ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version
  1. In main, change ros::publisher map_pub to ros::Publisher map_pub
  2. 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); }