ANYdrive SDK
The SDK for interfacing ANYdrive.
anydrive::State Class Reference

State of the ANYdrive. More...

#include <State.hpp>

Inheritance diagram for anydrive::State:
Inheritance graph

Public Member Functions

 State ()
 
virtual ~State ()
 
const any_measurements::Time & getStamp () const
 
void setStamp (const any_measurements::Time &stamp)
 
const StatuswordgetStatusword () const
 
void setStatusword (const Statusword &statusword)
 
double getCurrent () const
 
void setCurrent (const double current)
 
double getGearPosition () const
 
void setGearPosition (const double gearPosition)
 
double getGearVelocity () const
 
void setGearVelocity (const double gearVelocity)
 
double getJointPosition () const
 
void setJointPosition (const double jointPosition)
 
double getJointVelocity () const
 
void setJointVelocity (const double jointVelocity)
 
double getJointAcceleration () const
 
void setJointAcceleration (const double jointAcceleration)
 
double getJointTorque () const
 
void setJointTorque (const double jointTorque)
 
const any_measurements::Imu & getImu () const
 
void setImu (const any_measurements::Imu &imu)
 
bool isValid () const
 
virtual std::string asString (const std::string &prefix="") const
 

Protected Attributes

any_measurements::Time stamp_
 Time when the state was read out. More...
 
Statusword statusword_
 Statusword. More...
 
double current_ = 0.0
 Current [A]. More...
 
double gearPosition_ = 0.0
 Gear position [rad]. More...
 
double gearVelocity_ = 0.0
 Gear velocity [rad/s]. More...
 
double jointPosition_ = 0.0
 Joint position [rad]. More...
 
double jointVelocity_ = 0.0
 Joint velocity [rad/s]. More...
 
double jointAcceleration_ = 0.0
 Joint velocity [rad/s²]. More...
 
double jointTorque_ = 0.0
 Joint torque [Nm]. More...
 
any_measurements::Imu imu_
 IMU. More...
 

Detailed Description

State of the ANYdrive.

Constructor & Destructor Documentation

◆ State()

anydrive::State::State ( )

◆ ~State()

anydrive::State::~State ( )
virtual

Member Function Documentation

◆ asString()

std::string anydrive::State::asString ( const std::string &  prefix = "") const
virtual

Reimplemented in anydrive::StateExtended.

◆ getCurrent()

double anydrive::State::getCurrent ( ) const

◆ getGearPosition()

double anydrive::State::getGearPosition ( ) const

◆ getGearVelocity()

double anydrive::State::getGearVelocity ( ) const

◆ getImu()

const any_measurements::Imu & anydrive::State::getImu ( ) const

◆ getJointAcceleration()

double anydrive::State::getJointAcceleration ( ) const

◆ getJointPosition()

double anydrive::State::getJointPosition ( ) const

◆ getJointTorque()

double anydrive::State::getJointTorque ( ) const

◆ getJointVelocity()

double anydrive::State::getJointVelocity ( ) const

◆ getStamp()

const any_measurements::Time & anydrive::State::getStamp ( ) const

◆ getStatusword()

const Statusword & anydrive::State::getStatusword ( ) const

◆ isValid()

bool anydrive::State::isValid ( ) const

Check if the state is valid:

  • Stamp is non-zero
  • Statusword is valid
  • None of the values is Inf or NaN
    Returns
    True if valid.

◆ setCurrent()

void anydrive::State::setCurrent ( const double  current)

◆ setGearPosition()

void anydrive::State::setGearPosition ( const double  gearPosition)

◆ setGearVelocity()

void anydrive::State::setGearVelocity ( const double  gearVelocity)

◆ setImu()

void anydrive::State::setImu ( const any_measurements::Imu &  imu)

◆ setJointAcceleration()

void anydrive::State::setJointAcceleration ( const double  jointAcceleration)

◆ setJointPosition()

void anydrive::State::setJointPosition ( const double  jointPosition)

◆ setJointTorque()

void anydrive::State::setJointTorque ( const double  jointTorque)

◆ setJointVelocity()

void anydrive::State::setJointVelocity ( const double  jointVelocity)

◆ setStamp()

void anydrive::State::setStamp ( const any_measurements::Time &  stamp)

◆ setStatusword()

void anydrive::State::setStatusword ( const Statusword statusword)

Member Data Documentation

◆ current_

double anydrive::State::current_ = 0.0
protected

Current [A].

◆ gearPosition_

double anydrive::State::gearPosition_ = 0.0
protected

Gear position [rad].

◆ gearVelocity_

double anydrive::State::gearVelocity_ = 0.0
protected

Gear velocity [rad/s].

◆ imu_

any_measurements::Imu anydrive::State::imu_
protected

IMU.

◆ jointAcceleration_

double anydrive::State::jointAcceleration_ = 0.0
protected

Joint velocity [rad/s²].

◆ jointPosition_

double anydrive::State::jointPosition_ = 0.0
protected

Joint position [rad].

◆ jointTorque_

double anydrive::State::jointTorque_ = 0.0
protected

Joint torque [Nm].

◆ jointVelocity_

double anydrive::State::jointVelocity_ = 0.0
protected

Joint velocity [rad/s].

◆ stamp_

any_measurements::Time anydrive::State::stamp_
protected

Time when the state was read out.

◆ statusword_

Statusword anydrive::State::statusword_
protected

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