Skip to content

[JTC] Non-0 velocity commanded after closed-loop execution #671

@egordon

Description

@egordon

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:

  1. Command a trajectory to any robot with only a velocity interface and closed-loop control and non-0 goal tolerance
  2. Execute the trajectory
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions