ros / solidworks_urdf_exporter

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

Export of ball joints #139

Open SammyRamone opened 1 year ago

SammyRamone commented 1 year ago

Is your feature request related to a problem? Please describe. I want to model a robot which has at one point a ball joint (see image below). I know that it is not possible to directly model this in URDF and that it is necessary to use two revolute joints with a fake link in between. joint Exporting this example currently gives me a single joint with 1 DoF. Of course, it is possible to change the exported URDF manually to include a fake link and a second joint to achieve the 2DoF ball joint that I am interested in. However, it would be nicer to be able to specify this in the export plugin directly.

Describe the solution you'd like Add an option to the list of joint types for ball joints. Maybe one for a 2DoF ball joint and one for a 3DoF ball joint. When chosing this type, the necessary URDF joints and fake links are automatically generated.

Describe alternatives you've considered

btw: Thanks a lot for this tool, it is very helpful 🙂

SammyRamone commented 1 year ago

If anyone else stumbles on this issue: I circumvented it by adding a fake link (consisting of a single sphere) to the assembly at the point of the ball joint. I set the material of this fake link to air and made it invisible. I then specified two revolute joints: link1->fake_link and fake_link->link2. I also had to specify the origin and axis manually. Additionally, I had to remove the collision and visual models of this fake link from the URDF after the export.