ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

How to Segment Octree?

asked 2018-04-25 07:01:12 -0500

zhchpan gravatar image

updated 2018-04-25 07:02:28 -0500

I am doing my path planning task in a large scale outdoor environment.

Suppose I have two ‘octomap::octree’ variables, oct_temp and oct_map. And the current position of robot in the map is already known : P=[x,y,z].

The global map is stored in oct_map, and I want to use oct_temp to store a segmentation of global map which contains nodes within 30 meters from position P in oct_map.

I know the data structure of octree is different from PCL, but I can't extract a specific node of oct_map and copy it to oct_temp.

I stuck on this issue for a long time, any suggestion is very big help for me, thanks!

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2018-04-25 15:26:06 -0500

Segmenting an Octree in the way you want is a non-trivial task. These trees partition space by recursively subdividing cubic volumes into 8 smaller cubes. Therefore trying to extract the region within 30m of a given point may cross many different branches of the tree.

Are you sure you wouldn't be better off using a 2.5D digital elevation map using the grid_map plugin?

edit flag offensive delete link more

Comments

Very thanks for your advice and introducing a new grid_map for me.I will dig it in the future. I want to do path-planning with FCL, since it supports object shape of 'octree'. But I am not sure if 'grid_map' can be used for collision detection?

zhchpan gravatar image zhchpan  ( 2018-04-26 01:46:27 -0500 )edit

FCL doesn't appear to support path planning directly. Are you going to buld the path planner yourself based up this? Do you need to plan complex 3D routes in a 3D environment? We use the grid_map plugin in our lab all the time. We calculate a cost map layer then use standard path planners on that.

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2018-04-27 08:35:21 -0500 )edit

Question Tools

3 followers

Stats

Asked: 2018-04-25 07:01:12 -0500

Seen: 494 times

Last updated: Apr 25 '18