mc_rbdyn::BodySensor Struct Reference

#include <mc_rbdyn/BodySensor.h>

Inheritance diagram for mc_rbdyn::BodySensor:
Collaboration diagram for mc_rbdyn::BodySensor:

Public Member Functions

EIGEN_MAKE_ALIGNED_OPERATOR_NEW BodySensor ()
 
 BodySensor (const std::string &name, const std::string &bodyName, const sva::PTransformd &X_b_s)
 
 BodySensor (const BodySensor &bs)
 
BodySensoroperator= (const BodySensor &bs)
 
 BodySensor (BodySensor &&)=default
 
BodySensoroperator= (BodySensor &&)=default
 
 ~BodySensor () noexcept override
 
const std::string & parentBody () const
 
const sva::PTransformd & X_b_s () const
 
const Eigen::Vector3d & position () const
 
void position (const Eigen::Vector3d &position)
 
const Eigen::Quaterniond & orientation () const
 
void orientation (const Eigen::Quaterniond &orientation)
 
const Eigen::Vector3d & linearVelocity () const
 
void linearVelocity (const Eigen::Vector3d &linear_velocity)
 
const Eigen::Vector3d & angularVelocity () const
 
void angularVelocity (const Eigen::Vector3d &angular_velocity)
 
const MC_RTC_DEPRECATED Eigen::Vector3d & acceleration () const
 
MC_RTC_DEPRECATED void acceleration (const Eigen::Vector3d &acceleration)
 
const Eigen::Vector3d & linearAcceleration () const
 
void linearAcceleration (const Eigen::Vector3d &linear_acceleration)
 
const Eigen::Vector3d & angularAcceleration () const
 
void angularAcceleration (const Eigen::Vector3d &angular_acceleration)
 
DevicePtr clone () const override
 
- Public Member Functions inherited from mc_rbdyn::Device
 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
 

Additional Inherited Members

- Protected Attributes inherited from mc_rbdyn::Device
std::string type_
 
std::string name_
 
std::string parent_
 
sva::PTransformd X_p_s_
 

Detailed Description

This structure defines a body sensor, that is a sensor that provides dynamic information about a body. It would typically be used to represent an IMU reading but in more ideal (simulation, external tracking system...) it can hold more information

Constructor & Destructor Documentation

◆ BodySensor() [1/4]

EIGEN_MAKE_ALIGNED_OPERATOR_NEW mc_rbdyn::BodySensor::BodySensor ( )
inline

Default constructor, does not represent a valid body sensor

◆ BodySensor() [2/4]

mc_rbdyn::BodySensor::BodySensor ( const std::string &  name,
const std::string &  bodyName,
const sva::PTransformd &  X_b_s 
)
inline

Constructor

Parameters
nameName of the sensor
bodyNameName of the body to which the sensor is attached
X_b_sTransformation from the parent body to the sensor

◆ BodySensor() [3/4]

mc_rbdyn::BodySensor::BodySensor ( const BodySensor bs)
inline

◆ BodySensor() [4/4]

mc_rbdyn::BodySensor::BodySensor ( BodySensor &&  )
default

◆ ~BodySensor()

mc_rbdyn::BodySensor::~BodySensor ( )
overridenoexcept

Member Function Documentation

◆ acceleration() [1/2]

const MC_RTC_DEPRECATED Eigen::Vector3d& mc_rbdyn::BodySensor::acceleration ( ) const
inline

Return the sensor's linear acceleration reading, Zero if not provided

Deprecated:
in favor of const Eigen::Vector3d & linearAcceleration() const

◆ acceleration() [2/2]

MC_RTC_DEPRECATED void mc_rbdyn::BodySensor::acceleration ( const Eigen::Vector3d &  acceleration)
inline

Set the sensor's linear acceleration reading

Deprecated:
in favor of void linearAcceleration(const Eigen::Vector3d &)

◆ angularAcceleration() [1/2]

const Eigen::Vector3d& mc_rbdyn::BodySensor::angularAcceleration ( ) const
inline

Return the sensor's angular acceleration reading, Zero if not provided

◆ angularAcceleration() [2/2]

void mc_rbdyn::BodySensor::angularAcceleration ( const Eigen::Vector3d &  angular_acceleration)
inline

Set the sensor's angular acceleration reading

◆ angularVelocity() [1/2]

const Eigen::Vector3d& mc_rbdyn::BodySensor::angularVelocity ( ) const
inline

Return the sensor's angular velocity reading, Zero if not provided

◆ angularVelocity() [2/2]

void mc_rbdyn::BodySensor::angularVelocity ( const Eigen::Vector3d &  angular_velocity)
inline

Set the sensor's angular velocity reading

◆ clone()

DevicePtr mc_rbdyn::BodySensor::clone ( ) const
overridevirtual

Perform a device copy

Implements mc_rbdyn::Device.

◆ linearAcceleration() [1/2]

const Eigen::Vector3d& mc_rbdyn::BodySensor::linearAcceleration ( ) const
inline

Return the sensor's linear acceleration reading, Zero if not provided

◆ linearAcceleration() [2/2]

void mc_rbdyn::BodySensor::linearAcceleration ( const Eigen::Vector3d &  linear_acceleration)
inline

Set the sensor's linear acceleration reading

◆ linearVelocity() [1/2]

const Eigen::Vector3d& mc_rbdyn::BodySensor::linearVelocity ( ) const
inline

Return the sensor's linear velocity reading, Zero if not provided

◆ linearVelocity() [2/2]

void mc_rbdyn::BodySensor::linearVelocity ( const Eigen::Vector3d &  linear_velocity)
inline

Set the sensor's linear velocity reading

◆ operator=() [1/2]

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

◆ operator=() [2/2]

BodySensor& mc_rbdyn::BodySensor::operator= ( const BodySensor bs)
inline

◆ orientation() [1/2]

const Eigen::Quaterniond& mc_rbdyn::BodySensor::orientation ( ) const
inline

Return the sensor's orientation reading, Identity if not provided

◆ orientation() [2/2]

void mc_rbdyn::BodySensor::orientation ( const Eigen::Quaterniond &  orientation)
inline

Set the sensor's orientation reading

Note
By convention, this rotation should be given from the inertial frame (i.e. a fixed frame in the real world) to a sensor frame of the robot.

◆ parentBody()

const std::string& mc_rbdyn::BodySensor::parentBody ( ) const
inline

Get the sensor's parent body name

◆ position() [1/2]

const Eigen::Vector3d& mc_rbdyn::BodySensor::position ( ) const
inline

Return the sensor's position reading, Zero if not provided

◆ position() [2/2]

void mc_rbdyn::BodySensor::position ( const Eigen::Vector3d &  position)
inline

Set the sensor's position reading

◆ X_b_s()

const sva::PTransformd& mc_rbdyn::BodySensor::X_b_s ( ) const
inline

Return the transformation from the parent body to the sensor


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