Rosanswers logo

Dear all,

I would like to use dynamicEDT3D that comes with octomap for distance computation. For the moment this question is not necessarily a ROS issue, but I hope to get an answer to my problem here as well.

I am using the latest source code from the octomap github repository and built it. I created a simple environment within blender (2.61) only consisting of a wall spanning from 0,05..x..0,15 -0,5..y..0,5 0,0..z..1,0 (Blender coordinates) and a point lamp. Then, I followed the tutorial to generate a binary tree to initialize the octomap structure.

I used the following commands:

  • Export as X3D Extensible 3D file with 'Y forward' and 'Z up'

  • xsltproc -o collision_test_envYZ.vrml X3dToVrml97.xslt collision_test_envYZ.x3d

    [Info] differs from computed profile='Interactive' [Hint] preferred Dublin Core Metadata Term is name='title' (vice filename) [Hint] Recommended: add for documentation [check X3D source or VRML output to find pertinent head] [Hint] Recommended: add date content for documentation [check X3D source or VRML output to find pertinent head] [Hint] Recommended: add date content for documentation [check X3D source or VRML output to find pertinent head] [Warning] PointLight node location and radius are affected by translation and scaling of parent [PointLight DEF='LA_Point']

  • ./binvox64 -bb -1.0 -1.0 -1.0 1.0 1.0 1.0 -d 200 ~/octomap/data/collision_test_envYZ.vrml

    --- [binvox] mesh voxelizer, version 1.08, build #445 on 2011/08/02 18:49:00 --- written by Patrick Min, 2004-2011

    will force bounding box to be [-1, -1, -1, 1] - [1, 1, 1, 1]

    loading model file... MeshFileIdentifier::*create_mesh_file(/home/fxm/octomap/data/collision_test_envYZ.vrml) VrmlMeshFile::load(/home/fxm/octomap/data/collision_test_envYZ.vrml) Timer [load_vrml] started VRML version 2.0 75 lines read, and 4 top level nodes Mesh::add_def_name_group(Point_TRANSFORM, 0, -1, 0) Mesh::add_def_name_group(group_ME_Cube, 0, 5, 2) Mesh::add_def_name_group(Cube_ifs_TRANSFORM, 0, 5, 1) Mesh::add_def_name_group(Cube_TRANSFORM, 0, 5, 0) freeing VRML memory Timer [load_vrml] stopped at 0.000439 seconds bounding box: [0.05, -0.5, 0, 1] - [0.15, 0.5, 1, 1] normalization transform: (1) translate [-0.05, 0.5, -0, 1], (2) scale 1, (3) translate [0, 0, 0] removed 0 faces before rendering

    voxel model dimension: 200 Graphics card and driver information: Vendor: NVIDIA Corporation Renderer: GeForce GT 330M/PCI/SSE2 Version: 3.3.0 NVIDIA 270.41.06 Voxels::init(200, 200, 200) calling set clip box SimpleMeshView::set_clip_box Voxelizer::carve_voxelize doing x direction doing y direction doing z direction Voxelizer::parity_vote_voxelize doing x direction doing y direction doing z direction Voxels::process_votes Voxelizer::voxelize took 0.680941 seconds area filled: 20 x 200 x 200 integer bounding box: [0,0,0] - [19,199,199]

    writing voxel file... VoxelFile::write_file(/home/fxm/octomap/data/collision_test_envYZ.binvox) Wrote 800000 set voxels out of 8000000, in 62748 bytes done

  • ./binvox2bt --mark-free ../data/collision_test_envYZ.binvox

    Reading binvox file ../data/collision_test_envYZ.binvox. reading binvox version 1 Generating octree with leaf size 0.005

    Read data: ....................

    read 800000 voxels, skipped 0 (out of bounding box)

    Pruning octree

    Writing octree to ../data/collision_test_envYZ.binvox.bt


In the resulting binary tree, the bounding box of the binary tree is not [-1,-1,-1][1,1,1] as specified but appears to be something like [0.05,-0.5,0] - [1.05,0.5,1] (see octovis). Why is that? Did I do something wrong?

Originally posted by Felix Messmer on ROS Answers with karma: 198 on 2013-01-17

Post score: 1

Original comments

Comment by AHornung on 2013-01-18:
I agree that maybe ROS answers is not the best for issues related directly to OctoMap (not in ROS). If there is enough demand, I can create a mailing list or OctoMap-related questions and issues...

Comment by AHornung on 2013-01-23:
The new mailing list for OctoMap is here: https://groups.google.com/d/forum/octomap This should be used in the future for general (non-ROS related) questions.


1 Answer 1


Rosanswers logo

binvox sometimes behaves strange, maybe it ignores the bounding box in a later step. As a first measure, I would get the latest version from the author's homepage (future versions of OctoMap will no longer contain binvox binaries anyways) and see if the problem is resolved with it.

I usually had good results with binvox using the -v or -e options, ignoring -bb. Instead, try using the --bb and --offset parameters of binvox2bt, that worked more reliable.

To verify whether the intermediate binvox file is OK you can use viewvox, and then octovis to verify the final .bt output.

Originally posted by AHornung with karma: 5904 on 2013-01-18

This answer was ACCEPTED on the original site

Post score: 0


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.