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

Revision history [back]

click to hide/show revision 1
initial version

I think you should take a look at this tutorial, which goes through a lot of MoveIt capabilities.

But high level, a plan includes a starting and ending position, both of which you can set. A common practice is setting the starting position to the current robot position, but you do not have to. See these lines of the tutorial:

moveit::core::RobotState start_state(*move_group.getCurrentState());
geometry_msgs::Pose start_pose2;
start_pose2.orientation.w = 1.0;
start_pose2.position.x = 0.55;
start_pose2.position.y = -0.05;
start_pose2.position.z = 0.8;
start_state.setFromIK(joint_model_group, start_pose2);
move_group.setStartState(start_state);

In your case what you want to do is plan and move from default to A, then plan and move from A to B, etc.