Turn a SolidWorks assembly into a ready-to-launch ROS 2 package or Gz Sim model — meshes, URDF/Xacro, SDF, and launch files generated for you.
flowchart LR
A[SolidWorks<br/>model] -->|SW2GZ| B{Pick mode}
B --> C[Robot Package<br/>URDF · launch · control]
B --> D[SDF Model]
B --> E[SDF World]
C --> G[ros2 launch → Gz Sim]
D --> G
E --> G
style A fill:#e3242b,stroke:#fff,color:#fff
style B fill:#FB8C00,stroke:#fff,color:#fff
style G fill:#22314E,stroke:#fff,color:#fff
- Download the latest
SW2GZ-Setupinstaller from the Releases page. - Run it as administrator.
- In SolidWorks, open
Tools → Add-Insand enable SW2GZ.
Installs alongside the original SW2URDF add-in — both can run together.
- Open an assembly in SolidWorks.
Tools → SW2GZ → Export to ROS 2 / Gz.- Pick a mode, ROS 2 distro, Gz version, and output folder.
- Configure the link tree, then Finish Export.
- Build and launch:
cd <output>/<robot>_ws && colcon build
ros2 launch <robot>_description gz_sim.launch.py| Mode | What you get |
|---|---|
| Robot Package | Full ROS 2 package: URDF/Xacro, launch files, ros2_control config, RViz, a world |
| SDF Model | Standalone Gz model: model.config, model.sdf, meshes |
| SDF World | Standalone Gz world with physics, sun, and ground plane |
ROS 2 distro and Gz version are paired automatically:
| ROS 2 Distro | Gz Version |
|---|---|
| Humble | Fortress |
| Jazzy | Harmonic (default) |
| Kilted | Ionic |
| Rolling | Harmonic |
examples/three_dof_arm_ros2/ is a package SW2GZ produced
from the bundled 3-DOF arm (Jazzy + Harmonic).
- Build from source: BUILD.md
- Contributing & internals: CONTRIBUTING.md
- Release history: CHANGELOG.md
A modernized derivative of
solidworks_urdf_exporter by Stephen
Brawner. The ROS 2 + Gz Sim port, new writers, installer, and tooling are by Aryan Arlikar.
MIT — see LICENSE. Third-party components: THIRD-PARTY-LICENSES.md.
"SolidWorks" is a trademark of Dassault Systèmes; SW2GZ is independent and not affiliated with or endorsed by Dassault Systèmes.