Note: This tutorial assumes that you have completed the previous tutorials: This tutorial assumes you have successfully installed the SolidWorks to Exporter.
(!) Please ask about problems and questions regarding this tutorial on Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Export a SolidWorks part to URDF (Unsupported)

Description: Exporting to a part is currently unsupported. Please see the next tutorial about exporting assemblies. This tutorial describes the very simple process for exporting a SolidWorks part to a URDF.

Tutorial Level: BEGINNER

Next Tutorial: Exporting an Assembly to URDF

Exporting a part

  1. Open your part in SolidWorks.

  2. Click "Tools>Export to URDF". If using 1.5.1 or older it will be under "File>Export to URDF" (sometimes its "Extras>File>Export to URDF").

This will bring up a single page form that loads the material property, color property and mass property information into the form. If you desire, you can change any items you like, but the part will be loadable into Gazebo or RVIZ without any modifications.

The SW Part to URDF Link Export Form

The default save path is a package named after the part in your home folder, click browse to change this.

You can add a texture to the link by selecting the texture from your computer. This file will be copied into your URDF package.

Click finish to create the package. It will export the meshes, copy the textures and create a URDF that specifies the locations of these files with a 'package://PackageName' relative location. If you do not have rospack installed on your target computer, you will have to edit these locations manually.

The built package

The package will contain directories for meshes, textures and robots. It will also contain a ROS package.xml (manifest) file so you can use this as a ROS package by just copying it to your ROS system. The path locations in the URDF are relative to the package itself. If you do not have rospack, you will need to change the paths manually so that they refer to locations on the machine using the URDF files. If you do use rospack, you will need to add the package to a location in your $ROS_PACKAGE_PATH. To simplify complicated meshes, you may like to use a program like MeshLab or Blender.

Wiki: sw_urdf_exporter/Tutorials/Export a Part (last edited 2021-12-21 23:59:11 by StephenBrawner)