![]() |
RobWorkProject
23.9.11-
|
finds resting poses of a dynamic scene. More...
#include <RestingPoseGenerator.hpp>
Public Types | |
| typedef boost::function< void(const rw::kinematics::State &)> | RestingPoseCallback |
| typedef boost::function< void(const rw::kinematics::State &)> | UpdateEventCallback |
Public Member Functions | |
| RestingPoseGenerator (rw::core::Ptr< rwsim::simulator::DynamicSimulator > sim, const rw::kinematics::State &initState, rw::core::Ptr< SimStateConstraint > restConstraint) | |
| RestingPoseGenerator (rw::core::Ptr< rwsim::simulator::DynamicSimulator > sim, const rw::kinematics::State &initState, rw::core::Ptr< StateSampler > sampler, rw::core::Ptr< SimStateConstraint > restConstraint) | |
| virtual | ~RestingPoseGenerator () |
| destructor | |
| void | setInitStateSample (rw::core::Ptr< StateSampler > sampler) |
| set the sampler used for initial state More... | |
| void | setRestingCriteria (rw::core::Ptr< SimStateConstraint > restconstraint) |
| resting state contraint More... | |
| void | setResultCallback (RestingPoseCallback callback) |
| set the callback for when a resting pose is found. More... | |
| void | setUpdateEventCallback (UpdateEventCallback callback) |
| set the callback for when a simulation step has been carried out. More... | |
| void | start (int nrOfTests) |
| start resting pose generation More... | |
| void | proceed () |
| pause the execution | |
| void | stop () |
| stop the execution | |
| bool | isFinished () |
| the generator is finished if the specified nr of resting poses has been generated. More... | |
| int | getNrOfSamplesDone () |
| returns the number of samples that has been simulated. | |
| int | getNrOfSamplesLeft () |
| returns the number of samples that has yet to be simulated. | |
| std::string | getStatusString () |
| a simple status. More... | |
Protected Member Functions | |
| void | stepperLoop () |
finds resting poses of a dynamic scene.
This generator relies on
for each simulation step taken an update event callback a is triggered.
| RestingPoseGenerator | ( | rw::core::Ptr< rwsim::simulator::DynamicSimulator > | sim, |
| const rw::kinematics::State & | initState, | ||
| rw::core::Ptr< SimStateConstraint > | restConstraint | ||
| ) |
| sim | |
| initState | |
| restConstraint |
| RestingPoseGenerator | ( | rw::core::Ptr< rwsim::simulator::DynamicSimulator > | sim, |
| const rw::kinematics::State & | initState, | ||
| rw::core::Ptr< StateSampler > | sampler, | ||
| rw::core::Ptr< SimStateConstraint > | restConstraint | ||
| ) |
| sim | |
| initState | |
| sampler | |
| restConstraint |
| std::string getStatusString | ( | ) |
a simple status.
| bool isFinished | ( | ) |
the generator is finished if the specified nr of resting poses has been generated.
|
inline |
set the sampler used for initial state
| sampler | [in] state sampler |
|
inline |
resting state contraint
| restconstraint | [in] constraint |
|
inline |
set the callback for when a resting pose is found.
| callback | [in] callback funtion |
|
inline |
set the callback for when a simulation step has been carried out.
| callback | [in] callback funtion |
| void start | ( | int | nrOfTests | ) |
start resting pose generation
| nrOfTests | [in] number of resting poses to find. |