Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
PlannerObstacle< N > Class Template ReferenceBase class for all obstacles. More...
Inheritance diagram for PlannerObstacle< N >:
Detailed Descriptiontemplate<size_t N>
|
Public Types | |
enum | ObstacleGeometry { RECTANGULAR_OBS = 2, CIRCULAR_OBS = 3, ELLIPTICAL_OBS = 5, CONVEX_POLY_OBS = 7, HIERARCHICAL_OBS = 11, BOX_OBS = 13, CYLINDRICAL_OBS = 17, SPHERICAL_OBS = 19, ELLIPSOID_OBS = 23 } |
each collision shape is assigned a prime number, these provide fast dispatch in collides() More... | |
typedef FamilyFactory < PlannerObstacle, std::string > | registry_t |
Public Member Functions | |
PlannerObstacle (ObstacleGeometry geom, const std::string &t) | |
Default constructor. | |
virtual | ~PlannerObstacle () |
Destructor. | |
virtual void | updatePosition (const fmat::SubVector< N, const fmat::fmatReal > &newPos)=0 |
Increases the size of the obstacle in all directions by at least amount. | |
virtual void | rotate (const fmat::SubVector< N, const fmat::fmatReal > &origin, const fmat::SubMatrix< N, N, const fmat::fmatReal > &rot)=0 |
rotate the obstacle about a specified origin and a 2d rotation matrix | |
void | rotate (const fmat::SubMatrix< N, N, const fmat::fmatReal > &rot) |
rotate the obstacle about its center by a 2d rotation matrix | |
virtual fmat::Column< N > | getCenter () const =0 |
get center point of obstacle | |
virtual BoundingBox< N > | getBoundingBox () const =0 |
get boundaries of the current obstacle | |
bool | collides (const PlannerObstacle< N > &other) const |
checks for collision with other PlannerObstacles | |
virtual bool | collides (const fmat::SubVector< N, const fmat::fmatReal > &point) const =0 |
All collision tests that need to be handled by subclasses for specific points. | |
virtual fmat::Column< N > | getSupport (const fmat::SubVector< N, const fmat::fmatReal > &direction) const =0 |
Support function for GJK collision detection algorithm. | |
virtual fmat::Column< N > | gradient (const fmat::SubVector< N, const fmat::fmatReal > &pt) const =0 |
Calculate the vector to closest point on the obstacle boundary from pt. | |
virtual std::string | toString () const |
return current value as a string | |
ObstacleGeometry | getObstacleGeometry () const |
int | getShapeId () const |
void | setShapeId (int id) |
bool | isBodyObstacle () |
void | setBodyObstacle () |
const std::string & | getTypeName () const |
PLIST_CLONE_FWD (PlannerObstacle) | |
Static Public Member Functions | |
template<typename T > | |
static int | sgn (T x) |
sgn(x): returns sign of input | |
static void | convertShapeToPlannerObstacle (const DualCoding::ShapeRoot &shape, float inflation, std::vector< PlannerObstacle * > &obstacles) |
static registry_t & | getRegistry () |
Public Attributes | |
plist::Primitive< std::string > | name |
Sub-components of an obstacle. | |
Protected Member Functions | |
PlannerObstacle (const PlannerObstacle &o) | |
Copy constructor, be careful not to cross-copy different types. | |
PlannerObstacle & | operator= (const PlannerObstacle &o) |
Don't use this assignment... | |
void | init () |
Protected Attributes | |
plist::Primitive< std::string > | type |
ObstacleGeometry | geometry |
int | shapeId |
For obstacles defined by DualCoding shapes. | |
bool | bodyObstacle |
For 3D path planning, to avoid arm-body collisions. | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const PlannerObstacle &po) |
typedef FamilyFactory<PlannerObstacle,std::string> PlannerObstacle< N >::registry_t |
Definition at line 132 of file PlannerObstacles.h.
enum PlannerObstacle::ObstacleGeometry |
each collision shape is assigned a prime number, these provide fast dispatch in collides()
RECTANGULAR_OBS | |
CIRCULAR_OBS | |
ELLIPTICAL_OBS | |
CONVEX_POLY_OBS | |
HIERARCHICAL_OBS | |
BOX_OBS | |
CYLINDRICAL_OBS | |
SPHERICAL_OBS | |
ELLIPSOID_OBS |
Definition at line 54 of file PlannerObstacles.h.
PlannerObstacle< N >::PlannerObstacle | ( | ObstacleGeometry | geom, | |
const std::string & | t | |||
) | [explicit] |
Default constructor.
Definition at line 67 of file PlannerObstacles.h.
virtual PlannerObstacle< N >::~PlannerObstacle | ( | ) | [virtual] |
Destructor.
Definition at line 71 of file PlannerObstacles.h.
PlannerObstacle< N >::PlannerObstacle | ( | const PlannerObstacle< N > & | o | ) | [protected] |
Copy constructor, be careful not to cross-copy different types.
Definition at line 139 of file PlannerObstacles.h.
virtual bool PlannerObstacle< N >::collides | ( | const fmat::SubVector< N, const fmat::fmatReal > & | point | ) | const [pure virtual] |
All collision tests that need to be handled by subclasses for specific points.
bool PlannerObstacle< N >::collides | ( | const PlannerObstacle< N > & | other | ) | const |
checks for collision with other PlannerObstacles
Referenced by RRTNode3DR< N >::CollisionChecker::JointObstacle::collides(), and RRTNode2DR< N >::CollisionChecker::JointObstacle::collides().
static void PlannerObstacle< N >::convertShapeToPlannerObstacle | ( | const DualCoding::ShapeRoot & | shape, | |
float | inflation, | |||
std::vector< PlannerObstacle< N > * > & | obstacles | |||
) | [static] |
virtual BoundingBox<N> PlannerObstacle< N >::getBoundingBox | ( | ) | const [pure virtual] |
get boundaries of the current obstacle
Implemented in RectangularObstacle, CircularObstacle, EllipticalObstacle, ConvexPolyObstacle, HierarchicalObstacle, BoxObstacle, CylindricalObstacle, SphericalObstacle, and EllipsoidObstacle.
Referenced by HierarchicalObstacle::expandBoundingBox().
virtual fmat::Column<N> PlannerObstacle< N >::getCenter | ( | ) | const [pure virtual] |
get center point of obstacle
Implemented in RectangularObstacle, CircularObstacle, EllipticalObstacle, ConvexPolyObstacle, HierarchicalObstacle, BoxObstacle, CylindricalObstacle, SphericalObstacle, and EllipsoidObstacle.
Referenced by HierarchicalObstacle::collides(), HierarchicalObstacle::expandBoundingBox(), and PlannerObstacle< N >::rotate().
ObstacleGeometry PlannerObstacle< N >::getObstacleGeometry | ( | ) | const |
Definition at line 122 of file PlannerObstacles.h.
static registry_t& PlannerObstacle< N >::getRegistry | ( | ) | [static] |
Definition at line 133 of file PlannerObstacles.h.
Referenced by plist::loadXML().
int PlannerObstacle< N >::getShapeId | ( | ) | const |
Definition at line 124 of file PlannerObstacles.h.
virtual fmat::Column<N> PlannerObstacle< N >::getSupport | ( | const fmat::SubVector< N, const fmat::fmatReal > & | direction | ) | const [pure virtual] |
Support function for GJK collision detection algorithm.
Gets the point on the convex polygon farthest along the specified direction.
Referenced by GJK::getSupport().
const std::string& PlannerObstacle< N >::getTypeName | ( | ) | const |
Definition at line 130 of file PlannerObstacles.h.
virtual fmat::Column<N> PlannerObstacle< N >::gradient | ( | const fmat::SubVector< N, const fmat::fmatReal > & | pt | ) | const [pure virtual] |
Calculate the vector to closest point on the obstacle boundary from pt.
Referenced by GaitedFootsteps::addCandidate().
void PlannerObstacle< N >::init | ( | ) | [protected] |
Definition at line 151 of file PlannerObstacles.h.
Referenced by PlannerObstacle< N >::operator=(), and PlannerObstacle< N >::PlannerObstacle().
bool PlannerObstacle< N >::isBodyObstacle | ( | ) |
Definition at line 127 of file PlannerObstacles.h.
PlannerObstacle& PlannerObstacle< N >::operator= | ( | const PlannerObstacle< N > & | o | ) | [protected] |
Don't use this assignment...
Definition at line 143 of file PlannerObstacles.h.
PlannerObstacle< N >::PLIST_CLONE_FWD | ( | PlannerObstacle< N > | ) |
void PlannerObstacle< N >::rotate | ( | const fmat::SubMatrix< N, N, const fmat::fmatReal > & | rot | ) |
rotate the obstacle about its center by a 2d rotation matrix
Definition at line 98 of file PlannerObstacles.h.
Referenced by PlannerObstacle< N >::rotate().
virtual void PlannerObstacle< N >::rotate | ( | const fmat::SubVector< N, const fmat::fmatReal > & | origin, | |
const fmat::SubMatrix< N, N, const fmat::fmatReal > & | rot | |||
) | [pure virtual] |
rotate the obstacle about a specified origin and a 2d rotation matrix
Referenced by HierarchicalObstacle::collides(), and HierarchicalObstacle::expandBoundingBox().
void PlannerObstacle< N >::setBodyObstacle | ( | ) |
Definition at line 128 of file PlannerObstacles.h.
Referenced by ShapeSpaceCollisionCheckerBase< 2 >::addDisplayRobotObstacles(), ShapeSpaceCollisionCheckerBase< 2 >::addRobotObstacles(), and ShapeSpaceCollisionCheckerBase< 3 >::createBodyObstacle().
void PlannerObstacle< N >::setShapeId | ( | int | id | ) |
Definition at line 125 of file PlannerObstacles.h.
sgn(x): returns sign of input
Definition at line 75 of file PlannerObstacles.h.
Referenced by EllipsoidObstacle::get2Support(), EllipsoidObstacle::getSupport(), CylindricalObstacle::getSupport(), and EllipticalObstacle::getSupport().
std::string PlannerObstacle< N >::toString | ( | ) | const [virtual] |
return current value as a string
Reimplemented from plist::DictionaryBase.
Reimplemented in RectangularObstacle, CircularObstacle, EllipticalObstacle, ConvexPolyObstacle, HierarchicalObstacle, BoxObstacle, CylindricalObstacle, SphericalObstacle, and EllipsoidObstacle.
Definition at line 164 of file PlannerObstacles.h.
virtual void PlannerObstacle< N >::updatePosition | ( | const fmat::SubVector< N, const fmat::fmatReal > & | newPos | ) | [pure virtual] |
Increases the size of the obstacle in all directions by at least amount.
Decreases the size of the obstacle in all directions by at least amount moves the obstacle
Referenced by HierarchicalObstacle::collides(), and HierarchicalObstacle::expandBoundingBox().
std::ostream& operator<< | ( | std::ostream & | os, | |
const PlannerObstacle< N > & | po | |||
) | [friend] |
Definition at line 120 of file PlannerObstacles.h.
bool PlannerObstacle< N >::bodyObstacle [protected] |
For 3D path planning, to avoid arm-body collisions.
Definition at line 160 of file PlannerObstacles.h.
Referenced by PlannerObstacle< N >::isBodyObstacle(), and PlannerObstacle< N >::setBodyObstacle().
ObstacleGeometry PlannerObstacle< N >::geometry [protected] |
Definition at line 158 of file PlannerObstacles.h.
Referenced by PlannerObstacle< N >::getObstacleGeometry(), and PlannerObstacle< N >::operator=().
plist::Primitive<std::string> PlannerObstacle< N >::name |
Sub-components of an obstacle.
Definition at line 78 of file PlannerObstacles.h.
Referenced by ShapeSpaceCollisionCheckerBase< 2 >::addDisplayRobotObstacles(), ShapeSpaceCollisionCheckerBase< 2 >::addRobotObstacles(), RRTNode3DR< N >::CollisionChecker::CollisionChecker(), ShapeSpaceCollisionCheckerBase< 3 >::createBodyObstacle(), PlannerObstacle< N >::init(), RRTNode3DR< N >::CollisionChecker::JointObstacle::JointObstacle(), RRTNode2DR< N >::CollisionChecker::JointObstacle::JointObstacle(), RRTNode3DR< N >::CollisionChecker::LinkObstacle::LinkObstacle(), RRTNode2DR< N >::CollisionChecker::LinkObstacle::LinkObstacle(), PlannerObstacle< N >::operator=(), PlannerObstacle< N >::toString(), EllipsoidObstacle::toString(), SphericalObstacle::toString(), CylindricalObstacle::toString(), BoxObstacle::toString(), HierarchicalObstacle::toString(), ConvexPolyObstacle::toString(), EllipticalObstacle::toString(), CircularObstacle::toString(), and RectangularObstacle::toString().
int PlannerObstacle< N >::shapeId [protected] |
For obstacles defined by DualCoding shapes.
Definition at line 159 of file PlannerObstacles.h.
Referenced by PlannerObstacle< N >::getShapeId(), and PlannerObstacle< N >::setShapeId().
plist::Primitive<std::string> PlannerObstacle< N >::type [protected] |
Definition at line 157 of file PlannerObstacles.h.
Referenced by PlannerObstacle< N >::getTypeName(), PlannerObstacle< N >::init(), PlannerObstacle< N >::operator=(), and PlannerObstacle< N >::toString().
Tekkotsu v5.1CVS |
Generated Mon May 9 04:59:14 2016 by Doxygen 1.6.3 |