#include <mc_rbdyn/Device.h>
Public Member Functions | |
Device (const std::string &name) | |
Device (const std::string &name, const std::string &parent, const sva::PTransformd &X_p_s) | |
Device (const Device &)=delete | |
Device & | operator= (const Device &)=delete |
Device (Device &&)=default | |
Device & | operator= (Device &&)=default |
virtual | ~Device () noexcept=default |
const std::string & | name () const |
const std::string & | type () const |
const std::string & | parent () const |
void | parent (const std::string &p) |
const sva::PTransformd & | X_p_d () const |
const sva::PTransformd & | X_p_s () const |
void | X_p_d (const sva::PTransformd &pt) |
void | X_p_s (const sva::PTransformd &pt) |
sva::PTransformd | X_0_d (const mc_rbdyn::Robot &robot) const |
sva::PTransformd | X_0_s (const mc_rbdyn::Robot &robot) const |
virtual DevicePtr | clone () const =0 |
Protected Attributes | |
std::string | type_ |
std::string | name_ |
std::string | parent_ |
sva::PTransformd | X_p_s_ |
This struct represents a generic device attached to a robot
This is a barebone interface meant to be derived by a concrete device implementation
mc_rbdyn::Device::Device | ( | const std::string & | name | ) |
mc_rbdyn::Device::Device | ( | const std::string & | name, |
const std::string & | parent, | ||
const sva::PTransformd & | X_p_s | ||
) |
Build a device attached to a specific body of the robot
|
delete |
|
default |
|
virtualdefaultnoexcept |
|
pure virtual |
Perform a device copy
Implemented in mc_rbdyn::ForceSensor, and mc_rbdyn::BodySensor.
|
inline |
Returns the name of the sensor
|
inline |
Returns the parent body of the sensor
|
inline |
Change the parent body of the sensor
|
inline |
Returns the type of the sensor
|
inline |
Returns the deviec position in the inertial frame (convenience function)
sva::PTransformd mc_rbdyn::Device::X_0_s | ( | const mc_rbdyn::Robot & | robot | ) | const |
Returns the sensor position in the inertial frame (convenience function)
|
inline |
Returns the transformation from the parent body to the device
|
inline |
Change the parent to device transformation
|
inline |
Returns the transformation from the parent body to the sensor
|
inline |
Change the parent to sensor transformation
|
protected |
Name of the sensor
|
protected |
Parent body of the sensor
|
protected |
Type of sensor as string
|
protected |
Transformation from the parent body frame to the sensor frame