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

a generator of rigid bodies. More...

#include <RigidBodyGenerator.hpp>

Inherits SimulatedController.

Public Types

typedef rw::core::Ptr< RigidBodyGeneratorPtr
 
- Public Types inherited from SimulatedController
typedef rw::core::Ptr< SimulatedControllerPtr
 smart pointer type of this class
 
- Public Types inherited from Stateless
typedef rw::core::Ptr< StatelessPtr
 Smart pointer type for Stateless.
 

Public Member Functions

 RigidBodyGenerator (const std::string &name, const rw::math::Vector3D<> &pos, std::vector< rw::geometry::Geometry::Ptr > geoms, double delay, double lifetime=-1, bool repeat=false)
 constructor More...
 
virtual ~RigidBodyGenerator ()
 destructor
 
void update (const rwlibs::simulation::Simulator::UpdateInfo &info, rw::kinematics::State &state)
 updates/steps the controller with time step dt. It will update the state state accordingly More...
 
void reset (const rw::kinematics::State &state)
 reset the controller to the applied state More...
 
rwlibs::control::ControllergetController ()
 get the name of this controller More...
 
void setEnabled (bool enabled)
 disable or enable this controller More...
 
bool isEnabled ()
 
- Public Member Functions inherited from SimulatedController
virtual std::string getControllerName ()=0
 get the name of this controller More...
 
virtual rw::core::Ptr< rwlibs::control::ControllergetControllerHandle (rw::core::Ptr< rwlibs::simulation::Simulator > sim)=0
 get the controller handle eg. statefull handle, associated with this simulated controller More...
 
rw::core::Ptr< rw::models::ControllerModelgetControllerModel ()
 get the controllermodel of this simulated controller More...
 
virtual bool isEnabled () const =0
 true if this controller is enabled More...
 
- Public Member Functions inherited from Stateless
virtual ~Stateless ()
 destructor
 
virtual void registerIn (State &state)
 initialize this stateless data to a specific state More...
 
virtual void registerIn (StateStructure::Ptr state)
 register this stateless object in a statestructure.
 
virtual void unregister ()
 unregisters all state data of this stateless object
 
StateStructure::Ptr getStateStructure ()
 Get the state structure. More...
 
const StateStructure::Ptr getStateStructure () const
 Get the state structure. More...
 
bool isRegistered ()
 Check if object has registered its state. More...
 

Additional Inherited Members

- Protected Member Functions inherited from SimulatedController
 SimulatedController (rw::models::ControllerModel::Ptr model)
 Constructor. More...
 
- Protected Member Functions inherited from Stateless
 Stateless ()
 constructor
 
template<class T >
void add (StatelessData< T > &data)
 implementations of sensor should add all their stateless data on initialization
 
void add (StateData *data)
 Add data. More...
 
void add (rw::core::Ptr< StateData > data)
 implementations of sensor should add all their state data on initialization
 
- Protected Attributes inherited from Stateless
bool _registered
 True if object has registered its state.
 
std::vector< rw::core::Ptr< StateData > > _datas
 Data.
 
StateStructure::Ptr _stateStruct
 The state structure.
 

Detailed Description

a generator of rigid bodies.

Constructor & Destructor Documentation

◆ RigidBodyGenerator()

RigidBodyGenerator ( const std::string &  name,
const rw::math::Vector3D<> &  pos,
std::vector< rw::geometry::Geometry::Ptr geoms,
double  delay,
double  lifetime = -1,
bool  repeat = false 
)

constructor

Parameters
name[in] name of controller
pos[in] position from which bodies are generated
geoms
delay
lifetime
repeat

Member Function Documentation

◆ getController()

rwlibs::control::Controller* getController ( )
inline

get the name of this controller

Returns
name of this controller

◆ reset()

void reset ( const rw::kinematics::State state)
virtual

reset the controller to the applied state

Parameters
state[in] the state to reset to

Implements SimulatedController.

◆ setEnabled()

void setEnabled ( bool  enabled)
inlinevirtual

disable or enable this controller

Parameters
enabled

Implements SimulatedController.

◆ update()

void update ( const rwlibs::simulation::Simulator::UpdateInfo info,
rw::kinematics::State state 
)
virtual

updates/steps the controller with time step dt. It will update the state state accordingly

Parameters
info[in] update information related to the time step.
state[in/out] the current state

Implements SimulatedController.


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