epfl-lasa / kuka-lwr-ros

ROS KUKA robot control (simulation & physical)
58 stars 30 forks source link

Cannot command action when another action is currently in progress #2

Closed felixduvallet closed 5 years ago

felixduvallet commented 8 years ago

@gpldecha let me know what you think about this

Sending an action through the console when another action is currently in progress does not behave as expected. The previous action gets canceled, but the new action isn't commanded. You need to send the new command twice for the robot to actually perform the commanded action.

Example scenario of commands in the console:

go_home : Robot moves towards 'home' configuration go_left : Robot stops go_left : Robot moves towards 'left' configuration

Expected behavior: Robot should move left after the first go_left command.

gpldecha commented 8 years ago

At the moment it is implemented in this way. An action has to be called twice if the previous action has not terminated.

Could change it such that it cancels the current action and gets called immediately. I would have to then add a stop command to make the robot stay at its current position.

Can add this behaviour in a bit.

felixduvallet commented 8 years ago

I think it makes sense to allow goal preemption, see example here: http://wiki.ros.org/actionlib_tutorials/Tutorials/SimpleActionServer%28GoalCallbackMethod%29