RobWorkProject  24.12.4-
Public Types | Public Member Functions | List of all members
RigidDevice Class Reference

the Rigid device is composed of a set of links where one or multiple constraints (joints) connect the links. The RigidDevice has motors on all active joints. These motors can be operated in either velocity control mode or force control mode. More...

#include <RigidDevice.hpp>

Inherits DynamicDevice.

Public Types

enum  MotorControlMode { Force , Velocity }
 Possible control modes for the motors in each joint. More...
 
typedef rw::core::Ptr< RigidDevicePtr
 Smart pointer type for a dynamic device.
 
- Public Types inherited from DynamicDevice
typedef rw::core::Ptr< DynamicDevicePtr
 Smart pointer type for a DynamicDevice.
 
- Public Types inherited from Stateless
typedef rw::core::Ptr< StatelessPtr
 Smart pointer type for Stateless.
 

Public Member Functions

 RigidDevice (dynamics::Body::Ptr base, const std::vector< std::pair< BodyInfo, rw::models::Object::Ptr >> &objects, rw::models::JointDevice::Ptr dev)
 Construct new kinematic device. More...
 
virtual ~RigidDevice ()
 Destructor.
 
void setMotorForceLimits (const rw::math::Q &force)
 set the force limits of all motors of this device More...
 
rw::math::Q getMotorForceLimits ()
 get the force limits of all motors of this device
 
rw::math::Q getJointVelocities (const rw::kinematics::State &state)
 get velocities of all motorized joints More...
 
double getJointVelocity (int i, const rw::kinematics::State &state)
 Get the velocity of a motorized joint. More...
 
void setJointVelocities (const rw::math::Q &q, rw::kinematics::State &state)
 set the joint velocities More...
 
void setJointVelocity (double vel, int i, rw::kinematics::State &state)
 Set the velocity of a motorized joint. More...
 
std::vector< MotorControlModegetMotorModes (const rw::kinematics::State &state)
 get the modes of all motors
 
MotorControlMode getMotorMode (int i, const rw::kinematics::State &state)
 Get the control mode for a single motor. More...
 
rw::math::Q getMotorTargets (const rw::kinematics::State &state)
 get the target off all motors More...
 
double getMotorTarget (int i, const rw::kinematics::State &state)
 Get the target for a single motor. More...
 
void setMotorTargets (const rw::math::Q &q, rw::kinematics::State &state)
 set target of all motors More...
 
void setMotorForceTargets (const rw::math::Q &force, rw::kinematics::State &state)
 Set force targets for all motors. More...
 
void setMotorVelocityTargets (const rw::math::Q &vel, rw::kinematics::State &state)
 Set velocity targets for all motors. More...
 
void setMotorTarget (double q, int i, rw::kinematics::State &state)
 set the target of motor i. the target may be a desired force or a desired velocity depending on the current mode of the motor. More...
 
void setMotorForceTarget (double force, int i, rw::kinematics::State &state)
 Set force target for a single motor. More...
 
void setMotorVelocityTarget (double vel, int i, rw::kinematics::State &state)
 Set velocity target for a single motor. More...
 
rw::models::JointDevice::Ptr getJointDevice ()
 Get the kinematic model of the device. More...
 
const std::vector< Body::Ptr > & getLinks ()
 Get the links of the device. More...
 
- Public Member Functions inherited from DynamicDevice
virtual ~DynamicDevice ()
 Destructor.
 
virtual rw::math::Q getQ (const rw::kinematics::State &state)
 gets the position
 
virtual void setQ (const rw::math::Q &q, rw::kinematics::State &state)
 Set the position of the joints. More...
 
rw::models::DevicegetModel ()
 gets the kinematic model of the DynamicDevice.
 
rw::models::Device::Ptr getKinematicModel ()
 Get the kinematic model of the device. More...
 
dynamics::Body::Ptr getBase ()
 Get the base of the device. More...
 
virtual rw::math::Q getVelocity (const rw::kinematics::State &state)
 deprecated More...
 
virtual void setVelocity (const rw::math::Q &vel, rw::kinematics::State &state)
 Set the velocities of the joints. More...
 
const std::string & getName () const
 Get the name of the dynamic device. 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 DynamicDevice
 DynamicDevice (dynamics::Body::Ptr base, rw::models::Device::Ptr dev)
 Construct new dynamic device. 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 DynamicDevice
rw::models::Device::Ptr _dev
 The kinematic model.
 
dynamics::Body::Ptr _base
 The base of the device.
 
- 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

the Rigid device is composed of a set of links where one or multiple constraints (joints) connect the links. The RigidDevice has motors on all active joints. These motors can be operated in either velocity control mode or force control mode.

To extend this to other types of control please use a JointController from rwsim::control

The Rigid device is created as a wrapper on top of a kinematic device from RobWork. This makes all constraints hard and only constraints (that is joints) that robwork supports in its device class is supported here.


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