RobWorkProject  23.9.11-
Public Member Functions | List of all members
SpherePoseSampler Class Reference

samples poses of a movable frame, such that the frame is always positioned on a sphere around some specified center. Random deviations to the position of the frame can be added. More...

#include <SpherePoseSampler.hpp>

Inherits StateSampler.

Public Member Functions

 SpherePoseSampler (rw::kinematics::MovableFrame *mframe, const rw::math::Vector3D<> &wPc, double radi)
 constructor frame will be set in random poses on the sphere with center wPc and radius radi More...
 
 SpherePoseSampler (rw::kinematics::MovableFrame *mframe, const rw::math::Vector3D<> &wPc, rw::kinematics::State &initState)
 constructor frame will be set in random poses on the sphere with center wPc and radius implicitly defined as the distance from frame to wPc in initState More...
 
virtual ~SpherePoseSampler ()
 destructor
 
void setRPYNoiseBound (const rw::math::RPY<> &low, const rw::math::RPY<> &upper)
 sets the bounds of the rotation noise(small random deviation) that is added to the generated pose of the frame. More...
 
void setPosNoiseBound (const rw::math::Vector3D<> &low, const rw::math::Vector3D<> &upper)
 sets the bounds of the position noise(small random deviation) that is added to the generated pose of the frame. More...
 
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 poses of a movable frame, such that the frame is always positioned on a sphere around some specified center. Random deviations to the position of the frame can be added.

This StateSampler will never become empty.

Constructor & Destructor Documentation

◆ SpherePoseSampler() [1/2]

SpherePoseSampler ( rw::kinematics::MovableFrame mframe,
const rw::math::Vector3D<> &  wPc,
double  radi 
)

constructor frame will be set in random poses on the sphere with center wPc and radius radi

Parameters
mframe[in] the frame
wPc[in] the origo of the sphere
radi[in] radius of sphere

◆ SpherePoseSampler() [2/2]

constructor frame will be set in random poses on the sphere with center wPc and radius implicitly defined as the distance from frame to wPc in initState

Parameters
mframe[in] the frame
wPc[in] the origo of the sphere
initState[in] the initial state

Member Function Documentation

◆ empty()

bool empty ( ) const
virtual

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.

◆ setPosNoiseBound()

void setPosNoiseBound ( const rw::math::Vector3D<> &  low,
const rw::math::Vector3D<> &  upper 
)

sets the bounds of the position noise(small random deviation) that is added to the generated pose of the frame.

Parameters
low[in] lower bound position values
upper[in] upper bound position values

◆ setRPYNoiseBound()

void setRPYNoiseBound ( const rw::math::RPY<> &  low,
const rw::math::RPY<> &  upper 
)

sets the bounds of the rotation noise(small random deviation) that is added to the generated pose of the frame.

Parameters
low[in] lower bound RPY values
upper[in] upper bound RPY values

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