roboticslab-uc3m / yarp-devices

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

Expose actuator commands in gripper-like subdevices #228

Open PeterBowman opened 5 years ago

PeterBowman commented 5 years ago

Stemming from https://github.com/roboticslab-uc3m/yarp-devices/issues/211, it would be nice to enable some sort of self-description behavior to grippers: LacqueyFetch, TextilesHand and Dextra+CAN (https://github.com/roboticslab-uc3m/yarp-devices/issues/227).

PR https://github.com/roboticslab-uc3m/kinematics-dynamics/pull/181 introduced an actuator command to our cartesian controller interface. This command accepts a vocab describing one of several possible action. In https://github.com/roboticslab-uc3m/kinematics-dynamics/issues/115#issuecomment-518304080, I propose that gripper devices could expose their supported actions, and act upon them when requested, via IRemoteVariables.

For simpler devices, the vocab list could live in a header. Cons: might easily become out-dated from time to time, it's virtually impossible to cover all possible use cases for actuators - not just mere grippers. Also, not sure what to do with AMOR, whose gripper implementation is embedded in the cartesian controller itself.

For Dextra, keep in mind the forthcoming translator device/tool (what I used to call IK).

PeterBowman commented 4 years ago

Robot tools of all kinds, especially grippers and more complex hands, could be interfaced on the YARP network through a dedicate port in which the only motor nodes exposed are the ones used by the tool itself: https://github.com/roboticslab-uc3m/yarp-devices/issues/211#issuecomment-532196134. In contrast, we currently control six joint motors and one Lacquey motor via the same /teo/leftArm port, for instance.

This separation clears the path for wrapping complex behavior in dedicated client devices which implement the specific behavior for the gripper type it is meant for. In other words, to illustrate this:

Since the physical implementation is transparent to this client layer, the IRemoteVariables interface would render useful in identifying whether the remote device is actually the gripper type the client device is trying to connect to.

PeterBowman commented 2 years ago
  • A new client device could connect to these YARP ports and expose a gripper-specific C++ interface in which handy commands are available, say, openHand(), makeGesture() and so on.

This can be nicely done with Thrift, e.g. see our SpeechIDL and its server implementation.