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

Implementation for the Technosoft iPOS as a single CAN bus joint (control board raw interfaces).

#include <TechnosoftIpos.hpp>

Inheritance diagram for TechnosoftIpos:
TechnosoftIpos_ParamsParser roboticslab::ICanBusSharer

Public Types

using return_t = bool
 

Public Member Functions

bool open (yarp::os::Searchable &config) override
 
bool close () override
 
std::string id () const override
 
unsigned int getId () override
 Retrieve CAN node ID.
 
std::vector< unsigned int > getAdditionalIds () override
 Retrieve more associated CAN node IDs, if any.
 
bool notifyMessage (const roboticslab::can_message &message) override
 Notify observers that a new CAN message has arrived.
 
bool initialize () override
 Perform CAN node initialization.
 
bool finalize () override
 Finalize CAN node communications.
 
bool registerSender (roboticslab::ICanSenderDelegate *sender) override
 Pass a handle to a CAN sender delegate instance.
 
bool synchronize (double timestamp) override
 Perform synchronized action on CAN master's request.
 
return_t getAxisNameRaw (int axis, std::string &name) override
 
return_t getJointTypeRaw (int axis, yarp::dev::JointTypeEnum &type) override
 
return_t setLimitsRaw (int axis, double min, double max) override
 
return_t getLimitsRaw (int axis, double *min, double *max) override
 
return_t setVelLimitsRaw (int axis, double min, double max) override
 
return_t getVelLimitsRaw (int axis, double *min, double *max) override
 
return_t getControlModeRaw (int j, int *mode) override
 
return_t getControlModesRaw (int *modes) override
 
return_t getControlModesRaw (int n_joint, const int *joints, int *modes) override
 
return_t setControlModeRaw (int j, int mode) override
 
return_t setControlModesRaw (int *modes) override
 
return_t setControlModesRaw (int n_joint, const int *joints, int *modes) override
 
return_t getCurrentRaw (int m, double *curr) override
 
return_t getCurrentsRaw (double *currs) override
 
return_t getCurrentRangeRaw (int m, double *min, double *max) override
 
return_t getCurrentRangesRaw (double *min, double *max) override
 
return_t setRefCurrentRaw (int m, double curr) override
 
return_t setRefCurrentsRaw (const double *currs) override
 
return_t setRefCurrentsRaw (int n_motor, const int *motors, const double *currs) override
 
return_t getRefCurrentRaw (int m, double *curr) override
 
return_t getRefCurrentsRaw (double *currs) override
 
return_t getAxes (int *ax) override
 
return_t resetEncoderRaw (int j) override
 
return_t resetEncodersRaw () override
 
return_t setEncoderRaw (int j, double val) override
 
return_t setEncodersRaw (const double *vals) override
 
return_t getEncoderRaw (int j, double *v) override
 
return_t getEncodersRaw (double *encs) override
 
return_t getEncoderSpeedRaw (int j, double *sp) override
 
return_t getEncoderSpeedsRaw (double *spds) override
 
return_t getEncoderAccelerationRaw (int j, double *spds) override
 
return_t getEncoderAccelerationsRaw (double *accs) override
 
return_t getEncoderTimedRaw (int j, double *encs, double *time) override
 
return_t getEncodersTimedRaw (double *encs, double *time) override
 
return_t getImpedanceRaw (int j, double *stiffness, double *damping) override
 
return_t setImpedanceRaw (int j, double stiffness, double damping) override
 
return_t setImpedanceOffsetRaw (int j, double offset) override
 
return_t getImpedanceOffsetRaw (int j, double *offset) override
 
return_t getCurrentImpedanceLimitRaw (int j, double *min_stiff, double *max_stiff, double *min_damp, double *max_damp) override
 
return_t getInteractionModeRaw (int axis, yarp::dev::InteractionModeEnum *mode) override
 
return_t getInteractionModesRaw (int n_joints, int *joints, yarp::dev::InteractionModeEnum *modes) override
 
