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

Interface for the checking for collisions for work cell states. More...

#include <QConstraint.hpp>

Public Types

typedef rw::common::Ptr< QConstraintPtr
 smart pointer type to this class
 
typedef rw::common::Ptr< const QConstraintCPtr
 smart pointer type to this const class
 

Public Member Functions

virtual ~QConstraint ()
 Destructor.
 
virtual void setLog (rw::common::Log::Ptr log)
 Set the log to be used for writing debug info. More...
 
void update (const rw::kinematics::State &state)
 Updates the constraint with a new state. More...
 
bool inCollision (const rw::math::Q &q) const
 True if the work cell is considered to be in collision for the device configuration q.
 

Static Public Member Functions

static QConstraint::Ptr makeFixed (bool value)
 A fixed constraint. More...
 
static QConstraint::Ptr makeBounds (const rw::models::Device::QBox &bounds)
 Constraint for the bounds of the configuration space. More...
 
static QConstraint::Ptr make (rw::common::Ptr< StateConstraint > detector, rw::models::Device::CPtr device, const rw::kinematics::State &state)
 Map a state constraint to a configuration constraint.
 
static QConstraint::Ptr make (rw::common::Ptr< rw::proximity::CollisionDetector > detector, rw::models::Device::CPtr device, const rw::kinematics::State &state)
 Map a collision detector to a configuration constraint.
 
static QConstraint::Ptr makeMerged (const std::vector< QConstraint::Ptr > &constraints)
 Combine a set of configuration constraints into a single configuration constraint.
 
static QConstraint::Ptr makeMerged (const QConstraint::Ptr &ca, const QConstraint::Ptr &cb)
 Combine a pair of configuration constraints into a single configuration constraint.
 
static QConstraint::Ptr makeNormalized (const QConstraint::Ptr &constraint, const std::pair< rw::math::Q, rw::math::Q > &bounds)
 Map a configuration constraint for standard configurations into a configuration constraint for normalized configurations. More...
 
static QConstraint::Ptr makeNormalized (const QConstraint::Ptr &constraint, const rw::models::Device &device)
 Map a configuration constraint for standard configurations into a configuration constraint for normalized configurations. More...
 
static QConstraint::Ptr makeNormalized (const QConstraint::Ptr &constraint, const QNormalizer &normalizer)
 Map a configuration constraint for standard configurations into a configuration constraint for normalized configurations. More...
 

Protected Member Functions

virtual bool doInCollision (const rw::math::Q &q) const =0
 Subclass implementation of the inCollision() method.
 
virtual void doSetLog (rw::common::Log::Ptr log)=0
 Set a log. More...
 
virtual void doUpdate (const rw::kinematics::State &state)
 Update constraint. More...
 
 QConstraint ()
 

Detailed Description

Interface for the checking for collisions for work cell states.

Constructor & Destructor Documentation

◆ QConstraint()

QConstraint ( )
inlineprotected

Constructor

Member Function Documentation

◆ doSetLog()

virtual void doSetLog ( rw::common::Log::Ptr  log)
protectedpure virtual

Set a log.

Parameters
log[in] the log.

◆ doUpdate()

virtual void doUpdate ( const rw::kinematics::State state)
inlineprotectedvirtual

Update constraint.

Parameters
state[in] the state.

◆ makeBounds()

static QConstraint::Ptr makeBounds ( const rw::models::Device::QBox bounds)
static

Constraint for the bounds of the configuration space.

The configuration is considered to be in collision if it is outside of the bounds given by bounds.

◆ makeFixed()

static QConstraint::Ptr makeFixed ( bool  value)
static

A fixed constraint.

The fixed constraint always returns value from inCollision().

◆ makeNormalized() [1/3]

static QConstraint::Ptr makeNormalized ( const QConstraint::Ptr constraint,
const std::pair< rw::math::Q, rw::math::Q > &  bounds 
)
static

Map a configuration constraint for standard configurations into a configuration constraint for normalized configurations.

Configuration values are mapped from the range [0, 1] into the corresponding position in the box bounds.

◆ makeNormalized() [2/3]

static QConstraint::Ptr makeNormalized ( const QConstraint::Ptr constraint,
const rw::models::Device device 
)
static

Map a configuration constraint for standard configurations into a configuration constraint for normalized configurations.

Configuration values are mapped from the range [0, 1] into the corresponding position in the configuration space of device.

◆ makeNormalized() [3/3]

static QConstraint::Ptr makeNormalized ( const QConstraint::Ptr constraint,
const QNormalizer normalizer 
)
static

Map a configuration constraint for standard configurations into a configuration constraint for normalized configurations.

Configuration values are mapped from normalized configurations into standard configurations using normalizer.

◆ setLog()

virtual void setLog ( rw::common::Log::Ptr  log)
virtual

Set the log to be used for writing debug info.

Parameters
log[in] Log to which debug information is to be written

◆ update()

void update ( const rw::kinematics::State state)

Updates the constraint with a new state.

The method might not have an effect on all constrainttypes.


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