Running the Simulator
Drive the Bolt in CARLA with the same ROS 2 topics as the real car. CARLA runs on the sim server; you work from your Coder workspace.
1. Open your workspace
In Coder, open VS Code and Desktop. rviz shows up in the Desktop tab.
2. Start the car
In a VS Code terminal:
uv run ~/bolt-ros2/sim/spawn_bolt.py --autopilot
This puts the Bolt and all its sensors in CARLA. Leave it running; Ctrl+C removes the car.
Drop --autopilot if you want to drive it yourself.
3. Start ROS and rviz
In a second terminal:
cd ~/bolt-ros2 && docker compose run --rm dev
This opens a shell in the bolt-ros2 container and builds the code (the first time takes a few minutes). Then:
ros2 launch bolt2_launch bolt.launch.py mode:=sim rviz:=true
The sensors appear in rviz on the Desktop tab. To stop, press Ctrl+C in both terminals.
What you get
The sim publishes the same topics and TF as the car, so your code works on both:
Sensor positions come from vehicle/src/bolt2_launch/cfg/sensors.yaml. On the car, the same launch file runs the real
drivers: mode:=real.