ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
One solution is to format your incoming data as a PointCloud and go through existing channels for editing the costmap.
However, if you want to do it in code, you can edit the underlying charMap like this.
unsigned int mx, my;
costmap_temp.worldToMap(point.pose.position.x, point.pose.position.y, &mx, &my);
costmap_temp.setCost(mx, my, LETHAL_OBSTACLE);