how to edit costmap data manually?
Hello :) i wanna edit costmap data manually. i have x and y location of map data given by hector_mapping. and my costmap_2d_ros_ data is runs ok like this:
costmap_2d_ros_ = new costmap_2d::Costmap2DROS("global_costmap", tfl_);
how can i do?
costmap_2d::Costmap2D costmap_temp;
costmap_2d_ros_->getCostmapCopy(costmap_temp);
int map_width = costmap_temp.getSizeInCellsX();
int map_height = costmap_temp.getSizeInCellsY();
int num_map_cells = map_width * map_height;
const unsigned char* occupancy_grid_array;
occupancy_grid_array = costmap_temp.getCharMap();
geometry_msgs::PoseStamped lethal_obstacle;
point.pose.position.x=0.1;
point.pose.position.y=0.1;
if(??? QUESTION1 ???)
{
??? QUESTION2 ???=costmap_2d::LETHAL_OBSTACLE;
}
??? QUESTION3 ??? now convert costmap_2d::Costmap2D (costmap_temp) to costmap_2d::Costmap2DROS.