Skip to content

Automapping

Evgeniy Antonov edited this page Jul 30, 2016 · 3 revisions

This wiki page contains description of working process of automapping and exploration_server nodes. Additional information about their params, which are shown in bold in the text below, is available at Nodes summary.

Algorithm

When automapping and exploration_server nodes work in conjuction, they follow this algorithm:

  1. The automapping node determines current robot's position in the "map" frame using the standard tf::Listener.

  2. The automapping node sends this information and possibly list of some excluded_goals (see below) to the exploration_server node through "get_goal_at_map" service and starts waiting for an answer.

  3. The exploration_server node receives the request from automapping node.

  4. The exploration_server node gets the map of an environment using the dynamic_map service.

  5. The exploration_server node finds the closest to robot pixel of the map which is located on a frontier between grey and white regions on it. To do this the exploration_server "scans" pixels around the robot in order shown on the picture below

    way_of_scanner

    and checks each of them whether it lies on the frontier in the following way:

    • it counts total numbers of black (b), white (w) and grey (g) pixels in the region of region_sizeXregion_size size around the checked pixel (see the picture below);

      region_size

    • it checks the value of this condition:

      int total = region_size * region_size;
      if( (w/total*100 > white_perc) && (g/total*100 > grey_perc) && !(b/total*100 > black_perc) )

      The exploration_server node considers that the checked pixels is liyng on a frontier, if the value is true.

  6. The exploration_server node checks whether the found pixel is located closer than delta meters to any of excluded_goals or not. If not, it sends pixel's coordinates in the "map" frame back to the automapping node. In the other situation it continues to search for a suitable pixel as it is described in the last item.

    Excluded_goals are some goals that the explorations_server previously had sent to automapping node, but the latter couldn't send the robot to them due to different reasons.

  7. The automapping node finds the path from current robot's position to the goal obtained from the exploration_server using the make_plan service.

  8. The automapping node finds the closest to the goal pose of the path which is located further than safe_distance from the goal. It sounds strange, so better see the image below. The mentioned pose is shown in pink on it.

    safe_distance

  9. The automapping node "asks" the move_base to bring the robot to the pose which was found in the last item.

  10. All described process repeats again.

Both mentioned nodes finish their work when exploration_server becomes unable to find a new goal (when white-grey frontiers end on the map).

At the beginning of its work (when it doesn't need the exploration_server node) the automapping node also makes a robot rotating a place. It is needed for creating a map of robot's surroundings.

Clone this wiki locally