move_group stop and resume based on callback data

asked 2021-01-14 17:32:54 -0500

zahid990170 gravatar image

Hi,

I am using move_group_interface to plan and test simple motions for UR5 robotic arm. Currently, I am testing it within rviz simulator. I can send the pose and joint_space goals and see the robotic arm moving within rviz. I have been able to execute the same commands on the real robotic arm.

Now, I am interested to stop and resume motions. I am using the asyncExecute API from move_group. Based on some input that I receive on certain subscribed topics, I want to stop and resume movement of the robotic arm. In my node which is responsible for motion planning and sending motion commands, I subscribe to the following two topics and write the corresponding callbacks.

  1. /move_group/status/
  2. control_msgs/FollowJointTrajectoryActionResult

After running the launch script, I test the topic rospic echo /control_msgs/FollowJointTrajectoryActionResult but, I do not see any information. Is this because, I am not sending the motion commands to the actual robotic arm.

As for the topic /move_group/status/, I receive This goal has been accepted by the simple action server and then I receive Motion plan was computed succesfully.

However, as soon as the the following message appears on the terminal

[ INFO] [1610666394.953694419]: Execution request received
[ INFO] [1610666395.008992805]: Fake execution of trajectory

I receive no further information/data on the callbacks of the subscribed topics. In particular, there was a third subscribed topic on which I receive random numbers. And, if I received the number in a particular range, I wanted to issue the stop command to the robotic arm. However, when the robotic arm starts its movement in rviz, and the above messages appear on terminal, I no longer receive any data on the callbacks, and hence cannot act upon on the received information.

Please, can somebody advise on how to monitor the status of the ongoing trajectory execution when using move_group_interface and stop and resume motions. Any pointers in this direction.

Thanks,

zahid

edit retag flag offensive close merge delete