Docs Run the car Workspace repo
Docs menu

Quickstart

Every command for running the car on one page, each with a single line saying what it does.

Commands only. The command reference gives the output that shows each one is working, and the options each one takes.

Set up a terminal

Run both lines in every new terminal before any ros2 command.

source /opt/ros/jazzy/setup.bash
source ~/racerbot-ws/install/setup.bash

Check the hardware

The doctor checks every device from USB up to its ROS topic and ends with 0 FAIL when the car is ready.

ros2 run racerbot_doctor doctor

Start the hardware

Bringup starts the gamepad, LiDAR and VESC drivers in Terminal 1, and every mode below runs on top of it.

ros2 launch f1tenth_stack bringup_launch.py

Drive with the gamepad

Hold LB and drive with the sticks, from Terminal 2 with bringup running.

ros2 launch f1tenth_stack teleop_launch.py

Pair a Wiimote

This one-time setup checks the Bluetooth stack layer by layer and pairs the Wiimote.

ros2 run racerbot_wiimote_driver wiimote_connect

Drive with a Wiimote

Run this in place of teleop_launch.py, never alongside it.

ros2 launch racerbot_wiimote_driver wiimote_teleop_launch.py

Follow the gap

The car drives itself without a map while LB is held.

ros2 launch gap_follow gap_follow_launch.py

Follow the gap at a lower speed

Caps the top speed for this run only.

ros2 launch gap_follow gap_follow_launch.py max_speed:=1.0

Map a course

Drives three laps with gap_follow while SLAM builds the map, then saves the map and racing line and prints the race commands.

ros2 run racerbot_launch map_course

Race a saved map

Localizes on the map from the start pose and follows the racing line with pure pursuit.

ros2 launch racerbot_launch race_launch.py run_dir:=$HOME/racerbot-ws/data/<id>/racerbot_auto/<run>

Race with another steering law

Replace stanley with lqr or mpc to race the same line with a different controller.

ros2 launch racerbot_launch race_launch.py run_dir:=$HOME/racerbot-ws/data/<id>/racerbot_auto/<run> steering_law:=stanley

Find the newest run folder

Lists the three most recent mapping runs, newest first.

ls -t ~/racerbot-ws/data/<id>/racerbot_auto | head -3

Map and race in one run

Maps the course and hands over to pure pursuit without a restart, and starts the hardware itself, so run it instead of bringup.

ros2 launch racerbot_launch auto_map_race_launch.py

Start the dashboard

Serves the car to dashboard.sfuracerbot.ca and can run alongside any mode.

ros2 launch racerbot_launch dashboard_launch.py

Stream the camera

Starts the car’s camera for the dashboard: car 1’s USB webcam or car 2’s RealSense D435i, chosen from the car profile.

ros2 launch racerbot_launch camera_launch.py

Calibrate odometry

Opens the calibration wizard on port 8090, with bringup and teleop running in Terminals 1 and 2.

ros2 launch odom_calibration odom_calibration_launch.py

Record a run

Start the recorder in its own terminal before the mode you want to record.

ros2 launch race_diagnostics record_run.py

Summarize a run

Prints a summary of a recorded run.

ros2 run race_diagnostics summarize_run ~/racerbot-ws/data/<id>/racerbot_runs/<ts>

Analyze a run

Writes analysis/report.md in the run folder, with the cause of every stop.

python3 ~/racerbot-ws/tools/run_analysis/analyze_run.py ~/racerbot-ws/data/<id>/racerbot_runs/<ts>

Simulate mapping and racing

Runs the full map-then-race flow without the car, and refuses to start while the real drivers are running.

ros2 launch racerbot_sim sim_auto_map_race_launch.py

Test gap_follow without ROS

Drives gap_follow’s logic on every indoor layout in a few seconds.

python3 ~/racerbot-ws/tools/f1tenth_sim/sweep_gap.py --track indoor --seeds 6

Stop a stuck process

Press Ctrl+C in each terminal first, control layer before bringup, and use this only for what is left.

pkill -f "joy_node|joy_teleop|vesc_driver_node|urg_node_driver|ackermann_mux|ackermann_to_vesc_node|vesc_to_odom_node|static_transform_publisher|gap_follow_node|slam_toolbox|particle_filter|pure_pursuit_node|waypoint_recorder_node"

Checked against car 1 commit 0265263 and car 2 commit b81b291, before the two workspaces merged.