First Simulation Run¶
End-to-end walkthrough: simulator → stand → plan → walk to a clicked goal. Should take ~10 minutes from a clean install.
What you'll see¶
By the end of this tutorial:
- A Go2 (or Spirit) standing in Gazebo
- A planning stack producing a global path you can re-target with a click in RViz
- The local planner producing a 26-step body plan + footstep schedule
- The robot walking along the path
0. Prep¶
You should have completed Installation and source install/setup.bash in every terminal.
1. Launch the simulator¶
The quad_gazebo.py launch file accepts these parameters:
| Param | Default | Purpose |
|---|---|---|
robot_configs |
Single Go2 at origin | JSON list of robots and their configs |
gui |
false |
Show the Gazebo viewer |
paused |
false |
Start paused |
world |
flat.sdf |
Pick a world from quad_simulator/gazebo_scripts/worlds |
live_plot |
false |
Auto-launch PlotJuggler |
dash |
false |
Auto-launch the rqt dashboard |
logging |
false |
Record a bag |
obstacles |
[] |
JSON list of static obstacles |
scenario |
none |
Named obstacle scenario |
use_sim_time |
true |
Use Gazebo clock |
Inspect the running processes:
2. Stand the robot¶
The robot ramps to its nominal stance. If it doesn't:
- Check
ros2 topic echo /robot_1/state/ground_truth --once— there should be a quaternion + 12 joint angles - Check
ros2 topic hz /robot_1/joint_states— should report ≥ 500 Hz - Drop
stand_kpinquad_utils/config/<robot>.yamlif the robot oscillates
3. Launch the planning stack¶
Key params:
| Param | Default | Purpose |
|---|---|---|
reference |
gbpl |
Plan source — gbpl for global planner, twist for cmd_vel only |
twist_input |
none |
keyboard, joy, or none |
leaping |
true |
Allow flight phases in the global plan |
logging |
false |
Record a bag |
You should see in ros2 topic list:
/robot_1/global_plan/robot_1/local_plan/robot_1/foot_plan_continuous/robot_1/foot_plan_discrete
4. Set a goal¶
Open RViz (auto-launched by quad_visualization.py or run manually with the provided RViz config), then use the Publish Point tool. Click somewhere on the terrain and the global planner picks it up via /clicked_point.
Alternatively, set a default goal via param:
5. Walk¶
The robot tracks the local plan. To redirect, click a new goal in RViz and the global planner will replan toward it.
6. Drive with cmd_vel instead¶
For a hand-driven test:
Teleop keys:
q/z— increase/decrease speed scale 10%w/x— adjust linear onlye/c— adjust angular only
Troubleshooting¶
Robot collapses on stand
The most common cause is gain mismatch. Reduce stand_kp in the per-robot YAML. If joints jitter, reduce stand_kd.
NMPC reports Restoration_Failed
Reference is infeasible. Check the global plan is reachable, friction mu matches the simulation surface, and cmd_vel_scale isn't pushing past kinematic limits.
RViz crashes when using Publish Point
Known NVIDIA driver / interactive-marker issue. Use xrdp or set LIBGL_ALWAYS_SOFTWARE=1 for visualization-only sessions.
Robot drifts laterally on stand
IMU bias. With the robot at rest, run the calibration step in your platform's bringup sequence.
Next steps¶
- Logging & Playback — record runs, replay, post-process
- Adding a new robot — extend the SDK to a new platform
- Writing your own controller — drop in a custom
LegController