hpp-fcl: hpp::fcl::OcTree Class Reference

hpp-fcl 1.6.0 HPP fork of FCL -- The Flexible Collision Library

Public Types | Public Member Functions | List of all members
hpp::fcl::OcTree Class Reference

Octree is one type of collision geometry which can encode uncertainty information in the sensor data. More...

`#include <hpp/fcl/octree.h>`

Inheritance diagram for hpp::fcl::OcTree:

## Public Types
typedef octomap::OcTreeNode | OcTreeNode

## Public Member Functions
| OcTree (FCL_REAL resolution)
| construct octree with a given resolution More...
| OcTree (const boost::shared_ptr< const octomap::OcTree > &tree_)
| construct octree from octomap More...
void | computeLocalAABB ()
| compute the AABB for the octree in its local coordinate system More...
AABB | getRootBV () const
| get the bounding volume for the root More...
OcTreeNode * | getRoot () const
| get the root node of the octree More...
bool | isNodeOccupied (const OcTreeNode *node) const
| whether one node is completely occupied More...
bool | isNodeFree (const OcTreeNode *node) const
| whether one node is completely free More...
bool | isNodeUncertain (const OcTreeNode *node) const
| whether one node is uncertain More...
std::vector< boost::array< FCL_REAL, 6 > > | toBoxes () const
| transform the octree into a bunch of boxes; uncertainty information is kept in the boxes. However, we only keep the occupied boxes (i.e., the boxes whose occupied probability is higher enough). More...
FCL_REAL | getOccupancyThres () const
| the threshold used to decide whether one node is occupied, this is NOT the octree occupied_thresold More...
FCL_REAL | getFreeThres () const
| the threshold used to decide whether one node is occupied, this is NOT the octree free_threshold More...
FCL_REAL | getDefaultOccupancy () const
void | setCellDefaultOccupancy (FCL_REAL d)
void | setOccupancyThres (FCL_REAL d)
void | setFreeThres (FCL_REAL d)
OcTreeNode * | getNodeChild (OcTreeNode *node, unsigned int childIdx)
const OcTreeNode * | getNodeChild (const OcTreeNode *node, unsigned int childIdx) const
bool | nodeChildExists (const OcTreeNode *node, unsigned int childIdx) const
| return true if the child at childIdx exists More...
bool | nodeHasChildren (const OcTreeNode *node) const
| return true if node has at least one child More...
OBJECT_TYPE | getObjectType () const
| return object type, it is an octree More...
NODE_TYPE | getNodeType () const
| return node type, it is an octree More...
Public Member Functions inherited from hpp::fcl::CollisionGeometry
| CollisionGeometry ()
virtual | ~CollisionGeometry ()
void * | getUserData () const
| get user data in geometry More...
void | setUserData (void *data)
| set user data in geometry More...
bool | isOccupied () const
| whether the object is completely occupied More...
bool | isFree () const
| whether the object is completely free More...
bool | isUncertain () const
| whether the object has some uncertainty More...
virtual Vec3f | computeCOM () const
| compute center of mass More...
virtual Matrix3f | computeMomentofInertia () const
| compute the inertia matrix, related to the origin More...
virtual FCL_REAL | computeVolume () const
| compute the volume More...
virtual Matrix3f | computeMomentofInertiaRelatedToCOM () const
| compute the inertia matrix, related to the com More...

## Additional Inherited Members
Public Attributes inherited from hpp::fcl::CollisionGeometry
Vec3f | aabb_center
| AABB center in local coordinate. More...
FCL_REAL | aabb_radius
| AABB radius. More...
AABB | aabb_local
| AABB in local coordinate, used for tight AABB when only translation transform. More...
void * | user_data
| pointer to user defined data specific to this object More...
FCL_REAL | cost_density
| collision cost for unit volume More...
FCL_REAL | threshold_occupied
| threshold for occupied ( >= is occupied) More...
FCL_REAL | threshold_free
| threshold for free (<= is free) More...

## Detailed Description

Octree is one type of collision geometry which can encode uncertainty information in the sensor data.

## Member Typedef Documentation

## ◆ OcTreeNode

typedef octomap::OcTreeNode hpp::fcl::OcTree::OcTreeNode

## Constructor & Destructor Documentation

## ◆ OcTree() [1/2]

