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 found what was wrong with the above code, i needed to slow down the node, for some reason(not clear to me) move_base server takes a little more time to refresh the new goal, so when a newer goal is given the client already thinks it has succeeded which was a message from previous goal state. by slowing down the node we give enough time for goal state to be refreshed. it may not be the ideal solution but it worked pretty fine for me. just add the following line at the end of node.it makes node sleep for 1 second.

ros::Duration(1.0).sleep();