Closed PeterBowman closed 5 years ago
Marking as high priority per #164.
Motivation: starting from point A, I can issue a movl command to reach point B, but joint limits are hit at some point. The controller should either stop and throw an error, or at least warn the user. Now, it just goes on and the final trajectory might be kinda curvy with no warn (sometimes even not noticeable at all, or we notice it too late in order to stop and make corrections)
This is caused because if the joint reachs its limit, it stops and doesn't continue but the rest of joints that have not reached their limit continue their movement, producing a deviation of the trajectory. We need to stop the movement of all kinematic chain when a joint reaches its limit (In reference to roboticslab-uc3m/teo-bimanipulation#3 )
I've committed https://github.com/roboticslab-uc3m/kinematics-dynamics/commit/ba17795348e52da1d5b5eade943700b2cc45d3f6, but this is a naive approach. It won't work on simulation since I'm checking against the limits fetched from the simulator itself, that is, the remote_controlboard
client within BCC should never be reported a joint value out of the expected range. It will just stop moving the offending joint and go on with the controlled trajectory, regardless of what we do from the BCC side. On the real robot, limits are parsed from the .ini files. It really depends on how are they handled by the motor driver (Technosoft iPOS), but we can potentially incur in a similar issue.
A solution I can come up with for this is to apply a small epsilon that would make the joint limit check report an out-of-range value a bit earlier that it's actually supposed to.
A solution I can come up with for this is to apply a small epsilon that would make the joint limit check report an out-of-range value a bit earlier that it's actually supposed to.
Here it is: https://github.com/roboticslab-uc3m/kinematics-dynamics/commit/6544a92b20073ecd340558d5c9ad276105f0a59d. The problem is that I couldn't perform any CMC motion from the simulated AMOR's initial pose with epsilon = 0.001
since it starts very closely to the configured limit on certain joints. It did work after decreasing to 0.00001
, though. @jgvictores do you think this is a robust solution?
A small epsilon that would make the joint limit check report an out-of-range value a bit earlier that it's actually supposed to.
@jgvictores do you think this is a robust solution?
I guess it all boils down to https://github.com/roboticslab-uc3m/teo-main/issues/15 and should end up somewhere in https://github.com/roboticslab-uc3m/developer-manual but sure! If it works, go for it!!
OK, done at https://github.com/roboticslab-uc3m/kinematics-dynamics/commit/d2afc5e5368ed3cf9b29de91ed56c69cd0d0cc2e. I'm therefore removing the priority: high label as there is more to be done here and the urgency has been removed.
A word of caution: once having reached a limit, the cartesian controller will not be able to move the joint out of it. Instead, connect to the RPC port and change the robot position via set pos x ...
.
A word of caution: once having reached a limit, the cartesian controller will not be able to move the joint out of it. Instead, connect to the RPC port and change the robot position via
set pos x ...
.
There should be a way to regain control of the robot once joint limits are hit.
There should be a way to regain control of the robot once joint limits are hit.
(actually, only the velocities)
Probably, I also considered accelerations having https://github.com/roboticslab-uc3m/kinematics-dynamics/issues/163 in mind. Although this is not the common use case, it merits its own case study and further analysis.
Expanding on https://github.com/roboticslab-uc3m/kinematics-dynamics/issues/159, status checks could be performed on each thread step to make sure that no joints are out of limits,
nor maximum permisible speeds/accelerations are exceeded. I'd put them before the actual handler (e.g.handleMovl
) is entered:https://github.com/roboticslab-uc3m/kinematics-dynamics/blob/c187abdc0c9b2284d36df0f22cf64ecb238642b2/libraries/YarpPlugins/BasicCartesianControl/RateThreadImpl.cpp#L11-L33
Motivation: starting from point A, I can issue a
movl
command to reach point B, but joint limits are hit at some point. The controller should either stop and throw an error, or at least warn the user. Now, it just goes on and the final trajectory might be kinda curvy with no warn (sometimes even not noticeable at all, or we notice it too late so that it cannot be stopped nor further corrections be made).Partially (regarding speeds and accelerations) blocked by https://github.com/roboticslab-uc3m/yarp-devices/issues/189.Edit: see https://github.com/roboticslab-uc3m/kinematics-dynamics/issues/161#issuecomment-493167169.