mc_rbdyn::Device Struct Referenceabstract

#include <mc_rbdyn/Device.h>

Inheritance diagram for mc_rbdyn::Device:

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
 
Deviceoperator= (const Device &)=delete
 
 Device (Device &&)=default
 
Deviceoperator= (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_
 

Detailed Description

This struct represents a generic device attached to a robot

This is a barebone interface meant to be derived by a concrete device implementation

Constructor & Destructor Documentation

◆ Device() [1/4]

mc_rbdyn::Device::Device ( const std::string &  name)

Build a device not specifically attached to the robot

When the Device becomes part of a Robot instance it is attached to the origin of the robot

◆ Device() [2/4]

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

◆ Device() [3/4]

mc_rbdyn::Device::Device ( const Device )
delete

◆ Device() [4/4]

mc_rbdyn::Device::Device ( Device &&  )
default

◆ ~Device()

virtual mc_rbdyn::Device::~Device ( )
virtualdefaultnoexcept

Member Function Documentation

◆ clone()

virtual DevicePtr mc_rbdyn::Device::clone ( ) const
pure virtual

Perform a device copy

Implemented in mc_rbdyn::ForceSensor, and mc_rbdyn::BodySensor.

◆ name()

const std::string& mc_rbdyn::Device::name ( ) const
inline

Returns the name of the sensor

◆ operator=() [1/2]

Device& mc_rbdyn::Device::operator= ( const Device )
delete

◆ operator=() [2/2]

Device& mc_rbdyn::Device::operator= ( Device &&  )
default

◆ parent() [1/2]

const std::string& mc_rbdyn::Device::parent ( ) const
inline

Returns the parent body of the sensor

◆ parent() [2/2]

void mc_rbdyn::Device::parent ( const std::string &  p)
inline

Change the parent body of the sensor

◆ type()

const std::string& mc_rbdyn::Device::type ( ) const
inline

Returns the type of the sensor

◆ X_0_d()

sva::PTransformd mc_rbdyn::Device::X_0_d ( const mc_rbdyn::Robot robot) const
inline

Returns the deviec position in the inertial frame (convenience function)

◆ X_0_s()

sva::PTransformd mc_rbdyn::Device::X_0_s ( const mc_rbdyn::Robot robot) const

Returns the sensor position in the inertial frame (convenience function)

◆ X_p_d() [1/2]

const sva::PTransformd& mc_rbdyn::Device::X_p_d ( ) const
inline

Returns the transformation from the parent body to the device

◆ X_p_d() [2/2]

void mc_rbdyn::Device::X_p_d ( const sva::PTransformd &  pt)
inline

Change the parent to device transformation

◆ X_p_s() [1/2]

const sva::PTransformd& mc_rbdyn::Device::X_p_s ( ) const
inline

Returns the transformation from the parent body to the sensor

◆ X_p_s() [2/2]

void mc_rbdyn::Device::X_p_s ( const sva::PTransformd &  pt)
inline

Change the parent to sensor transformation

Member Data Documentation

◆ name_

std::string mc_rbdyn::Device::name_
protected

Name of the sensor

◆ parent_

std::string mc_rbdyn::Device::parent_
protected

Parent body of the sensor

◆ type_

std::string mc_rbdyn::Device::type_
protected

Type of sensor as string

◆ X_p_s_

sva::PTransformd mc_rbdyn::Device::X_p_s_
protected

Transformation from the parent body frame to the sensor frame


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