Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

HierarchicalObstacle Class Reference

Hierarchically defined obstacle containing multiple obstacles. More...

#include <PlannerObstacles.h>

Inheritance diagram for HierarchicalObstacle:

Detailed Description

Hierarchically defined obstacle containing multiple obstacles.

Definition at line 568 of file PlannerObstacles.h.

List of all members.

Public Member Functions

 HierarchicalObstacle ()
 default constructor
 HierarchicalObstacle (const HierarchicalObstacle &ho)
 copy constructor (deep copy obstacles)
HierarchicalObstacleoperator= (const HierarchicalObstacle &o)
 Assignment, should not use plist::Dictionary version.
virtual ~HierarchicalObstacle ()
 destructor
template<class T >
void getObstacles (std::vector< T > &obs) const
 returns obstacles of specified type
const std::vector
< PlannerObstacle2D * > & 
getObstacles () const
virtual bool collides (const fmat::SubVector< 2, const fmat::fmatReal > &point) const
 For obstacle on point.
virtual fmat::Column< 2 > getSupport (const fmat::SubVector< 2, const fmat::fmatReal > &direction) const
virtual BoundingBox2D getBoundingBox () const
 get boundaries of the current obstacle
virtual fmat::Column< 2 > getCenter () const
 get center point of obstacle
virtual fmat::Matrix< 2, 2 > getRotation () const
virtual void updatePosition (const fmat::SubVector< 2, const fmat::fmatReal > &newPos)
virtual void updateRotation (const fmat::Matrix< 2, 2 > &rot)
 update to specified orientation about the center
virtual void rotate (const fmat::SubVector< 2, const fmat::fmatReal > &origin, const fmat::SubMatrix< 2, 2, const fmat::fmatReal > &rot)
virtual fmat::Column< 2 > gradient (const fmat::SubVector< 2, const fmat::fmatReal > &pt) const
virtual std::string toString () const
 return current value as a string
void clear ()
 clear all obstacles
void add (PlannerObstacle2D *o)
 add obstacle to end of obstacle list; obstacles should be transformed in terms of Hierarchical Obstacle
virtual HierarchicalObstacleclone () const __attribute__((warn_unused_result))
 clone definition for HierarchicalObstacle

Protected Member Functions

void recalculateBoundingBox ()
 recalculate rectangular bounding box based on contained obstacles
void expandBoundingBox (PlannerObstacle2D &other)
 grow the bounding box to include that of other

Protected Attributes

std::vector< PlannerObstacle2D * > obstacles
 the obstacles contained in the hierarchy
BoundingBox2D aabb
 axis-aligned bounding box of all obstacles
fmat::Column< 2 > center
 origin of the obstacle, all sub-obstacles will be relative to this point
fmat::Matrix< 2, 2 > rotation
 rotation about the origin

Static Protected Attributes

static const std::string autoRegisterName = PlannerObstacle2D::getRegistry().registerType<HierarchicalObstacle>("Hierarchy")
 stores the class name used for polymorphic load/save

Constructor & Destructor Documentation

HierarchicalObstacle::HierarchicalObstacle (  ) 

default constructor

Definition at line 588 of file PlannerObstacles.h.

HierarchicalObstacle::HierarchicalObstacle ( const HierarchicalObstacle ho  ) 

copy constructor (deep copy obstacles)

Definition at line 592 of file PlannerObstacles.h.

virtual HierarchicalObstacle::~HierarchicalObstacle (  )  [virtual]

destructor

Definition at line 616 of file PlannerObstacles.h.


Member Function Documentation

void HierarchicalObstacle::add ( PlannerObstacle2D o  ) 

add obstacle to end of obstacle list; obstacles should be transformed in terms of Hierarchical Obstacle

Memory allocation of o will be claimed by the hierarchical obstacle.

Definition at line 657 of file PlannerObstacles.h.

Referenced by ShapeSpaceCollisionCheckerBase< N >::addObstacleFromCollisionModel(), LinkComponent::getObstacles(), and ShapeSpaceCollisionCheckerBase< N >::getRobotObstacle().

void HierarchicalObstacle::clear (  )  [virtual]

clear all obstacles

Reimplemented from plist::DictionaryBase.

Definition at line 649 of file PlannerObstacles.h.

Referenced by operator=(), and ~HierarchicalObstacle().

HierarchicalObstacle * HierarchicalObstacle::clone (  )  const [virtual]

clone definition for HierarchicalObstacle

Reimplemented from plist::DictionaryOf< PO, Alloc >.

Definition at line 30 of file PlannerObstacles.cc.

bool HierarchicalObstacle::collides ( const fmat::SubVector< 2, const fmat::fmatReal > &  point  )  const [virtual]