return_t getInteractionModesRaw (yarp::dev::InteractionModeEnum *modes) override
 
return_t setInteractionModeRaw (int axis, yarp::dev::InteractionModeEnum mode) override
 
return_t setInteractionModesRaw (int n_joints, int *joints, yarp::dev::InteractionModeEnum *modes) override
 
return_t setInteractionModesRaw (yarp::dev::InteractionModeEnum *modes) override
 
return_t getLastJointFaultRaw (int j, int &fault, std::string &message) override
 
return_t getNumberOfMotorsRaw (int *num) override
 
return_t getTemperatureRaw (int m, double *val) override
 
return_t getTemperaturesRaw (double *vals) override
 
return_t getTemperatureLimitRaw (int m, double *temp) override
 
return_t setTemperatureLimitRaw (int m, double temp) override
 
return_t getGearboxRatioRaw (int m, double *val) override
 
return_t setGearboxRatioRaw (int m, double val) override
 
return_t getNumberOfMotorEncodersRaw (int *num) override
 
return_t resetMotorEncoderRaw (int m) override
 
return_t resetMotorEncodersRaw () override
 
return_t setMotorEncoderCountsPerRevolutionRaw (int m, double cpr) override
 
return_t getMotorEncoderCountsPerRevolutionRaw (int m, double *cpr) override
 
return_t setMotorEncoderRaw (int m, double val) override
 
return_t setMotorEncodersRaw (const double *vals) override
 
return_t getMotorEncoderRaw (int m, double *v) override
 
return_t getMotorEncodersRaw (double *encs) override
 
return_t getMotorEncoderTimedRaw (int m, double *encs, double *stamp) override
 
return_t getMotorEncodersTimedRaw (double *encs, double *stamps) override
 
return_t getMotorEncoderSpeedRaw (int m, double *sp) override
 
return_t getMotorEncoderSpeedsRaw (double *spds) override
 
return_t getMotorEncoderAccelerationRaw (int m, double *spds) override
 
return_t getMotorEncoderAccelerationsRaw (double *vaccs) override
 
return_t setPidRaw (const yarp::dev::PidControlTypeEnum &pidtype, int j, const yarp::dev::Pid &pid) override
 
return_t setPidsRaw (const yarp::dev::PidControlTypeEnum &pidtype, const yarp::dev::Pid *pids) override
 
return_t setPidReferenceRaw (const yarp::dev::PidControlTypeEnum &pidtype, int j, double ref) override
 
return_t setPidReferencesRaw (const yarp::dev::PidControlTypeEnum &pidtype, const double *refs) override
 
return_t setPidErrorLimitRaw (const yarp::dev::PidControlTypeEnum &pidtype, int j, double limit) override
 
return_t setPidErrorLimitsRaw (const yarp::dev::PidControlTypeEnum &pidtype, const double *limits) override
 
return_t getPidErrorRaw (const yarp::dev::PidControlTypeEnum &pidtype, int j, double *err) override
 
return_t getPidErrorsRaw (const yarp::dev::PidControlTypeEnum &pidtype, double *errs) override
 
return_t getPidOutputRaw (const yarp::dev::PidControlTypeEnum &pidtype, int j, double *out) override
 
return_t getPidOutputsRaw (const yarp::dev::PidControlTypeEnum &pidtype, double *outs) override
 
return_t getPidRaw (const yarp::dev::PidControlTypeEnum &pidtype, int j, yarp::dev::Pid *pid) override
 
return_t getPidsRaw (const yarp::dev::PidControlTypeEnum &pidtype, yarp::dev::Pid *pids) override
 
return_t getPidReferenceRaw (const yarp::dev::PidControlTypeEnum &pidtype, int j, double *ref) override
 
return_t getPidReferencesRaw (const yarp::dev::PidControlTypeEnum &pidtype, double *refs) override
 
return_t getPidErrorLimitRaw (const yarp::dev::PidControlTypeEnum &pidtype, int j, double *limit) override
 
