RobWorkProject
23.9.11-
|
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< StateSampler > | Ptr |
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.
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
mframe | [in] the frame |
wPc | [in] the origo of the sphere |
radi | [in] radius of sphere |
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
mframe | [in] the frame |
wPc | [in] the origo of the sphere |
initState | [in] the initial state |
|
virtual |
True if the sampler is known to contain no more configurations.
Implements StateSampler.
|
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.
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.
low | [in] lower bound position values |
upper | [in] upper bound position values |
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.
low | [in] lower bound RPY values |
upper | [in] upper bound RPY values |