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 request long-term. Authentication is required. You can do it with the following command:
$ sim gazebo authThen you can create the robot using:
$ sim gazebo create <robot_name> <onshape_url>Flags
| Flag | Description |
|---|---|
--attach-to-world | Fix base_link to the Gazebo world (stationary robots) |
--no-attach-to-world | Explicitly skip - for mobile robots |
--no-reduce | Skip 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:
$ sim gazebo update armThis 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
Joints must be defined as mates in the OnShape assembly. Check the OnShape model if joints don't appear in the generated controller YAML.
sim gazebo create post-processes the raw OnShape URDF (mesh paths, control xacro
generation, indentation). Check the OnShape assembly for unexpected geometry or joint
definitions if the generated URDF still looks wrong afterwards.
Your API key may be invalid or expired. Generate a new one at dashboard.trickfirerobotics.com → Settings → CLI access.