Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Does octomap calcNumNodes() give toatal number of occupied+free voxels?

Hello i am working with ros octomap library. Octomap function calcNumNodes() returns with size. Function is defined like this:

octomap::OcTreeBaseImpl< NODE, I >::calcNumNodes() const

Traverses the tree to calculate the total number of nodes.

Does it mean this return total number of occupied + free voxels?

Actually i want to find how many voxels has been explored in a cubic volume and i am using this function but from the numbers i feel like its much lesser than how many there should be.

For an alternate there can be a way that i iterate all over the occupied and free voxels and count them, but should i be doing that or not? Pls enlighten me if there is better alternate?

P.S. I tried searching about this but couldn't find a clear answer. If there is an explanation somewhere i will be happy to read that as well.

Thanks.

Does octomap calcNumNodes() give toatal number of occupied+free voxels?

Hello i am working with ros octomap library. Octomap function calcNumNodes() returns with size. Function is defined like this:

octomap::OcTreeBaseImpl< NODE, I >::calcNumNodes() const

Traverses the tree to calculate the total number of nodes.

Does it mean this return total number of occupied + free voxels?

Actually i want to find how many voxels has been explored in a cubic volume and i am using this function but from the numbers i feel like its much lesser than how many there should be.

For an alternate there can be a way that i iterate all over the occupied and free voxels and count them, but should i be doing that or not? Pls enlighten me if there is better alternate?

P.S. I tried searching about this but couldn't find a clear answer. If there is an explanation somewhere i will be happy to read that as well.

Thanks.