-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Add preferred lanes CostmapFilter #1522
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
Comments
That's an interesting approach, I hadn't thought of something like that. It seems a little non-general but it might function just as well. If you know the lane boundaries (ei you know the locations of the sides widthwise of the lane) why not draw a straight line of lethal cost across it, lets say, 1 meter behind the robot? That would push the robot forward in the lane without the sides that make up the U-shape. That seems less optimal but functional once in the lane, but how do you track paths long term through a facility to route through lanes in their proper direction? ie I'm in a warehouse and in order to get from point A to B, I need to go through 4 different lanes and then navigate a little bit to and from them on either end to reach my target positions? It seems with the directionality aspect, it would require less information embedded in just an image but also work in the planner itself. Something like a sparse graph of nodes from the start of the lane and each of the valid exit locations to create paths to connect to, and then the usual dense plans from A*/Dij. after leaving a lane to get to the positions. The paths inside of the lanes are just straight lines in the direction for the controller to track. With that suggestion, its lesser a discussion of costmap plugins and more of a discussion on semantic labeling of the map and creating a sparse-graph planner. I'm not sure if that's in scope for what you want to be working on -- but certainly that will generalize better and deal with the on-ramp and off-ramps with multiple segments + free-space planning. Let me know your thoughts. If nothing else, I think still implementing a lanes layer without directionality as a costmap layer has alot of value. This is because it can be both for lanes for the robot to follow, but also if the information is encoded not as "free" and "occupied" but with variable cost from 0-254, then we can create suggested paths and let them deviate. Or create areas of higher cost to ideally stay out of, but are not strictly required to. This can be thought of as the keepouts but with variable cost. But perhaps that can be properly represented in the keepouts layer itself. |
Добрый день, @AlexeyMerzlyakov! |
@AlexeyMerzlyakov what are your thoughts now on the preferred lanes for costmap filters? I think we've decided at most to have it be non-directional, and some discussion on rolling it into another layer with an inverted use. Do you think we should do that or have a different unique layer for it? I like the idea of a unique layer to highlight it, but if its functionally the same, there's alot of overlap |
According to latest discussion in connected #1263, we have agreed that lanes should be preferred and omni-directional. Based on loaded map, |
What? I don't understand your comment at all, what does rolling costmaps or inflation have to do with anything here? |
As we discussed, the lane's boundary could have a cost smoothly increasing from I've draw some picture of how costmap might look for the lanes from #1263 (comment) comment (I am not an artist, too, but hoping this will make a little clearer the meaning): |
Sure - but how does this functionally differ from a inverted keepout map? I think that was the initial question I posed; do we need a specifically separate lanes layer or do we provide instruction for using it both ways? The gradient, at the end of the day, is up to the application / company to make in the file, so I'm not sure we need to discuss it further than "sure, someone could do that", but if the gradient is in the file, then from our perspective, nothing is different. Read file -> advertise it -> read topic -> set mapped values in internal costmap |
Yes, I also agree that this might covered by I'll depict it in a new separate "Costmap Filters" section in |
Closed by mistake. Re-opening. |
I disagree with any automatic gradient adding. That should be up to the application designer, mostly because I don't think that gradient is likely all that useful. The issue its trying to solve should be considered more carefully on an application by application basis if you want any deviation, and how much to give (likely far more leeway that isn't easily represented as an automatically generated gradient). |
OK, I've added a support of intermediate states from [0..100] OccupancyGrid data range in |
OK. So any reason to have a separate lanes layer at this point or just close this particular ticket and document the lanes usecase of keep out? |
I see no other reason to keep this ticket opened futhermore: inversion of input map-filter could be either made by ROS2 application develops, e.g. by using colors inversion in favourite graphics redactor. So, I think, |
* Add costmap filters with KeepoutFilter realization * Cover preferred lanes in industries by KeepoutFilter (#1522) * * Resolve review questions * Add new OccupancyGrid class into nav2_util - API wrapper for original OccupancyGrid * Add declareParameter() with one argument to Layer API * Resolve 2nd review questions * Remove OccupancyGrid class wrapper * Add Costmap2D constructor with OccupancyGrid instead * Add launch-file to help running CostmapFilterInfo publisher * Code clean-up * Resolve 3rd review questions (partially) * Fix hidden problems during the shared handling of copstmap_ resource * Cast into double during the linear conversion of OccupancyGrid data * Add keepout_filter system test * Add error message when base or multiplier is not set in ConstmapFilterInfo message * Add comment to dummy info publisher launch-file * Add costmap_conversion unit test * Add declareParameter() unit test * Add keepout zone entering check in FiltersTester * Fix upper window boundary calculation in KeepoutFilter * Correct mutex header in costmap_filters * Added KeepoutFilter::isActive() method for filter readiness check * Add KeepoutFilter unit test * Correct the code to consider node_ as a weak pointer * Enhance KeepoutFilter unit test coverage by adding different surfaces * Made CostmapFilters and minor documentation updates * Fixed typo * Move CostmapFilterInfo publisher to Map Server * Add costmap_filter_info.launch.py into tb3_simulation_launch.py * Remove hard-coded bar areas from test_keepout_filter * Add CostmapFilters HLD * Fix doc after review * Fix mask parameter initialization in bringup_launch.py * Improve tests and remove costmap-filters from nav2_bringup * Update map mask to filter mask in HLD * Small fix-ups * Fix error message
* Add costmap filters with KeepoutFilter realization * Cover preferred lanes in industries by KeepoutFilter (ros-navigation#1522) * * Resolve review questions * Add new OccupancyGrid class into nav2_util - API wrapper for original OccupancyGrid * Add declareParameter() with one argument to Layer API * Resolve 2nd review questions * Remove OccupancyGrid class wrapper * Add Costmap2D constructor with OccupancyGrid instead * Add launch-file to help running CostmapFilterInfo publisher * Code clean-up * Resolve 3rd review questions (partially) * Fix hidden problems during the shared handling of copstmap_ resource * Cast into double during the linear conversion of OccupancyGrid data * Add keepout_filter system test * Add error message when base or multiplier is not set in ConstmapFilterInfo message * Add comment to dummy info publisher launch-file * Add costmap_conversion unit test * Add declareParameter() unit test * Add keepout zone entering check in FiltersTester * Fix upper window boundary calculation in KeepoutFilter * Correct mutex header in costmap_filters * Added KeepoutFilter::isActive() method for filter readiness check * Add KeepoutFilter unit test * Correct the code to consider node_ as a weak pointer * Enhance KeepoutFilter unit test coverage by adding different surfaces * Made CostmapFilters and minor documentation updates * Fixed typo * Move CostmapFilterInfo publisher to Map Server * Add costmap_filter_info.launch.py into tb3_simulation_launch.py * Remove hard-coded bar areas from test_keepout_filter * Add CostmapFilters HLD * Fix doc after review * Fix mask parameter initialization in bringup_launch.py * Improve tests and remove costmap-filters from nav2_bringup * Update map mask to filter mask in HLD * Small fix-ups * Fix error message
Feature request
Feature description
The ticket is a branch from #1263 meta-ticket. It contains all background and work related to "lanes" features only.
Implementation considerations
The suggested implementation implies usage of directed lanes. There could be direction maps encoded as PGM-files and plugin for Costmsp2D forcing robot to move in specified direction each time when robot enters the directed lane.
The design is just as follows:
Map-server part:
Another idea - is to group by 2 bytes sequentially going in PGM into
float16[]
data. Here we have much more abilities. E.g. values in {0.0 ... 360.0} range may represent direction in degrees, negative values will represent "no lane here". However, this idea is not much friendly in terms of UI when making direction maps manually.OccupancyGrid
map with its data encoded the same rule as above.Costmap2D plugin part:
CostmapFilters
plugin and then processed byDirectedLanesFilter
class as mentioned in Costmap Filters (keep out, preferred lanes, slow/safety zones) #1263, derived from basicCostmapFilters
class.DirectedLanesFilter
will generate U-shaped figure around the robot in the costmap layer. The borders of U-figure will be aLETHAL_OBSTACLE
. Inside U-shaped figure will be a costmap gradient. This should force robot to move in desired direction like presented in the picture below:Usecase:
Limitations:
Possible issues:
The text was updated successfully, but these errors were encountered: