27#ifndef __embObjMotionControlh__
28#define __embObjMotionControlh__
38#include <yarp/os/Bottle.h>
39#include <yarp/os/BufferedPort.h>
40#include <yarp/os/Timer.h>
41#include <yarp/dev/DeviceDriver.h>
42#include <yarp/dev/PolyDriver.h>
43#include <yarp/dev/ControlBoardHelper.h>
44#include <yarp/dev/IVirtualAnalogSensor.h>
45#include <yarp/dev/IVelocityDirect.h>
46#include <yarp/dev/ImplementJointFault.h>
47#include <yarp/dev/IDeviceDriverParams.h>
48#include <yarp/dev/IJointBrake.h>
49#include <yarp/dev/ImplementJointBrake.h>
66#ifdef NETWORK_PERFORMANCE_BENCHMARK
100Watchdog(): _count(0), _isStarted(false), _threshold(60000), _time(0), _abstime(
yarp::os::Time::now()){;}
101Watchdog(uint32_t threshold):_count(0), _isStarted(false), _threshold(threshold), _time(0), _abstime(
yarp::os::Time::now()){;}
110void start() {_count = 0; _time = yarp::os::Time::now(); _isStarted =
true;}
116void setThreshold(uint8_t txrateOfRegularROPs){
if(txrateOfRegularROPs != 0) _threshold = _threshold / txrateOfRegularROPs;}
126 double _motorTempPrev;
128 int32_t _initCounter;
129 std::vector<double> _initTempBuffer;
131 TemperatureFilter(): _threshold(20), _isStarted(false), _initCounter(50), _initTempBuffer(0), _motorTempPrev(0){;}
132 TemperatureFilter(uint32_t threshold, int32_t initCounter): _threshold(threshold), _isStarted(false), _initCounter(initCounter), _initTempBuffer(0), _motorTempPrev(0){;}
147 int median_pos = std::ceil(_initTempBuffer.size() / 2) -1;
148 _motorTempPrev = _initTempBuffer.at(median_pos);
153 _initTempBuffer.push_back(temperature);
172 std::vector<BufferedPort<Bottle>*>
ports;
210 public IPidControlRaw,
211 public IControlCalibrationRaw,
212 public IAmplifierControlRaw,
213 public IEncodersTimedRaw,
214 public IMotorEncodersRaw,
215 public ImplementEncodersTimed,
216 public ImplementMotorEncoders,
218 public ImplementMotor,
219 public IPositionControlRaw,
220 public IVelocityControlRaw,
221 public IControlModeRaw,
222 public ImplementControlMode,
223 public IControlLimitsRaw,
224 public IImpedanceControlRaw,
225 public ImplementImpedanceControl,
226 public ImplementControlLimits,
227 public ImplementAmplifierControl,
228 public ImplementPositionControl,
229 public ImplementControlCalibration,
230 public ImplementPidControl,
231 public ImplementVelocityControl,
232 public ITorqueControlRaw,
233 public ImplementTorqueControl,
234 public IVirtualAnalogSensor,
235 public IPositionDirectRaw,
236 public ImplementPositionDirect,
237 public IInteractionModeRaw,
238 public ImplementInteractionMode,
239 public IRemoteVariablesRaw,
240 public ImplementRemoteVariables,
242 public ImplementAxisInfo,
243 public IPWMControlRaw,
244 public ImplementPWMControl,
245 public ICurrentControlRaw,
246 public ImplementCurrentControl,
248 public IJointFaultRaw,
249 public ImplementJointFault,
251 public IVelocityDirectRaw,
252 public ImplementVelocityDirect,
253 public IDeviceDriverParams,
254 public IJointBrakeRaw,
255 public ImplementJointBrake
262 ControlBoardHelper* _measureConverter;
275 std::vector<double> _ref_command_positions;
276 std::vector<double> _ref_speeds;
277 std::vector<double> _ref_command_speeds;
278 std::vector<double> _ref_positions;
279 std::vector<double> _ref_accs;
280 std::vector<double> _encodersStamp;
281 std::vector<double> _last_position_move_time;
282 std::vector<eOmc_impedance_t> _cacheImpedance;
285 std::vector<yarp::dev::eomc::Watchdog> _temperatureSensorErrorWatchdog;
286 std::vector<yarp::dev::eomc::Watchdog> _temperatureExceededLimitWatchdog;
287 std::vector<yarp::dev::eomc::TemperatureFilter> _temperatureSpikesFilter;
290 std::map<std::string, rawValuesKeyMetadata> _rawValuesMetadataMap;
291 std::vector<std::int32_t> _rawDataAuxVector;
300#ifdef NETWORK_PERFORMANCE_BENCHMARK
306 std::string getBoardInfo(
void)
const;
307 bool askRemoteValue(eOprotID32_t id32,
void* value, uint16_t& size);
309 bool askRemoteValues(eOprotEndpoint_t ep, eOprotEntity_t entity, eOprotTag_t tag, std::vector<T>& values);
310 bool checkRemoteControlModeStatus(
int joint,
int target_mode);
312 bool verifyUserControlLawConsistencyInJointSet(
eomc::PidInfo *ipdInfo);
314 bool verifyTorquePidshasSameUnitTypes(yarp::dev::PidFeedbackUnitsEnum &fbk_pidunits, yarp::dev::PidOutputUnitsEnum& out_pidunits);
315 bool verifyUseMotorSpeedFbkInJointSet(
int useMotorSpeedFbk []);
316 bool updatedJointsetsCfgWithControlInfo(
void);
317 bool saveCouplingsData(
void);
318 void debugUtil_printJointsetInfo(
void);
319 void debugUtil_printPidInfoByJointSet(
void);
322 bool iNeedCouplingsInfo(
void);
324 bool getJointConfiguration(
int joint, eOmc_joint_config_t *jntCfg_ptr);
325 bool getMotorConfiguration(
int axis, eOmc_motor_config_t *motCfg_ptr);
326 bool getGerabox_E2J(
int joint,
double *gearbox_E2J_ptr);
327 bool getJointEncTolerance(
int joint,
double *jEncTolerance_ptr);
328 bool getMotorEncTolerance(
int axis,
double *mEncTolerance_ptr);
329 void updateDeadZoneWithDefaultValues(
void);
330 bool getJointDeadZoneRaw(
int j,
double &jntDeadZone);
333 bool fromConfig(yarp::os::Searchable &config);
334 int fromConfig_NumOfJoints(yarp::os::Searchable &config);
335 bool fromConfig_Step2(yarp::os::Searchable &config);
336 bool fromConfig_readServiceCfg(yarp::os::Searchable &config);
338 bool alloc(
int njoints);
346 ReturnValue helper_getVelDirPidRaw(
int j, Pid *pid);
347 ReturnValue helper_getVelDirPidsRaw(Pid *pid);
348 ReturnValue helper_setVelDirPidRaw(
int j,
const Pid &pid);
350 bool checkCalib14RotationParam(int32_t calib_param4);
353 bool getRawData_core(std::string key, std::vector<std::int32_t> &
data);
354 std::string controlModeType2String(eOmc_controlmode_t
type);
363 virtual bool open(yarp::os::Searchable &par);
364 virtual bool close();
368 virtual bool update(eOprotID32_t id32,
double timestamp,
void *rxdata);
369 virtual bool getEntityName(uint32_t entityId, std::string &entityName);
370 virtual bool getEncoderTypeName(uint32_t jomoId, eOmc_position_t pos, std::string &encoderTypeName)
override;
371 virtual bool getEntityControlModeName(uint32_t entityId, eOenum08_t control_mode, std::string &controlModeName, eObool_t compact_string)
override;
374 virtual ReturnValue
getAvailablePidsRaw(
int j, std::vector<PidControlTypeEnum>& avail)
override;
375 virtual ReturnValue
setPidRaw(
const PidControlTypeEnum& pidtype,
int j,
const Pid &pid)
override;
376 virtual ReturnValue
setPidsRaw(
const PidControlTypeEnum& pidtype,
const Pid *pids)
override;
377 virtual ReturnValue
setPidReferenceRaw(
const PidControlTypeEnum& pidtype,
int j,
double ref)
override;
378 virtual ReturnValue
setPidReferencesRaw(
const PidControlTypeEnum& pidtype,
const double *refs)
override;
379 virtual ReturnValue
setPidErrorLimitRaw(
const PidControlTypeEnum& pidtype,
int j,
double limit)
override;
380 virtual ReturnValue
setPidErrorLimitsRaw(
const PidControlTypeEnum& pidtype,
const double *limits)
override;
381 virtual ReturnValue
getPidErrorRaw(
const PidControlTypeEnum& pidtype,
int j,
double *err)
override;
382 virtual ReturnValue
getPidErrorsRaw(
const PidControlTypeEnum& pidtype,
double *errs)
override;
383 virtual ReturnValue
getPidOutputRaw(
const PidControlTypeEnum& pidtype,
int j,
double *
out)
override;
384 virtual ReturnValue
getPidOutputsRaw(
const PidControlTypeEnum& pidtype,
double *outs)
override;
385 virtual ReturnValue
getPidRaw(
const PidControlTypeEnum& pidtype,
int j, Pid *pid)
override;
386 virtual ReturnValue
getPidsRaw(
const PidControlTypeEnum& pidtype, Pid *pids)
override;
387 virtual ReturnValue
getPidReferenceRaw(
const PidControlTypeEnum& pidtype,
int j,
double *ref)
override;
388 virtual ReturnValue
getPidReferencesRaw(
const PidControlTypeEnum& pidtype,
double *refs)
override;
389 virtual ReturnValue
getPidErrorLimitRaw(
const PidControlTypeEnum& pidtype,
int j,
double *limit)
override;
390 virtual ReturnValue
getPidErrorLimitsRaw(
const PidControlTypeEnum& pidtype,
double *limits)
override;
391 virtual ReturnValue
resetPidRaw(
const PidControlTypeEnum& pidtype,
int j)
override;
392 virtual ReturnValue
disablePidRaw(
const PidControlTypeEnum& pidtype,
int j)
override;
393 virtual ReturnValue
enablePidRaw(
const PidControlTypeEnum& pidtype,
int j)
override;
394 virtual ReturnValue
setPidOffsetRaw(
const PidControlTypeEnum& pidtype,
int j,
double v)
override;
395 virtual ReturnValue
setPidFeedforwardRaw(
const PidControlTypeEnum& pidtype,
int j,
double v)
override;
396 virtual ReturnValue
getPidOffsetRaw(
const PidControlTypeEnum& pidtype,
int j,
double& v)
override;
397 virtual ReturnValue
getPidFeedforwardRaw(
const PidControlTypeEnum& pidtype,
int j,
double& v)
override;
398 virtual ReturnValue
isPidEnabledRaw(
const PidControlTypeEnum& pidtype,
int j,
bool& enabled)
override;
399 virtual ReturnValue
getPidExtraInfoRaw(
const PidControlTypeEnum& pidtype,
int j, yarp::dev::PidExtraInfo& units)
override;
400 virtual ReturnValue
getPidExtraInfosRaw(
const PidControlTypeEnum& pidtype, std::vector<yarp::dev::PidExtraInfo>& units)
override;
417 virtual ReturnValue
stopRaw(
int j)
override;
418 virtual ReturnValue
stopRaw()
override;
422 virtual ReturnValue
positionMoveRaw(
const int n_joint,
const int *joints,
const double *refs)
override;
423 virtual ReturnValue
relativeMoveRaw(
const int n_joint,
const int *joints,
const double *deltas)
override;
424 virtual ReturnValue
checkMotionDoneRaw(
const std::vector<int>& joints,
bool& flag)
override;
425 virtual ReturnValue
setTrajSpeedsRaw(
const int n_joint,
const int *joints,
const double *spds)
override;
426 virtual ReturnValue
setTrajAccelerationsRaw(
const int n_joint,
const int *joints,
const double *accs)
override;
427 virtual ReturnValue
getTrajSpeedsRaw(
const int n_joint,
const int *joints,
double *spds)
override;
429 virtual ReturnValue
stopRaw(
const int n_joint,
const int *joints)
override;
432 virtual ReturnValue
getTargetPositionsRaw(
const int n_joint,
const int *joints,
double *refs)
override;
449 virtual ReturnValue
getControlModeRaw(
int j, yarp::dev::ControlModeEnum& mode)
override;
450 virtual ReturnValue
getControlModesRaw(std::vector<yarp::dev::ControlModeEnum>& mode)
override;
453 virtual ReturnValue
getControlModesRaw(
const std::vector<int>& joints, std::vector<yarp::dev::ControlModeEnum>& mode)
override;
454 virtual ReturnValue
setControlModeRaw(
int j, yarp::dev::SelectableControlModeEnum mode)
override;
455 virtual ReturnValue
setControlModesRaw(
const std::vector<int>& joints,
const std::vector<yarp::dev::SelectableControlModeEnum>& modes)
override;
456 virtual ReturnValue
setControlModesRaw(
const std::vector<yarp::dev::SelectableControlModeEnum>& modes)
override;
461 virtual ReturnValue
setEncoderRaw(
int j,
double val)
override;
463 virtual ReturnValue
getEncoderRaw(
int j,
double *v)
override;
494 virtual ReturnValue
setRemoteVariableRaw(std::string key,
const yarp::os::Bottle& val)
override;
499 virtual ReturnValue
getAxisNameRaw(
int axis, std::string& name)
override;
524 virtual ReturnValue
getCurrentRaw(
int j,
double *val)
override;
529 virtual ReturnValue
getPWMRaw(
int j,
double* val)
override;
531 virtual ReturnValue
setPWMLimitRaw(
int j,
const double val)
override;
542#ifdef IMPLEMENT_DEBUG_INTERFACE
546 virtual bool setParameterRaw(
int j,
unsigned int type,
double value)
override;
547 virtual bool getParameterRaw(
int j,
unsigned int type,
double *value)
override;
548 virtual bool setDebugParameterRaw(
int j,
unsigned int index,
double value)
override;
549 virtual bool setDebugReferencePositionRaw(
int j,
double value)
override;
550 virtual bool getDebugParameterRaw(
int j,
unsigned int index,
double *value)
override;
551 virtual bool getDebugReferencePositionRaw(
int j,
double *value)
override;
555 virtual ReturnValue
setPosLimitsRaw(
int axis,
double min,
double max)
override;
556 virtual ReturnValue
getPosLimitsRaw(
int axis,
double *min,
double *max)
override;
558 virtual ReturnValue
setVelLimitsRaw(
int axis,
double min,
double max)
override;
559 virtual ReturnValue
getVelLimitsRaw(
int axis,
double *min,
double *max)
override;
562 virtual ReturnValue
getTorqueRaw(
int j,
double *t)
override;
568 virtual ReturnValue
setRefTorquesRaw(
const int n_joint,
const int *joints,
const double *t)
override;
576 virtual ReturnValue
velocityMoveRaw(
const int n_joint,
const int *joints,
const double *spds)
override;
583 virtual ReturnValue
getImpedanceRaw(
int j,
double *stiffness,
double *damping)
override;
584 virtual ReturnValue
setImpedanceRaw(
int j,
double stiffness,
double damping)
override;
587 virtual ReturnValue
getCurrentImpedanceLimitRaw(
int j,
double *min_stiff,
double *max_stiff,
double *min_damp,
double *max_damp)
override;
591 virtual ReturnValue
setPositionsRaw(
const int n_joint,
const int *joints,
const double *refs)
override;
595 virtual ReturnValue
getRefPositionsRaw(
const int n_joint,
const int *joints,
double *refs)
override;
599 virtual ReturnValue
getInteractionModesRaw(
const std::vector<int>& joints, std::vector<yarp::dev::InteractionModeEnum>& modes)
override;
602 virtual ReturnValue
setInteractionModesRaw(
const std::vector<int>& joints,
const std::vector<yarp::dev::InteractionModeEnum>& modes)
override;
603 virtual ReturnValue
setInteractionModesRaw(
const std::vector<yarp::dev::InteractionModeEnum>& modes)
override;
634 virtual ReturnValue
setRefCurrentsRaw(
const int n_joint,
const int *joints,
const double *t)
override;
645 virtual bool getRawDataMap(std::map<std::string, std::vector<std::int32_t>> &map)
override;
646 virtual bool getRawData(std::string key, std::vector<std::int32_t> &
data)
override;
647 virtual bool getKeys(std::vector<std::string> &keys)
override;
651 virtual bool getAxesNames(std::string key, std::vector<std::string> &axesNames)
override;
654 virtual ReturnValue
getAxes(
size_t& axes)
override;
657 virtual ReturnValue
setRefVelocityRaw(
const std::vector<int>& jnts,
const std::vector<double>& vels)
override;
660 virtual ReturnValue
getRefVelocityRaw(
const std::vector<int>& jnts, std::vector<double>& vels)
override;
663 virtual bool parseParams(
const yarp::os::Searchable& config)
override;
693 virtual bool getParamValue(
const std::string& paramName, std::string& paramValue)
const override;
702 virtual yarp::dev::ReturnValue
isJointBrakedRaw(
int j,
bool& braked)
const override;
embObjMotionControl : driver for iCub motor control boards EMS on a ETH bus.
virtual ReturnValue getEncoderSpeedsRaw(double *spds) override
virtual ReturnValue getCurrentRangeRaw(int j, double *min, double *max) override
virtual ReturnValue getPidExtraInfosRaw(const PidControlTypeEnum &pidtype, std::vector< yarp::dev::PidExtraInfo > &units) override
virtual ReturnValue setInteractionModesRaw(const std::vector< int > &joints, const std::vector< yarp::dev::InteractionModeEnum > &modes) override
virtual bool getRawData(std::string key, std::vector< std::int32_t > &data) override
virtual ReturnValue getRefTorqueRaw(int j, double *t) override
virtual ReturnValue getPWMRaw(int j, double *val) override
virtual ReturnValue setEncoderRaw(int j, double val) override
virtual ReturnValue setPidReferenceRaw(const PidControlTypeEnum &pidtype, int j, double ref) override
virtual ReturnValue getPidErrorsRaw(const PidControlTypeEnum &pidtype, double *errs) override
virtual bool getEncoderTypeName(uint32_t jomoId, eOmc_position_t pos, std::string &encoderTypeName) override
virtual ReturnValue enablePidRaw(const PidControlTypeEnum &pidtype, int j) override
virtual ReturnValue setImpedanceOffsetRaw(int j, double offset) override
virtual ReturnValue disablePidRaw(const PidControlTypeEnum &pidtype, int j) override
virtual std::string getDeviceName() const override
Get the name of the device (i.e.
virtual ReturnValue setRefCurrentsRaw(const double *t) override
bool getRotorEncoderTypeRaw(int j, int &type)
virtual ReturnValue getAvailablePidsRaw(int j, std::vector< PidControlTypeEnum > &avail) override
virtual ReturnValue resetEncodersRaw() override
virtual ReturnValue setRefTorquesRaw(const double *t) override
virtual ReturnValue getRemoteVariablesListRaw(yarp::os::Bottle *listOfKeys) override
virtual ReturnValue getEncoderTimedRaw(int j, double *encs, double *stamp) override
virtual ReturnValue setPosLimitsRaw(int axis, double min, double max) override
virtual bool update(eOprotID32_t id32, double timestamp, void *rxdata)
virtual ReturnValue disableAmpRaw(int j) override
virtual ReturnValue getMotorEncoderAccelerationsRaw(double *accs) override
virtual ReturnValue getMotorEncoderTimedRaw(int m, double *encs, double *stamp) override
virtual ReturnValue getPeakCurrentRaw(int m, double *val) override
bool getHasRotorEncoderRaw(int j, int &ret)
virtual ReturnValue setRefVelocityRaw(int jnt, double vel) override
virtual ReturnValue calibrateAxisWithParamsRaw(int axis, unsigned int type, double p1, double p2, double p3) override
virtual ReturnValue setImpedanceRaw(int j, double stiffness, double damping) override
virtual ReturnValue getImpedanceRaw(int j, double *stiffness, double *damping) override
virtual ReturnValue calibrationDoneRaw(int j) override
virtual ReturnValue setPidErrorLimitRaw(const PidControlTypeEnum &pidtype, int j, double limit) override
virtual ReturnValue getRefPositionRaw(const int joint, double *ref) override
virtual ReturnValue getTrajAccelerationsRaw(double *accs) override
virtual ReturnValue getTargetVelocityRaw(const int joint, double *ref) override
virtual ReturnValue getTorquesRaw(double *t) override
virtual ReturnValue getMotorEncodersRaw(double *encs) override
virtual ReturnValue getAxisNameRaw(int axis, std::string &name) override
virtual ReturnValue setControlModesRaw(const std::vector< int > &joints, const std::vector< yarp::dev::SelectableControlModeEnum > &modes) override
virtual ReturnValue getPidRaw(const PidControlTypeEnum &pidtype, int j, Pid *pid) override
virtual ReturnValue setPositionsRaw(const int n_joint, const int *joints, const double *refs) override
bool getRotorLimitsRaw(int j, double *rotorMin, double *rotorMax)
virtual ReturnValue getTorqueRangeRaw(int j, double *min, double *max) override
virtual std::vector< std::string > getListOfParams() const override
Return a list of all params used by the device.
virtual bool open(yarp::os::Searchable &par)
virtual ReturnValue getTargetPositionRaw(const int joint, double *ref) override
virtual ReturnValue setRefCurrentRaw(int j, double t) override
virtual ReturnValue setPositionRaw(int j, double ref) override
bool getHasHallSensorRaw(int j, int &ret)
bool getJointEncoderResolutionRaw(int m, double &jntres)
virtual ReturnValue getEncodersTimedRaw(double *encs, double *stamps) override
virtual ReturnValue setPidFeedforwardRaw(const PidControlTypeEnum &pidtype, int j, double v) override
virtual ReturnValue setPidReferencesRaw(const PidControlTypeEnum &pidtype, const double *refs) override
virtual ReturnValue setNominalCurrentRaw(int m, const double val) override
virtual ReturnValue getNumberOfMotorEncodersRaw(int *num) override
virtual ReturnValue getMotorEncodersTimedRaw(double *encs, double *stamps) override
virtual bool getEntityName(uint32_t entityId, std::string &entityName)
virtual eth::iethresType_t type()
virtual ReturnValue getEncoderSpeedRaw(int j, double *sp) override
bool getTemperatureSensorTypeRaw(int j, std::string &ret)
virtual bool getEntityControlModeName(uint32_t entityId, eOenum08_t control_mode, std::string &controlModeName, eObool_t compact_string) override
virtual ReturnValue getTorqueRaw(int j, double *t) override
virtual ReturnValue getPidErrorLimitRaw(const PidControlTypeEnum &pidtype, int j, double *limit) override
virtual yarp::dev::ReturnValue isJointBrakedRaw(int j, bool &braked) const override
virtual bool updateVirtualAnalogSensorMeasure(yarp::sig::Vector &fTorques) override
virtual ReturnValue setControlModeRaw(int j, yarp::dev::SelectableControlModeEnum mode) override
virtual ReturnValue getTrajAccelerationRaw(int j, double *acc) override
virtual ReturnValue getMotorEncoderRaw(int m, double *v) override
virtual yarp::dev::ReturnValue setAutoBrakeEnabledRaw(int j, bool enabled) override
virtual ReturnValue getNumberOfMotorsRaw(int *num) override
virtual ReturnValue getCurrentRangesRaw(double *min, double *max) override
virtual ReturnValue getTemperaturesRaw(double *vals) override
virtual ReturnValue getPidExtraInfoRaw(const PidControlTypeEnum &pidtype, int j, yarp::dev::PidExtraInfo &units) override
virtual ReturnValue getPidOffsetRaw(const PidControlTypeEnum &pidtype, int j, double &v) override
virtual ReturnValue getControlModeRaw(int j, yarp::dev::ControlModeEnum &mode) override
virtual yarp::dev::VAS_status getVirtualAnalogSensorStatus(int ch) override
virtual ReturnValue setMotorEncodersRaw(const double *vals) override
bool getHasTempSensorsRaw(int j, int &ret)
virtual ReturnValue getPidReferenceRaw(const PidControlTypeEnum &pidtype, int j, double *ref) override
virtual ReturnValue getCurrentImpedanceLimitRaw(int j, double *min_stiff, double *max_stiff, double *min_damp, double *max_damp) override
virtual ReturnValue resetEncoderRaw(int j) override
virtual ReturnValue setVelLimitsRaw(int axis, double min, double max) override
virtual ReturnValue getMotorEncoderSpeedRaw(int m, double *sp) override
virtual ReturnValue getAvailableControlModesRaw(int j, std::vector< yarp::dev::SelectableControlModeEnum > &avail) override
virtual std::string getDeviceClassName() const override
Get the name of the DeviceDriver class.
virtual ReturnValue setPeakCurrentRaw(int m, const double val) override
virtual ReturnValue setPidsRaw(const PidControlTypeEnum &pidtype, const Pid *pids) override
virtual ReturnValue setMotorTorqueParamsRaw(int j, const MotorTorqueParameters params) override
virtual std::string getConfiguration() const override
Return the configuration of the device.
virtual ReturnValue getRefCurrentsRaw(double *t) override
virtual ReturnValue getTrajSpeedRaw(int j, double *ref) override
virtual ReturnValue getMotorEncoderCountsPerRevolutionRaw(int m, double *v) override
virtual bool getRawDataMap(std::map< std::string, std::vector< std::int32_t > > &map) override
virtual ReturnValue getPidOutputRaw(const PidControlTypeEnum &pidtype, int j, double *out) override
virtual ReturnValue getRefTorquesRaw(double *t) override
virtual ReturnValue getPowerSupplyVoltageRaw(int j, double *val) override
virtual ReturnValue getTorqueRangesRaw(double *min, double *max) override
virtual ReturnValue getImpedanceOffsetRaw(int j, double *offset) override
virtual ReturnValue getNominalCurrentRaw(int m, double *val) override
virtual ReturnValue stopRaw() override
virtual bool getMetadataMap(rawValuesKeyMetadataMap &metamap) override
virtual ReturnValue getPidOutputsRaw(const PidControlTypeEnum &pidtype, double *outs) override
virtual ReturnValue getPidReferencesRaw(const PidControlTypeEnum &pidtype, double *refs) override
virtual ReturnValue getAmpStatusRaw(int *st) override
virtual ReturnValue getMotorTorqueParamsRaw(int j, MotorTorqueParameters *params) override
virtual ReturnValue setTrajAccelerationRaw(int j, double acc) override
virtual ReturnValue setInteractionModeRaw(int j, yarp::dev::InteractionModeEnum _mode) override
virtual ReturnValue setMotorEncoderRaw(int m, const double val) override
virtual ReturnValue positionMoveRaw(int j, double ref) override
virtual ReturnValue getRefPositionsRaw(double *refs) override
virtual ReturnValue getTargetPositionsRaw(double *refs) override
virtual ReturnValue getTemperatureRaw(int m, double *val) override
bool getRotorEncoderResolutionRaw(int m, double &rotres)
virtual ReturnValue getPWMLimitRaw(int j, double *val) override
virtual ReturnValue setEncodersRaw(const double *vals) override
virtual ReturnValue getLastJointFaultRaw(int j, int &fault, std::string &message) override
virtual ReturnValue getDutyCycleRaw(int j, double *v) override
virtual ReturnValue setRemoteVariableRaw(std::string key, const yarp::os::Bottle &val) override
virtual ReturnValue getEncoderAccelerationsRaw(double *accs) override
bool getWholeImpedanceRaw(int j, eOmc_impedance_t &imped)
virtual ReturnValue checkMotionDoneRaw(bool &flag) override
virtual ReturnValue setCalibrationParametersRaw(int axis, const CalibrationParameters ¶ms) override
bool getJointEncoderTypeRaw(int j, int &type)
virtual ReturnValue getJointTypeRaw(int axis, yarp::dev::JointTypeEnum &type) override
virtual ReturnValue setPWMLimitRaw(int j, const double val) override
virtual ReturnValue setRefDutyCycleRaw(int j, double v) override
virtual ReturnValue getEncoderAccelerationRaw(int j, double *spds) override
virtual ReturnValue isPidEnabledRaw(const PidControlTypeEnum &pidtype, int j, bool &enabled) override
virtual ReturnValue getPidFeedforwardRaw(const PidControlTypeEnum &pidtype, int j, double &v) override
virtual ReturnValue setRefTorqueRaw(int j, double t) override
virtual ReturnValue getAxes(size_t &axes) override
virtual ReturnValue setTrajSpeedRaw(int j, double sp) override
virtual ReturnValue getCurrentRaw(int j, double *val) override
virtual ReturnValue setRefDutyCyclesRaw(const double *v) override
virtual ReturnValue setMaxCurrentRaw(int j, double val) override
virtual ReturnValue getPidErrorRaw(const PidControlTypeEnum &pidtype, int j, double *err) override
virtual bool initialised()
virtual ReturnValue getMotorEncoderAccelerationRaw(int m, double *spds) override
virtual ReturnValue getEncoderRaw(int j, double *v) override
bool getMotorPolesRaw(int j, int &poles)
virtual ReturnValue getPosLimitsRaw(int axis, double *min, double *max) override
virtual ReturnValue setTemperatureLimitRaw(int m, const double temp) override
virtual ReturnValue getRemoteVariableRaw(std::string key, yarp::os::Bottle &val) override
virtual ReturnValue getRefVelocityRaw(const int jnt, double &vel) override
virtual bool getKeys(std::vector< std::string > &keys) override
bool getKinematicMJRaw(int j, double &rotres)
virtual std::string getDocumentationOfDeviceParams() const override
Get the documentation of the DeviceDriver's parameters.
virtual ReturnValue velocityMoveRaw(int j, double sp) override
virtual yarp::dev::ReturnValue setManualBrakeActiveRaw(int j, bool active) override
virtual yarp::dev::ReturnValue getAutoBrakeEnabledRaw(int j, bool &enabled) const override
virtual int getNumberOfKeys() override
virtual ReturnValue getInteractionModeRaw(int j, yarp::dev::InteractionModeEnum &_mode) override
virtual ReturnValue resetMotorEncodersRaw() override
virtual ReturnValue getEncodersRaw(double *encs) override
virtual ReturnValue resetPidRaw(const PidControlTypeEnum &pidtype, int j) override
virtual ReturnValue relativeMoveRaw(int j, double delta) override
virtual ReturnValue getTemperatureLimitRaw(int m, double *temp) override
virtual bool getAxesNames(std::string key, std::vector< std::string > &axesNames) override
virtual ReturnValue getRefDutyCycleRaw(int j, double *v) override
virtual bool parseParams(const yarp::os::Searchable &config) override
virtual ReturnValue getRefDutyCyclesRaw(double *v) override
virtual ReturnValue getInteractionModesRaw(const std::vector< int > &joints, std::vector< yarp::dev::InteractionModeEnum > &modes) override
virtual ReturnValue getDutyCyclesRaw(double *v) override
virtual ReturnValue setTrajAccelerationsRaw(const double *accs) override
virtual ReturnValue setPidRaw(const PidControlTypeEnum &pidtype, int j, const Pid &pid) override
virtual ReturnValue getControlModesRaw(std::vector< yarp::dev::ControlModeEnum > &mode) override
virtual ReturnValue getMotorEncoderSpeedsRaw(double *spds) override
virtual ReturnValue getTrajSpeedsRaw(double *spds) override
virtual ReturnValue getCurrentsRaw(double *vals) override
virtual ReturnValue setTrajSpeedsRaw(const double *spds) override
bool getTorqueControlFilterType(int j, int &type)
virtual ReturnValue getRefCurrentRaw(int j, double *t) override
virtual ReturnValue getVelLimitsRaw(int axis, double *min, double *max) override
virtual int getVirtualAnalogSensorChannels() override
bool getRotorIndexOffsetRaw(int j, double &rotorOffset)
virtual ReturnValue getMaxCurrentRaw(int j, double *val) override
virtual ReturnValue resetMotorEncoderRaw(int m) override
virtual ReturnValue setPidOffsetRaw(const PidControlTypeEnum &pidtype, int j, double v) override
virtual ReturnValue setGearboxRatioRaw(int m, const double val) override
virtual bool getParamValue(const std::string ¶mName, std::string ¶mValue) const override
Return the value (represented as a string) of the requested parameter.
virtual ReturnValue setMotorEncoderCountsPerRevolutionRaw(int m, const double cpr) override
virtual ReturnValue setPidErrorLimitsRaw(const PidControlTypeEnum &pidtype, const double *limits) override
virtual bool getKeyMetadata(std::string key, rawValuesKeyMetadata &meta) override
virtual ReturnValue getGearboxRatioRaw(int m, double *gearbox) override
virtual ReturnValue getPidsRaw(const PidControlTypeEnum &pidtype, Pid *pids) override
virtual ReturnValue getTargetVelocitiesRaw(double *refs) override
virtual ReturnValue getPidErrorLimitsRaw(const PidControlTypeEnum &pidtype, double *limits) override
bool getHasRotorEncoderIndexRaw(int j, int &ret)
virtual ReturnValue enableAmpRaw(int j) override
void updatePrevTemperature(double temperature)
TemperatureFilter(TemperatureFilter &&other) noexcept=default
TemperatureFilter & operator=(const TemperatureFilter &other)=default
TemperatureFilter(const TemperatureFilter &other)=default
TemperatureFilter & operator=(TemperatureFilter &&other) noexcept=default
TemperatureFilter(uint32_t threshold, int32_t initCounter)
uint32_t getTemperatureThreshold()
double getPrevTemperature()
void start(double temperature)
~TemperatureFilter()=default
Watchdog & operator=(const Watchdog &other)=default
void setThreshold(uint8_t txrateOfRegularROPs)
Watchdog(uint32_t threshold)
Watchdog(const Watchdog &other)=default
Watchdog(Watchdog &&other) noexcept=default
Watchdog & operator=(Watchdog &&other) noexcept=default
This file contains the definition of unique IDs for the body parts and the skin parts of the robot.
Copyright (C) 2008 RobotCub Consortium.
std::vector< BufferedPort< Bottle > * > ports
eOmn_serv_diagn_cfg_t config
vector< eOmc_jointset_configuration_t > jointset_cfgs
vector< vector< int > > set2joint