solidworks_urdf_exporter icon indicating copy to clipboard operation
solidworks_urdf_exporter copied to clipboard

Incorrect Axis inferred from Reference Axis

Open BenArtes opened this issue 6 years ago • 1 comments

In the Exported URDF our rotation axes are inverted (something like 0 -1 0) which is causing our joints to rotate as though they followed the left-hand rule instead of the ROS standard right-hand rule.

I had assumed that this was inferred from the axis in Solidworks then stored in the configuration, but changes to the Joint Configuration aren't being saved.

Essentially, I assume we drew our axes backwards but Solidworks doesn't indicate any 'direction' associated with axes and doesn't provide a quick way to 'invert' them. I would have thought that the axis is compared to the associated Coordinate System and then the positive direction was assumed from that.

I would just like to:

  1. Confirm that joint axis is inferred from the Solidworks axis and that if 'drawn' backwards (even though Solidworks doesn't give an indication of axis direction) the rotation of the axis will be backwards.
  2. Confirm that the current solution is to just recreate the axes with the correct start / end points
  3. Document this issue in case anyone else runs into it.

BenArtes avatar Aug 27 '19 22:08 BenArtes

It's a common issue and one I haven't determined a good general solution to. Most people use simple axes like [0 1 0], so I've flirted with just forcing a positive value in that case. But it may lead to unexpected behavior if someone goes to the effort of creating their own reference axis and wants a specific sign.

I believe that recreating the line that the axis is based on with its endpoints reversed should cause the reference axis to flip directions.

brawner avatar Aug 27 '19 22:08 brawner