How to change the bounding box of a obstacle layer costmap in updatebounds and set the cost of each cell to FREE_SPACE?

asked 2016-06-15 16:25:26 -0500

Dharmateja Kadem gravatar image

updated 2016-06-19 13:30:42 -0500

I am trying to reset the whole obstacle layer to FREE_SPACE using clear_costmaps service but it is only clearing the area under the bounding box. I am not able to figure out how to increase the bounding box to whole obstacle layer and set each cell's cost value to FREE_SPACE. Can someone help how to solve this?

Edit: I tried to change the parameters of UpdateBounds function in ObstacleLayer.cpp (shown below) to clear the obstacle layer of global costmap. I am trying to clear the whole obstacle layer, while clearing it is also clearing the static layer. How to clear the obstacle layer of the whole global costmap without clearing static layer?

void ObstacleLayer::updateBounds(double robot_x, double robot_y, double robot_yaw, double* min_x,
                                          double* min_y, double* max_x, double* max_y)
{
  if (rolling_window_)
    updateOrigin(robot_x - getSizeInMetersX() / 2, robot_y - getSizeInMetersY() / 2);
  if (!enabled_)
    return;
  useExtraBounds(min_x, min_y, max_x, max_y);

  bool current = true;
  std::vector<Observation> observations, clearing_observations;
edit retag flag offensive close merge delete

Comments

Under what bounding box?

David Lu gravatar image David Lu  ( 2016-06-17 15:10:49 -0500 )edit

Thanks for the reply. I updated my question, could you please suggest how to solve this issue?

Dharmateja Kadem gravatar image Dharmateja Kadem  ( 2016-06-19 13:32:25 -0500 )edit