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

Make linear trajectories depend on velocity instead of time #157

Open PeterBowman opened 6 years ago

PeterBowman commented 6 years ago

Split from https://github.com/roboticslab-uc3m/kinematics-dynamics/issues/46 and influenced by https://github.com/roboticslab-uc3m/kinematics-dynamics/issues/121, we'd like to tweak another parameter that governs the CMC (movl command). Currently, generated trajectories obey a duration value passed by the controller, but fail on run time if a maximum specified joint velocity is reached in any joint. This issue is focused on fixing a joint cartesian velocity instead so that the controller may adjust the trajectory duration accordingly. Note that this is how the movj command works (by enforcing isochronous trajectories in all joints) and, conversely, it could depend on duration.

Vaguely related, we could benefit from a dry run mechanism to perform tests: https://github.com/roboticslab-uc3m/kinematics-dynamics/issues/156.

PeterBowman commented 6 years ago

Would block https://github.com/roboticslab-uc3m/kinematics-dynamics/issues/159.

PeterBowman commented 1 year ago

Vaguely related, we could benefit from a dry run mechanism to perform tests: https://github.com/roboticslab-uc3m/kinematics-dynamics/issues/156.

Joint velocities can be checked offline (i.e. prior to sending motion commands) in MOVL with --enableFailFast (https://github.com/roboticslab-uc3m/kinematics-dynamics/commit/26f8c35f4253cc984bc326cbb8ee9fe4b515f4ae), and it's better used along with --usePosdMovl (https://github.com/roboticslab-uc3m/kinematics-dynamics/issues/193#issuecomment-1432212469).

I believe the velocities that should be actually regarded are the cartesian ones. KDL::VelocityProfile_Trap has a convenient SetProfileVelocity method. Warning: here, newvelocity is a fraction (contained within [0.0, 1.0]) to be applied on the default maximum velocity.