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>
45 #include <yarp/dev/IVirtualAnalogSensor.h>
47 #include<yarp/dev/ImplementJointFault.h>
65 #ifdef NETWORK_PERFORMANCE_BENCHMARK
71 #undef VERIFY_ROP_SETIMPEDANCE
73 #undef VERIFY_ROP_SETPOSITIONRAW
81 #define EMBOBJMC_DONT_USE_MAIS
126 Watchdog(): _count(0), _isStarted(false), _threshold(60000), _time(0){;}
127 Watchdog(uint32_t threshold):_count(0), _isStarted(false), _threshold(threshold), _time(0){;}
136 void start() {_count = 0; _time = yarp::os::Time::now(); _isStarted =
true;}
142 void setThreshold(uint8_t txrateOfRegularROPs){
if(txrateOfRegularROPs != 0) _threshold = _threshold / txrateOfRegularROPs;}
151 double _motorTempPrev;
153 int32_t _initCounter;
154 std::vector<double> _initTempBuffer;
156 TemperatureFilter(): _threshold(20), _isStarted(false), _initCounter(50), _initTempBuffer(0), _motorTempPrev(0){;}
157 TemperatureFilter(uint32_t threshold, int32_t initCounter): _threshold(threshold), _isStarted(false), _initCounter(initCounter), _initTempBuffer(0), _motorTempPrev(0){;}
172 int median_pos = std::ceil(_initTempBuffer.size() / 2) -1;
173 _motorTempPrev = _initTempBuffer.at(median_pos);
178 _initTempBuffer.push_back(temperature);
197 std::vector<BufferedPort<Bottle>*>
ports;
201 using namespace iCub;
224 public IPidControlRaw,
225 public IControlCalibrationRaw,
226 public IAmplifierControlRaw,
227 public IEncodersTimedRaw,
228 public IMotorEncodersRaw,
229 public ImplementEncodersTimed,
230 public ImplementMotorEncoders,
232 public ImplementMotor,
233 public IPositionControlRaw,
234 public IVelocityControlRaw,
235 public IControlModeRaw,
236 public ImplementControlMode,
237 public IControlLimitsRaw,
238 public IImpedanceControlRaw,
239 public ImplementImpedanceControl,
240 public ImplementControlLimits,
241 public ImplementAmplifierControl,
242 public ImplementPositionControl,
243 public ImplementControlCalibration,
244 public ImplementPidControl,
245 public ImplementVelocityControl,
246 public ITorqueControlRaw,
247 public ImplementTorqueControl,
248 public IVirtualAnalogSensor,
249 public IPositionDirectRaw,
250 public ImplementPositionDirect,
251 public IInteractionModeRaw,
252 public ImplementInteractionMode,
253 public IRemoteVariablesRaw,
254 public ImplementRemoteVariables,
256 public ImplementAxisInfo,
257 public IPWMControlRaw,
258 public ImplementPWMControl,
259 public ICurrentControlRaw,
260 public ImplementCurrentControl,
262 public IJointFaultRaw,
263 public ImplementJointFault,
271 ControlBoardHelper* _measureConverter;
282 double * _gearbox_M2J;
283 double * _gearbox_E2J;
285 std::vector<eomc::kalmanFilterParams_t> _kalman_params;
287 std::vector<std::unique_ptr<eomc::ITemperatureSensor>> _temperatureSensorsVector;
291 std::vector<eomc::encoder_t> _jointEncs;
292 std::vector<eomc::encoder_t> _motorEncs;
294 std::vector<eomc::rotorLimits_t> _rotorsLimits;
295 std::vector<eomc::jointLimits_t> _jointsLimits;
296 std::vector<eomc::motorCurrentLimits_t> _currentLimits;
297 std::vector<eomc::temperatureLimits_t> _temperatureLimits;
299 std::vector<eomc::JointsSet> _jsets;
300 std::vector<int> _joint2set;
301 std::vector<eomc::timeouts_t> _timeouts;
303 std::vector<eomc::impedanceParameters_t> _impedance_params;
314 std::vector<eomc::axisInfo_t> _axesInfo;
320 #ifdef VERIFY_ROP_SETIMPEDANCE
321 uint32_t *impedanceSignature;
324 #ifdef VERIFY_ROP_SETPOSITIONRAW
325 uint32_t *refRawSignature;
326 bool *sendingDirects;
331 double SAFETY_THRESHOLD;
338 double *_ref_command_positions;
340 double *_ref_command_speeds;
341 double *_ref_positions;
343 double *_encodersStamp;
344 bool *checking_motiondone;
345 #define MAX_POSITION_MOVE_INTERVAL 0.080
346 double *_last_position_move_time;
347 eOmc_impedance_t *_cacheImpedance;
348 std::vector<yarp::dev::eomc::Watchdog> _temperatureSensorErrorWatchdog;
349 std::vector<yarp::dev::eomc::Watchdog> _temperatureExceededLimitWatchdog;
350 std::vector<yarp::dev::eomc::TemperatureFilter> _temperatureSpikesFilter;
352 std::map<std::string, rawValuesKeyMetadata> _rawValuesMetadataMap;
353 std::vector<std::int32_t> _rawDataAuxVector;
355 #ifdef NETWORK_PERFORMANCE_BENCHMARK
356 Tools:Emb_RensponseTimingVerifier m_responseTimingVerifier;
361 std::string getBoardInfo(
void);
362 bool askRemoteValue(eOprotID32_t id32,
void* value, uint16_t& size);
364 bool askRemoteValues(eOprotEndpoint_t ep, eOprotEntity_t entity, eOprotTag_t tag, std::vector<T>& values);
365 bool checkRemoteControlModeStatus(
int joint,
int target_mode);
370 bool verifyUserControlLawConsistencyInJointSet(
eomc::PidInfo *ipdInfo);
372 bool verifyTorquePidshasSameUnitTypes(yarp::dev::PidFeedbackUnitsEnum &fbk_pidunits, yarp::dev::PidOutputUnitsEnum& out_pidunits);
373 bool verifyUseMotorSpeedFbkInJointSet(
int useMotorSpeedFbk []);
374 bool updatedJointsetsCfgWithControlInfo(
void);
375 bool saveCouplingsData(
void);
376 void debugUtil_printJointsetInfo(
void);
378 bool isTorqueControlEnabled(
int joint);
379 bool isVelocityControlEnabled(
int joint);
381 bool iNeedCouplingsInfo(
void);
383 bool getJointConfiguration(
int joint, eOmc_joint_config_t *jntCfg_ptr);
384 bool getMotorConfiguration(
int axis, eOmc_motor_config_t *motCfg_ptr);
385 bool getGerabox_E2J(
int joint,
double *gearbox_E2J_ptr);
386 bool getJointEncTolerance(
int joint,
double *jEncTolerance_ptr);
387 bool getMotorEncTolerance(
int axis,
double *mEncTolerance_ptr);
388 void updateDeadZoneWithDefaultValues(
void);
389 bool getJointDeadZoneRaw(
int j,
double &jntDeadZone);
394 bool fromConfig(yarp::os::Searchable &config);
395 int fromConfig_NumOfJoints(yarp::os::Searchable &config);
396 bool fromConfig_getGeneralInfo(yarp::os::Searchable &config);
397 bool fromConfig_Step2(yarp::os::Searchable &config);
398 bool fromConfig_readServiceCfg(yarp::os::Searchable &config);
400 bool alloc(
int njoints);
407 bool helper_setPosPidRaw(
int j,
const Pid &pid);
408 bool helper_getPosPidRaw(
int j, Pid *pid);
409 bool helper_getPosPidsRaw(Pid *pid);
412 bool helper_setTrqPidRaw(
int j,
const Pid &pid);
413 bool helper_getTrqPidRaw(
int j, Pid *pid);
414 bool helper_getTrqPidsRaw(Pid *pid);
417 bool helper_setVelPidRaw(
int j,
const Pid &pid);
418 bool helper_getVelPidRaw(
int j, Pid *pid);
419 bool helper_getVelPidsRaw(Pid *pid);
422 bool helper_setCurPidRaw(
int j,
const Pid &pid);
423 bool helper_getCurPidRaw(
int j, Pid *pid);
424 bool helper_getCurPidsRaw(Pid *pid);
427 bool helper_setSpdPidRaw(
int j,
const Pid &pid);
428 bool helper_getSpdPidRaw(
int j, Pid *pid);
429 bool helper_getSpdPidsRaw(Pid *pid);
431 bool checkCalib14RotationParam(int32_t calib_param4);
434 bool getRawData_core(std::string key, std::vector<std::int32_t> &
data);
443 virtual bool open(yarp::os::Searchable &par);
444 virtual bool close();
446 virtual bool initialised();
448 virtual bool update(eOprotID32_t id32,
double timestamp,
void *rxdata);
449 virtual bool getEntityName(uint32_t entityId, std::string &entityName);
452 virtual bool setPidRaw(
const PidControlTypeEnum& pidtype,
int j,
const Pid &pid)
override;
453 virtual bool setPidsRaw(
const PidControlTypeEnum& pidtype,
const Pid *pids)
override;
454 virtual bool setPidReferenceRaw(
const PidControlTypeEnum& pidtype,
int j,
double ref)
override;
455 virtual bool setPidReferencesRaw(
const PidControlTypeEnum& pidtype,
const double *refs)
override;
456 virtual bool setPidErrorLimitRaw(
const PidControlTypeEnum& pidtype,
int j,
double limit)
override;
457 virtual bool setPidErrorLimitsRaw(
const PidControlTypeEnum& pidtype,
const double *limits)
override;
458 virtual bool getPidErrorRaw(
const PidControlTypeEnum& pidtype,
int j,
double *err)
override;
459 virtual bool getPidErrorsRaw(
const PidControlTypeEnum& pidtype,
double *errs)
override;
460 virtual bool getPidOutputRaw(
const PidControlTypeEnum& pidtype,
int j,
double *
out)
override;
461 virtual bool getPidOutputsRaw(
const PidControlTypeEnum& pidtype,
double *outs)
override;
462 virtual bool getPidRaw(
const PidControlTypeEnum& pidtype,
int j, Pid *pid)
override;
463 virtual bool getPidsRaw(
const PidControlTypeEnum& pidtype, Pid *pids)
override;
464 virtual bool getPidReferenceRaw(
const PidControlTypeEnum& pidtype,
int j,
double *ref)
override;
465 virtual bool getPidReferencesRaw(
const PidControlTypeEnum& pidtype,
double *refs)
override;
466 virtual bool getPidErrorLimitRaw(
const PidControlTypeEnum& pidtype,
int j,
double *limit)
override;
467 virtual bool getPidErrorLimitsRaw(
const PidControlTypeEnum& pidtype,
double *limits)
override;
468 virtual bool resetPidRaw(
const PidControlTypeEnum& pidtype,
int j)
override;
469 virtual bool disablePidRaw(
const PidControlTypeEnum& pidtype,
int j)
override;
470 virtual bool enablePidRaw(
const PidControlTypeEnum& pidtype,
int j)
override;
471 virtual bool setPidOffsetRaw(
const PidControlTypeEnum& pidtype,
int j,
double v)
override;
472 virtual bool isPidEnabledRaw(
const PidControlTypeEnum& pidtype,
int j,
bool* enabled)
override;
475 virtual bool getAxes(
int *ax)
override;
476 virtual bool positionMoveRaw(
int j,
double ref)
override;
477 virtual bool positionMoveRaw(
const double *refs)
override;
478 virtual bool relativeMoveRaw(
int j,
double delta)
override;
479 virtual bool relativeMoveRaw(
const double *deltas)
override;
480 virtual bool checkMotionDoneRaw(
bool *flag)
override;
481 virtual bool checkMotionDoneRaw(
int j,
bool *flag)
override;
482 virtual bool setRefSpeedRaw(
int j,
double sp)
override;
483 virtual bool setRefSpeedsRaw(
const double *spds)
override;
484 virtual bool setRefAccelerationRaw(
int j,
double acc)
override;
485 virtual bool setRefAccelerationsRaw(
const double *accs)
override;
486 virtual bool getRefSpeedRaw(
int j,
double *ref)
override;
487 virtual bool getRefSpeedsRaw(
double *spds)
override;
488 virtual bool getRefAccelerationRaw(
int j,
double *
acc)
override;
489 virtual bool getRefAccelerationsRaw(
double *accs)
override;
490 virtual bool stopRaw(
int j)
override;
491 virtual bool stopRaw()
override;
495 virtual bool positionMoveRaw(
const int n_joint,
const int *joints,
const double *refs)
override;
496 virtual bool relativeMoveRaw(
const int n_joint,
const int *joints,
const double *deltas)
override;
497 virtual bool checkMotionDoneRaw(
const int n_joint,
const int *joints,
bool *flags)
override;
498 virtual bool setRefSpeedsRaw(
const int n_joint,
const int *joints,
const double *spds)
override;
499 virtual bool setRefAccelerationsRaw(
const int n_joint,
const int *joints,
const double *accs)
override;
500 virtual bool getRefSpeedsRaw(
const int n_joint,
const int *joints,
double *spds)
override;
501 virtual bool getRefAccelerationsRaw(
const int n_joint,
const int *joints,
double *accs)
override;
502 virtual bool stopRaw(
const int n_joint,
const int *joints)
override;
503 virtual bool getTargetPositionRaw(
const int joint,
double *ref)
override;
504 virtual bool getTargetPositionsRaw(
double *refs)
override;
505 virtual bool getTargetPositionsRaw(
const int n_joint,
const int *joints,
double *refs)
override;
508 virtual bool velocityMoveRaw(
int j,
double sp)
override;
509 virtual bool velocityMoveRaw(
const double *sp)
override;
513 virtual bool setCalibrationParametersRaw(
int axis,
const CalibrationParameters& params)
override;
514 virtual bool calibrateAxisWithParamsRaw(
int axis,
unsigned int type,
double p1,
double p2,
double p3)
override;
515 virtual bool calibrationDoneRaw(
int j)
override;
521 virtual bool getControlModeRaw(
int j,
int *v)
override;
522 virtual bool getControlModesRaw(
int *v)
override;
525 virtual bool getControlModesRaw(
const int n_joint,
const int *joints,
int *modes)
override;
526 virtual bool setControlModeRaw(
const int j,
const int mode)
override;
527 virtual bool setControlModesRaw(
const int n_joint,
const int *joints,
int *modes)
override;
528 virtual bool setControlModesRaw(
int *modes)
override;
531 virtual bool resetEncoderRaw(
int j)
override;
532 virtual bool resetEncodersRaw()
override;
533 virtual bool setEncoderRaw(
int j,
double val)
override;
534 virtual bool setEncodersRaw(
const double *vals)
override;
535 virtual bool getEncoderRaw(
int j,
double *v)
override;
536 virtual bool getEncodersRaw(
double *
encs)
override;
537 virtual bool getEncoderSpeedRaw(
int j,
double *sp)
override;
538 virtual bool getEncoderSpeedsRaw(
double *spds)
override;
539 virtual bool getEncoderAccelerationRaw(
int j,
double *spds)
override;
540 virtual bool getEncoderAccelerationsRaw(
double *accs)
override;
543 virtual bool getEncodersTimedRaw(
double *
encs,
double *stamps)
override;
544 virtual bool getEncoderTimedRaw(
int j,
double *
encs,
double *stamp)
override;
547 virtual bool getNumberOfMotorEncodersRaw(
int * num)
override;
548 virtual bool resetMotorEncoderRaw(
int m)
override;
549 virtual bool resetMotorEncodersRaw()
override;
550 virtual bool setMotorEncoderRaw(
int m,
const double val)
override;
551 virtual bool setMotorEncodersRaw(
const double *vals)
override;
552 virtual bool getMotorEncoderRaw(
int m,
double *v)
override;
553 virtual bool getMotorEncodersRaw(
double *
encs)
override;
554 virtual bool getMotorEncoderSpeedRaw(
int m,
double *sp)
override;
555 virtual bool getMotorEncoderSpeedsRaw(
double *spds)
override;
556 virtual bool getMotorEncoderAccelerationRaw(
int m,
double *spds)
override;
557 virtual bool getMotorEncoderAccelerationsRaw(
double *accs)
override;
558 virtual bool getMotorEncodersTimedRaw(
double *
encs,
double *stamps)
override;
559 virtual bool getMotorEncoderTimedRaw(
int m,
double *
encs,
double *stamp)
override;
560 virtual bool getMotorEncoderCountsPerRevolutionRaw(
int m,
double *v)
override;
561 virtual bool setMotorEncoderCountsPerRevolutionRaw(
int m,
const double cpr)
override;
565 virtual bool getRemoteVariableRaw(std::string key, yarp::os::Bottle& val)
override;
566 virtual bool setRemoteVariableRaw(std::string key,
const yarp::os::Bottle& val)
override;
567 virtual bool getRemoteVariablesListRaw(yarp::os::Bottle* listOfKeys)
override;
571 virtual bool getAxisNameRaw(
int axis, std::string& name)
override;
572 virtual bool getJointTypeRaw(
int axis, yarp::dev::JointTypeEnum& type)
override;
576 bool getRotorEncoderResolutionRaw(
int m,
double &rotres) ;
577 bool getJointEncoderResolutionRaw(
int m,
double &jntres) ;
578 bool getJointEncoderTypeRaw(
int j,
int &type) ;
579 bool getRotorEncoderTypeRaw(
int j,
int &type) ;
580 bool getKinematicMJRaw(
int j,
double &rotres) ;
581 bool getTemperatureSensorTypeRaw(
int j, std::string& ret) ;
582 bool getHasTempSensorsRaw(
int j,
int& ret) ;
583 bool getHasHallSensorRaw(
int j,
int& ret) ;
584 bool getHasRotorEncoderRaw(
int j,
int& ret) ;
585 bool getHasRotorEncoderIndexRaw(
int j,
int& ret) ;
586 bool getMotorPolesRaw(
int j,
int& poles) ;
587 bool getRotorIndexOffsetRaw(
int j,
double& rotorOffset) ;
588 bool getTorqueControlFilterType(
int j,
int& type) ;
589 bool getRotorLimitsRaw(
int j,
double *rotorMin,
double *rotorMax) ;
590 bool getWholeImpedanceRaw(
int j, eOmc_impedance_t &imped);
593 virtual bool enableAmpRaw(
int j)
override;
594 virtual bool disableAmpRaw(
int j)
override;
595 virtual bool getCurrentsRaw(
double *vals)
override;
596 virtual bool getCurrentRaw(
int j,
double *val)
override;
597 virtual bool setMaxCurrentRaw(
int j,
double val)
override;
598 virtual bool getMaxCurrentRaw(
int j,
double *val)
override;
599 virtual bool getAmpStatusRaw(
int *st)
override;
600 virtual bool getAmpStatusRaw(
int j,
int *st)
override;
601 virtual bool getPWMRaw(
int j,
double* val)
override;
602 virtual bool getPWMLimitRaw(
int j,
double* val)
override;
603 virtual bool setPWMLimitRaw(
int j,
const double val)
override;
604 virtual bool getPowerSupplyVoltageRaw(
int j,
double* val)
override;
609 virtual yarp::dev::VAS_status getVirtualAnalogSensorStatus(
int ch)
override;
610 virtual int getVirtualAnalogSensorChannels()
override;
611 virtual bool updateVirtualAnalogSensorMeasure(yarp::sig::Vector &fTorques)
override;
612 virtual bool updateVirtualAnalogSensorMeasure(
int j,
double &fTorque)
override;
614 #ifdef IMPLEMENT_DEBUG_INTERFACE
618 virtual bool setParameterRaw(
int j,
unsigned int type,
double value)
override;
619 virtual bool getParameterRaw(
int j,
unsigned int type,
double *value)
override;
620 virtual bool setDebugParameterRaw(
int j,
unsigned int index,
double value)
override;
621 virtual bool setDebugReferencePositionRaw(
int j,
double value)
override;
622 virtual bool getDebugParameterRaw(
int j,
unsigned int index,
double *value)
override;
623 virtual bool getDebugReferencePositionRaw(
int j,
double *value)
override;
627 virtual bool setLimitsRaw(
int axis,
double min,
double max)
override;
628 virtual bool getLimitsRaw(
int axis,
double *
min,
double *
max)
override;
630 virtual bool setVelLimitsRaw(
int axis,
double min,
double max)
override;
631 virtual bool getVelLimitsRaw(
int axis,
double *
min,
double *
max)
override;
634 virtual bool getTorqueRaw(
int j,
double *t)
override;
635 virtual bool getTorquesRaw(
double *t)
override;
636 virtual bool getTorqueRangeRaw(
int j,
double *
min,
double *
max)
override;
637 virtual bool getTorqueRangesRaw(
double *
min,
double *
max)
override;
638 virtual bool setRefTorquesRaw(
const double *t)
override;
639 virtual bool setRefTorqueRaw(
int j,
double t)
override;
640 virtual bool setRefTorquesRaw(
const int n_joint,
const int *joints,
const double *t)
override;
641 virtual bool getRefTorquesRaw(
double *t)
override;
642 virtual bool getRefTorqueRaw(
int j,
double *t)
override;
643 virtual bool getMotorTorqueParamsRaw(
int j, MotorTorqueParameters *params)
override;
644 virtual bool setMotorTorqueParamsRaw(
int j,
const MotorTorqueParameters params)
override;
648 virtual bool velocityMoveRaw(
const int n_joint,
const int *joints,
const double *spds)
override;
649 virtual bool getRefVelocityRaw(
const int joint,
double *ref)
override;
650 virtual bool getRefVelocitiesRaw(
double *refs)
override;
651 virtual bool getRefVelocitiesRaw(
const int n_joint,
const int *joints,
double *refs)
override;
655 virtual bool getImpedanceRaw(
int j,
double *stiffness,
double *damping)
override;
656 virtual bool setImpedanceRaw(
int j,
double stiffness,
double damping)
override;
657 virtual bool setImpedanceOffsetRaw(
int j,
double offset)
override;
658 virtual bool getImpedanceOffsetRaw(
int j,
double *
offset)
override;
659 virtual bool getCurrentImpedanceLimitRaw(
int j,
double *min_stiff,
double *max_stiff,
double *min_damp,
double *max_damp)
override;
662 virtual bool setPositionRaw(
int j,
double ref)
override;
663 virtual bool setPositionsRaw(
const int n_joint,
const int *joints,
const double *refs)
override;
664 virtual bool setPositionsRaw(
const double *refs)
override;
665 virtual bool getRefPositionRaw(
const int joint,
double *ref)
override;
666 virtual bool getRefPositionsRaw(
double *refs)
override;
667 virtual bool getRefPositionsRaw(
const int n_joint,
const int *joints,
double *refs)
override;
670 virtual bool getInteractionModeRaw(
int j, yarp::dev::InteractionModeEnum* _mode)
override;
671 virtual bool getInteractionModesRaw(
int n_joints,
int *joints, yarp::dev::InteractionModeEnum* modes)
override;
672 virtual bool getInteractionModesRaw(yarp::dev::InteractionModeEnum* modes)
override;
673 virtual bool setInteractionModeRaw(
int j, yarp::dev::InteractionModeEnum _mode)
override;
674 virtual bool setInteractionModesRaw(
int n_joints,
int *joints, yarp::dev::InteractionModeEnum* modes)
override;
675 virtual bool setInteractionModesRaw(yarp::dev::InteractionModeEnum* modes)
override;
678 virtual bool getNumberOfMotorsRaw(
int * num)
override;
679 virtual bool getTemperatureRaw(
int m,
double* val)
override;
680 virtual bool getTemperaturesRaw(
double *vals)
override;
681 virtual bool getTemperatureLimitRaw(
int m,
double *temp)
override;
682 virtual bool setTemperatureLimitRaw(
int m,
const double temp)
override;
683 virtual bool getPeakCurrentRaw(
int m,
double *val)
override;
684 virtual bool setPeakCurrentRaw(
int m,
const double val)
override;
685 virtual bool getNominalCurrentRaw(
int m,
double *val)
override;
686 virtual bool setNominalCurrentRaw(
int m,
const double val)
override;
687 virtual bool getGearboxRatioRaw(
int m,
double *gearbox)
override;
690 virtual bool setRefDutyCycleRaw(
int j,
double v)
override;
691 virtual bool setRefDutyCyclesRaw(
const double *v)
override;
692 virtual bool getRefDutyCycleRaw(
int j,
double *v)
override;
693 virtual bool getRefDutyCyclesRaw(
double *v)
override;
694 virtual bool getDutyCycleRaw(
int j,
double *v)
override;
695 virtual bool getDutyCyclesRaw(
double *v)
override;
701 virtual bool getCurrentRangeRaw(
int j,
double *
min,
double *
max)
override;
702 virtual bool getCurrentRangesRaw(
double *
min,
double *
max)
override;
703 virtual bool setRefCurrentsRaw(
const double *t)
override;
704 virtual bool setRefCurrentRaw(
int j,
double t)
override;
705 virtual bool setRefCurrentsRaw(
const int n_joint,
const int *joints,
const double *t)
override;
706 virtual bool getRefCurrentsRaw(
double *t)
override;
707 virtual bool getRefCurrentRaw(
int j,
double *t)
override;
713 virtual bool getLastJointFaultRaw(
int j,
int& fault, std::string& message)
override;
716 virtual bool getRawDataMap(
std::map<std::string, std::vector<std::int32_t>> &
map)
override;
717 virtual bool getRawData(std::string key, std::vector<std::int32_t> &
data)
override;
718 virtual bool getKeys(std::vector<std::string> &keys)
override;
719 virtual int getNumberOfKeys()
override;
embObjMotionControl : driver for iCub motor control boards EMS on a ETH bus.
void updatePrevTemperature(double temperature)
TemperatureFilter(TemperatureFilter &&other) noexcept=default
TemperatureFilter(const TemperatureFilter &other)=default
TemperatureFilter(uint32_t threshold, int32_t initCounter)
TemperatureFilter & operator=(TemperatureFilter &&other) noexcept=default
uint32_t getTemperatureThreshold()
double getPrevTemperature()
void start(double temperature)
~TemperatureFilter()=default
TemperatureFilter & operator=(const TemperatureFilter &other)=default
void setThreshold(uint8_t txrateOfRegularROPs)
Watchdog(uint32_t threshold)
Watchdog & operator=(Watchdog &&other) noexcept=default
Watchdog(const Watchdog &other)=default
Watchdog & operator=(const Watchdog &other)=default
Watchdog(Watchdog &&other) noexcept=default
yarp::sig::Vector & map(yarp::sig::Vector &v, double(op)(double))
Performs a unary operator inplace on each element of a vector.
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
bool useRawEncoderData
its value depends on environment variable "ETH_VERBOSEWHENOK"
bool pwmIsLimited
if true than do not use calibration data
int resolution
Num of error bits passable for joint encoder.
double tolerance
joint encoder type
vector< eOmc_jointset_configuration_t > jointset_cfgs
vector< vector< int > > set2joint