How to change the bounding box of a obstacle layer costmap in updatebounds and set the cost of each cell to FREE_SPACE?
I am trying to reset the whole obstacle layer to FREESPACE using clearcostmaps 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;
Asked by Dharmateja Kadem on 2016-06-15 16:25:26 UTC
Comments
Under what bounding box?
Asked by David Lu on 2016-06-17 15:10:49 UTC
Thanks for the reply. I updated my question, could you please suggest how to solve this issue?
Asked by Dharmateja Kadem on 2016-06-19 13:32:25 UTC