BUG: Got a second transition to DONE
When i am sending the move base goal from my ros node. Sometime i'm getting this error message. Can anyone tell me what this bug means and what is causing it?
ROS_INFO("cognition: Sending move_base/clear_costmaps request!");
std_srvs::Empty srv;
bool clear_costmap = clear_costmap_client.call(srv);
if (clear_costmap)
{
ROS_INFO("cognition: move_base/clear_costmaps done!");
retry_count = 0;
publishMoveBaseGoal(mission.way_pnts[CURR_GOAL_IND].pose);
}
else
{
ROS_ERROR("cognition: Failed to call service move_base/clear_costmaps");
}
void publishMoveBaseGoal(const geometry_msgs::Pose pose) {
goal.target_pose.header.stamp = ros::Time::now();
goal.target_pose.pose = pose;
ac.sendGoal(goal,
boost::bind(&Cognition::doneMoveBaseCb, this, _1, _2),
MoveBaseClient::SimpleActiveCallback(),
MoveBaseClient::SimpleFeedbackCallback());
ROS_INFO("cognition: move_base goal sent for %d time", retry_count);
EXE_MISSION = false;
}
Asked by dinesh on 2022-01-14 08:07:57 UTC
Answers
It looks like you're wrapping the sending of a goal via a custom function: publishMoveBaseGoal
, so it's hard to tell what's going on here but I have two guesses. First, you might not be evaluating if you've successfully completed the goal before sending a new one. If you wait until the action has completed you won't have two competing goals potentially leading to this state. The other thing to check would be if you're publishing directly to the /move_base/goal
topic (as the function name implies). The move base goals are implemented as an Action, so you should be calling them via the actionlib client and then waiting for completion.
Asked by cst0 on 2022-01-18 12:32:31 UTC
Comments
This function is only called when move base aborts the goal.
Asked by dinesh on 2022-01-18 12:55:57 UTC
Comments
Looks like this is the actual line that's getting called from. That's the actionlib client, so it's probably something to do with how you're calling the move_base goal.
Asked by cst0 on 2022-01-17 21:41:54 UTC