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

Revision history [back]

You're trying to call the stop method as if it was static, you'll need to create a concrete instance of the MoveGroup object to be able to call the stop method. If you add a MoveGroup instance to the StopRobot class as shown below:

moveit::planning_interface::MoveGroup moveGroupInstance;

Then call it in the stop method like this:

moveGroupInstance.stop();

I'm not 100% sure that you can call this method from any node, it's possible you'll have to call this on the same MoveGroup object that's being used to execute the move. But give it a try and let us know how you get on.

You're trying to call the stop method as if it was static, you'll need to create a concrete instance of the MoveGroup object to be able to call the stop method. If you add a MoveGroup instance to the StopRobot class as shown below:

moveit::planning_interface::MoveGroup moveGroupInstance;

Then call it in the stop method like this:

moveGroupInstance.stop();

I'm not 100% sure that you can call this method from any node, it's possible you'll have to call this on the same MoveGroup object that's being used to execute the move. But give it a try and let us know how you get on.

Update : There are two different move commands in the moveit interface. asyncMove() returns instantly allowing your node to execute other code while the robot is moving. While the move() command is blocking, which means that execution of your node will be effectively paused until the robot has completed executing the plan.

If you use the asyncMove() command then you'll be able to receive messages and potentially stop the robot from moving while the arm is in motion.