RobotLocomotion / drake

Model-based design and verification for robotics.
https://drake.mit.edu
Other
3.33k stars 1.26k forks source link

Add SDFormat and URDF parsing for screw joint #17765

Closed jwnimmer-tri closed 2 years ago

jwnimmer-tri commented 2 years ago

See https://github.com/RobotLocomotion/drake/issues/12404#issuecomment-1111679692

jwnimmer-tri commented 2 years ago

+@scpeters is on deck for this one -@rpoyner-tri.

scpeters commented 2 years ago

I've started working on this and quickly realized that the //joint/thread_pitch parameter is not clearly defined in the SDFormat specification. I've opened https://github.com/gazebosim/sdformat/issues/1125 to address this.

scpeters commented 2 years ago

I also notice that Drake's screw joint does not accept an axis unit vector parameter; it is defined to rotate and translate along the Z-axis of the F and M frames. This raises the question of how to handle the //joint/axis/xyz parameter. For initial testing, we can use a model with //joint/axis/xyz == "0 0 1", but for models that specify a different joint axis I can think of two options:

sherm1 commented 2 years ago

My first thought would be treat this the same way we do a rotational or prismatic joint. Do we rotate the F and M frames for those? That seems reasonable to me. Is it likely that someone would define a joint frame that doesn't line up with the axis?

scpeters commented 2 years ago

My first thought would be treat this the same way we do a rotational or prismatic joint. Do we rotate the F and M frames for those?

the RevoluteJoint for example accepts a Vector3d axis parameter, but ScrewJoint does not have a similar axis parameter

scpeters commented 2 years ago

I just opened a feature request to add a Vector3 axis parameter to the ScrewJoint constructor in #17882

scpeters commented 2 years ago

draft pull request in https://github.com/RobotLocomotion/drake/pull/18127 that depends on https://github.com/gazebosim/sdformat/pull/1168

scpeters commented 2 years ago

pull request for URDF parsing in https://github.com/RobotLocomotion/drake/pull/18191