For obstacle on point.

Definition at line 904 of file PlannerObstacles.cc.

Referenced by gradient().

void HierarchicalObstacle::expandBoundingBox ( PlannerObstacle2D other  )  [protected]

grow the bounding box to include that of other

Definition at line 893 of file PlannerObstacles.cc.

Referenced by add(), and recalculateBoundingBox().

virtual BoundingBox2D HierarchicalObstacle::getBoundingBox (  )  const [virtual]

get boundaries of the current obstacle

Implements PlannerObstacle< N >.

Definition at line 630 of file PlannerObstacles.h.

Referenced by ShapeSpacePlannerXYTheta::planPath().

virtual fmat::Column<2> HierarchicalObstacle::getCenter (  )  const [virtual]

get center point of obstacle

Implements PlannerObstacle< N >.

Definition at line 632 of file PlannerObstacles.h.

Referenced by expandBoundingBox(), gradient(), rotate(), and updatePosition().

const std::vector<PlannerObstacle2D*>& HierarchicalObstacle::getObstacles (  )  const

Definition at line 622 of file PlannerObstacles.h.

template<class T >
void HierarchicalObstacle::getObstacles ( std::vector< T > &  obs  )  const

returns obstacles of specified type

Definition at line 664 of file PlannerObstacles.h.

virtual fmat::Matrix<2,2> HierarchicalObstacle::getRotation (  )  const [virtual]

Definition at line 633 of file PlannerObstacles.h.

fmat::Column< 2 > HierarchicalObstacle::getSupport ( const fmat::SubVector< 2, const fmat::fmatReal > &  direction  )  const [virtual]

Definition at line 920 of file PlannerObstacles.cc.

fmat::Column< 2 > HierarchicalObstacle::gradient ( const fmat::SubVector< 2, const fmat::fmatReal > &  pt  )  const [virtual]

Definition at line 949 of file PlannerObstacles.cc.

HierarchicalObstacle& HierarchicalObstacle::operator= ( const HierarchicalObstacle o  ) 

Assignment, should not use plist::Dictionary version.

Definition at line 602 of file PlannerObstacles.h.

void HierarchicalObstacle::recalculateBoundingBox (  )  [protected]

recalculate rectangular bounding box based on contained obstacles

Definition at line 883 of file PlannerObstacles.cc.

Referenced by clear(), and rotate().

void HierarchicalObstacle::rotate ( const fmat::SubVector< 2, const fmat::fmatReal > &  origin,
const fmat::SubMatrix< 2, 2, const fmat::fmatReal > &  rot 
) [virtual]

Definition at line 942 of file PlannerObstacles.cc.

std::string HierarchicalObstacle::toString (  )  const [virtual]

return current value as a string

Reimplemented from PlannerObstacle< N >.

Definition at line 979 of file PlannerObstacles.cc.

void HierarchicalObstacle::updatePosition ( const fmat::SubVector< 2, const fmat::fmatReal > &  newPos  )  [virtual]

Definition at line 935 of file PlannerObstacles.cc.

Referenced by RRTNodeXYTheta::CollisionChecker::collides().

virtual void HierarchicalObstacle::updateRotation ( const fmat::Matrix< 2, 2 > &  rot  )  [virtual]

update to specified orientation about the center

Definition at line 638 of file PlannerObstacles.h.

Referenced by RRTNodeXYTheta::CollisionChecker::collides().


Member Data Documentation

axis-aligned bounding box of all obstacles

Definition at line 581 of file PlannerObstacles.h.

Referenced by collides(), expandBoundingBox(), getBoundingBox(), operator=(), recalculateBoundingBox(), and updatePosition().

const std::string HierarchicalObstacle::autoRegisterName = PlannerObstacle2D::getRegistry().registerType<HierarchicalObstacle>("Hierarchy") [static, protected]

stores the class name used for polymorphic load/save

Definition at line 571 of file PlannerObstacles.h.

origin of the obstacle, all sub-obstacles will be relative to this point

Definition at line 583 of file PlannerObstacles.h.

Referenced by collides(), getCenter(), getSupport(), operator=(), rotate(), and updatePosition().

the obstacles contained in the hierarchy

Definition at line 579 of file PlannerObstacles.h.

Referenced by add(), clear(), collides(), getObstacles(), getSupport(), gradient(), HierarchicalObstacle(), operator=(), recalculateBoundingBox(), and toString().

rotation about the origin

Definition at line 584 of file PlannerObstacles.h.

Referenced by collides(), expandBoundingBox(), getRotation(), getSupport(), gradient(), operator=(), rotate(), and updateRotation().


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

Tekkotsu v5.1CVS
Generated Fri Mar 16 05:27:19 2012 by Doxygen 1.6.3