MoveIt! planning not continue after successful planning?
I was following this movegroup interface tutorial (http://docs.ros.org/hydro/api/pr2_moveit_tutorials/html/planning/src/doc/move_group_interface_tutorial.html) on my own 7DOF robot. It has successfully found a solution but the program is not continuing to the next line of code. (See code below, so it is not printing out "Visualizing ..." in terminal)
moveit::planning_interface::MoveGroup::Plan my_plan;
bool success = group.plan(my_plan); // stuck here
ROS_INFO("Visualizing plan 1 (pose goal) %s",success?"SUCCESSFUL":"FAILED");
sleep(5.0);
The last displayed lines are:
[ INFO] [1459836629.415696549]: Solution found in 0.395740 seconds
[ INFO] [1459835061.553672913]: SimpleSetup: Path simplification took 0.029544 seconds and changed from 3 to 2 states
Anyone has any idea why this is happening? (I can see in RViz that the planner definitely found the path, but it won't let me continue so I can publish it to "/movegroup/displayplanned_path"). Either something is blocking the process or is waiting for some messages.
Asked by johnyang on 2016-04-05 01:42:14 UTC
Answers
I found out where the problem is now after read this post: https://groups.google.com/forum/#!topic/moveit-users/s9b7IJuKRKY You have to have the spinner at the right place. I had it wrapped around in an if statement, so the actionlib is not actually working properly without the asyncspinner set properly.
ros::AsyncSpinner spinner(4);
spinner.start();
Asked by johnyang on 2016-04-07 18:03:34 UTC
Comments
I was about to suggest that
Asked by blancoys on 2018-04-20 11:09:55 UTC
Comments
I found a possible cause: It is stuck at waitForResult() in the plan() function. The problem is similar to https://groups.google.com/forum/#!topic/moveit-users/s9b7IJuKRKY but I'm running group.plan(my_plan) inside main function.
Asked by johnyang on 2016-04-06 22:50:15 UTC
Anyone has any clue how to get out of this waitForResult() function. (it is waiting for cur_simple_state_ == SimpleGoalState::DONE according to the source code)
Asked by johnyang on 2016-04-06 22:50:25 UTC