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

Distance map parameter meaning #88

husong998 opened this Issue Oct 15, 2018 · 1 comment


None yet
2 participants

husong998 commented Oct 15, 2018


I followed the example code of ProbMap2DistMap.cpp to try to generate a distance map for my own use case. My probability map is simply a single dot, shown as below:
screenshot from 2018-10-15 19-33-36

However, the generated probability map does not make sense to me:
screenshot from 2018-10-15 19-33-18

We expect the distance map to be somewhat cubical or spherecal. The planar shape is really counter intuitive. Can someone explain to me why is it so?

The code snippet used to generate the distance map is as follow:

 // but we generat the distance map only from voxels with an occupancy higher than 0.55, so this section gets not converted
boost::shared_ptr<DistanceVoxelMap> dist_map(gvl->getMap("myDistanceMap")->as<DistanceVoxelMap>());
  dist_map->mergeOccupied(prob_map, Vector3ui(0), 0.55);
  dist_map->parallelBanding3D(m1, m2, m3, PBA_DEFAULT_M1_BLOCK_SIZE, PBA_DEFAULT_M2_BLOCK_SIZE, PBA_DEFAULT_M3_BLOCK_SIZE, 1);

m1, m2, m3 are 1, 1, 4 respectively in this case


What do the parameters of parallelBanding3D mean?
How is the occupancy value calculated in probability map?

Any help is appreciated.


This comment has been minimized.


cjue commented Nov 10, 2018

thank you for your report!

Could you please show me some more of your example code?

Does the initial DistanceVoxelMap after mergeOccupied look as expected, if you don't run the parallelBanding3D step?

What is printed when you left-click on of the visible voxels?

Did you enter one of the "slice modes" by pressing "t" in the visualizer?

Regarding PBA parameters: m1,m2 and m3 are ways to increase the parallelism during the distance computation - for almost all 3D scenarios it's fine to have them at their default values of 1. Setting m3 to 2 or 4 can increase performance a bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment