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

maxRGB - alpha broke color logic #4233

Closed
pank-su opened this issue Apr 2, 2024 · 3 comments
Closed

maxRGB - alpha broke color logic #4233

pank-su opened this issue Apr 2, 2024 · 3 comments

Comments

@pank-su
Copy link

pank-su commented Apr 2, 2024

There are potential issues with handling transparency (alpha channel) in map server images.

  • Black pixels (color #000000) with occupied_thresh 0.9: Black might be misinterpreted as "unknown" or "not occupied" if the background is transparent.
  • White pixels on transparent backgrounds: White pixels might be considered less occupied than transparent areas.

Possible solutions:

  • Remove transparency handling: This simplifies the code but might lead to unexpected behavior with transparent images.
  • Document the issue: Clearly explain this potential problem in the documentation to avoid confusion.
  • Configuration option for transparency: Implement a setting to control how the server handles transparency in images. This allows for more flexibility based on specific use cases.

https://github.com/ros-planning/navigation2/blob/2ecc91e47bb09485289531144ab9b038f4cfc432/nav2_map_server/src/map_io.cpp#L204C8-L205C99

@SteveMacenski
Copy link
Member

SteveMacenski commented Apr 2, 2024

Quite frankly, this has been inherited and inherited since the dawn of modern robotics even pre-ROS' rise. I won't defend any particular element of it, honestly its not a place I spend alot of my time. I support any additional documentation you think would clarify this for users! Though, I don't think we're going to be making any changes to this given the wide reaching ramifications and the integrations with other SLAM and localization libraries that it could break in subtle ways for alot of users

Can you submit a PR with your documentation clarification?

@SteveMacenski
Copy link
Member

@pank-su any update?

@SteveMacenski
Copy link
Member

Closing without update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants