Tutorials PartCraft help Walkthroughs

Export an assembly as a robot description (URDF, MJCF, SDF)

Write an assembly's parts, joints, limits, couplings, masses and meshes as URDF, MJCF and SDF files for robot simulators, and read what the report says was left out or filled in.

Written for PartCraft 0.12. The same help is inside the app: press F1.

In an assembly choose Export › Robot description (URDF, MJCF, SDF). You get a .zip with the files you ticked, a meshes folder with one STL for each different part, and export-report.txt. PartCraft's mesh kernel is enough; no add-on is needed.

The window

  • URDF, MJCF, SDF: which files to write.
  • Density for parts with no material: shown when a part has none. Leave it empty and no mass is written for those parts; PartCraft does not guess one. Give parts a material in the part properties.
  • Joint effort limit and Joint velocity limit: URDF requires both on a limited joint. PartCraft cannot work them out, so the boxes start with placeholders (100 and 1): type your motors' values. They go into the URDF only.
  • ROS package name: when given, the URDF names its meshes package://<name>/meshes/….

What is written

  • One link for each placed part, in meters, kilograms and radians, with Z up. The grounded part is the base. Mass, center of mass and inertia come from the part's solid and its material's density.
  • A joint's coordinate is the number PartCraft shows for it. If the assembly has closed loops, zero is the position you export instead, and the report says so.
  • A joint with several values (cylindrical, planar, ball, pin in slot) becomes one-value joints in a row with in-between links.
  • Limits as you set them. A turn with no limits is continuous. URDF also requires limits on every slider: a slider with none gets a placeholder travel of twice the assembly's size in the URDF, and the report names it.
  • Gear, rack and screw couplings as mimic joints (URDF, and SDF version 1.11) or a joint equality (MJCF). Cam couplings are left out of all three and named.
  • Closed loops: URDF holds trees only, so the closing joint is left out and named. SDF writes it as a joint. MJCF closes a hinge with two connect points and a rigid joint with a weld; other kinds are left out and named.
  • Parts that nothing joins, and the rigid ties of a sub-assembly, become fixed joints.

Before you rely on it

  • With the mesh kernel, round faces are flat facets: meshes, masses and inertia are those of the faceted solids, not exact surface values.
  • The meshes are used for both looks and collision. A simulator may collide the convex hull of a mesh, and parts that touch at a joint may need contact between them turned off.
  • No motors, sensors, friction or damping are written.
  • Load the files in your simulator and move every joint before trusting them.