RobWorkProject
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
QEdgeConstraint Class Referenceabstract

Edge constraint interface. More...

#include <QEdgeConstraint.hpp>

Public Types

typedef rw::common::Ptr< QEdgeConstraintPtr
 smart pointer type to this class
 
typedef rw::common::Ptr< const QEdgeConstraintCPtr
 smart pointer type to this class
 

Public Member Functions

virtual ~QEdgeConstraint ()
 Destructor.
 
bool inCollision (const rw::math::Q &start, const rw::math::Q &end) const
 True if the path from start to end can't be traversed. More...
 

Static Public Member Functions

static QEdgeConstraint::Ptr make (rw::common::Ptr< QConstraint > constraint, rw::math::QMetric::CPtr metric, double resolution)
 Discrete path verification for a linearly interpolated path. More...
 
static QEdgeConstraint::Ptr makeDefault (rw::common::Ptr< QConstraint > constraint, rw::common::Ptr< const rw::models::Device > device)
 Default edge constraint for a configuration constraint and a device. More...
 
static QEdgeConstraint::Ptr makeMerged (const std::vector< QEdgeConstraint::Ptr > &constraints)
 Makes an edge constraint by combining multiple edge constraints. More...
 
static QEdgeConstraint::Ptr makeMerged (QEdgeConstraint::Ptr constraint1, QEdgeConstraint::Ptr constraint2)
 Makes an edge constraint by combining two edge constraints. More...
 

Protected Member Functions

virtual bool doInCollision (const rw::math::Q &start, const rw::math::Q &end) const =0
 Subclass implementation of the inCollision() method. More...
 

Detailed Description

Edge constraint interface.

An edge constraint represents a path that connects a pair of configurations and checks if this path can be traversed.

The edge constraint may assume that the start and end configurations are valid (e.g. not colliding).

Each edge has a non-negative cost measuring the degree to which the path connecting the configurations has been verified. You can use the cost measure to for example always verify the edge for which the most of the path still remains to be verified. The exact meaning of the cost is defined by the specific subclass.

Given an edge constraint you can construct a new edge constraint of the same type, but for a new pair of configurations, with QEdgeConstraint::instance().

Member Function Documentation

◆ doInCollision()

virtual bool doInCollision ( const rw::math::Q start,
const rw::math::Q end 
) const
protectedpure virtual

Subclass implementation of the inCollision() method.

By default the method is implemented in terms of instance() and inCollision().

◆ inCollision()

bool inCollision ( const rw::math::Q start,
const rw::math::Q end 
) const
inline

True if the path from start to end can't be traversed.

Parameters
start[in] Start configuration.
end[in] End configuration.

◆ make()

static QEdgeConstraint::Ptr make ( rw::common::Ptr< QConstraint constraint,
rw::math::QMetric::CPtr  metric,
double  resolution 
)
static

Discrete path verification for a linearly interpolated path.

Performs a binary style checking of the edge with a resolution of resolution. The length of the edge is virtually extended to exactly match the specified resolution. However, only configurations within the original length are tested.

Each configuration tested is checked using constraint.

The metric must be well-behaved, i.e. linear.

Start and end configurations are assumed to be collision free.

Parameters
constraint[in] Constraint to check configurations with
metric[in] Metric with which the resolution it to be measured
resolution[in] The test resolution

◆ makeDefault()

static QEdgeConstraint::Ptr makeDefault ( rw::common::Ptr< QConstraint constraint,
rw::common::Ptr< const rw::models::Device device 
)
static

Default edge constraint for a configuration constraint and a device.

Start and end configurations are connected by a straight line in the configuration space and are checked by a default collision checking resolution.

◆ makeMerged() [1/2]

static QEdgeConstraint::Ptr makeMerged ( const std::vector< QEdgeConstraint::Ptr > &  constraints)
static

Makes an edge constraint by combining multiple edge constraints.

The constraints provided are called one by one in the order provided. It is assumed that all constraints matches the same device.

Parameters
constraints[in] List of constraints to check
Returns
Pointer to the resulting QEdgeConstraint. Pointer has ownership.

◆ makeMerged() [2/2]

static QEdgeConstraint::Ptr makeMerged ( QEdgeConstraint::Ptr  constraint1,
QEdgeConstraint::Ptr  constraint2 
)
static

Makes an edge constraint by combining two edge constraints.

The constraints provided are called one by one in the order provided. It is assumed that all constraints matches the same device.

Parameters
constraint1[in] First constraint to check
constraint2[in] Second constraint to check
Returns
Pointer to the resulting QEdgeConstraint. Pointer has ownership.

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