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

which topic to subscribe for getting trajectory status [closed]

asked 2022-02-25 11:56:06 -0600

zahid990170 gravatar image

Hi all,

Which topic can we subscribe to in order to get the result of trajectory execution. I am using move_group_interface. I have tried to subscribe to /execute_trajectory/result, but, this works if we use move_group execute method, and does not provide feedback for motion commands that were issued with move_group move method. /follow_joint_trajectory/result does not return anything when controller cannot execute the trajectory. However, it reports for successfully completed trajectories.

We want to issue some motion commands in sequence but for sending the next command, we want to know that last one was completed.

thanks, Zahid

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by zahid990170
close date 2022-03-02 10:18:10.325074

1 Answer

Sort by ยป oldest newest most voted

answered 2022-02-26 07:34:05 -0600

Mike Scheutzow gravatar image

It is not clear what you mean by "get the result". If you want to know where the arm actually is, subscribe to /joint_states or use a move_group_interface call like get_current_joint_values().

If you want to know the outcome after using an Action Server, some action servers report it with get_result(), and others with get_state(). Note that your node should be using the libaction client API calls, not directly subscribing to the topics.

edit flag offensive delete link more


thanks Mike, I want to get the result in my code after the completion of trajectory, or if the controller failed to execute the trajectory. I am using move_group_interface, and there is no direct API call to achieve that. When using move_group, is there an action server that runs in the background and how can I access it for invoking the calls that you mentioned. Zahid

zahid990170 gravatar image zahid990170  ( 2022-02-28 06:13:40 -0600 )edit

I'm a little confused by your question. I would expect each blocking (synchronous) movement method in move_group_interface to return a status code. Which one does not?

Mike Scheutzow gravatar image Mike Scheutzow  ( 2022-02-28 08:47:37 -0600 )edit

thank you Mike, you are right, I overlooked it. So, move_group_interface class move() method does return MoveItErrorCodes value. I was not checking the return value before.

zahid990170 gravatar image zahid990170  ( 2022-02-28 09:40:41 -0600 )edit

Question Tools



Asked: 2022-02-25 11:56:06 -0600

Seen: 68 times

Last updated: Feb 26 '22