Robotics

SW2GZ exports SolidWorks assemblies to ROS 2 without URDF coding

Skip hand-written URDF — SW2GZ automates robot export from SolidWorks.

Deep Dive

SW2GZ, created by Aryan Arlikar, is a SolidWorks add-in that eliminates the tedious process of hand-authoring URDF files for robot simulation. It reads masses, inertias, joint frames, and mates directly from the SolidWorks assembly, then generates a fully functional ROS 2 package or Gazebo model. Three export modes are available: "Robot" produces a complete ROS 2 package with URDF/Xacro, launch files, ros2_control configuration, RViz setup, and a spawn world; "World" creates a standalone Gazebo Sim world (SDF + meshes); and "Asset" exports a single part or sub-assembly as a reusable Gz model. Joint types and axes are automatically inferred from SolidWorks mates—Lock becomes Fixed, Concentric becomes Revolute or Continuous, Angle becomes Revolute, Distance becomes Prismatic—with an optional manual axis pick for precision.

The add-in is currently live-tested on ROS 2 Jazzy + Gazebo Harmonic, while support for Humble/Fortress, Kilted/Ionic, and Rolling/Harmonic is wired into the pairing logic but still under development. Installation is straightforward: download the installer from the GitHub Releases page, and it runs alongside the original SW2URDF add-in. Although the tool is still early—some features like World launch/bridge generation are temporarily disabled due to a structural bug—the Robot mode and World mode are solid and fully functional. SW2GZ is a modernized fork of the classic solidworks_urdf_exporter by Stephen Brawner, rebuilt from the ground up for ROS 2 and Gazebo Sim (the original targeted ROS 1 + Gazebo Classic). The project is MIT-licensed and welcomes contributions.

Key Points
  • Three export modes: Robot (full ROS 2 package), World (standalone Gz Sim SDF), and Asset (reusable model).
  • Automatically maps SolidWorks mates to joint types—e.g., Concentric → Revolute, Distance → Prismatic—saving hours of manual URDF writing.
  • Live-tested on ROS 2 Jazzy + Gz Harmonic; other distros (Humble/Fortress, Kilted/Ionic, Rolling/Harmonic) in development.

Why It Matters

Eliminates manual URDF authoring, dramatically accelerating robot simulation workflows for SolidWorks-centric teams.

📬 Get the top 10 AI stories daily