RobWorkProject
23.9.11-
|
a kinematic device is able to influence the simulated environment but the device is not influenced by any external force as is the RigidDevice. More...
#include <KinematicDevice.hpp>
Inherits DynamicDevice.
Public Types | |
typedef rw::core::Ptr< KinematicDevice > | Ptr |
Smart pointer type for a KinematicDevice. | |
Public Types inherited from DynamicDevice | |
typedef rw::core::Ptr< DynamicDevice > | Ptr |
Smart pointer type for a DynamicDevice. | |
Public Types inherited from Stateless | |
typedef rw::core::Ptr< Stateless > | Ptr |
Smart pointer type for Stateless. | |
Public Member Functions | |
KinematicDevice (dynamics::Body::Ptr base, const std::vector< std::pair< BodyInfo, rw::core::Ptr< rw::models::Object >>> &objects, rw::models::JointDevice::Ptr dev) | |
Construct new kinematic device. More... | |
virtual | ~KinematicDevice () |
destructor | |
rw::math::Q | getJointVelocities (const rw::kinematics::State &state) |
get the current velocities of all joints More... | |
void | setJointVelocities (const rw::math::Q &vel, rw::kinematics::State &state) |
Set the velocities of the joints. More... | |
const std::vector< Body::Ptr > & | getLinks () |
get the kinematic bodies that this KinematicDevice controls. The bodies are ordered such that device joint i maps to kinematic body i More... | |
void | setMaxAcc (const rw::math::Q &acc) |
Set maximum acceleration for the joints. More... | |
rw::math::Q | getMaxAcc () |
Get the maximum joint accelerations. More... | |
void | setMaxVel (const rw::math::Q &vel) |
Set the maximum joint velocities. More... | |
rw::math::Q | getMaxVel () |
Get the maximum joint velocities. More... | |
rw::models::JointDevice::Ptr | getJointDevice () |
Get the kinematic model. 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::Device & | getModel () |
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... | |
virtual void | setMotorVelocityTargets (const rw::math::Q &vel, rw::kinematics::State &state) |
Set motor targets for 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. | |
a kinematic device is able to influence the simulated environment but the device is not influenced by any external force as is the RigidDevice.
The kinematic device is velocity controlled and if the acceleration limits permit then the velocity of the kinematic device will be equal to the target velocity in the next step of the simulator.
This class is especially usefull for animating robot devices in a simulated environment.
KinematicDevice | ( | dynamics::Body::Ptr | base, |
const std::vector< std::pair< BodyInfo, rw::core::Ptr< rw::models::Object >>> & | objects, | ||
rw::models::JointDevice::Ptr | dev | ||
) |
Construct new kinematic device.
base | [in] base of the device. |
objects | [in] vector of links. Each linksis given as the dynamic body parameters and the object geometry. |
dev | [in] the kinematic model. |
|
inline |
Get the kinematic model.
|
inlinevirtual |
get the current velocities of all joints
state | [in] the state |
Implements DynamicDevice.
|
inlinevirtual |
get the kinematic bodies that this KinematicDevice controls. The bodies are ordered such that device joint i maps to kinematic body i
Implements DynamicDevice.
rw::math::Q getMaxAcc | ( | ) |
Get the maximum joint accelerations.
rw::math::Q getMaxVel | ( | ) |
Get the maximum joint velocities.
|
inlinevirtual |
Set the velocities of the joints.
vel | [in] the joint velocities. |
state | [out] the state with updated velocities. |
Implements DynamicDevice.
void setMaxAcc | ( | const rw::math::Q & | acc | ) |
Set maximum acceleration for the joints.
acc | [in] the maximum accelerations. |
void setMaxVel | ( | const rw::math::Q & | vel | ) |
Set the maximum joint velocities.
vel | [in] the maximum velocities. |