ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
main
, change ros::publisher map_pub
to ros::Publisher map_pub
In mapCallback
, when you loop over all elements of the grid, you should wrap the else
in brackets like so:
else {
//occupied or unknown
grid[i][j] = true;
currCell++;
grid[i][j]=new_grid;
map_pub.publish(new_grid); }