Skip to content

How are the empty and occupied nodes specified? #405

Closed
@NoufFarhoud99

Description

@NoufFarhoud99

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions