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

BUG: Got a second transition to DONE

asked 2022-01-14 07:07:57 -0500

dinesh gravatar image

updated 2022-01-18 11:55:30 -0500

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;
}
edit retag flag offensive close merge delete

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.

cst0 gravatar image cst0  ( 2022-01-17 20:41:54 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-01-18 11:32:31 -0500

cst0 gravatar image

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.

edit flag offensive delete link more

Comments

This function is only called when move base aborts the goal.

dinesh gravatar image dinesh  ( 2022-01-18 11:55:57 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2022-01-14 07:07:57 -0500

Seen: 240 times

Last updated: Jan 18 '22