Click an OS badge to grab the latest prebuilt editor from the release page. Cross-platform for edit / build / export ; the extract step (driving SolidWorks over COM) is Windows + SolidWorks only .
Click an OS badge to grab the latest prebuilt editor from the release page. Cross-platform for edit / build / export ; the extract step (driving SolidWorks over COM) is Windows + SolidWorks only .
SolidWorks → robot (URDF) converter. Turn a SolidWorks assembly into a URDF, then clean it up in the browser.
New here? The tutorial ( 日本語 ) builds a quadruped in SolidWorks from three simple parts and turns it into a URDF; its files are in examples/quadruped .
One import package, with two subpackages:
sw2robot.exporter — the exporter. extract opens a throwaway copy of a .sldasm in a hidden SolidWorks instance and pulls the kinematic graph + per-link meshes into graph.json (slow, Windows + SolidWorks only). build turns that graph.json into a URDF (fast, headless, no SolidWorks). The original CAD file is never modified.
sw2robot.editor — a single-page browser editor on top of the graph: re-root the tree, change joint types (incl. Shift+drag box-select to bulk-set a range), edit root frames, set materials/densities, see live self-collision as you drag, auto joint limits from a self-collision sweep, and export a ROS / robot-compiler package.
How sw2robot relates to the classic exporter
sw2robot builds on — and is inspired by — the great, long-standing solidworks_urdf_exporter SolidWorks add-in. The two tools solve the same first mile differently, and they compose rather than compete:
The kinematic tree is inferred, not hand-built. The classic add-in asks you to lay out the link hierarchy and set each joint's origin and axis by hand inside SolidWorks. sw2robot instead reads the assembly's existing mates (constraints) to infer the link tree and joint axes automatically — then lets you correct anything it got wrong in the browser editor, rather than building it from scratch.
Editing is cross-platform. Only the extract step needs Windows + SolidWorks; edit / build / export run natively on Windows, macOS, and Linux from a single prebuilt binary — no SolidWorks and no Python.
It also edits URDFs the classic exporter produced. Already exporting with the classic add-in? Open that .urdf in sw2robot's editor to re-root the tree, retype joints, add limits/mimic, place end-coord frames, and re-export a ROS package. sw2robot works on any URDF, not only its own output.
An assembly the add-in already configured is read, not re-guessed. The add-in stores its whole configuration inside the .SLDASM ; sw2robot finds it and uses the authored link tree, names, frames and axes instead of inferring them. Add sw2urdf_config: sw2urdf_compat to the joint config to go further and reproduce the add-in's own export — its authored axis signs and the mass / inertia it computed — so a migrated URDF matches the one you already have.
Which one fits depends on your workflow, not on which is "better":
Install in one line (no Python, no clone)
A single command downloads the prebuilt editor for your OS, drops it on your PATH as sw2robot-web , and you're done. No Python, no cloning this repo.
…or with wget if you don't have curl :
Windows — in PowerShell:
Then launch the editor (it opens in your browser — xdg-open on Linux, the default browser elsewhere):
The installer picks the matching sw2robot-web- - asset from the latest release , installs it to ~/.local/bin (Windows: %LOCALAPPDATA%\sw2robot\bin ), and adds that dir to PATH if needed. Knobs:
Prebuilt binaries currently ship for Linux x64 , Linux arm64 , macOS (Apple Silicon) , and Windows x64 . Re-running the installer upgrades in place; the editor can also self-update from its own UI. Prefer to grab the file by hand, or need a different OS/arch? The per-OS steps below still apply.
Opening a .urdf with sw2robot
The installer also registers a .urdf file association, so you can hand a URDF straight to the editor the same way on Linux and macOS:
Either launches the editor with that URDF loaded (URDF-input mode). A .urdf also gets an Open With → sw2robot entry in the file manager / Finder, and sw2robot shows up in your application . Pass SW2ROBOT_NO_DESKTOP=1 to the installer (or --no-desktop ) to skip this. Linux needs xdg-utils installed for the association; without it the binary still installs and the step is skipped with a note.
Quick start — download the Windows .exe (no Python)
If you just want to convert a SolidWorks assembly, you don't need to install Python or clone this repo. Grab the prebuilt editor and run it:
Download. Go to the latest release and download sw2robot-web-windows-x64-v .exe (under Assets ). It's a single self-contained file — nothing to install.
Run it. Double-click the .exe . A console window opens, a local server starts, and your default browser opens the editor at automatically. Windows SmartScreen may warn that the publisher is unknown (the binary is unsigned). Click More info → Run anyway . To pick a different port or skip auto-opening the browser, run it from a terminal: sw2robot-web-windows-x64-v .exe --port 9000 --no-browser .
Windows SmartScreen may warn that the publisher is unknown (the binary is unsigned). Click More info → Run anyway .
To pick a different port or skip auto-opening the browser, run it from a terminal: sw2robot-web-windows-x64-v .exe --port 9000 --no-browser .
Extract a robot. Open your .sldasm assembly with the in-app file picker — the 🗄 file browser (lists SolidWorks' recent files for one-click access) or 📋 paste a full path . SolidWorks needs the real on-disk path to resolve referenced parts, which a browser never exposes for a drag-and-dropped file, so the editor opens by path rather than by drop. The app drives a hidden SolidWorks instance to pull the kinematic graph + meshes. Your original CAD file is never modified. Extracted packages are written to %TEMP%\sw2robot\output . The extract step needs SolidWorks installed on the same machine — the app talks to it over COM; it does not embed SolidWorks. No SolidWorks? You can still open and edit an already-extracted package, and the build / export steps work without it.
The extract step needs SolidWorks installed on the same machine — the app talks to it over COM; it does not embed SolidWorks.
No SolidWorks? You can still open and edit an already-extracted package, and the build / export steps work without it.
Clean it up. In the editor: re-root the tree, set joint types (Shift+drag to bulk-set a range), edit the root frame, set materials and densities, watch live self-collision as you drag joints, and run the auto joint-limit sweep.
Export. Export a ROS / robot-compiler package (URDF + meshes + configs) from the editor, ready to drop into your workspace.
Closing the console window stops the server and tears down the SolidWorks instance it spawned.
Quick start — macOS / Linux (no SolidWorks)
SolidWorks does not run on macOS / Linux, so the extract step (assembly → graph) is Windows-only. Everything else — open & edit an already-extracted package, open & edit any URDF, build, and export — runs natively on macOS and Linux.
Option A — download the prebuilt editor (no Python). Grab the asset for your OS from the latest release (under Assets ):
macOS (Apple Silicon) — sw2robot-web-macos-arm64-v .zip . Unzip it to get sw2robot-web.app ; double-click to launch (it opens the editor in your browser at ).
Linux (x64) — sw2robot-web-linux-x64-v (a single binary):
The binary is frozen against GLIBC 2.35, so it runs on Ubuntu 22.04 or newer (22.04, 24.04, …). On older distros you may hit a GLIBC_2.xx not found error at launch — in that case run from source (Option B below) instead.
Option B — run from source (see Install from source below):
The editor opens in URDF-input mode when you point it at a .urdf file: re-root, retype joints, set mimic/limits/materials, add end-coord ports, and re-export a ROS package — then closing the tab leaves your original .urdf untouched.
Editor — features & keyboard shortcuts
Everything below edits the package server-side and rebuilds the URDF in place (~0.5 s), so the viewer always shows the real exported result.
Make root — pick any link and make it the base; the tree is re-rooted and every edge between the old and new root is flipped automatically.
Joint types — toggle a joint fixed ↔ movable, or Shift+drag a box over the tree to bulk-set a whole range at once.
Flip axis — reverse a joint's positive direction in one keystroke.
Mimic — link follower joints to a master so they move together; set a multiplier and offset per follower (URDF ). Move the master and the followers track it live.
Delete subtree — drop a link and everything below it.
Actuator & physics — per movable joint, set effort/velocity and the optional URDF (damping/friction), (soft limits, k_position, k_velocity) and (rising/falling). Blank fields stay unset. Persisted in joints.yaml , so they survive a re-extract (or hand-edit the same keys under each joint in joints.yaml ).
Root frame — rotate the root its current axes or type exact numbers; or click a face to align the root to it (origin = face center). Written as root_rpy / root_xyz in joints.yaml .
⊕ Port (end-coords) — click a face to drop a named, coordinate-only link there with +Z = the face normal , then nudge it with the gizmo ( g move / r rotate) and Place . Handy for end-effector, sensor, or mount frames. Click a magenta marker to remove one. Stored under ports: in joints.yaml .
Export shape + weight? — the checkbox on each link row in the joint tree. Uncheck it for a CAD-only part (a dummy_axis drawn just to carry a joint axis): the link and its joint stay in the tree, but the URDF gets a bare frame — no , no , no . Stored as frame_only: in joints.yaml . (Different from mass-only , which keeps the weight and only works on a fixed child.)
CAD coordinate systems — every named SolidWorks coordinate system (in the assembly, a sub-assembly, or inside a part file) becomes one of these coordinate-only links automatically, on the part it was drawn in — or, for a frame drawn in the top-level assembly, on the component its origin was picked from. Turn it off or pick a subset with coordinate_system_links: off | all | [ , ...] in joints.yaml ; the default skips frames an embedded SW2URDF config already uses as link origins.
Authoring aids — live self-collision highlight as you drag a joint, an auto joint-limit sweep, per-link materials/densities, a tf view (frame triads + parent links), and a sizeable ground grid.
— left-drag orbits, right-drag pans, the wheel dollies right into the assembly so you can inspect internal parts. Double-click a link to make it the orbit centre (then orbit and zoom around that part); press v to recentre the orbit on it, or c for a full view reset.
Keyboard shortcuts (with a link selected or hovered):
In a port/end-coords placement session the gizmo owns the keys: g move, r rotate, Esc cancel.
Install from source (developers)
Prefer this if you want to hack on sw2robot or run it on a non-Windows machine (view / edit / build / export work anywhere; only extract needs Windows + SolidWorks).
[ui] adds python-fcl (collision queries); scikit-robot (FK, primitive fitting) is a core dependency. The editor's view / edit / extract / build work without [ui] ; collision and auto-limits just report "not available" until it is installed.
Extract a .sldasm -> URDF (Windows, with SolidWorks installed):
Or a single .sldprt -> URDF. Point the exact same command (or the editor's 🗄 file browser / 📋 path bar) at a lone part instead of an assembly:
A single part has no mates to infer a kinematic tree from, so this yields a trivial 1-link, 0-joint URDF — one rigid body with the part's mesh and its SolidWorks-native mass / centre-of-mass / inertia tensor (exact CAD geometry
material, not a mesh estimate). Handy for a static prop, an environment object, or a single end-effector/sensor body you want in a simulator with an accurate inertial. It will not turn a multibody part into a jointed robot — that needs an assembly with mates.
Open the browser editor on an already-extracted package (no SolidWorks needed — a sample is included):
From the editor you can also extract a fresh package: open a .sldasm with the in-app file picker (🗄 file browser of SolidWorks' recent files, or 📋 paste a full path) and it drives SolidWorks for you. It opens by real on-disk path — not by browser drag-and-drop, which never exposes the path SolidWorks needs to resolve referenced parts.
Headless build / edit / export (no GUI):
Export a MuJoCo model. --mujoco writes a standalone _mjcf package — an MJCF model plus its binary-STL assets — to the URDF one, and the editor has the same thing as a ⬇ MuJoCo (MJCF) button:
A URDF that loads in RViz is not yet a model you can train on, so the export does more than change file format. It merges fixed links (MuJoCo has no use for one body per screw), then derives from the CAD itself:
per-joint damping of effort / velocity — the torque-speed slope of that joint's own servo, so a leg cannot be swung faster in sim than the real motor can drive it;
a sphere per foot , sized from that foot's own patch and tangent to its lowest point, because the convex hull of a flat bracket end gives points that jump around under a walking policy;
an IMU site and the sensors a locomotion task looks up by name ( imu_ang_vel , imu_lin_vel , imu_lin_acc , root_angmom );
a keyframe whose base height is computed so nothing starts below the floor.
The base floats by default. --mujoco-fixed-base welds it to the world for an arm bolted to a table — which also drops the foot spheres and the IMU, both legged-robot features. --mujoco-armature takes the reflected rotor inertia, the one number a CAD model cannot supply (it depends on the motor and the gear ratio), and defaults to 0. --collision applies here as it does to the ROS package.
Feeding it to an RL framework that brings its own actuator model (mjlab, say, which deletes the MJCF's actuators and keyframe and substitutes its own) needs two things: --mujoco-no-backemf-damping , so the joint is not damped twice, and foot names that match what the task config selects on. The sphere and site are named after the link ( FL_foot_toe , FL_foot ) unless you say otherwise; write_mjcf_package(foot_links={"FL_foot": "FL", ...}) names them after the leg instead ( FL_toe , FL ), which is the usual locomotion-task convention.
The MJCF itself is written by skrobot.urdf.urdf_to_mjcf , which is also where the per-joint damping and the measured base height come from. Real CAD meshes routinely include shapes MuJoCo's compiler refuses — a material-split single triangle, a stamped part with zero enclosed volume, a perfectly flat sheet — so this needs scikit-robot 0.3.34 or newer ; on 0.3.33 such an assembly fails with mesh volume is too small or at least 4 vertices required .
Export for Isaac Sim (or any PBR renderer). --isaac writes a standalone _isaac package to the URDF one: mesh references relative to the URDF file (no ROS package path to set up), .glb visuals and .stl collision, and no ROS build files.
For a fixture (a rig, a table, anything welded to the floor) add --world-link , or world_link: true in the joint config: a massless world root fixed to the base link at the base's assembly pose, so the URDF's origin is the CAD assembly's origin. Without it the base part's own frame becomes the origin, and a rig whose base part sits 74 mm above the CAD floor loads 74 mm into the simulator's ground. It is off by default, and independent of --isaac , because a mobile robot must not be welded to the CAD origin; --no-world-link overrides a config that turns it on.
Each .glb carries one glTF PBR material -- metallic / roughness -- on top of the CAD's per-face colours, which is what makes an aluminium extrusion read as aluminium rather than grey clay. A .glb with no material is, by the glTF spec, a fully rough metal, and that is what every mesh exported before this looked like in Isaac Sim. The finish comes from, in order: a materials: override in the joints config ( link_name: chrome , or link_name: {metallic: 1.0, roughness: 0.3} ; presets in sw2robot/exporter/pbr.py ); the part's SolidWorks appearance ( satin finish aluminum , chromium plate , black low gloss plastic , ... -- read at extract time and recorded on the link's ); the part's SolidWorks material name ( 6061 Alloy , ABS ); else a neutral dielectric. Measured on Isaac Sim 6.0.0: its URDF importer takes the .glb geometry but drops the materials and even the colours, so for Isaac Sim convert the package with scikit-robot's urdf_to_usd instead (it binds a UsdPreviewSurface per finish from the glTF material and the result renders as expected); add a dome light with an HDRI before judging the metals. three.js and trimesh read the glb materials directly.
Fast re-extract while debugging. Keep the assembly open in SolidWorks, then:
graph.json — the intermediate representation
Everything after extract reads only graph.json and the meshes beside it, so any CAD can feed the build by writing that file. sw2robot/exporter/graph.schema.json is the contract as a JSON Schema, and the extractor does not need to import sw2robot.
Lengths are metres, angles are radians, and poses are in the top-level document's frame. .3dxml meshes are millimetres; every other mesh format is metres.
edges hold raw constraints (mates), and the build infers joints from their geometry. joints hold joints the source declared — type, axis, limits, and source ( cad / inferred / user / ai ). The build uses a declared joint as given. Set use_declared_joints: false in the joint config to infer every joint from the mates instead.
A component's color (RGBA, 0–1) paints a part whose mesh carries no colour, such as an STL written from code. It reaches the URDF as a and every export built from it. A joint config colors: entry still wins, and a part with neither keeps its mesh's own colours.
schema_version is 2. A file without it loads as version 1. A file newer than the installed sw2robot is refused.
Robots written in code
GraphBuilder writes a package straight from code, such as build123d shapes, trimesh meshes, or mesh files. The author states the joints, so there is nothing to infer. unit="mm" scales meshes, poses, and axis points to metres. A part's inertia comes from its mesh and its density or mass , and color ( "#RRGGBB" or 0–1 floats) is how it is drawn.
When exactly one part is fixed, it becomes the graph's base , the root of the tree. A graph without a base roots the tree at the part the most others attach to. A base: in the joint config overrides both.
sw2robot-check reports problems in a package. Each finding has a stable code , a severity, and the names of the parts involved, so a script or an agent can act on it. For example, joint-motion-blocked means the mates do not allow a declared joint's motion. The command exits with 1 if any finding is an error.
sw2robot-sim loads an exported MJCF in MuJoCo and runs it for a moment, starting from the keyframe. It reports parts that start overlapping, a model that blows up, and a base that falls through the floor, using the same finding format. It needs pip install "sw2robot[sim]" .
sw2robot-mcp serves these checks, the build, and the schema as MCP tools ( check_package , build_package , simulate_package , graph_schema ). It runs over stdio and needs pip install "sw2robot[mcp]" , plus [sim] for simulate_package .
Several agents on one PC
Every SolidWorks client normally gets the same SLDWORKS.exe, so agents running side by side would edit each other's documents. Give each one its own:
Only one SolidWorks can be starting at a time (several launched at once exit before they are ready), so start waits its turn and prints a line every 10 s while it waits. Jobs in different processes then run in parallel; without SOLIDWORKS_PID they one SolidWorks and queue. sw2robot-solidworks list shows which processes can be pinned this way.
Some pytest fixtures expect a cached output/ /graph.json ; those skip when absent.
Please read CONTRIBUTING.md before opening an issue or pull request. In short: first via an issue, keep PRs small and focused, attach a demo video for UI changes, and disclose any AI usage.
Apache License 2.0
Release files for sw2robot 0.4.14
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation .
Source distribution (sdist)
Built distribution (wheel)
Total release size: 1.9 MB
Release files / sw2robot-0.4.14.tar.gz
Provenance describes where a file came from. On PyPI, provenance is shared via attestations , which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Release files / sw2robot-0.4.14-py3-none-any.whl
Provenance describes where a file came from. On PyPI, provenance is shared via attestations , which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Security for sw2robot 0.4.14
Provenance describes where a file came from. On PyPI, provenance is shared via attestations , which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Both files in this release have been uploaded with provenance metadata.
Attestation for sw2robot-0.4.14.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Attestation for sw2robot-0.4.14-py3-none-any.whl
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
Release history Release notifications | RSS feed
Nov 27, 2026 2 release files Full provenance
Nov 13, 2026 2 release files Full provenance
Nov 4, 2026 2 release files Full provenance
Nov 4, 2026 2 release files Full provenance
Nov 4, 2026 2 release files Full provenance
Oct 25, 2026 2 release files Full provenance
Oct 24, 2026 2 release files Full provenance
Oct 22, 2026 2 release files Full provenance
Oct 20, 2026 2 release files Full provenance
Oct 20, 2026 2 release files Full provenance
Sep 15, 2026 2 release files Full provenance
Aug 31, 2026 2 release files Full provenance
Aug 27, 2026 2 release files Full provenance
Aug 26, 2026 2 release files Full provenance
The full story
This article is one source in a clustered incident — the cluster page carries the summary, timeline and every other outlet covering it.
