RobWorkProject  25.2.11-
Public Member Functions | List of all members
CollisionFreeSampler Class Reference

samples another state sampler until it returns a collision free state. More...

#include <CollisionFreeSampler.hpp>

Inherits StateSampler.

Public Member Functions

 CollisionFreeSampler (StateSampler::Ptr sampler, rw::core::Ptr< rw::proximity::CollisionDetector > detector, int n=-1)
 constructor More...
 
virtual ~CollisionFreeSampler ()
 destructor
 
bool sample (rw::kinematics::State &state)
 Sample a state. More...
 
bool empty () const
 True if the sampler is known to contain no more configurations. More...
 

Additional Inherited Members

- Public Types inherited from StateSampler
typedef rw::core::Ptr< StateSamplerPtr
 

Detailed Description

samples another state sampler until it returns a collision free state.

Constructor & Destructor Documentation

◆ CollisionFreeSampler()

constructor

Parameters
sampler[in] the sampler that is to be wrapped
detector[in] the collision detector
n[in] max nr of tries pr sample request

Member Function Documentation

◆ empty()

bool empty ( ) const
inlinevirtual

True if the sampler is known to contain no more configurations.

Implements StateSampler.

◆ sample()

bool sample ( rw::kinematics::State state)
virtual

Sample a state.

If sampling fails, the sampler may return the empty configuration. If empty() is true then the sampler has no more configurations. Otherwise sample() may (or may not) succeed if called a second time.

Implements StateSampler.


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