Skip to content
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

How are the empty and occupied nodes specified? #405

Open
NoufFarhoud99 opened this issue Nov 21, 2023 · 1 comment
Open

How are the empty and occupied nodes specified? #405

NoufFarhoud99 opened this issue Nov 21, 2023 · 1 comment
Labels

Comments

@NoufFarhoud99
Copy link

Hello,

I am trying to create an algorithm that creates an occupancy map made of three types of nodes: Empty, Occupied and a third option that basically requires more information to be classified into empty and occupied.
I would like to understand how the empty and occupied nodes are specified, therefore, i did the following:
I am currently using the following to create the occupancy map:
#construct octree
tree = octomap.OcTree(0.01) #specifies the resolution or voxel size of the octree.
tree.insertPointCloud(points, origin=np.array([0, 0, 0], dtype=float))
occupied, empty = tree.extractPointCloud()

I have cheked the Extract pointcloud(): https://github.com/wkentaro/octomap-python/blob/feed59d2070a46b3208c486e125d1c48d5e8f89b/octomap/octomap.pyx#L491 which led me to isNodeOccupied():

inline bool isNodeOccupied(const OcTreeNode* occupancyNode) const{
. Now i understand that getlogodds returns a value (
inline float getLogOdds() const{ return value; }
) and compares it to probability threshold. I found how the threshold is calculated however, i am unable to figure out how the value returned is calculated.
I believe the value is found using compute update as well as update node (
computeUpdate(scan, sensor_origin, free_cells, occupied_cells, maxrange);
).

I have reached a dead end and am in need of assistance.
Can someone help me figure out how value is computed?

@ahornung
Copy link
Member

Best have a look at the paper linked from https://octomap.github.io/ - it should explain everything behind it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants