PPL API Reference
Overview Core Algorithm Abstractions Utilities Parallel Methods
Modules Class Hierarchy Classes Functions
Todo List Bug List Dead Code
List of all members
Constraint Class Referenceabstract

Public Member Functions

Constraint Interface
virtual void SetRobot (Robot *const _r)
 
virtual const BoundaryGetBoundary () const =0
 
virtual bool Satisfied (const Cfg &_c) const =0
 

Protected Attributes

Internal State
Robotm_robot {nullptr}
 The subject of this constraint.
 

Construction

 Constraint (Robot *const _r)
 
virtual ~Constraint ()
 
virtual std::unique_ptr< ConstraintClone () const =0
 
static std::unique_ptr< ConstraintFactory (Robot *const _r, XMLNode &_node)
 

Detailed Description

An abstract base class representing the required interface for a constraint on the state of a robot. The Constraint interface requires plain jane Cfg's to ensure that they are usable by reactive agents.

Constraints may apply to specific robots, or they may be more general criterion on any robot. In the later case, the robot pointer for the constraint will be null.

Constructor & Destructor Documentation

◆ Constraint()

Constraint::Constraint ( Robot *const  _r)
explicit

Create a constraint for a robot.

Parameters
_rThe robot to constrain.

Member Function Documentation

◆ Factory()

std::unique_ptr< Constraint > Constraint::Factory ( Robot *const  _r,
XMLNode _node 
)
static

Construct a constraint of the appropriate type from an XML node.

Parameters
_rThe robot to which the constraint applies.
_nodeThe XML node to parse.
Returns
A constraint for _r of the type/parameters described by _node.

◆ Clone()

virtual std::unique_ptr< Constraint > Constraint::Clone ( ) const
pure virtual

Copy this constraint.

Returns
A copy of this constraint.

Implemented in BoundaryConstraint, and CSpaceConstraint.

◆ SetRobot()

void Constraint::SetRobot ( Robot *const  _r)
virtual

Change the subject of this constraint.

Parameters
_rThe new robot to constrain, or null to represent any robot.

◆ GetBoundary()

virtual const Boundary * Constraint::GetBoundary ( ) const
pure virtual

Get a sampling boundary that describes the subset of CSpace allowed by this constraint.

Note
Many constraints can be described in terms of boundaries, but some cannot (such as constraints with ordering requirements). If the constraint can't be represented as a boundary, this will return a null pointer.

Implemented in BoundaryConstraint.

◆ Satisfied()

virtual bool Constraint::Satisfied ( const Cfg _c) const
pure virtual

Determine whether a given configuration of the robot satisfies this constraint.

Parameters
_cThe configuration to check.
Returns
True if _c satisfies this constraint.

Implemented in BoundaryConstraint.


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