roboticslab-uc3m / yarp-devices

A place for YARP devices
https://robots.uc3m.es/yarp-devices/
9 stars 7 forks source link

Migrate Jr3 to use YARP Multiple Analog Sensor Interfaces #240

Closed jgvictores closed 2 years ago

jgvictores commented 4 years ago

See http://www.yarp.it/group__dev__iface__multiple__analog.html and robotology/yarp#1526 .

Note: Issue involves updating

  1. https://github.com/roboticslab-uc3m/teo-configuration-files as described in https://github.com/roboticslab-uc3m/teo-configuration-files/issues/27
  2. https://github.com/roboticslab-uc3m/installation-guides/blob/695512226b313079aa83307611c7a25e0263a928/install-jr3.md#view-jr3-data
  3. https://github.com/roboticslab-uc3m/yarp-devices/tree/master/examples
PeterBowman commented 2 years ago

The ISixAxisForceTorqueSensors interface has been implemented at https://github.com/roboticslab-uc3m/yarp-devices/commit/2475bb1f25c45f9b19b0ea27daf4d01bdb81a726 while still preserving IAnalogSensor (mapping calls between implementations to avoid code duplication). The device can be still instantiated as an analogServer's subdevice (as usual, via yarpdev --device Jr3), but now it can be also wrapped by the new MAS in this way:

yarpdev --device multipleanalogsensorsserver --subdevice Jr3 --name /jr3 --period 20

I guess we need to wait for YARP devs to learn whether they decide to keep or nuke analogServer.

Note that IAnalogSensors is still used in our examples: exampleJr3.cpp, exampleRemoteJr3.cpp, exampleRemoteJr3.py.

PeterBowman commented 2 years ago

The new ftCompensation app uses this MAS implementation of Jr3: https://github.com/roboticslab-uc3m/kinematics-dynamics/issues/191.

PeterBowman commented 2 years ago

Our local C++/Python examples have been migrated to using the new MAS interface: https://github.com/roboticslab-uc3m/yarp-devices/commit/de914de92fd227d9675b03a132b15e769bf26bbf. Keep in mind there is no calibration (set-to-zero) method, therefore either restart the device or apply an offset programatically to achieve that.