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

ANYdrive command. More...

#include <Command.hpp>

Public Member Functions

 Command ()
 
virtual ~Command ()
 
const any_measurements::Time & getStamp () const
 
void setStamp (const any_measurements::Time &stamp)
 
mode::ModeEnum getModeEnum () const
 
void setModeEnum (const mode::ModeEnum modeEnum)
 
double getCurrent () const
 
void setCurrent (const double current)
 
double getMotorPosition () const
 
void setMotorPosition (const double motorPosition)
 
double getMotorVelocity () const
 
void setMotorVelocity (const double motorVelocity)
 
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 getJointTorque () const
 
void setJointTorque (const double jointTorque)
 
mode::PidGainsFgetPidGains ()
 
const mode::PidGainsFgetPidGains () const
 
void setPidGains (const mode::PidGainsF &pidGains)
 
bool isValid () const
 
virtual std::string asString (const std::string &prefix="") const
 

Protected Attributes

any_measurements::Time stamp_
 Stamp. More...
 
mode::ModeEnum modeEnum_ = mode::ModeEnum::NA
 Mode. More...
 
double current_ = 0.0
 Current [A]. More...
 
double motorPosition_ = 0.0
 Motor position [rad]. More...
 
double motorVelocity_ = 0.0
 Motor velocity [rad/s]. 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 jointTorque_ = 0.0
 Joint torque [Nm]. More...
 
mode::PidGainsF pidGains_
 PID gains. More...
 

Detailed Description

ANYdrive command.

Constructor & Destructor Documentation

◆ Command()

anydrive::Command::Command ( )

◆ ~Command()

anydrive::Command::~Command ( )
virtual

Member Function Documentation

◆ asString()

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

◆ getCurrent()

double anydrive::Command::getCurrent ( ) const

◆ getGearPosition()

double anydrive::Command::getGearPosition ( ) const

◆ getGearVelocity()

double anydrive::Command::getGearVelocity ( ) const

◆ getJointPosition()

double anydrive::Command::getJointPosition ( ) const

◆ getJointTorque()

double anydrive::Command::getJointTorque ( ) const

◆ getJointVelocity()

double anydrive::Command::getJointVelocity ( ) const

◆ getModeEnum()

mode::ModeEnum anydrive::Command::getModeEnum ( ) const

◆ getMotorPosition()

double anydrive::Command::getMotorPosition ( ) const

◆ getMotorVelocity()

double anydrive::Command::getMotorVelocity ( ) const

◆ getPidGains() [1/2]

mode::PidGainsF & anydrive::Command::getPidGains ( )

◆ getPidGains() [2/2]

const mode::PidGainsF & anydrive::Command::getPidGains ( ) const

◆ getStamp()

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

◆ isValid()

bool anydrive::Command::isValid ( ) const

Check if the command is valid:

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

◆ setCurrent()

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

◆ setGearPosition()

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

◆ setGearVelocity()

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

◆ setJointPosition()

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

◆ setJointTorque()

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

◆ setJointVelocity()

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

◆ setModeEnum()

void anydrive::Command::setModeEnum ( const mode::ModeEnum  modeEnum)

◆ setMotorPosition()

void anydrive::Command::setMotorPosition ( const double  motorPosition)

◆ setMotorVelocity()

void anydrive::Command::setMotorVelocity ( const double  motorVelocity)

◆ setPidGains()

void anydrive::Command::setPidGains ( const mode::PidGainsF pidGains)

◆ setStamp()

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

Member Data Documentation

◆ current_

double anydrive::Command::current_ = 0.0
protected

Current [A].

◆ gearPosition_

double anydrive::Command::gearPosition_ = 0.0
protected

Gear position [rad].

◆ gearVelocity_

double anydrive::Command::gearVelocity_ = 0.0
protected

Gear velocity [rad/s].

◆ jointPosition_

double anydrive::Command::jointPosition_ = 0.0
protected

Joint position [rad].

◆ jointTorque_

double anydrive::Command::jointTorque_ = 0.0
protected

Joint torque [Nm].

◆ jointVelocity_

double anydrive::Command::jointVelocity_ = 0.0
protected

Joint velocity [rad/s].

◆ modeEnum_

mode::ModeEnum anydrive::Command::modeEnum_ = mode::ModeEnum::NA
protected

Mode.

◆ motorPosition_

double anydrive::Command::motorPosition_ = 0.0
protected

Motor position [rad].

◆ motorVelocity_

double anydrive::Command::motorVelocity_ = 0.0
protected

Motor velocity [rad/s].

◆ pidGains_

mode::PidGainsF anydrive::Command::pidGains_
protected

PID gains.

◆ stamp_

any_measurements::Time anydrive::Command::stamp_
protected

Stamp.


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