robotology / gz-sim-yarp-plugins

YARP plugins for Modern Gazebo (gz-sim).
BSD 3-Clause "New" or "Revised" License
9 stars 2 forks source link

Manage change of control mode in control board #97

Open xela-95 opened 9 months ago

xela-95 commented 9 months ago

It is of utmost importance to manage correctly the switch from one control mode to another, to guarantee the smoothest transition, for example by properly setting new correct references to track.

xela-95 commented 9 months ago

@traversaro if there are specifications (written somewhere or from experience on the robot) let me know, so that we can gather them here.

traversaro commented 9 months ago

@traversaro if there are specifications (written somewhere or from experience on the robot) let me know, so that we can gather them here.

I am not aware if there are any written specification, but what happens in most implementation is that the measured quantity is used to initialize the setpoint, see for example:

Interestingly, this logic seems not be used in velocity, but that is probably a bug:

traversaro commented 9 months ago

Interestingly, this logic seems not be used in velocity, but that is probably a bug:

Thinking a bit more about this, perhaps the logic is to do the safest possible thing in the change of control mode, i.e. ensure that the desired velocity is 0, so this could have sense.