Scripts
All scripts live in the scripts/ directory at the repository root. They’re designed to be run from the project root.
launch_sim.sh
Section titled “launch_sim.sh”The main entry point for running simulations. Builds the ROS 2 workspace and launches Gazebo with the specified robot.
./scripts/launch_sim.sh <robot_name> [flags]Flags:
| Flag | Description |
|---|---|
--no-build | Skip the colcon build step |
--build-only | Build only, don’t launch |
--help | Print usage and exit |
What it does:
- Validates that
<robot>_bringupand<robot>_descriptionpackages exist inrobot-sim/ - Runs
colcon build --packages-up-totargeting the robot’s packages plussim_worldsandsim_common - Sources
install/setup.bash - Sets
GZ_SIM_RESOURCE_PATHfor Gazebo world file discovery - Runs
ros2 launch <robot>_bringup <robot>.launch.py gui:=true
Logging: All output is teed to robot-sim/log/<robot>-gazebo-<timestamp>.log with ANSI codes stripped.
Source: scripts/launch_sim.sh
start_x_server.sh
Section titled “start_x_server.sh”Starts a complete headless X11 desktop inside the container so Gazebo, RViz, and other GUI apps can render.
./scripts/start_x_server.sh [-v|--verbose]What it starts (in order):
- Xorg — virtual X server using the dummy display driver, configured via
/etc/X11/xorg.conf - Openbox — lightweight window manager for window decorations and resizing
- x11vnc — VNC server on port
5900for remote access to the X display - noVNC — web-based VNC client on port
6080, accessible athttp://localhost:6080/vnc.html
Environment variables used (set in the Dockerfile):
DISPLAY— X display identifier (:1)VNC_PORT— VNC server port (5900)NOVNC_PORT— noVNC web port (6080)
The script traps SIGINT/SIGTERM and cleans up all child processes on exit.
Source: scripts/start_x_server.sh
clean_build.sh
Section titled “clean_build.sh”Deletes ROS 2 build artifacts to resolve unexplained build failures.
./scripts/clean_build.shRemoves build/, install/, and log/ from the robot-sim/ directory. This is also run automatically as the Dev Container’s postCreateCommand.
Source: scripts/clean_build.sh
attach_to_container.sh
Section titled “attach_to_container.sh”Opens a new interactive terminal inside a running Dev Container. Run this from the host machine, not inside the container.
./scripts/attach_to_container.shIt finds the running VS Code Dev Container by matching the image name vsc-gazebo-simulations, then attaches with docker exec as the trickfire user. Useful when you need extra terminal sessions beyond what VS Code provides.
Source: scripts/attach_to_container.sh