Skip to content
Commits on Source (3)
%% Cell type:markdown id:d43c825ac8d07479 tags:
### LogReader example ###
Each message has this form (timestamp, (NAME, data_dictionary)
Data dictionary have those keys:
- mission_id - id of mission (Int)
- ASM - Autonomous state machine state (Int)
- car_status - The status of the whole car (Int)
- finished - If the car has finished the run (Bool)
- steering_angle_setpoint - Requested angle of steering wheel by autonomous system (Float)
- steering_angle - Actual angle of steering wheel (Float)
- speed_setpoint - Requested speed by autonomous system (Float)
- mission_log - Log of the mission (Dictionary)
- mission_kwargs - Arguments for the mission (Dictionary)
- mission_kwargs keys:
- ins_position - Position from global navigation system (Tuple, x,y)
- ins_velocity - Velocity from global navigation system (Tuple, x,y,z)
%% Cell type:code id:748cbe7232f736f4 tags:
``` python
from helpers import LogReader
for msg in LogReader('mission_17_10_2023-16_29_04.pkl'):
print(msg)
break
```
%% Output
(4591.728406698, ('FRAME', {'mission_log': {}, 'mission_kwargs': {'percep_data': array([], shape=(0, 3), dtype=float64), 'actual_speed': 0.0, 'actual_steering_angle': 0.0, 'ins_position': array([0., 0.]), 'ins_velocity': (0.0, 0.0, 0.0), 'ins_heading': 0.0, 'ins_status': (0, 0, 0), 'switch': 0}, 'steering_angle': 0.0, 'motor_command': None, 'mission_id': 'NoValue', 'ASM': 0, 'car_status': <CarState.NOT_READY: 0>, 'finished': False, 'mission_status': {}}))
%% Cell type:markdown id:2d335ffc tags:
We have provided you with log file from our SIL (Software in the loop) testing.
The log contains 100 laps on our simulated test track, your task is to find the fastest and slowest lap from those 100.
You should provide us with the lap time and the lap number.
For the slowest and fastest lap you should also provide is with plotted graph of the lap.
The graph should contain the following information:
- Speed (visualized as color of the line, heat map in simmilar style as in the example below)
- Plot in global x,y coordinates such as in the example below
<img src="example.png" style="height:300px" />
%% Cell type:code id:b6104136 tags:
``` python
### HERE YOU SHOULD IMPLEMENT YOUR CODE ###
```
%% Cell type:markdown id:63658942edfb5097 tags: