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

VoxelMap center to quadrotor's position #5

Closed
mktk1117 opened this issue Jul 27, 2018 · 4 comments
Closed

VoxelMap center to quadrotor's position #5

mktk1117 opened this issue Jul 27, 2018 · 4 comments

Comments

@mktk1117
Copy link

Hi! Thank you for your library!

I tried to use this planner with rotors simulator with gazebo.
Then, I want to set the center of the VoxelMap to a quadrotor's position.
When I just set the origin with VoxelMapUtil's setMap function, it just shifted the map.
selection_003

How can I fix this?

Thank you!

@sikang
Copy link
Owner

sikang commented Jul 27, 2018 via email

@mktk1117
Copy link
Author

Thank you Sikang!

Yes, I did center - 0.5dim.

But the problem is the voxel map takes the position of the points from the world frame.
For example, if an obstacle is at (x=1, y=0) and the center of the voxel map is (x=-1, y=0),
the obstacle's position in the voxel map should be (x=2, y=0) (looking from a quadrotor's position)
But, it becomes just (x=1, y=0)
So, when the robot moves, only the origin of the voxel map changes and the voxels inside do not change.

@mktk1117
Copy link
Author

Hi Sikang!

I found the solution.
I didn't call VoxelGrid::allocate before adding the cloud.
After I called this fuction to set the origin, the problem fixed.

Thank you!

@sikang
Copy link
Owner

sikang commented Jul 28, 2018

👍

@sikang sikang closed this as completed Jul 28, 2018
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