robotology / wb-toolbox

Simulink toolbox to rapidly prototype robot controllers
https://robotology.github.io/wb-toolbox/
GNU Lesser General Public License v2.1
23 stars 17 forks source link

Support for prismatic joints #181

Open traversaro opened 5 years ago

traversaro commented 5 years ago

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:

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

diegoferigo commented 4 years ago

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.