yarp-devices
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
EmulatedControlBoard Class Reference

Implements several motor interfaces.

#include <EmulatedControlBoard.hpp>

Inheritance diagram for EmulatedControlBoard:
EmulatedControlBoard_ParamsParser

Public Member Functions

bool getAxes (int *ax) override
 
bool positionMove (int j, double ref) override
 
bool positionMove (const double *refs) override
 
bool relativeMove (int j, double delta) override
 
bool relativeMove (const double *deltas) override
 
bool checkMotionDone (int j, bool *flag) override
 
bool checkMotionDone (bool *flag) override
 
bool setRefSpeed (int j, double sp) override
 
bool setRefSpeeds (const double *spds) override
 
bool setRefAcceleration (int j, double acc) override
 
bool setRefAccelerations (const double *accs) override
 
bool getRefSpeed (int j, double *ref) override
 
bool getRefSpeeds (double *spds) override
 
bool getRefAcceleration (int j, double *acc) override
 
bool getRefAccelerations (double *accs) override
 
bool stop (int j) override
 
bool stop () override
 
bool positionMove (int n_joint, const int *joints, const double *refs) override
 
bool relativeMove (int n_joint, const int *joints, const double *deltas) override
 
bool checkMotionDone (int n_joint, const int *joints, bool *flags) override
 
bool setRefSpeeds (int n_joint, const int *joints, const double *spds) override
 
bool setRefAccelerations (int n_joint, const int *joints, const double *accs) override
 
bool getRefSpeeds (int n_joint, const int *joints, double *spds) override
 
bool getRefAccelerations (int n_joint, const int *joints, double *accs) override
 
bool stop (int n_joint, const int *joints) override
 
bool getTargetPosition (int joint, double *ref) override
 
bool getTargetPositions (double *refs) override
 
bool getTargetPositions (int n_joint, const int *joints, double *refs) override
 
bool setPosition (int j, double ref) override
 
bool setPositions (int n_joint, const int *joints, const double *refs) override
 
bool setPositions (const double *refs) override
 
bool getRefPosition (int joint, double *ref) override
 
bool getRefPositions (double *refs) override
 
bool getRefPositions (int n_joint, const int *joints, double *refs) override
 
bool resetEncoder (int j) override
 
bool resetEncoders () override
 
bool setEncoder (int j, double val) override
 
bool setEncoders (const double *vals) override
 
bool getEncoder (int j, double *v) override
 
bool getEncoders (double *encs) override
 
bool getEncoderSpeed (int j, double *sp) override
 
bool getEncoderSpeeds (double *spds) override
 
bool getEncoderAcceleration (int j, double *spds) override
 
bool getEncoderAccelerations (double *accs) override
 
bool getEncodersTimed (double *encs, double *time) override
 
bool getEncoderTimed (int j, double *encs, double *time) override
 
bool velocityMove (int j, double sp) override
 
bool velocityMove (const double *sp) override
 
bool velocityMove (int n_joint, const int *joints, const double *spds) override
 
bool getRefVelocity (int joint, double *vel) override
 
bool getRefVelocities (double *vels) override
 
bool getRefVelocities (int n_joint, const int *joints, double *vels) override
 
bool setLimits (int axis, double min, double max) override
 
bool getLimits (int axis, double *min, double *max) override
 
bool setVelLimits (int axis, double min, double max) override
 
bool getVelLimits (int axis, double *min, double *max) override
 
bool getControlMode (int j, int *mode) override
 
bool getControlModes (int *modes) override
 
bool getControlModes (int n_joint, const int *joints, int *modes) override
 
bool setControlMode (int j, const int mode) override
 
bool setControlModes (int n_joint, const int *joints, int *modes) override
 
bool 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
 

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 }
 
enum  jmc_mode { POSITION_MODE , VELOCITY_MODE , POSITION_DIRECT_MODE , UNKNOWN_MODE }
 

Private Member Functions

bool setPositionMode (int j)
 
bool setVelocityMode (int j)
 
bool setTorqueMode (int j)
 
bool setPositionDirectMode (int j)
 

Private Attributes

jmc_mode controlMode {UNKNOWN_MODE}
 
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 = {}
 
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: