ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
2

How to check sate of plan execution in MoveIt! during async execution in python?

asked 2016-12-13 17:31:16 -0600

oars gravatar image

I'm using MoveIt! to generate motion plans for a robot arm. Have it working just fine using the defined move_group for my arm. My question is, when executing a plan with group.go(wait=False), what is the correct way to check on the status of the execution of the path?

The return of group.go(wait=False) is a boolean so that doesn't do me any good, and the group, and robot objects do not seem to have anything indicating a plan is being executed.

edit retag flag offensive close merge delete

Comments

Should be able to check the status of the controller or from joint states.

JoshMarino gravatar image JoshMarino  ( 2016-12-13 23:03:46 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
11

answered 2016-12-14 03:28:33 -0600

rbbg gravatar image

Hi Oars,

There is no way to check for the status of group.go(wait=False) using the standard moveit_commande API calls. However, under the hood, the moveit_commander makes a call to the moveit_msgs/MoveGroup Action. The difference between async and non-async is that when you tell moveit_commander to wait, it monitors the output of the MoveGroup Action state and only returns control to the caller when the action has either succeeded or failed.

To see how that works: the code that does so can be found here.

To get the relevant information from the action server you can subscribe to the /move_group/status/ topic, which publishes a actionlib_msgs/GoalStatusArray that "stores the statuses for goals that are currently being tracked". An alternative would be the /move_group/feedback/ topic, which also contains information on what the action server is doing.

I'd advise you to rostopic echo both topics to see what messages are being published so you can decide which is easier to use.

edit flag offensive delete link more

Comments

Awesome! Thanks for the detailed answer. Really appreciate it. This gives me all I need moving forward.

oars gravatar image oars  ( 2016-12-14 11:28:50 -0600 )edit

Question Tools

Stats

Asked: 2016-12-13 17:31:16 -0600

Seen: 4,659 times

Last updated: Dec 14 '16