urdf-loaders icon indicating copy to clipboard operation
urdf-loaders copied to clipboard

Support Floating, Planar joint types

Open gkjohnson opened this issue 7 years ago • 5 comments

http://wiki.ros.org/urdf/XML/joint

  • [x] prismatic
  • [ ] floating
  • [ ] planar

Open question: How do we set a float joint? 6 inputs for setOffset?

gkjohnson avatar Feb 03 '18 21:02 gkjohnson

Supporting the planar, floating, and prismatic joints would require updating the API for setting the position of the joint / adding a new function because angle doesn't make as much sense here

gkjohnson avatar May 16 '18 05:05 gkjohnson

Test model needed

gkjohnson avatar Aug 18 '18 15:08 gkjohnson

I'm intending to contribute planar joint support sometime this week, as my project that uses urdf-loaders needs to support whole-body motion planning (achieved in the simplest case via an infinitely-variable "planar joint" representing the X,Y location of the robot). Do you have any advice or preferences on how I should implement the API?

EzraBrooks avatar Feb 12 '24 15:02 EzraBrooks

@EzraBrooks Awesome!

I think the setJointValue function can just be modified as it is. URDFJoint.setJointValue already takes a set of values to accommodate a multi dimensional joint case, so setting the joint would look like so:

robot.setJointValue( 'joint_name', x_value, y_value );

// or

robot.joints.joint_name.setJointValue( x_value, y_value );

This, of course, only lets you set both dimensions at a time. Setting one at a time could be done by just reusing the existing set joint value but if you need something more convenient then something like the following interface could work where the first argument is the index into the joint value tuple:

joint.setJointValueComponent( joint_value_index, joint_value );

gkjohnson avatar Feb 13 '24 03:02 gkjohnson

thanks. got held up behind another bug so far this week but myself or one of my teammates should be taking a stab at this soon :)

EzraBrooks avatar Feb 15 '24 22:02 EzraBrooks