hpp::fcl::OcTree::OcTree | ( | FCL_REAL | resolution | ) |
| inline

construct octree with a given resolution

## ◆ OcTree() [2/2]

hpp::fcl::OcTree::OcTree | ( | const boost::shared_ptr< const octomap::OcTree > & | tree_ | ) |
| inline

construct octree from octomap

## Member Function Documentation

## ◆ computeLocalAABB()

void hpp::fcl::OcTree::computeLocalAABB | ( |  | ) |
| inlinevirtual

compute the AABB for the octree in its local coordinate system

Implements hpp::fcl::CollisionGeometry.

## ◆ getDefaultOccupancy()

FCL_REAL hpp::fcl::OcTree::getDefaultOccupancy | ( |  | ) | const
| inline

## ◆ getFreeThres()

FCL_REAL hpp::fcl::OcTree::getFreeThres | ( |  | ) | const
| inline

the threshold used to decide whether one node is occupied, this is NOT the octree free_threshold

## ◆ getNodeChild() [1/2]

const OcTreeNode* hpp::fcl::OcTree::getNodeChild | ( | const OcTreeNode * | node,
|  | unsigned int | childIdx
| ) |  | const
| inline

Returns
  const ptr to child number childIdx of node

## ◆ getNodeChild() [2/2]

OcTreeNode* hpp::fcl::OcTree::getNodeChild | ( | OcTreeNode * | node,
|  | unsigned int | childIdx
| ) |  |
| inline

Returns
  ptr to child number childIdx of node

## ◆ getNodeType()

NODE_TYPE hpp::fcl::OcTree::getNodeType | ( |  | ) | const
| inlinevirtual

return node type, it is an octree

Reimplemented from hpp::fcl::CollisionGeometry.

## ◆ getObjectType()

OBJECT_TYPE hpp::fcl::OcTree::getObjectType | ( |  | ) | const
| inlinevirtual

return object type, it is an octree

Reimplemented from hpp::fcl::CollisionGeometry.

## ◆ getOccupancyThres()

FCL_REAL hpp::fcl::OcTree::getOccupancyThres | ( |  | ) | const
| inline

the threshold used to decide whether one node is occupied, this is NOT the octree occupied_thresold

## ◆ getRoot()

OcTreeNode* hpp::fcl::OcTree::getRoot | ( |  | ) | const
| inline

get the root node of the octree

## ◆ getRootBV()

AABB hpp::fcl::OcTree::getRootBV | ( |  | ) | const
| inline

get the bounding volume for the root

## ◆ isNodeFree()

bool hpp::fcl::OcTree::isNodeFree | ( | const OcTreeNode * | node | ) | const
| inline

whether one node is completely free

## ◆ isNodeOccupied()

bool hpp::fcl::OcTree::isNodeOccupied | ( | const OcTreeNode * | node | ) | const
| inline

whether one node is completely occupied

## ◆ isNodeUncertain()

bool hpp::fcl::OcTree::isNodeUncertain | ( | const OcTreeNode * | node | ) | const
| inline

whether one node is uncertain

## ◆ nodeChildExists()

bool hpp::fcl::OcTree::nodeChildExists | ( | const OcTreeNode * | node,
|  | unsigned int | childIdx
| ) |  | const
| inline

return true if the child at childIdx exists

## ◆ nodeHasChildren()

bool hpp::fcl::OcTree::nodeHasChildren | ( | const OcTreeNode * | node | ) | const
| inline

return true if node has at least one child

## ◆ setCellDefaultOccupancy()

void hpp::fcl::OcTree::setCellDefaultOccupancy | ( | FCL_REAL | d | ) |
| inline

## ◆ setFreeThres()

void hpp::fcl::OcTree::setFreeThres | ( | FCL_REAL | d | ) |
| inline

## ◆ setOccupancyThres()

void hpp::fcl::OcTree::setOccupancyThres | ( | FCL_REAL | d | ) |
| inline

## ◆ toBoxes()

std::vector<boost::array<FCL_REAL, 6> > hpp::fcl::OcTree::toBoxes | ( |  | ) | const
| inline

transform the octree into a bunch of boxes; uncertainty information is kept in the boxes. However, we only keep the occupied boxes (i.e., the boxes whose occupied probability is higher enough).

The documentation for this class was generated from the following file:

- include/hpp/fcl/octree.h