Interrupting a joint trajectory
I am using the move_arm package in the arm_navigation stack to control a joint trajectory, and I'd like to be able to interrupt (completely cancel) the trajectory while it's in progress.
Should I be able to do this by cancelling the MoveArmAction containing the arm pose goal? I've tried that, and while the MoveArmAction gets cancelled the trajectory itself does not (I don't get a preempt request on the joint controller action server).
I tried looking at the source for the move_arm node, and in move_arm_simple_action.cpp I found a private method called 'stopTrajectory()' that is never called anywhere in the MoveArm class. Is this a bug, or am I just not supposed to be able to cancel a joint trajectory with a MoveArmAction cancel request?
I guess this is a bug.
I think, it's the (joint trajectory) controllers job to stop the execution of the trajectory, if the corresponding action goal gets cancelled. Does the controller you use implement this?
The move_arm action started the joint trajectory action. When it is cancelled, it doesn't seem to cancel the joint trajectory action and that is exactly the problem. The node that starts an action should also cancel it if it is cancelled itself.
Correct. If that doesn't happen, then it seems to be a bug indeed.