yarp-devices
Loading...
Searching...
No Matches
EmulatedControlBoard Class Reference

Implements several motor interfaces.

#include <EmulatedControlBoard.hpp>

Inheritance diagram for EmulatedControlBoard:
EmulatedControlBoard_ParamsParser

Public Types

using return_t = bool

Public Member Functions

return_t getAxes (int *ax) override
return_t positionMove (int j, double ref) override
return_t positionMove (const double *refs) override
return_t positionMove (int n_joint, const int *joints, const double *refs) override
return_t relativeMove (int j, double delta) override
return_t relativeMove (const double *deltas) override
return_t relativeMove (int n_joint, const int *joints, const double *deltas) override
return_t checkMotionDone (int j, bool *flag) override
return_t checkMotionDone (bool *flag) override
return_t checkMotionDone (int n_joint, const int *joints, bool *flags) override
return_t setRefSpeed (int j, double sp) override
return_t setRefSpeeds (const double *spds) override
return_t setRefSpeeds (int n_joint, const int *joints, const double *spds) override
return_t getRefSpeed (int j, double *ref) override
return_t getRefSpeeds (double *spds) override
return_t getRefSpeeds (int n_joint, const int *joints, double *spds) override
return_t setRefAcceleration (int j, double acc) override
return_t setRefAccelerations (const double *accs) override
return_t setRefAccelerations (int n_joint, const int *joints, const double *accs) override
return_t getRefAcceleration (int j, double *acc) override
return_t getRefAccelerations (double *accs) override
return_t getRefAccelerations (int n_joint, const int *joints, double *accs) override
return_t stop (int j) override
return_t stop () override
return_t stop (int n_joint, const int *joints) override
return_t getTargetPosition (int joint, double *ref) override
return_t getTargetPositions (double *refs) override
return_t getTargetPositions (int n_joint, const int *joints, double *refs) override
return_t setPosition (int j, double ref) override
return_t setPositions (int n_joint, const int *joints, const double *refs) override
return_t setPositions (const double *refs) override
return_t getRefPosition (int joint, double *ref) override
return_t getRefPositions (double *refs) override
return_t getRefPositions (int n_joint, const int *joints, double *refs) override
return_t resetEncoder (int j) override
return_t resetEncoders () override
return_t setEncoder (int j, double val) override
return_t setEncoders (const double *vals) override
return_t getEncoder (int j, double *v) override
return_t getEncoders (double *encs) override
return_t getEncodersTimed (double *encs, double *time) override
return_t getEncoderTimed (int j, double *encs, double *time) override
return_t getEncoderSpeed (int j, double *sp) override
return_t getEncoderSpeeds (double *spds) override
return_t getEncoderAcceleration (int j, double *spds) override
return_t getEncoderAccelerations (double *accs) override
return_t velocityMove (int j, double sp) override
return_t velocityMove (const double *sp) override
return_t velocityMove (int n_joint, const int *joints, const double *spds) override
return_t getRefVelocity (int joint, double *vel) override
return_t getRefVelocities (double *vels) override
return_t getRefVelocities (int n_joint, const int *joints, double *vels) override
return_t setLimits (int axis, double min, double max) override
return_t getLimits (int axis, double *min, double *max) override
return_t setVelLimits (int axis, double min, double max) override
return_t getVelLimits (int axis, double *min, double *max) override
return_t getControlMode (int j, int *mode) override
return_t getControlModes (int *modes) override
return_t getControlModes (int n_joint, const int *joints, int *modes) override
return_t setControlMode (int j, const int mode) override
return_t setControlModes (int n_joint, const int *joints, int *modes) override
return_t setControlModes (int *modes) override
bool open (yarp::os::Searchable &config) override
bool close () override
bool threadInit () override
void run () override
Public Member Functions inherited from EmulatedControlBoard_ParamsParser
bool parseParams (const yarp::os::Searchable &config) override
std::string getDeviceClassName () const override
std::string getDeviceName () const override
std::string getDocumentationOfDeviceParams () const override
std::vector< std::string > getListOfParams () const override
bool getParamValue (const std::string &paramName, std::string &paramValue) const override
std::string getConfiguration () const override

Protected Member Functions

void setEncRaw (const int index, const double position)
void setEncsRaw (const std::vector< double > &positions)
double getEncRaw (const int index)
std::vector< double > getEncsRaw ()
double getEncExposed (const int index)
std::vector< double > getEncsExposed ()

Private Types

enum  jmc_state { NOT_CONTROLLING , POSITION_MOVE , RELATIVE_MOVE , VELOCITY_MOVE }

Private Attributes

yarp::conf::vocab32_t controlMode {0}
double lastTime {0.0}
std::mutex encRawMutex
std::vector< jmc_state > jointStatus
std::vector< double > encRaw
std::vector< double > refAcc
std::vector< double > targetExposed
std::vector< double > velRaw

Additional Inherited Members

Public Attributes inherited from EmulatedControlBoard_ParamsParser
const std::string m_device_classname = {"EmulatedControlBoard"}
const std::string m_device_name = {"EmulatedControlBoard"}
bool m_parser_is_strict = false
const parser_version_type m_parser_version = {}
std::string m_provided_configuration
const std::string m_axes_defaultValue = {"5"}
const std::string m_jmcMs_defaultValue = {"20"}
const std::string m_mode_defaultValue = {""}
const std::string m_genInitPos_defaultValue = {"0.0"}
const std::string m_genJointTol_defaultValue = {"0.25"}
const std::string m_genMaxLimit_defaultValue = {"180.0"}
const std::string m_genMinLimit_defaultValue = {"-180.0"}
const std::string m_genRefSpeed_defaultValue = {"7.5"}
const std::string m_genEncRawExposed_defaultValue = {"0.0174532925199433"}
const std::string m_genVelRawExposed_defaultValue = {"0.0174532925199433"}
const std::string m_initPoss_defaultValue = {""}
const std::string m_jointTols_defaultValue = {""}
const std::string m_maxLimits_defaultValue = {""}
const std::string m_minLimits_defaultValue = {""}
const std::string m_refSpeeds_defaultValue = {""}
const std::string m_encRawExposeds_defaultValue = {""}
const std::string m_velRawExposeds_defaultValue = {""}
int m_axes = {5}
int m_jmcMs = {20}
std::string m_mode = {}
double m_genInitPos = {0.0}
double m_genJointTol = {0.25}
double m_genMaxLimit = {180.0}
double m_genMinLimit = {-180.0}
double m_genRefSpeed = {7.5}
double m_genEncRawExposed = {0.0174532925199433}
double m_genVelRawExposed = {0.0174532925199433}
std::vector< double > m_initPoss = {}
std::vector< double > m_jointTols = {}
std::vector< double > m_maxLimits = {}
std::vector< double > m_minLimits = {}
std::vector< double > m_refSpeeds = {}
std::vector< double > m_encRawExposeds = {}
std::vector< double > m_velRawExposeds = {}

The documentation for this class was generated from the following files:
  • libraries/YarpPlugins/EmulatedControlBoard/EmulatedControlBoard.hpp
  • libraries/YarpPlugins/EmulatedControlBoard/DeviceDriverImpl.cpp
  • libraries/YarpPlugins/EmulatedControlBoard/IControlLimitsImpl.cpp
  • libraries/YarpPlugins/EmulatedControlBoard/IControlModeImpl.cpp
  • libraries/YarpPlugins/EmulatedControlBoard/IEncodersImpl.cpp
  • libraries/YarpPlugins/EmulatedControlBoard/IPositionControlImpl.cpp
  • libraries/YarpPlugins/EmulatedControlBoard/IPositionDirectImpl.cpp
  • libraries/YarpPlugins/EmulatedControlBoard/IVelocityControlImpl.cpp
  • libraries/YarpPlugins/EmulatedControlBoard/PeriodicThreadImpl.cpp
  • libraries/YarpPlugins/EmulatedControlBoard/SharedArea.cpp