yarp icon indicating copy to clipboard operation
yarp copied to clipboard

High ref accelerations in velocity mode never get reset

Open PeterBowman opened this issue 5 years ago • 1 comments
trafficstars

Describe the bug yarpmotorgui sets a reference acceleration value of 100000 upon switching into velocity control mode, see:

https://github.com/robotology/yarp/blob/d656d9b0a082b8494f4a5da696d0fe4e2af6dfc0/src/yarpmotorgui/partitem.cpp#L948-L969

This value is never reset, especially when switching back to position control mode. In consequence, I noticed that positionMove commands made the robot joints start and stop way too aggresively.

To Reproduce

  • Launch the robot controller and the yarpmotorgui, making sure joints are not in velocity control mode.
  • Query get accs via RPC.
  • Switch to velocity control mode via GUI widgets in the yarpmotorgui app.
  • Query acceleration again, you get 100000.

Expected behavior

  • Can we avoid this setRefAcceleration call?

  • If not, perhaps set accelerations only when specified via .ini file on start and, then, always switch back to old values upon leaving velocity control mode?

  • Even though we have a reference speed slider (in position control mode), there is no acceleration slider neither in position nor in velocity control modes despite being supported by the corresponding motor control interfaces (IPositionControl and IVelocityControl). I realize there are no acceleration limit accessors in the IControlLimits interface so that slider ranges are not known beforehand (cf. velocity limits).

Configuration:

  • OS: Ubuntu Bionic (18.04)
  • yarp version: 3.3.0 (3.3.0+27-20200110.2+git5fbea1e6e)
  • compiler: g++ (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0

Additional context cc @randaz81 (https://github.com/robotology/yarp/commit/3d6be034d0f69ff4ca733b6a64ec90ddcc069eb1).

PeterBowman avatar Jan 25 '20 13:01 PeterBowman

CC @randaz81

drdanz avatar Feb 25 '20 15:02 drdanz