wb-toolbox icon indicating copy to clipboard operation
wb-toolbox copied to clipboard

Support for prismatic joints

Open traversaro opened this issue 6 years ago • 1 comments

Summary

Both YARP motor control interfaces and iDynTree support models that contain prismatic joints. All the blocks that wrap iDynTree in the wb-toolbox should already work fine with prismatic joints. However, all the blocks that wrap YARP motor control interface hardcode the assumption that the joints are revolute. See for example what is happening when you:

  • read encoders: https://github.com/robotology/wb-toolbox/blob/f110c4b641a09a4bb392161db2ab79d0afc0adbe/toolbox/library/src/GetMeasurement.cpp#L234
  • set references https://github.com/robotology/wb-toolbox/blob/f110c4b641a09a4bb392161db2ab79d0afc0adbe/toolbox/library/src/SetReferences.cpp#L424
  • get limits https://github.com/robotology/wb-toolbox/blob/f110c4b641a09a4bb392161db2ab79d0afc0adbe/toolbox/library/src/GetLimits.cpp#L220

In all these cases and the degree/radians conversion are always applied. In the case of prismatic joints, YARP motor control interface already use meters-based units (meter, meter/s, meter/s^2), so no conversion is actually necessary, and so no conversion should be done.

Motivation

It would be nice to be able to use robot model that contain prismatic joints.

Additional context

WB-Toolbox block should call the yarp::dev::IAxisInfo::getJointType method to know the type of the joint, and apply the degrees/radians conversions only if the joint type is revolute.

cc @CarlottaSartore @nunoguedelha @fjandrad

traversaro avatar Nov 07 '19 15:11 traversaro

The changes to get this done are minimal, and it is a valuable addition :+1: Probably also the documentation in the masks of the blocks needs to be updated accordingly.

diegoferigo avatar Nov 08 '19 07:11 diegoferigo