Describe the bug
PR #565 sets traj_point_active_ptr_ to nullptr after trajectory execution to avoid a race condition.
This changes the behavior of closed-loop execution from (a) continuously commanding the last trajectory waypoint, to (b) leaving the last interface command in place after the goal tolerance has been reached.
This leads to behavior where, if the goal tolerance has been reached with a non-0 velocity (likely in a closed-loop velocity-only command setting), we continue to command that velocity after reporting a successful execution.
If we with to maintain (b), we should explicitly command the final desired velocity when traj_point_active_ptr_ becomes null, I'll submit a PR to this effect.
To Reproduce
Steps to reproduce the behavior:
- Command a trajectory to any robot with only a velocity interface and closed-loop control and non-0 goal tolerance
- Execute the trajectory
- Observe non-0 velocity after the Execution has been reported a success.
Expected behavior
Comment out L339.
Repeat previous steps. Observe 0 velocity after execution has been reported a success.
Screenshots
N/A
But I can provide video of our physical robot (a modified Kinova JACO2) if necessary.
Environment (please complete the following information):
- OS: Ubuntu 22.04 Jammy
- ROS Version Humble
- With current package
ros-humble-joint-trajectory-controller v2.20.0-1jammy.20230522.072811
Describe the bug
PR #565 sets
traj_point_active_ptr_tonullptrafter trajectory execution to avoid a race condition.This changes the behavior of closed-loop execution from (a) continuously commanding the last trajectory waypoint, to (b) leaving the last interface command in place after the goal tolerance has been reached.
This leads to behavior where, if the goal tolerance has been reached with a non-0 velocity (likely in a closed-loop velocity-only command setting), we continue to command that velocity after reporting a successful execution.
If we with to maintain (b), we should explicitly command the final desired velocity when
traj_point_active_ptr_becomes null, I'll submit a PR to this effect.To Reproduce
Steps to reproduce the behavior:
Expected behavior
Comment out L339.
Repeat previous steps. Observe 0 velocity after execution has been reported a success.
Screenshots
N/A
But I can provide video of our physical robot (a modified Kinova JACO2) if necessary.
Environment (please complete the following information):
ros-humble-joint-trajectory-controllerv2.20.0-1jammy.20230522.072811