RobWorkProject
0.7.0

Interface for the sampling a configuration that solves an IK problem. More...
#include <QIKSampler.hpp>
Public Types  
typedef rw::common::Ptr< QIKSampler >  Ptr 
smart pointer type to this class  
typedef rw::common::Ptr< const QIKSampler >  CPtr 
smart pointer type to this const class  
Public Member Functions  
rw::math::Q  sample (const rw::math::Transform3D<> &target) 
Sample a configuration that solves an IK problem for target. More...  
bool  empty () const 
True if the sampler is known to contain no more configurations.  
virtual  ~QIKSampler () 
Destructor.  
Static Public Member Functions  
static QIKSampler::Ptr  make (rw::common::Ptr< rw::models::Device > device, const rw::kinematics::State &state, rw::common::Ptr< rw::invkin::IterativeIK > solver=NULL, rw::common::Ptr< QSampler > seed=NULL, int maxAttempts=1) 
An IK sampler based on an iterative IK solver. More...  
static QIKSampler::Ptr  makeConstrained (QIKSampler::Ptr sampler, rw::common::Ptr< QConstraint > constraint, int maxAttempts=1) 
An IK sampler filtered by a constraint. More...  
Protected Member Functions  
QIKSampler ()  
Constructor.  
virtual rw::math::Q  doSample (const rw::math::Transform3D<> &target)=0 
Subclass implementation of the sample() method.  
virtual bool  doEmpty () const 
Subclass implementation of the empty() method. More...  
Interface for the sampling a configuration that solves an IK problem.

protectedvirtual 
Subclass implementation of the empty() method.
By default the sampler is assumed to be sampling an infinite set of configurations. IOW. the function returns false by default.

static 
An IK sampler based on an iterative IK solver.
All solutions returned are checked to be within the bounds of the device.
device  [in] The device for which seeds are sampled. 
state  [in] Fixed state with respect to which IK is solved. 
solver  [in] Optional IK solver for device and state. 
seed  [in] Optional sampler of seeds to feed the IK solver. 
maxAttempts  [in] Optional number of seeds to feed the IK solver. If maxAttempts is negative, a default value for maxAttempts is chosen. 

static 
An IK sampler filtered by a constraint.
For each call of sample() up to maxAttempts configurations are extracted from sampler and checked by constraint. The first sample that satisfies the constraint is returned; if no such were found the empty configuration is returned.
If maxAttempts is negative, then sampler is sampled forever until either the sampler is empty or a configuration satisfying constraint is found.

inline 