ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
2

Exporting .urdf from SolidWorks

asked 2013-06-12 04:36:29 -0600

t.pimentel gravatar image

updated 2013-11-14 10:44:55 -0600

tfoote gravatar image

Good morning everyone,

I've been trying to export a model from SolidWorks to MoveIt, but I haven't been successful. I have an industrial arm in an assembly file and was trying to use the sw_urdf_exporter.
I followed all the steps described here: exporting assembly to URDF, but it hasn't worked correctly so far. My issue is that, when I export the file with the joints corrdinate systems all in the origin of the base_link, the arm is imported correctly in MoveIt, but the parts, instead of rotating in their place, rotate around the whole robot body. On the other side, when I put the coordinate systems in the right place, in the joint, they rotate around the right point, but are expanded as if two times as far as they should be from the origin of base_link.
Has anyone tryed this or has any idea of what might be the problem?

In this dropbox folder I have 2 videos of what is happening:
https://www.dropbox.com/sh/slw1mz05lo919l5/d5RlhA1t6z

Feel free to ask any questions you might have!
Thank you,
Tiago Pimentel

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
0

answered 2013-06-13 03:57:30 -0600

t.pimentel gravatar image

Good morning everyone,

I found a fix to the problem, but don't know if it's the right way to do it. I decided to just use the offset in each link to position all the meshes in the right position. By setting their visual and collision origins to the sum of all the joint's (its joint + its parent's joints) origins values times -1 (because the position of 1 joint builds upon the others before) I was able to put them in the right spot.

Does anyone here knows if that can cause a problem with the inertial component, should I put the same offset there? And does anyone know if there can be any future issues caused by this fix?

Thank you for the help, Tiago Pimentel

edit flag offensive delete link more

Comments

I can't comment on any potential issues, but have you checked the ROS Industrial support for the SIA20D? The [motoman_config](https://github.com/ros-industrial/motoman/tree/groovy-devel/motoman_config/meshes) package seems to contain a working URDF for your manipulator.

gvdhoorn gravatar image gvdhoorn  ( 2013-11-13 23:53:30 -0600 )edit
1

answered 2013-06-12 07:22:23 -0600

brawner gravatar image

Have you tried just restraining the degrees of freedom using mates in SW, and using the exporter to determine where the coordinate systems should go? That might be trickier if you only have meshes, but I'd be curious to see what your results were.

Assuming the exporter is working correctly, you need to put the coordinate systems at the origin of each joint. Not at the base link. The behavior in the first video is what I would expect with what you did. The second video, not so much. It looks like a bug.

A new feature that was added to v1.2 seems to have caused some issues for people and I've had to address several bugs related to it. You can try an older, stable version and see if that works.

https://bitbucket.org/brawner/sw2urdf/src/22928fc900fe16257f28834d86ad7d5a3ed5f357/INSTALL/Output/sw2urdfSetup.exe

Either way, let me know how it works. You can email me personally your SW files and I can help debug what's going on.

edit flag offensive delete link more

Comments

First of all, thanks for the help. I was using mates in SolidWorks for that and the coordinate systems were going to the joint positions, I just got confused because of the "expanded" final configuration and decided to try something different. I think what is happening is the stl files have offsets.

t.pimentel gravatar image t.pimentel  ( 2013-06-13 03:52:10 -0600 )edit

I tried both put the origin of the parts in the main origin of the assembly or in the joint point and that didn't seem to make any difference. But I finally found a fix to this problem, don't know if this is the right way to do it, but I'll post it as an answer here.

t.pimentel gravatar image t.pimentel  ( 2013-06-13 03:52:53 -0600 )edit
0

answered 2021-01-06 14:20:20 -0600

raj2306 gravatar image

The Best approach for creating a URDF from a Solid Works assembly is to define all the joints and link and reference axes manually. sw_urdf_exporter does a decent job while calculating the inertia and mass parameters. However, it doesn't work very well with auto-detecting axes and joints.

I'd suggest you to

  1. Follow a naming convention for each axes, joint and corresponding links. Like manually define axis as '_axis_joint1' and joint as '_joint_link1_link2' and similarly for link as '_link_name'.

    The naming convention is up to you as long as it's consistent.

  2. While selecting the joint links and axes in the sw_urdf_exporter menu in solid works, manually add the joints, axes and links. This naming convention saves you a lot of time later and helps you in Identifying them correctly.

  3. Select export after you accumulate the tree with the required info and you'll get a good looking URDF.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-06-12 04:36:29 -0600

Seen: 3,931 times

Last updated: Jun 13 '13