return_t getPidErrorLimitsRaw (const yarp::dev::PidControlTypeEnum &pidtype, double *limits) override
 
return_t resetPidRaw (const yarp::dev::PidControlTypeEnum &pidtype, int j) override
 
return_t disablePidRaw (const yarp::dev::PidControlTypeEnum &pidtype, int j) override
 
return_t enablePidRaw (const yarp::dev::PidControlTypeEnum &pidtype, int j) override
 
return_t setPidOffsetRaw (const yarp::dev::PidControlTypeEnum &pidtype, int j, double v) override
 
return_t isPidEnabledRaw (const yarp::dev::PidControlTypeEnum &pidtype, int j, bool *enabled) override
 
return_t positionMoveRaw (int j, double ref) override
 
return_t positionMoveRaw (const double *refs) override
 
return_t positionMoveRaw (int n_joint, const int *joints, const double *refs) override
 
return_t relativeMoveRaw (int j, double delta) override
 
return_t relativeMoveRaw (const double *deltas) override
 
return_t relativeMoveRaw (int n_joint, const int *joints, const double *deltas) override
 
return_t checkMotionDoneRaw (int j, bool *flag) override
 
return_t checkMotionDoneRaw (bool *flag) override
 
return_t checkMotionDoneRaw (int n_joint, const int *joints, bool *flag) override
 
return_t setRefSpeedRaw (int j, double sp) override
 
return_t setRefSpeedsRaw (const double *spds) override
 
return_t setRefSpeedsRaw (int n_joint, const int *joints, const double *spds) override
 
return_t setRefAccelerationRaw (int j, double acc) override
 
return_t setRefAccelerationsRaw (const double *accs) override
 
return_t setRefAccelerationsRaw (int n_joint, const int *joints, const double *accs) override
 
return_t getRefSpeedRaw (int j, double *ref) override
 
return_t getRefSpeedsRaw (double *spds) override
 
return_t getRefSpeedsRaw (int n_joint, const int *joints, double *spds) override
 
return_t getRefAccelerationRaw (int j, double *acc) override
 
return_t getRefAccelerationsRaw (double *accs) override
 
return_t getRefAccelerationsRaw (int n_joint, const int *joints, double *accs) override
 
return_t stopRaw (int j) override
 
return_t stopRaw () override
 
return_t stopRaw (int n_joint, const int *joints) override
 
return_t getTargetPositionRaw (int joint, double *ref) override
 
return_t getTargetPositionsRaw (double *refs) override
 
return_t getTargetPositionsRaw (int n_joint, const int *joints, double *refs) override
 
return_t setPositionRaw (int j, double ref) override
 
return_t setPositionsRaw (const double *refs) override
 
return_t setPositionsRaw (int n_joint, const int *joints, const double *refs) override
 
return_t getRefPositionRaw (int joint, double *ref) override
 
return_t getRefPositionsRaw (double *refs) override
 
return_t getRefPositionsRaw (int n_joint, const int *joints, double *refs) override
 
return_t getRemoteVariableRaw (std::string key, yarp::os::Bottle &val) override
 
return_t setRemoteVariableRaw (std::string key, const yarp::os::Bottle &val) override
 
return_t getRemoteVariablesListRaw (yarp::os::Bottle *listOfKeys) override
 
return_t getRefTorqueRaw (int j, double *t) override
 
return_t getRefTorquesRaw (double *t) override
 
return_t setRefTorqueRaw (int j, double t) override
 
return_t setRefTorquesRaw (int n_joint, const int *joints, const double *t) override
 
return_t setRefTorquesRaw (const double *t) override
 
return_t getTorqueRaw (int j, double *t) override
 
return_t getTorquesRaw (double *t) override
 
return_t getTorqueRangeRaw (int j, double *min, double *max) override
 
return_t getTorqueRangesRaw (double *min, double *max) override
 
