RobWorkProject
Public Types | Public Member Functions | Protected Member Functions | List of all members
SimulatedController Class Referenceabstract

interface of a simulated controller More...

#include <SimulatedController.hpp>

Inherits Stateless.

Inherited by SuctionCupController, BeamJointController, BodyController, PDController, PoseController, RigidBodyGenerator, SerialDeviceController, SpringJointController, SyncPDController, TrajectoryController, and VelRampController.

Public Types

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

Public Member Functions

virtual std::string getControllerName ()=0
 get the name of this controller More...
 
virtual void update (const Simulator::UpdateInfo &info, rw::kinematics::State &state)=0
 updates/steps the controller with time step dt. It will update the state state accordingly More...
 
virtual void reset (const rw::kinematics::State &state)=0
 reset the controller to the applied state More...
 
virtual rwlibs::control::Controller::Ptr getControllerHandle (rwlibs::simulation::Simulator::Ptr sim)=0
 get the controller handle eg. statefull handle, associated with this simulated controller More...
 
rw::models::ControllerModel::Ptr getControllerModel ()
 get the controllermodel of this simulated controller More...
 
virtual void setEnabled (bool enabled)=0
 disable or enable this 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...
 

Protected Member Functions

 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 (boost::shared_ptr< StateData > data)
 implementations of sensor should add all their state data on initialization
 

Additional Inherited Members

- Protected Attributes inherited from Stateless
bool _registered
 True if object has registered its state.
 
std::vector< boost::shared_ptr< StateData > > _datas
 Data.
 
StateStructure::Ptr _stateStruct
 The state structure.
 

Detailed Description

interface of a simulated controller

Constructor & Destructor Documentation

◆ SimulatedController()

Constructor.

Parameters
model[in] the controller model.

Member Function Documentation

◆ getControllerHandle()

virtual rwlibs::control::Controller::Ptr getControllerHandle ( rwlibs::simulation::Simulator::Ptr  sim)
pure virtual

get the controller handle eg. statefull handle, associated with this simulated controller

Returns

Implemented in SerialDeviceController, BodyController, PDController, PoseController, SpringJointController, SyncPDController, BeamJointController, TrajectoryController, and VelRampController.

◆ getControllerModel()

rw::models::ControllerModel::Ptr getControllerModel ( )
inline

get the controllermodel of this simulated controller

Returns

◆ getControllerName()

virtual std::string getControllerName ( )
pure virtual

◆ isEnabled()

virtual bool isEnabled ( ) const
pure virtual

◆ reset()

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

◆ setEnabled()

virtual void setEnabled ( bool  enabled)
pure virtual

◆ update()

virtual void update ( const Simulator::UpdateInfo info,
rw::kinematics::State state 
)
pure 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

Implemented in BodyController, SerialDeviceController, PDController, PoseController, SpringJointController, SyncPDController, BeamJointController, TrajectoryController, RigidBodyGenerator, SuctionCupController, and VelRampController.


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