SolidWorks to URDF Exporter
The SolidWorks to URDF exporter is a SolidWorks add-in that allows for the convenient export of SW Parts and Assemblies into a URDF file. The exporter will create a ROS-like package that contains a directory for meshes, textures and robots (urdf files). For single SolidWorks parts, the part exporter, will pull the material properties and create a single link in the URDF. For assemblies, the exporter will build the links, and createa tree based on the SW assembly hierarchy. The exporter can automatically determine the proper joint type, joint transforms and axes.
Some Important Items
Development on this plugin as of recently has come from the generous donations of several ROS community members. Without this support or from pull requests from communities members, development would not be able to continue. We also appreciate any bugs or feature requests so that we can work on them when the resources become available.
Want to get notifications about when this tool is updated? Consider joining the ROS SolidWorks SIG
This project is not dependent on ROS and can be used for exporting SolidWorks files for any URDF needs. The URDF will include rospack URI file locations ('package://'), so you will need to change those for non-ROS systems (some Gazebo systems can handle 'package' URIs).
So far this add-in has been tested only on Windows 7 64bit with SolidWorks 2017 64bit. It currently does not install on 32bit machines. The add-in makes use of the most up-to-date SW API so I do not expect this tool to work with versions before SolidWorks 2012 (but this hasn't been confirmed).
To learn more about URDF, please review its documentation.
If you have questions about the SolidWorks to URDF Exporter after reading this documentation please check ROS Answers for possible answers. If you don't find your answer, please submit a question with the tag 'sw_urdf_exporter'.
Details of bug fixes and new features are put in the Change Log.
The download is available as a pre-compiled installer or as source as a Visual Studio C# project.
This sounds made up, but you cannot install the files into a directory labeled "SW2URDF". For some reason, Windows struggles to find the supporting plug-ins, and will throw an unhandled exception error. If anyone has some suggestion as to why, I'd love to know.
This installs the most current stable release.
Upgrade to .NET Framework V4
- Download the installer linked above.
Run the installer. It will ask for permission to make changes to your computer. Your Windows account will need to have sufficient privileges to make these changes. It should install into the SolidWorks directory in program files.
Open SolidWorks, under "Tools>Add-ins" you will see a SW2URDF item at the very bottom. If this setup file doesn't work, try installing manually as described below.
These are the most up-to-date source files. Because this is checked in regularly, there may be bugs or un-finished code in the source files. If you need a stable version of the source, check-out the revision tied to the installer (rev 145).
To build the source, you'll need to download Visual C# Express 2010.
- Run Visual C# as administrator. Your Windows account needs to have these privileges to register the .dll. To do this, right click on Visual C# in your start menu and click, 'run as administrator'.
Click on "Debug>Start Debugging" or press F5. It will compile and run SolidWorks together. After doing this once, you only need to run from Visual C# to re-compile. Otherwise, to just use the tool, you can start SW normally.
When SolidWorks is open, under "Tools>Add-ins" you will see a SW2URDF item at the very bottom. If this setup file doesn't work try installing manually as described below.
The exporter has two separate forms, one for exporting single SW parts as a single link and the second for exporting assemblies as a set of links and joints.