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

OccupancyGridUpdate - Data is not being processed correctly #896

Closed
Eric-Bwr opened this issue Sep 6, 2022 · 2 comments
Closed

OccupancyGridUpdate - Data is not being processed correctly #896

Eric-Bwr opened this issue Sep 6, 2022 · 2 comments

Comments

@Eric-Bwr
Copy link
Contributor

Eric-Bwr commented Sep 6, 2022

Using Ubuntu 20.04 with ros2-foxy.

The std::copy is faulty, replacing it by a for loop fixes the incorrect updating of the costmap.
You are currently not able to set each pixels value as the std::copy fills the entire x axis with the first value of itself.
Fixed in: #895

@Eric-Bwr
Copy link
Contributor Author

Eric-Bwr commented Sep 6, 2022

One can simply reproduce this issue by trying to upload a checker-board pattern. (x % 2 == 0 || y % == 0) and change the color depending on that:
if(bbX % 2 == 0 || bbY % 2 == 0) theMessage->data[bbX + bbY * bW] = 2; else theMessage->data[bbX + bbY * bW] = 50;

@Eric-Bwr
Copy link
Contributor Author

I will close this because the fix has been merged.

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

1 participant