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

move_base receiving empty plan

asked 2018-12-04 08:26:32 -0600

RuiLoureiro gravatar image

I'm trying to write a global planner to use with move_base. I'm printing the path in the console and it looks good, but I'm getting a warn from move_base telling me the plan is empty, even though I'm checking in the end of makePlan that it isn't.

This is the part of makePlan that adds the poses to the plan vector:

if (bestPath.size() > 0){
        for (int i = bestPath.size()-1; i >=0; i--){
          GridCell current = bestPath[i];

          GridCell previous;

          if (i != (bestPath.size()-1))
            previous = bestPath[i + 1];

            previous = current;

          //Orient the bot towards target
          tf::Vector3 vectorToTarget;
          vectorToTarget.setValue(current.x - previous.x, current.y - previous.y, 0.0);
          float angle = atan2((double)vectorToTarget.y(), (double)vectorToTarget.x());

          geometry_msgs::PoseStamped pose = goal;

          pose.pose.position.x = current.x;
          pose.pose.position.y = current.y;
          pose.pose.position.z = 0.0;

          pose.pose.orientation = tf::createQuaternionMsgFromYaw(angle);


      ROS_DEBUG("Plan empty: %d", plan.empty());

      return true;

And the warning I'm getting is: [WARN]: Received an empty transformed plan.

Any help will be greatly appreciated.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2019-05-15 10:32:27 -0600

fherrero gravatar image

That warning can also show up when, while using dwa_local_planner with the parameter prune_plan set to true, the robot gets away from the path more than 1 meter. In this case, it's the prunePlan function which returns the empty path. I don't know why such a thing is done, though.

edit flag offensive delete link more


This was really helpful. Not sure why this happens though

xaru8145 gravatar image xaru8145  ( 2022-03-03 03:03:55 -0600 )edit

answered 2018-12-06 09:49:23 -0600

David Lu gravatar image

That error will result when your global plan does not overlap with the local costmap.

edit flag offensive delete link more


Could you please elaborate a bit more on "your global plan does not overlap with the local costmap" or point to more detailed information?

Roberto Z. gravatar image Roberto Z.  ( 2020-11-23 08:10:28 -0600 )edit

The warning can also be related to the footprint of the robot. Try to check the footprint of the robot in costmap_common_params.yaml and make sure your robot radius is in the footprint.

Trayach_ gravatar image Trayach_  ( 2022-05-21 07:00:51 -0600 )edit

Question Tools



Asked: 2018-12-04 08:26:32 -0600

Seen: 1,089 times

Last updated: May 15 '19