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

Map wraps around itself #215

Closed
mhowe8 opened this issue Jun 13, 2022 · 2 comments
Closed

Map wraps around itself #215

mhowe8 opened this issue Jun 13, 2022 · 2 comments

Comments

@mhowe8
Copy link

mhowe8 commented Jun 13, 2022

I am a university student using your elevation_mapping package for our robot. I am running the turtlebot demo in elevation_mapping and I wrote a program that prints the elevation map being read in real time. My main issue is right now is that the points of the point cloud that make contact beyond the edges of the elevation map wrap around itself, and I am wondering if I need to move the grid map frame or the grid map to a new position.
image

The points represent the point cloud and the 'n's represent nan values. As you can see, the left side of the point cloud bleeds over to the right. When I spin the robot left 90 degrees, this is what I get:
image (1)

I understand the map is stored as a circular buffer; is the fact that I am printing the map is what the cause of this issue is in the first place? Because of this, I don't see how I would successfully generate a cost map for path planning when the map wraps around.
Thank you.

@maximilianwulf
Copy link
Contributor

Hey, yes, do map.convertToDefaultStartIndex(); before the other operations. That should solve your issue, for instance see https://github.com/ANYbotics/grid_map/blob/master/grid_map_filters/src/BufferNormalizerFilter.cpp#L27

@mhowe8
Copy link
Author

mhowe8 commented Jun 15, 2022

That worked perfectly! Thank you so much!

@mhowe8 mhowe8 closed this as completed Jun 15, 2022
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