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

a JointController that use a PD loop on each joint to control the velocity such that the position target is reached. More...

#include <PoseController.hpp>

Inherits Controller, and SimulatedController.

Public Types

typedef rw::core::Ptr< PoseControllerPtr
 smart pointer type
 
- Public Types inherited from Controller
typedef rw::core::Ptr< ControllerPtr
 smart poiner definition for controller
 
- 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

 PoseController (const std::string &name, rw::core::Ptr< rwsim::dynamics::DynamicDevice > rdev, const rw::kinematics::State &state, double dt)
 constructor More...
 
 PoseController (const std::string &name, rw::core::Ptr< rwsim::dynamics::DynamicDevice > rdev, const rw::kinematics::State &state, double dt, rw::core::Ptr< rw::kinematics::Frame > endframe)
 constructor More...
 
virtual ~PoseController ()
 destructor
 
double getSampleTime ()
 the time between samples More...
 
void setSampleTime (double stime)
 set the time between samples in seconds More...
 
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...
 
ControllergetController ()
 get the name of this controller More...
 
std::string getControllerName ()
 get the name of this controller More...
 
rw::core::Ptr< rw::models::DevicegetControlledDevice ()
 get the device that is controlled by this controller More...
 
void setEnabled (bool enabled)
 disable or enable this controller More...
 
bool isEnabled () const
 true if this controller is enabled More...
 
void setTarget (const rw::math::Transform3D<> &target)
 sets the target joint value for the current control mode. More...
 
void setTarget (const rw::math::Transform3D<> &target, const rw::math::VelocityScrew6D<> &vals)
 sets target which is a cartesean position and the target velocity in that position More...
 
rwlibs::control::Controller::Ptr getControllerHandle (rwlibs::simulation::Simulator::Ptr sim)
 
- Public Member Functions inherited from Controller
virtual ~Controller ()
 destructor
 
const std::string & getName () const
 get the unique name of this controller More...
 
void setName (const std::string &name)
 set the name of the controller More...
 
- Public Member Functions inherited from SimulatedController
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...
 
- 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 Controller
 Controller (const std::string &name)
 constructor More...
 
- 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 JointController that use a PD loop on each joint to control the velocity such that the position target is reached.

Constructor & Destructor Documentation

◆ PoseController() [1/2]

PoseController ( const std::string &  name,
rw::core::Ptr< rwsim::dynamics::DynamicDevice rdev,
const rw::kinematics::State state,
double  dt 
)

constructor

Parameters
name
rdev[in] device that is to be controlled
state[in] target state
dt[in] the sampletime (time between samples in seconds) used in the control loop, this should be larger than the expected update sample time.

◆ PoseController() [2/2]

PoseController ( const std::string &  name,
rw::core::Ptr< rwsim::dynamics::DynamicDevice rdev,
const rw::kinematics::State state,
double  dt,
rw::core::Ptr< rw::kinematics::Frame endframe 
)

constructor

Parameters
name
rdev[in] device that is to be controlled
state[in] target state
dt[in] the sampletime (time between samples in seconds) used in the control loop, this should be larger than the expected update sample time.
endframe

Member Function Documentation

◆ getControlledDevice()

rw::core::Ptr<rw::models::Device> getControlledDevice ( )
inline

get the device that is controlled by this controller

Returns

◆ getController()

Controller* getController ( )
inline

get the name of this controller

Returns
name of this controller

◆ getControllerName()

std::string getControllerName ( )
inlinevirtual

get the name of this controller

Returns
name of this controller

Implements SimulatedController.

◆ getSampleTime()

double getSampleTime ( )

the time between samples

Returns
the sample time in seconds

◆ isEnabled()

bool isEnabled ( ) const
inlinevirtual

true if this controller is enabled

Returns

Implements SimulatedController.

◆ 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.

◆ setSampleTime()

void setSampleTime ( double  stime)

set the time between samples in seconds

Parameters
stime[in] sample time

◆ setTarget() [1/2]

void setTarget ( const rw::math::Transform3D<> &  target)

sets the target joint value for the current control mode.

◆ setTarget() [2/2]

void setTarget ( const rw::math::Transform3D<> &  target,
const rw::math::VelocityScrew6D<> &  vals 
)

sets target which is a cartesean position and the target velocity in that position

Parameters
target
vals

◆ 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: