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.
$ sim gazebo create <robot_name> <onshape_url>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: 432204Nothing 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
| 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.
The code rotates at 3am Pacific, and a lead can rotate it early, so an older one will not work. Ask for the current one. After several wrong codes the dashboard rate limits your network for an hour.
Set SIM_ACCESS_CODE and the prompt is skipped. There is no way to store the code
permanently, by design.