RobWorkProject  23.9.11-
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
DynamicDevice Class Referenceabstract

base class for dynamic devices that has dynamic state values such as velocity and acceleration. More...

#include <DynamicDevice.hpp>

Inherits Stateless.

Inherited by KinematicDevice, RigidDevice, and SuctionCup.

Public Types

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

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 getJointVelocities (const rw::kinematics::State &state)=0
 get the current velocities of all joints More...
 
virtual void setJointVelocities (const rw::math::Q &vel, rw::kinematics::State &state)=0
 Set the velocities of the joints. 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...
 
virtual void setMotorVelocityTargets (const rw::math::Q &vel, rw::kinematics::State &state)
 Set motor targets for the joints. More...
 
virtual const std::vector< Body::Ptr > & getLinks ()=0
 Get all links in the dynamic device. 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...
 

Protected Member Functions

 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

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

base class for dynamic devices that has dynamic state values such as velocity and acceleration.

Constructor & Destructor Documentation

◆ DynamicDevice()

DynamicDevice ( dynamics::Body::Ptr  base,
rw::models::Device::Ptr  dev 
)
inlineprotected

Construct new dynamic device.

Parameters
base[in] base of the device.
dev[in] the kinematic model.

Member Function Documentation

◆ getBase()

dynamics::Body::Ptr getBase ( )
inline

Get the base of the device.

Returns
the base.

◆ getJointVelocities()

virtual rw::math::Q getJointVelocities ( const rw::kinematics::State state)
pure virtual

get the current velocities of all joints

Parameters
state[in] the state
Returns
velocites of all joints

Implemented in SuctionCup, RigidDevice, and KinematicDevice.

◆ getKinematicModel()

rw::models::Device::Ptr getKinematicModel ( )
inline

Get the kinematic model of the device.

Returns
the kinematic device.

◆ getLinks()

virtual const std::vector<Body::Ptr>& getLinks ( )
pure virtual

Get all links in the dynamic device.

Returns
a vector with the links.

Implemented in SuctionCup, RigidDevice, and KinematicDevice.

◆ getName()

const std::string& getName ( ) const
inline

Get the name of the dynamic device.

Returns
the name.

◆ getVelocity()

virtual rw::math::Q getVelocity ( const rw::kinematics::State state)
inlinevirtual

deprecated

get the current velocities of all joints

Parameters
state[in] the state
Returns
velocites of all joints
Deprecated:
Use getJointVelocities() instead!

◆ setJointVelocities()

virtual void setJointVelocities ( const rw::math::Q vel,
rw::kinematics::State state 
)
pure virtual

Set the velocities of the joints.

Parameters
vel[in] the joint velocities.
state[out] the state with updated velocities.

Implemented in SuctionCup, KinematicDevice, and RigidDevice.

◆ setMotorVelocityTargets()

virtual void setMotorVelocityTargets ( const rw::math::Q vel,
rw::kinematics::State state 
)
inlinevirtual

Set motor targets for the joints.

Parameters
vel[in] velocity targets.
state[out] the state with new velocity targets.

Reimplemented in RigidDevice.

◆ setQ()

virtual void setQ ( const rw::math::Q q,
rw::kinematics::State state 
)
inlinevirtual

Set the position of the joints.

Parameters
q[in] the positions.
state[out] the state with new positions.

◆ setVelocity()

virtual void setVelocity ( const rw::math::Q vel,
rw::kinematics::State state 
)
inlinevirtual

Set the velocities of the joints.

Parameters
vel[in] the joint velocities.
state[out] the state with updated velocities.
Deprecated:
Use setJointVelocities() instead!

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