Ask Your Question
0

functions to modify an octomap

asked 2012-11-05 09:50:35 -0600

Chong gravatar image

Now I have an octomap in the form of .bt file, and I am able to read and translate it as an OcTree. I hope to rotate or move this octomap with respect to global frame and write it out as .bt file. Are there any functions or examples I can look into? I was reading the documentation of Pose6D and Vector3 but had no idea how to connect these two classes with OcTree.

Thanks!

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2013-02-06 22:41:10 -0600

dornhege gravatar image

The Pose6D defines a transformation. What you'd basically have to do:

  • Create a new empty OcTree
  • Iterate over your OcTree's cells
  • For each cell:
    • Transform its coordinates using your transform
    • Insert this cell at the transformed coordinates into the empty OcTree

However, this is very inefficient and at the same time the only way of doing that in principle. You'll need to identify your use case for that to decide if you really need to do this, otherwise, follow @jj56's advice.

edit flag offensive delete link more
0

answered 2013-02-06 17:03:32 -0600

I think you'd be better off transforming your query frame into the octomap frame rather than vice versa; the octomap grid needs to remain axis-aligned.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-11-05 09:50:35 -0600

Seen: 445 times

Last updated: Feb 06 '13