return_t getMotorTorqueParamsRaw (int j, yarp::dev::MotorTorqueParameters *params) override
 
return_t setMotorTorqueParamsRaw (int j, const yarp::dev::MotorTorqueParameters params) override
 
return_t velocityMoveRaw (int j, double sp) override
 
return_t velocityMoveRaw (const double *sp) override
 
return_t velocityMoveRaw (int n_joint, const int *joints, const double *spds) override
 
return_t getRefVelocityRaw (int joint, double *vel) override
 
return_t getRefVelocitiesRaw (double *vels) override
 
return_t getRefVelocitiesRaw (int n_joint, const int *joints, double *vels) override
 
- Public Member Functions inherited from roboticslab::ICanBusSharer
virtual ~ICanBusSharer ()=default
 Destructor.
 
- Public Member Functions inherited from roboticslab::ICanMessageNotifier
virtual ~ICanMessageNotifier ()=default
 Virtual destructor.
 
- Public Member Functions inherited from TechnosoftIpos_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
 

Private Attributes

roboticslab::TechnosoftIposBase * impl {nullptr}
 

Additional Inherited Members

- Public Attributes inherited from TechnosoftIpos_ParamsParser
const std::string m_device_classname = {"TechnosoftIpos"}
 
const std::string m_device_name = {"TechnosoftIpos"}
 
bool m_parser_is_strict = false
 
const parser_version_type m_parser_version = {}
 
std::string m_provided_configuration
 
const std::string m_canId_defaultValue = {""}
 
const std::string m_useEmbeddedPid_defaultValue = {"true"}
 
const std::string m_name_defaultValue = {""}
 
const std::string m_type_defaultValue = {""}
 
const std::string m_max_defaultValue = {""}
 
const std::string m_min_defaultValue = {""}
 
const std::string m_maxVel_defaultValue = {""}
 
const std::string m_refSpeed_defaultValue = {""}
 
const std::string m_refAcceleration_defaultValue = {""}
 
const std::string m_extraTr_defaultValue = {"1.0"}
 
const std::string m_samplingPeriod_defaultValue = {""}
 
const std::string m_reverse_defaultValue = {""}
 
const std::string m_heartbeatPeriod_defaultValue = {""}
 
const std::string m_syncPeriod_defaultValue = {""}
 
const std::string m_initialControlMode_defaultValue = {"idl"}
 
const std::string m_sdoTimeout_defaultValue = {"0.02"}
 
const std::string m_driveStateTimeout_defaultValue = {"2.0"}
 
const std::string m_tpdo1InhibitTime_defaultValue = {"0.0"}
 
const std::string m_tpdo1EventTimer_defaultValue = {"0.0"}
 
const std::string m_tpdo2InhibitTime_defaultValue = {"0.0"}
 
const std::string m_tpdo2EventTimer_defaultValue = {"0.0"}
 
const std::string m_monitorPeriod_defaultValue = {"0.0"}
 
const std::string m_driver_peakCurrent_defaultValue = {""}
 
const std::string m_motor_k_defaultValue = {""}
 
const std::string m_gearbox_tr_defaultValue = {""}
 
const std::string m_encoder_encoderPulses_defaultValue = {""}
 
const std::string m_ipMode_defaultValue = {"pt"}
 
const std::string m_ipPeriodMs_defaultValue = {"50"}
 
const std::string m_enableIp_defaultValue = {"false"}
 
const std::string m_enableCsv_defaultValue = {"false"}
 
const std::string m_initialInteractionMode_defaultValue = {"unkn"}
 
const std::string m_stiffness_defaultValue = {"0.0"}
 
const std::string m_damping_defaultValue = {"0.0"}
 
const std::string m_impedanceOffset_defaultValue = {"0.0"}
 
const std::string m_minStiffness_defaultValue = {"0.0"}
 
const std::string m_maxStiffness_defaultValue = {"0.0"}
 
const std::string m_minDamping_defaultValue = {"0.0"}
 
const std::string m_maxDamping_defaultValue = {"0.0"}
 
