-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[collision monitor] Select the observation sources used with each polygon #4197
Comments
Is it that you want to toggle certain sources for certain polygons, or is it more that you want to disable certain sources when the robot is in certain states (i.e. a box blocking this sensor on a forklift)? Currently, each source can be disabled with a dynamic parameter which you don't want to use that particular source at that moment. Doing what you suggest is possible, but I think its going to be more ugly than you think, given how we pass just a Can you motivate this feature a bit? I'm having a hard time imagining when this would be helpful, with the exception of optimizing performance by only checking certain sources over less number of polygons -- but my intuition is that is going to be negligible improvement to the full system -- but happy to be proved wrong |
In this case, we don't really need to toggle sources while the node is up. Actually, we need to define at launch time which source will be checked with which polygon, for each polygon. Here is our use case for more context: Our robot uses multiple ranges, a laser scan, and multiple point clouds data sources types. Because of robot's geometry and sensors position considerations, we would like to use certain sensors data to protect certain robot's parts. Typically, we want to use the point clouds to protect the whole robot's height (which can be up to 180cm). But the ranges and laser scan data would be no help upper than 20cm height. Since the robot's geometry is not necessarily the same below and above 20cm, the polygon geometry for "ground level" (0 to 20cm) may be different from the polygon geometry for "first level" (20 to 180cm), because we want the polygons to fit the robot's shape at best. So we need two polygons: a first one for "ground level" to check collision using the sources with types range, laser scan and point cloud, and a second one for "first level" to check collision only using the sources with type point cloud. I tried to describe our use case as simply as possible. But please tell me if you need more details or even a diagram. About the implementation, yes I would need to add a new attribute to class |
Please open the PR, we can discuss there - but seems OK. |
To be merged imminently |
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 multiplecollision_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 parameterobservation_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.The text was updated successfully, but these errors were encountered: