Gazebo

Adding a New Robot

How to generate ROS 2 packages from an OnShape CAD model and get a new robot running in Gazebo.

The command sim gazebo create takes a robot from OnShape and produces two ROS 2 packages. To make sure we do not hit the low OnShape API limits, requests to OnShape are routed through the dashboard that authenticates you and caches common requests long-term.

Getting access

You do not need a dashboard account or any setup. sim gazebo create asks for the club's 6-digit sim access code when it needs to talk to OnShape, and any lead can read the current one off dashboard.trickfirerobotics.com → API Keys.

Terminal
$ sim gazebo create <robot_name> <onshape_url>
Text
This needs the sim access code. Any lead can read the current one off
https://dashboard.trickfirerobotics.com → API Keys. It rotates at 3am.

Access code: 432204

Nothing is saved to your machine, so every create and update asks again. The code rotates automatically at 3am Pacific and a lead can rotate it early at any time, so grab a fresh one if yours stops working.

Only sim gazebo create and sim gazebo update ever ask. Running an existing robot needs no code at all, since the generated packages are committed to this repo.

Flags

FlagDescription
--attach-to-worldFix base_link to the Gazebo world (stationary robots)
--no-attach-to-worldExplicitly skip - for mobile robots
--no-reduceSkip STL mesh decimation (larger files, higher detail)
--output-dir <path>Write packages somewhere other than gazebo/

Updating an existing robot

When the OnShape CAD changes, pull in the new geometry without touching your bringup config using this command:

Terminal
$ sim gazebo update arm

This replaces only arm_description/urdf/arm.urdf and arm_description/meshes/. Everything else, your control xacro edits, launch file, controller YAML, RViz config is left untouched.

Troubleshooting

On this page