Code Monkey home page Code Monkey logo

Comments (4)

SteveMacenski avatar SteveMacenski commented on September 27, 2024

In some cases, we need to apply only some of the observation sources, for some of the polygons.

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 data vector into the polygons that is quashed from all sources. We'd have to adjust the input to the polygon's functions to being individual data source vectors with their associated names rather than a vector of point values that have no attributes about their ownership (or, I suppose a vector of points with their name associations per-point). Not rocket science, but a little more involved since we need to propagate that source-ownership information to the polygons to be able to check with that parameter.

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

from navigation2.

anaelle-sw avatar anaelle-sw commented on September 27, 2024

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 Polygon, which would be a vector of string containing the names of sources associated to the polygon.
Actually, we have been using this feature for a few months now on our fork (which is based on this repo iron branch). To give you an idea of the required changes to make it work, I tried my best to keep compliance with nav2 coding standards and ~70 lines are modified in total, in four different files. The changes may be a bit different since the main branch would be targeted in this PR case, not the iron branch. I didn't actually check the feasibility on main branch, but the collision monitor node configuration and operation look similar enough on main and iron to not be a big problem in my opinion. I would be happy to discuss more about implementation details before opening a PR, if you think the feature worth the effort.

from navigation2.

SteveMacenski avatar SteveMacenski commented on September 27, 2024

Please open the PR, we can discuss there - but seems OK.

from navigation2.

SteveMacenski avatar SteveMacenski commented on September 27, 2024

To be merged imminently

from navigation2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.