Skip to content
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

[Input requested] Topological operation costmap layers #2082

Closed
SteveMacenski opened this issue Nov 10, 2020 · 10 comments
Closed

[Input requested] Topological operation costmap layers #2082

SteveMacenski opened this issue Nov 10, 2020 · 10 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed in progress

Comments

@SteveMacenski
Copy link
Member

SteveMacenski commented Nov 10, 2020

Hi,

I figured I'd ask and see if there was interest in something like this. In order to help remove salt and pepper noise from images, typically you might use dilation and erosion. The same concept could apply to navigation2 costmap layers, where an erroneous voxel layer or obstacle layer measurement (or static layer with SLAM session and things moving around) would make in the middle of free space incorrectly.

The idea would be to then offer some convolution or topological costmap layer to remove this noise. Is this something folks think is useful and would use?

To get rid of noise, erode then dilate https://opencv-python-tutroals.readthedocs.io/en/latest/py_tutorials/py_imgproc/py_morphological_ops/py_morphological_ops.html

@ardabbour
Copy link

This is an actual use case in a real life application I developed, especially for adjusting traversability calculations for different robots with different needs. Is this in the same light as the grip_map package's filters? Because eventually that is what we moved to.

@SteveMacenski
Copy link
Member Author

I don't see this particular filter in the filter's package, but its in the same theme. Topological operations are typically used to remove salt and pepper noise from images so it could be good here to remove random single extraneous measurements.

It's also our intent to move to grid_maps, we'd certainly be happy to have you help with that :-)

@ardabbour
Copy link

We should be able to use the MathExpressionFilter to that extent, I think. Maybe a similar concept for costmap2D would be useful (or not, if nav2 is porting to grid_map 🤷). I remember there was such a porting task (I'll try to help if I can😬), but I couldn't find the corresponding issue to link here.

@SteveMacenski
Copy link
Member Author

Its been ported to ROS2 but we haven't started the design effort in replacing costmap with it yet. That's under the environmental modelling ticket.

@fmrico
Copy link
Contributor

fmrico commented Dec 2, 2020

Hi @SteveMacenski , I would like to focus my efforts these weeks on helping to port nav2 to grid_map. I am starting now to do some tests with the grid_map library.

@SteveMacenski
Copy link
Member Author

SteveMacenski commented Dec 2, 2020

It might be good to start gathering thoughts into a design doc (but a little off topic for this particular ticket :-) )

@jediofgever
Copy link
Contributor

jediofgever commented Dec 15, 2020

where to follow up the ticket/discussion related to replacing costmap_2d with grid_map ?, I am interested in this with a potential to take a part in the effort of porting.

@SteveMacenski
Copy link
Member Author

#1278 and mostly on slack in various groups.

@SteveMacenski SteveMacenski added good first issue Good for newcomers help wanted Extra attention is needed labels Apr 6, 2021
ryzhikovas added a commit to ryzhikovas/navigation2-fork that referenced this issue Sep 17, 2021
Filtering of noise-induced standalone obstacles (white costmap pixels) or small obstacles groups is implemented.

A fast algorithm is used to remove single obstacles. This algorithm performs dilation to determine if each obstacle cell has neighbors. Then replaces single obstacles without neighbors with empty cells.

To remove groups of obstacles, segmenting of the costmap image is used. Segments with a size less than the user-specified are deleted.

Resolve ros-navigation#2082.

Signed-off-by: ryzhikovas <ryzhikovas@gmail.com>
ryzhikovas added a commit to ryzhikovas/navigation2-fork that referenced this issue Sep 17, 2021
Filtering of noise-induced standalone obstacles (white costmap pixels) or small obstacles groups is implemented.

A fast algorithm is used to remove single obstacles. This algorithm performs dilation to determine if each obstacle cell has neighbors. Then replaces single obstacles without neighbors with empty cells.

To remove groups of obstacles, segmenting of the costmap image is used. Segments with a size less than the user-specified are deleted.

Resolve ros-navigation#2082.

Signed-off-by: ryzhikovas <ryzhikovas@gmail.com>
ryzhikovas added a commit to ryzhikovas/navigation2-fork that referenced this issue Mar 22, 2022
Filtering of noise-induced standalone obstacles (white costmap pixels) or small obstacles groups is implemented.

A fast algorithm is used to remove single obstacles. This algorithm performs dilation to determine if each obstacle cell has neighbors. Then replaces single obstacles without neighbors with empty cells.

To remove groups of obstacles, segmenting of the costmap image is used. Segments with a size less than the user-specified are deleted.

Resolve ros-navigation#2082.

Signed-off-by: ryzhikovas <ryzhikovas@gmail.com>
ryzhikovas added a commit to ryzhikovas/navigation2-fork that referenced this issue Apr 28, 2022
Filtering of noise-induced standalone obstacles (white costmap pixels) or small obstacles groups is implemented.

A fast algorithm is used to remove single obstacles. This algorithm performs dilation to determine if each obstacle cell has neighbors. Then replaces single obstacles without neighbors with empty cells.

To remove groups of obstacles, segmenting of the costmap image is used. Segments with a size less than the user-specified are deleted.

Resolve ros-navigation#2082.

Signed-off-by: ryzhikovas <ryzhikovas@gmail.com>
ryzhikovas added a commit to ryzhikovas/navigation2-fork that referenced this issue Nov 6, 2022
Filtering of noise-induced standalone obstacles (white costmap pixels) or small obstacles groups is implemented.

A fast algorithm is used to remove single obstacles. This algorithm performs dilation to determine if each obstacle cell has neighbors. Then replaces single obstacles without neighbors with empty cells.

To remove groups of obstacles, segmenting of the costmap image is used. Segments with a size less than the user-specified are deleted.

Resolve ros-navigation#2082.

Signed-off-by: ryzhikovas <ryzhikovas@gmail.com>
@AlexeyMerzlyakov
Copy link
Collaborator

Just for the case: attaching DenoiseLayer HLD and brief scheme of main algorithms, that I've prepared during the code analysis of the #2567. That was useful for me, hope this might help someone in the future.
DenoiseLayer_CodeStructure.pdf

@ryzhikovas
Copy link
Contributor

@AlexeyMerzlyakov, you did a great job creating these schemes. Thank you so much for your help. I'm sorry I didn't think of doing it myself, it would have made the review easier.

ryzhikovas added a commit to ryzhikovas/navigation2-fork that referenced this issue Apr 28, 2023
Filtering of noise-induced standalone obstacles (white costmap pixels) or small obstacles groups is implemented.

A fast algorithm is used to remove single obstacles. This algorithm performs dilation to determine if each obstacle cell has neighbors. Then replaces single obstacles without neighbors with empty cells.

To remove groups of obstacles, segmenting of the costmap image is used. Segments with a size less than the user-specified are deleted.

Resolve ros-navigation#2082.

Signed-off-by: ryzhikovas <ryzhikovas@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed in progress
Projects
None yet
Development

No branches or pull requests

6 participants