roboticslab-uc3m / kinematics-dynamics

Kinematics and dynamics solvers and controllers.
https://robots.uc3m.es/kinematics-dynamics/
GNU Lesser General Public License v2.1
19 stars 12 forks source link

Enable dual control in keyboardController app #174

Closed PeterBowman closed 3 years ago

PeterBowman commented 5 years ago

Given https://github.com/roboticslab-uc3m/teo-bimanipulation/issues/3, it would be nice to perform dual-arm control on TEO with the keyboardController, which currently accepts one manipulator. In that demo, coordinated coincident-TCP motion is to be achieved with two manipulators (TEO arms).

Currently WIP at https://github.com/roboticslab-uc3m/kinematics-dynamics/commit/d724a953747340c04a4334fdb90f461fd9cfce60, I'd like to add an abstraction layer so that an arbitrary number of manipulators could be controlled simultaneously.

PeterBowman commented 3 years ago

Might be worth splitting into a new app now that we've got a tree solver (https://github.com/roboticslab-uc3m/kinematics-dynamics/issues/190)?

PeterBowman commented 3 years ago

Implemented in https://github.com/roboticslab-uc3m/kinematics-dynamics/commit/8ce09b8c78acee3448bb22ac21f7d1f704223cf2 and described at https://github.com/roboticslab-uc3m/kinematics-dynamics/issues/190#issuecomment-856661951 (includes demo). Changes consists of a new parameter added to KdlTreeSolver that assumes two or more TCPs are to be treated as a single one. Neither the controller (BCC) nor the application (keyboardController) have been altered.

By the way, I have also deprecated bool ICartesianSolver::getNumJoints(int&) in favor of int getNumJoints() (https://github.com/roboticslab-uc3m/kinematics-dynamics/commit/bbb4cae24e0431c649890a14333f2830f33da5d7), and added int getNumTcps() (https://github.com/roboticslab-uc3m/kinematics-dynamics/commit/c19570aef8a0899f89addaabd2430be6f364790e).