RobWorkProject  23.9.11-
Public Types | Public Member Functions | Protected Member Functions | List of all members
RestingPoseGenerator Class Reference

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 ()
 

Detailed Description

finds resting poses of a dynamic scene.

This generator relies on

for each simulation step taken an update event callback a is triggered.

Constructor & Destructor Documentation

◆ RestingPoseGenerator() [1/2]

Parameters
sim
initState
restConstraint

◆ RestingPoseGenerator() [2/2]

Parameters
sim
initState
sampler
restConstraint
Returns

Member Function Documentation

◆ getStatusString()

std::string getStatusString ( )

a simple status.

Returns

◆ isFinished()

bool isFinished ( )

the generator is finished if the specified nr of resting poses has been generated.

Returns
true if all rest poses has been generated, false otherwise

◆ setInitStateSample()

void setInitStateSample ( rw::core::Ptr< StateSampler sampler)
inline

set the sampler used for initial state

Parameters
sampler[in] state sampler

◆ setRestingCriteria()

void setRestingCriteria ( rw::core::Ptr< SimStateConstraint restconstraint)
inline

resting state contraint

Parameters
restconstraint[in] constraint

◆ setResultCallback()

void setResultCallback ( RestingPoseCallback  callback)
inline

set the callback for when a resting pose is found.

Parameters
callback[in] callback funtion

◆ setUpdateEventCallback()

void setUpdateEventCallback ( UpdateEventCallback  callback)
inline

set the callback for when a simulation step has been carried out.

Parameters
callback[in] callback funtion

◆ start()

void start ( int  nrOfTests)

start resting pose generation

Parameters
nrOfTests[in] number of resting poses to find.

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