const std::string m_kp_defaultValue = {"0.0"}
 
const std::string m_ki_defaultValue = {"0.0"}
 
const std::string m_kd_defaultValue = {"0.0"}
 
const std::string m_maxInt_defaultValue = {"0.0"}
 
const std::string m_maxOutput_defaultValue = {"0.0"}
 
const std::string m_offset_defaultValue = {"0.0"}
 
const std::string m_scale_defaultValue = {"1.0"}
 
const std::string m_stictionUp_defaultValue = {"0.0"}
 
const std::string m_stictionDown_defaultValue = {"0.0"}
 
const std::string m_kff_defaultValue = {"0.0"}
 
const std::string m_errorLimit_defaultValue = {"0.0"}
 
int m_canId = {0}
 
bool m_useEmbeddedPid = {true}
 
std::string m_name = {}
 
std::string m_type = {}
 
double m_max = {std::nan("1")}
 
double m_min = {std::nan("1")}
 
double m_maxVel = {std::nan("1")}
 
double m_refSpeed = {std::nan("1")}
 
double m_refAcceleration = {std::nan("1")}
 
double m_extraTr = {1.0}
 
double m_samplingPeriod = {std::nan("1")}
 
bool m_reverse = {false}
 
double m_heartbeatPeriod = {std::nan("1")}
 
double m_syncPeriod = {std::nan("1")}
 
std::string m_initialControlMode = {"idl"}
 
double m_sdoTimeout = {0.02}
 
double m_driveStateTimeout = {2.0}
 
double m_tpdo1InhibitTime = {0.0}
 
double m_tpdo1EventTimer = {0.0}
 
double m_tpdo2InhibitTime = {0.0}
 
double m_tpdo2EventTimer = {0.0}
 
double m_monitorPeriod = {0.0}
 
double m_driver_peakCurrent = {std::nan("1")}
 
double m_motor_k = {std::nan("1")}
 
double m_gearbox_tr = {std::nan("1")}
 
double m_encoder_encoderPulses = {std::nan("1")}
 
std::string m_ipMode = {"pt"}
 
int m_ipPeriodMs = {50}
 
bool m_enableIp = {false}
 
bool m_enableCsv = {false}
 
std::string m_initialInteractionMode = {"unkn"}
 
double m_stiffness = {0.0}
 
double m_damping = {0.0}
 
double m_impedanceOffset = {0.0}
 
double m_minStiffness = {0.0}
 
double m_maxStiffness = {0.0}
 
double m_minDamping = {0.0}
 
double m_maxDamping = {0.0}
 
double m_kp = {0.0}
 
double m_ki = {0.0}
 
double m_kd = {0.0}
 
double m_maxInt = {0.0}
 
double m_maxOutput = {0.0}
 
double m_offset = {0.0}
 
double m_scale = {1.0}
 
double m_stictionUp = {0.0}
 
double m_stictionDown = {0.0}
 
double m_kff = {0.0}
 
double m_errorLimit = {0.0}
 

Member Function Documentation

◆ finalize()

bool TechnosoftIpos::finalize ( )
inlineoverridevirtual

◆ getAdditionalIds()

std::vector< unsigned int > TechnosoftIpos::getAdditionalIds ( )
inlineoverridevirtual

Reimplemented from roboticslab::ICanBusSharer.

◆ getId()

unsigned int TechnosoftIpos::getId ( )
inlineoverridevirtual

◆ initialize()

bool TechnosoftIpos::initialize ( )
inlineoverridevirtual

◆ notifyMessage()

bool TechnosoftIpos::notifyMessage ( const roboticslab::can_message &  msg)
inlineoverridevirtual

◆ registerSender()

bool TechnosoftIpos::registerSender ( roboticslab::ICanSenderDelegate *  sender)
inlineoverridevirtual

◆ synchronize()

bool TechnosoftIpos::synchronize ( double  timestamp)
inlineoverridevirtual

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