Docs menu
Launch, watch and stop
Start the foundation and exactly one control layer, check the controller and servo from a third terminal, and shut down without killing the drivers.
Every mode on the car has two layers, each launched in its own terminal. The foundation runs the drivers and the command mux and never moves the car by itself. The control layer decides what the car does, and only one runs at a time, because a second one’s commands reach the same mux.
Launch
Terminal 1, the foundation: the gamepad reader, the VESC chain, the LiDAR and the mux.
ros2 launch f1tenth_stack bringup_launch.pyWorking when: the output settles with no repeating red errors and the car sits still.
Terminal 2, one control layer:
ros2 launch f1tenth_stack teleop_launch.pyThat is manual driving: hold LB, the left stick sets speed and the right stick steers. For reactive autonomy, launch ros2 launch gap_follow gap_follow_launch.py instead, with a person standing by at the power switch while you hold LB. The command reference has the launch for every other mode.
Tune a node by editing its config/<pkg>.yaml, not the code: every value there is a declared ROS parameter. To try values without changing the packaged file, copy the YAML and point the launch at the copy.
Watch
From a third terminal, sourced the same way:
ros2 topic echo /joy
ros2 topic echo /commands/servo/positionWorking when: buttons[4] in /joy reads 1 while LB is held, and the servo position changes as you move the right stick. If buttons[4] never reaches 1, the controller is in DirectInput mode; set the switch on its back to XInput. The dashboard shows the map, LiDAR and pose live from a browser.
Stop
- Press
Ctrl+Cin the control-layer terminal. OneCtrl+Cstops every node that launch started. The foundation can stay up for the whole session. - Stop the foundation with
Ctrl+Cwhen the session ends. - Power down the VESC and the battery last, after every ROS node has stopped.
Do not run pkill -f joy_teleop. The command line of joy_node contains the same text, so the pattern kills both, and ros2 launch then shuts down the whole bringup, VESC and LiDAR included. For a stuck node, use the dashboard’s processes panel or a unique pattern such as pkill -f "__node:=joy_teleop".
Without the car
Each workspace has a simulator that stands in for the LiDAR, VESC and gamepad, so the real driving stack runs unchanged above it. It refuses to start beside the real drivers. The simulators page covers the workflow, including watching a simulated run on the dashboard.