This PR introduces the feature to request the untraversable convex polygon of the area checked for traversability (in attached pictures then thin green line is the area checked for traversability, whereas the red area is the untraversable convex polygon). As side effect, the PR fixes even the mutexing error mentioned in closed PR #61 (the error was easier to provoke while testing this PR, and therefore is part of it)
Main changes:
Message FootprintPath.msg has a new field, compute_untraversable_polygon, which tells if untraversable polygon should be computed while traversability is checked. Default value when creating a new message of type FootprintPath.msg for compute_untraversable_polygon is false, therefore modules using this message do not change.
Class TraversabilityMap has been a bit refactored, and its main parts to check traversability of circular footprint and polygon footprint have been spitted into functions.
If compute_untraversable_polygon if true, then the whole submap is checked for untraversable cells. This changes a bit the behavior of the class TraversabilityMap, as it was used to returning "untraversable path" as soon as one cell was detected as untraversable. Nevertheless, the performance are not worsen by this extra feature, as in general where the robot is walking is traversable, and therefore the traversability map is in most of the cases always checked completely.
Mutexing error occurring while updating traversability layers and at the same time checking if a path is traversable is fixed
ps. PR riles on a new method from GridMapCore (grid_map::Polygon::monotoneChainConvexHullOfPoints) that is going to be exposed soon to the public version.
This PR introduces the feature to request the untraversable convex polygon of the area checked for traversability (in attached pictures then thin green line is the area checked for traversability, whereas the red area is the untraversable convex polygon). As side effect, the PR fixes even the mutexing error mentioned in closed PR #61 (the error was easier to provoke while testing this PR, and therefore is part of it)
Main changes:
FootprintPath.msg
has a new field,compute_untraversable_polygon
, which tells if untraversable polygon should be computed while traversability is checked. Default value when creating a new message of typeFootprintPath.msg
forcompute_untraversable_polygon
is false, therefore modules using this message do not change.TraversabilityMap
has been a bit refactored, and its main parts to check traversability of circular footprint and polygon footprint have been spitted into functions.compute_untraversable_polygon
if true, then the whole submap is checked for untraversable cells. This changes a bit the behavior of the classTraversabilityMap
, as it was used to returning "untraversable path" as soon as one cell was detected as untraversable. Nevertheless, the performance are not worsen by this extra feature, as in general where the robot is walking is traversable, and therefore the traversability map is in most of the cases always checked completely.ps. PR riles on a new method from GridMapCore (
grid_map::Polygon::monotoneChainConvexHullOfPoints
) that is going to be exposed soon to the public version.