navigation2
navigation2 copied to clipboard
[collision monitor] Select the observation sources used with each polygon
Feature request
Feature description
Currently, the collision_monitor
associates all the observation sources to all polygons.
In some cases, we need to apply only some of the observation sources, for some of the polygons.
Implementation considerations
A simple solution consists in launching multiple collision_monitor
nodes, and split the observation sources (or polygons) definitions between these nodes. But it would require to define multiple times some of the polygons (or some of the observations sources). Plus, having multiple collision_monitor
nodes it not necessarily a good design since it could induce latency in the velocity command.
A nicer solution consists in defining a new parameter <polygon_name>.observation_sources
, for each polygon. This parameter would be a list of string, containing some (or all) of the names of the defined observation sources. Only the observations sources which names are listed in <polygon_name>.observation_sources
will be used to check collision with the polygon <polygon_name>
. The parameter observation_sources
still exists and contains the names of all observation sources, and the sources definition is unchanged. If the list <polygon_name>.observation_sources
is empty, all sources would be used (to no break previous usage). I can open an PR with an implementation of this solution.