Given the formula to calculate a frontier's centroid:
where
In the original code the frontier's size was actually
Such misplacement is inversely proportional to the frontier's size, resulting in unreachable goals. Now fixed.
The distance of a frontier from the robot is now calculated using A*, which approximates the real amount of space the robot needs to travel to reach it.
In case of a distance-greedy exploration config (for example by setting the gain component of the frontier to zero) the choice of a frontier was based exclusively on euclidean distance. In some cases (especially in environments with big rooms) this led to oscillating behaviours of the robot.
By using and actual path approximation the occurrence of such behaviours is greatly reduced (sadly not completely avoided). It works best with a low planner frequency (< 0.5).
A couple of details of this A* implementation:
- It tracks unknown space, it may flag a certain frontier as closest due to a path in unkown space, but the robot may not be able to actually traverse it.
- It ignores costmaps inflation layers, it simply looks for a plausible path.
- It has a state-space cutoff to limit the amount of resources needed, in big spaces if a frontier is outside of the search state space, an arbitrarily big distance is assigned to it.
- Once all frontiers have been computed, they are sorted according to their euclidean distance relative to the robot. The A* distance estimation is performed only on the 20 closest frontiers, to avoid computing thousands of searches for each planner loop. An arbitrarily big distance is assigned to the farther frontiers.
ROS packages for multi robot exploration.
Packages are released for ROS Kinetic and ROS Lunar.
sudo apt install ros-${ROS_DISTRO}-multirobot-map-merge ros-${ROS_DISTRO}-explore-lite
Build as standard catkin packages. There are no special dependencies needed
(use rosdep to resolve dependencies in ROS). You should use brach specific for
your release i.e. kinetic-devel for kinetic. Master branch is for latest ROS.
Packages are documented at ROS wiki.
Packages are licensed under BSD license. See respective files for details.