Docs menu
What the car records
When the car's automatic data logger is on and off, which data each recording holds, and how to record hand driving.
The car does not log all the time. Bringup’s auto_record node records only while a driving algorithm is running, so hand driving and time spent with only bringup up are not recorded. Its settings are in auto_record.yamlGitHub, and the list of recorded topics is DEFAULT_TOPICS in recording.pyGitHub.
When it records
auto_record checks the ROS graph four times a second. A node with a publisher on one of the trigger topics counts as an algorithm, and recording starts 1.5 s after the first one appears. Recording stops 3.0 s after the last algorithm leaves the graph, which is normally when its launch is stopped with Ctrl+C.
| Situation | Recorded |
|---|---|
| Bringup running, nothing else | No |
Hand driving with teleop_launch.py or wiimote_teleop_launch.py |
No |
| Web dashboard or Foxglove open, no algorithm | No |
gap_follow_launch.py, pure_pursuit_launch.py, race_launch.py, neural_racer_launch.py, or team A’s ftg, disparity_extender or reactive running |
Yes, from 1.5 s after the node appears until 3.0 s after it stops |
map_course, auto_map_race_launch.py, record_run.py or ros2 bag record running |
Yes, by that launch’s own recorder. auto_record stays off while another recorder is on the graph |
Bringup started with record:=false |
No |
| 2 GB or less free on the disk | No. Terminal 1 and auto_record.log say why |
The trigger topics are /drive, /auto_map/drive, /auto_race/drive, /neural_racer/shadow_drive, /ackermann_cmd, /commands/motor/speed and /commands/servo/position. Bringup’s own ackermann_mux and ackermann_to_vesc_node publish on the last three all the time, so they are ignored, and so is a bag being played back (rosbag2_player). /teleop is left out on purpose, so hand driving never starts a recording.
The trigger is the algorithm’s node being on the graph, not the car moving. Time with the algorithm running and LB released is recorded, and so is any /teleop driving done while an algorithm is also running.
What a recording holds
The bag records every topic in the table that some node publishes. A topic that nothing publishes during the run is listed but holds no messages.
| Data | Topics | Published by |
|---|---|---|
| LiDAR scans | /scan |
urg_node, started by bringup |
| Wheel odometry | /odom |
vesc_to_odom_node, started by bringup |
| Drive commands | /drive, /teleop, /ackermann_cmd, /auto_map/drive, /auto_race/drive, /neural_racer/shadow_drive, /commands/motor/speed, /commands/servo/position, /safety/brake |
The algorithm, ackermann_mux and the VESC bridge |
| Controller buttons and sticks | /joy |
joy_node, started by bringup |
| VESC IMU and motor state | /sensors/imu/raw, /sensors/core, /sensors/servo_position_command |
The VESC driver, started by bringup |
| BNO085 and fused IMU | /imu/data, /imu/vesc/data, /imu/bno/raw, /imu/bno/data, /odom/fused, /steering/measured, /odom/imu, /imu_bridge/wheel_odom |
imu_bridge, only when a launch has started it (see below) |
| Map and position | /map, /map_metadata, /slam_pose, /pose, /slam_toolbox/graph_visualization, /pf/viz/inferred_pose, /odometry/filtered, /initialpose |
SLAM, the particle filter and the IMU stack, when running |
| Transforms | /tf, /tf_static |
Every node that publishes a frame |
| Logs and settings | /rosout, /diagnostics, /drive_intent, /parameter_events |
Every node |
Camera images are never recorded. No camera topic is in the list, on either car.
Besides the bag, the run folder holds the code version, the car’s calibration files, each node’s parameters and the files described in Record a run.
The BNO085
The BNO085 data comes from imu_bridge’s vehicle_state_launch.py, which bringup does not start. Whether a recording has it depends on the launch that started the run.
| Launch | Starts the IMU stack |
|---|---|
bringup_launch.py, teleop_launch.py |
No |
gap_follow_launch.py |
Yes, by default (steering_damping follows imu, which defaults to true). imu:=false turns it off |
map_course, race_launch.py |
Yes, by default (imu:=true) |
pure_pursuit_launch.py, auto_map_race_launch.py, neural_racer_launch.py |
No |
To have BNO085 data in a run whose launch does not start it, start the IMU stack in its own terminal before the algorithm:
ros2 launch imu_bridge vehicle_state_launch.pyKeep the car still for the first 3 s while imu_bridge measures the gyro bias. ros2 topic hz /imu/bno/data then shows messages arriving. The VESC’s own IMU, /sensors/imu/raw, is in every recording because bringup always starts it.
Record hand driving
auto_record never records hand driving. To record it, start the recorder by hand in its own terminal before driving:
ros2 launch race_diagnostics record_run.pyIt prints the run folder it created under ~/racerbot-ws/data/<id>/racerbot_runs/. It records the same topics as an automatic recording, /teleop included, until it is stopped with Ctrl+C. While it runs, auto_record stays off, so an algorithm started during it is recorded once, by this recorder.
Disk use
A recording takes about 0.8 MB per second of driving (3 GB an hour), almost all of it LiDAR scans, as measured in the workspace’s docs/run-diagnostics.mdGitHub. Bag files are split at 50 MB, so no file exceeds GitHub’s 100 MB limit when runs are pushed with tools/save_runs.sh.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| No run folder after a session of hand driving | /teleop is not a trigger topic |
Start record_run.py before driving |
| No run folder after an algorithm ran | Bringup was started with record:=false, the disk had 2 GB or less free, or another recorder had the run |
Read ~/racerbot-ws/data/<id>/racerbot_runs/auto_record.log, which has one line for every start, stop and refusal |
The bag has no /imu/bno/data messages |
The launch did not start the IMU stack | Start vehicle_state_launch.py before the algorithm, or use a launch from the table above that starts it |
| The start of the run is missing | The car moved before recording live appeared in terminal 1 |
Wait for recording live before holding LB. summarize_run prints STARTED LATE for such a run |
Limitations
- Recording starts 1.5 s after the algorithm appears, so anything the algorithm does in its first 1.5 s is not in the bag.
auto_recorddecides from the ROS graph, not from the car’s motion, so a long wait with the algorithm running and LB released fills the disk as fast as driving does.- The trigger topic list is fixed in
auto_record.yaml. An algorithm that publishes only on a topic outside it is not recorded.
Checked against workspace commit afda25b.