ros / solidworks_urdf_exporter

SolidWorks to URDF Exporter
http://wiki.ros.org/sw_urdf_exporter
MIT License
392 stars 104 forks source link

SW2URDF: Inferring the joint geometry failed... #135

Open dlerner97 opened 1 year ago

dlerner97 commented 1 year ago
  1. SolidWorks 2022
  2. 1.6.0-4-g7f85cfe

Whenever I export an URDF, I fully constrain all SW2URDF parameters and do not rely on the automatic joint generation. Yet, very often I receive an error when I try to export them (as shown in the image below). This happens quite frequently when I have a single mesh/part but need to make a fixed joint between links at two locations on the part. I know this is an odd use case but it allows us to compose a sequence of URDF's at runtime by creating 6*0 joints between the output link of one part and an input link of a connected URDF. Because this is a fixed and fully constrained joint offset, this should be easy with the urdf exporter but very commonly errors out upon exporting. This also happens every so often when exporting actual assemblies with fully constrained mates as fixed joints. I cannot seem to find much of a pattern there but I'm hoping that fixing one will fix the other. I have attached an error message as well as a pack-and-go zip folder containing an assembly with the specific issue. I have also attached the logs in case they help.

I have another example in this ROS question: https://answers.ros.org/question/403261/sw2urdf-inferring-the-joint-geometry-failed/?answer=412226#post-id-412226

inferring_joint_geom_ex_error

infer_joint_geom_ex_assem.zip sw2urdf.log

SammyRamone commented 1 year ago

I had the same error message in my assembly. I just had two parts that I wanted to connect with a fixed link. Each of the parts had a sketch with the point marked where they are to be joined together. The first part was set fixed and the second one was connected by connecting those two sketeches without any DoF left. Manually setting the joint type at export to "fixed" did not resolve the issue. I finally fixed this by also manually creating the joint origin and axis (by adding an coordinate system and axis at the point where both parts are connected). This resolved the issue and the export now works.

dlerner97 commented 1 year ago

Thanks for the input! The thing is, I always add my own coordinate systems and a fixed joint doesn't need an axis. Other than the axis, I never leave any input blank and input my own values for all of them and I still often get this error.