Just a further question as I can't get replan to work with move. I have two desired positions defined in joint space and the robot moves back and forth between the two of them. At any given moment I can trigger an object in the workspace which without re-planning the robot would collide. If the object is triggered before the execution a suitable plan is obtained. However, if the object is triggered during execution the robot stops and I get the following message:
" ABORTED: Motion plan was found but it seems to be invalid (possibly due to post-processing). Not executing. "
I thought the robot would stop then replan a new path?
Here is a small snippet of the code:
moveit::planning_interface::MoveGroup group2("manipulator");
robot_state::RobotState rs(*group.getCurrentState());
group2.setStartState(rs);
group2.allowReplanning(true);
group2.setPlanningTime(10.0);
group2.startStateMonitor(1.0);
for (int j = 0; j <20; ++j) {
int i=j%2 + 1;
switch (i){
case 1:
group2.setJointValueTarget(q1);
break;
case 2:
group2.setJointValueTarget(q2);
break;
}
group2.setPlannerId("TRRTkConfigDefault");
group2.move();
sleep(1.0);
}
Any help would be appreciated or if anyone has a small example of dynamic replanning I'ld love to see it.
Kind regards
Philip