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 578 of file PlannerObstacles.h.

List of all members.

Public Member Functions

 HierarchicalObstacle ()
 default constructor
 HierarchicalObstacle (const HierarchicalObstacle &ho)
 copy constructor (deep copy components)
HierarchicalObstacleoperator= (const HierarchicalObstacle &o)
 Assignment, should not use plist::Dictionary version.
virtual ~HierarchicalObstacle ()
 destructor
template<class T >
void getComponents (std::vector< T > &obs) const
 returns components of specified type
const std::vector
< PlannerObstacle2D * > & 
getComponents () const
virtual bool collides (const fmat::SubVector< 2, const fmat::fmatReal > &point) const
 For obstacle on point.
virtual bool collides (const PlannerObstacle2D &other) const
virtual fmat::Column< 2 > getSupport (const fmat::SubVector< 2, const fmat::fmatReal > &direction) const
 Never called: since HO's aren't convex, must test collision with each obstacle.
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 > getOrientation () 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
virtual std::string componentsToString () const
 Print the string representation for all components contained in the Hierarchy.
void clear ()
 clear all components
void add (PlannerObstacle2D *o)
 add component to end of component list; components 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 * > components
 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 598 of file PlannerObstacles.h.

HierarchicalObstacle::HierarchicalObstacle ( const HierarchicalObstacle ho  ) 

copy constructor (deep copy components)

Definition at line 602 of file PlannerObstacles.h.

virtual HierarchicalObstacle::~HierarchicalObstacle (  )  [virtual]

destructor

Definition at line 626 of file PlannerObstacles.h.


Member Function Documentation

void HierarchicalObstacle::add ( PlannerObstacle2D o  ) 

add component to end of component list; components should be transformed in terms of Hierarchical Obstacle

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

Definition at line 673 of file PlannerObstacles.h.

Referenced by RRTNodeXYTheta::CollisionChecker::CollisionChecker(), and LinkComponent::getObstacles().

void HierarchicalObstacle::clear (  )  [virtual]

clear all components

Reimplemented from plist::DictionaryBase.

Definition at line 665 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 21 of file PlannerObstacles.cc.

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

bool HierarchicalObstacle::collides ( const PlannerObstacle2D other  )  const [virtual]

Definition at line 942 of file PlannerObstacles.cc.

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

For obstacle on point.

Definition at line 926 of file PlannerObstacles.cc.

Referenced by collides(), and gradient().

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

Print the string representation for all components contained in the Hierarchy.

Definition at line 1018 of file PlannerObstacles.cc.

Referenced by componentsToString().

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

grow the bounding box to include that of other

Definition at line 915 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 643 of file PlannerObstacles.h.

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

get center point of obstacle

Implements PlannerObstacle< N >.

Definition at line 645 of file PlannerObstacles.h.

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

Definition at line 632 of file PlannerObstacles.h.

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

returns components of specified type

Definition at line 680 of file PlannerObstacles.h.

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

Definition at line 646 of file PlannerObstacles.h.

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

Never called: since HO's aren't convex, must test collision with each obstacle.

Definition at line 641 of file PlannerObstacles.h.

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

Definition at line 982 of file PlannerObstacles.cc.

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

Assignment, should not use plist::Dictionary version.

Definition at line 612 of file PlannerObstacles.h.

void HierarchicalObstacle::recalculateBoundingBox (  )  [protected]

recalculate rectangular bounding box based on contained obstacles

Definition at line 909 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 975 of file PlannerObstacles.cc.

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

return current value as a string

Reimplemented from PlannerObstacle< N >.

Definition at line 1012 of file PlannerObstacles.cc.

Referenced by componentsToString().

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

update to specified orientation about the center

Definition at line 651 of file PlannerObstacles.h.

Referenced by RRTNodeXYTheta::CollisionChecker::colliders(), and RRTNodeXYTheta::CollisionChecker::collides().


Member Data Documentation

axis-aligned bounding box of all obstacles

Definition at line 591 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 581 of file PlannerObstacles.h.

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

Definition at line 593 of file PlannerObstacles.h.

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

the obstacles contained in the hierarchy

Definition at line 589 of file PlannerObstacles.h.

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

rotation about the origin

Definition at line 594 of file PlannerObstacles.h.

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


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

Tekkotsu v5.1CVS
Generated Mon May 9 04:59:09 2016 by Doxygen 1.6.3