ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I'm not quite sure but I think I found part of the answer. My mistake was to assume that the master_grid
would refer to the master costmap as mentioned in the paper. But this does not seem to be the case. If I would like to access the master costmap I should go over the so called layered_costmap_
Even though this may be the ugliest code around this is how I am now able to read out of the master costmap:
// READ
costmap_2d::Costmap2D* layered_costmap = layered_costmap_->getCostmap();
unsigned char* master_array = layered_costmap->getCharMap();
unsigned char element_500 = master_array[500];
But I am still confused how to properly write to the master costmap (layered_costmap_
)... Do I go via the master_grid
? Or do I go over functions like updateWithOverwrite()
?
2 | No.2 Revision |
I'm not quite sure but I think I found part of the answer. My mistake was to assume that the master_grid
would refer to the master costmap as mentioned in the paper. But this does not seem to be the case. If I would like to access the master costmap I should go over the so called layered_costmap_
Even though this may be the ugliest code around this is how I am now able to read out of the master costmap:
// READ
costmap_2d::Costmap2D* layered_costmap = layered_costmap_->getCostmap();
unsigned char* master_array = layered_costmap->getCharMap();
unsigned char element_500 = master_array[500];
But I am still confused how to properly write to the master costmap (layered_costmap_
)... Do I go via the master_grid
? Or do I go over functions like updateWithOverwrite()
? Or may it be sth into the direction of layered_costmap->setCost(x,y,value)
?