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

Changing the resolution of a grid_map #60

Closed
stonier opened this issue Apr 7, 2016 · 4 comments
Closed

Changing the resolution of a grid_map #60

stonier opened this issue Apr 7, 2016 · 4 comments

Comments

@stonier
Copy link
Contributor

stonier commented Apr 7, 2016

Without actually changing the lengths, nor the position of the grid_map window.

We've been playing around with something in cost_map/pull-requests/17.

Thoughts?

@pfankhauser
Copy link
Member

Here are two easy ways to change the resolution of a grid map.

  • Create a new grid map with the desired resolution, and use the addDataFrom(...) from method to add the data from the source grid map.

  • Use the changeResolution(...) method of the new GridMapCvProcessing class in grid_map_cv. This methods leverages the OpenCV interpolation functions to change the resolution. You can run the demo with

    roslaunch grid_map_demos resolution_change_demo.launch
    

Does this solve your problem?

@pfankhauser
Copy link
Member

@stonier Any update on this?

@stonier
Copy link
Contributor Author

stonier commented Sep 21, 2016

Missed my emails on this one. addDataFrom() could work, though it means manually doing the rest of the details (setting the length, position) manually. I feel having methods separate to the class (like the changeResolution() is the best course here since there are multiple ways of handling the changed resolution.

For our needs, I probably will build our own changeResolution() methods. Linking in openCV is often undesirable for us - we often drop it for product code.

@pfankhauser
Copy link
Member

Ok, I see. In this case, I think the best approach would be to create a new class GridMapProcessing in grid_map_core to perform a resolution change without dependency on OpenCV. Let me know if you need any support.

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