Comments (6)
Have you looked into why this is happening, codewise?
@AlexeyMerzlyakov was poking around here in the last 2 years, maybe he has some insight?
from navigation2.
I took a quick look into the code but sadly could not find anything yet. I will see if I can find some time to dive deeper later this week.
from navigation2.
From a quick scan: https://github.com/ros-planning/navigation2/blob/main/nav2_costmap_2d/plugins/inflation_layer.cpp#L216-L242
We find the costs in the master grid (i.e. all of them) adding in a margin for the inflation radius so that obstacles outside of the costmap have their inflations show up before being fully visible. That master grid includes all values, not just those below it.
This is actually one of the main reasons we have the costmap filters API separate from the costmap layers.
Reason for having a layer after the inflation_layer is that we have our own implementation of the keepout zones and we have wanted to inflate those areas bit differently.
It seems like that would meet you need as well.
from navigation2.
Thanks for quick responses and the suggestion. I was looking into this a bit today. Couldn't get much out of it yet, as I was bombarded with other things the whole day.
I believe we are resetting the combined_costmap
before passing it to the plugins at https://github.com/ros-planning/navigation2/blob/main/nav2_costmap_2d/src/layered_costmap.cpp#L217.
Assuming that I have not misunderstood how the iterator on the L218 works we should be going through the plugins in the order we added to the plugins_
array and that order is the order which they are listed on the config.
Based on that we should not have the data of the layer defined after inflation when we are on updating costs on inflation_layer. Or am I missing something?
I also gave a try to the filters as you suggested. I added the Keepout Filter to my global costmap and added publishing of the info message to our implementation and got it to work. Looks that we should able to use the filters instead. Have to do a bit more testing on that. And maybe write a implementation without the FilterInfoCallback layer so we do not need to add dependency to nav_msgs to the piece of our code which handles the "keepout" zones.
from navigation2.
Based on that we should not have the data of the layer defined after inflation when we are on updating costs on inflation_layer. Or am I missing something?
Look at the link to the inflation layer. It looks at the master_grid
- ie the combined costmap. You're right to say that for a given iteration, the inflation layer wouldn't see data above it -- but the very next iteration then it would. What you're seeing is the inflation of obstacles marked in the global map the cycle after they're marked, not the same one. I believe.
Looks that we should able to use the filters instead.
Good 😄 I think that's actually the reason why we added the costmap filters as a separate object: to overcome this exact issue.
And maybe write a implementation without the FilterInfoCallback layer so we do not need to add dependency to nav_msgs to the piece of our code which handles the "keepout" zones.
As is your right, note that the actual costmap filter API does not require it. Our implementations happen to use it in order to generalize the keepout/speed/binary/etc information to be encoded arbitrarily. If you know your exact encoding and its never going to change, no need to overcomplicate your life, I suppose.
This good to close?
from navigation2.
Right, seems that I have misunderstood the ResetMap function. Thank you for the explanations and tips!
from navigation2.
Related Issues (20)
- Local costmap for robot with obstacles HOT 5
- Stop planner if the goal is cancelled HOT 2
- SmacHybrid planner can crash to segmentation fault HOT 3
- Jazzy Release TODO List
- how to change QoS of cost map easily? HOT 1
- No way of decreasing costmap costs over time? HOT 1
- SmacPlannerHybrid segfault HOT 2
- Robot drives near keepout zones, and stops when "incidentally" enters the keepout zone HOT 4
- resetObstacleHeuristic segfaults on goal not in costmap HOT 5
- Can MPPI follow the path with time stamps? HOT 7
- Bug in findPathFurthestReachedPoint() HOT 1
- user-misconfiguration may cause a heap-buffer-overflow bug in nav2_amcl HOT 8
- Problem with bt_navigator turning off when 2d goal pose in ros2 foxy version HOT 1
- Issue with Chinese paths while loading map configuration files HOT 1
- Incomplete closed subscriber `initial_pose_sub_` in `nav2_amcl` may cause use-after-free bug HOT 7
- Obstacle Avoidance Responsibility in Nav2 HOT 1
- Dynamic footprint support in collision monitor (humble) HOT 5
- Source build failing due to missing packages HOT 4
- MPPI generates undesirable paths HOT 3
- Mppi plugin running HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from navigation2.