I am trying to use `stop` function for motoman robot, but it does not work when connected with real robot. I do:
move_group.setJointValueTarget(target_joints);
moveit::planning_interface::MoveGroupInterface::Plan my_plan;
bool success = (move_group.plan(my_plan) == moveit::planning_interface::MoveItErrorCode::SUCCESS);
if(success)
{
ROS_INFO("Moving");
move_group.asyncExecute(my_plan);
ros::Duration(0.5).sleep();
ROS_INFO("Stopping");
move_group.stop();
}
If I test above code with `demo.launch`, the trajectory is planned, the robot lightly moves and then it stops. But if I connect to real robot and run the code, whole trajectory is executed.
How could I stop the real robot?
↧