YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
FakeMotionControl.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
6#ifndef YARP_DEVICE_FAKE_MOTIONCONTROL
7#define YARP_DEVICE_FAKE_MOTIONCONTROL
8
9#include <yarp/os/Time.h>
10#include <yarp/os/Bottle.h>
11#include <yarp/sig/Vector.h>
22
23#include <mutex>
25
27{
28 double min_stiff;
29 double max_stiff;
30 double min_damp;
31 double max_damp;
32 double param_a;
33 double param_b;
34 double param_c;
35
36public:
38 {
39 min_stiff=0;
40 max_stiff=0;
41 min_damp=0;
42 max_damp=0;
43 param_a=0;
44 param_b=0;
45 param_c=0;
46 }
47
49 {
50 return min_stiff;
51 }
53 {
54 return max_stiff;
55 }
56 double get_min_damp()
57 {
58 return min_damp;
59 }
60 double get_max_damp()
61 {
62 return max_damp;
63 }
64};
65
73
133{
134private:
135 enum VerboseLevel
136 {
137 MUTE = 0, // only errors that prevent device from working
138 QUIET = 1, // adds errors that can cause malfunctioning
139 DEFAULT = 2, // adds warnings // DEFAULT // show noisy messages about back-compatible changes
140 CHATTY = 3, // adds info messages
141 VERBOSE = 4, // adds debug messages
142 VERY_VERBOSE = 5, // adds trace of events (shows thread running and catch if they get stuck)
143 VERY_VERY_VERBOSE = 6 // adds messages printed every cycle, so too much verbose for usage, only for deep debugging
144 };
145
146 const int npids = 3;
147
148 std::recursive_mutex _mutex;
149 double _cycleTimestamp;
150 int _njoints;
151 int *_axisMap= nullptr;
152 double* _angleToEncoder = nullptr;
153 double* _encodersStamp = nullptr;
154 double* _ampsToSensor = nullptr;
155 double* _dutycycleToPWM = nullptr;
156 double* _tempLimit = nullptr;
157 float* _DEPRECATED_encoderconversionfactor = nullptr;
158 float* _DEPRECATED_encoderconversionoffset = nullptr;
159// uint8_t *_jointEncoderType; /** joint encoder type*/
160 int* _jointEncoderRes = nullptr;
161 int* _rotorEncoderRes = nullptr;
162 // uint8_t *_rotorEncoderType= nullptr; /** rotor encoder type*/
163 double* _gearbox = nullptr;
164 bool* _hasHallSensor = nullptr;
165 bool* _hasTempSensor = nullptr;
166 bool* _hasRotorEncoder = nullptr;
167 bool* _hasRotorEncoderIndex = nullptr;
168 int* _rotorIndexOffset = nullptr;
169 int* _motorPoles = nullptr;
170 double* _rotorlimits_max = nullptr;
171 double* _rotorlimits_min = nullptr;
172 std::vector<yarp::dev::PidWithExtraInfo>* _ppids = nullptr;
173 std::vector<yarp::dev::PidWithExtraInfo>* _tpids = nullptr;
174 std::vector<yarp::dev::PidWithExtraInfo>* _cpids = nullptr;
175 std::vector<yarp::dev::PidWithExtraInfo>* _vpids = nullptr;
176 std::vector<yarp::dev::PidWithExtraInfo>* _pdpids = nullptr;
177 std::vector<yarp::dev::PidWithExtraInfo>* _vdpids = nullptr;
178 std::vector<yarp::dev::PidWithExtraInfo>* _mpids = nullptr;
180 std::vector<bool> *_ppids_ena = nullptr;
181 std::vector<bool> *_tpids_ena = nullptr;
182 std::vector<bool> *_cpids_ena = nullptr;
183 std::vector<bool> *_vpids_ena = nullptr;
184 std::vector<bool> *_pdpids_ena = nullptr;
185 std::vector<bool> *_vdpids_ena = nullptr;
186 std::vector<bool> *_mpids_ena = nullptr;
187
188 std::vector<double> *_ppids_lim = nullptr;
189 std::vector<double> *_tpids_lim = nullptr;
190 std::vector<double> *_cpids_lim = nullptr;
191 std::vector<double> *_vpids_lim = nullptr;
192 std::vector<double> *_pdpids_lim = nullptr;
193 std::vector<double> *_vdpids_lim = nullptr;
194 std::vector<double> *_mpids_lim = nullptr;
195
196 std::vector<double> *_ppids_ref = nullptr;
197 std::vector<double> *_tpids_ref = nullptr;
198 std::vector<double> *_cpids_ref = nullptr;
199 std::vector<double> *_vpids_ref = nullptr;
200 std::vector<double> *_pdpids_ref = nullptr;
201 std::vector<double> *_vdpids_ref = nullptr;
202 std::vector<double> *_mpids_ref = nullptr;
203
204 std::vector<double> *_ppids_ffd = nullptr;
205 std::vector<double> *_tpids_ffd = nullptr;
206 std::vector<double> *_cpids_ffd = nullptr;
207 std::vector<double> *_vpids_ffd = nullptr;
208 std::vector<double> *_pdpids_ffd = nullptr;
209 std::vector<double> *_vdpids_ffd = nullptr;
210 std::vector<double> *_mpids_ffd = nullptr;
211
212 std::vector<yarp::dev::SelectableControlModeEnum>* _availableControlModes = nullptr;
213 std::vector<yarp::dev::PidControlTypeEnum>* _availablePids = nullptr;
214 yarp::dev::InteractionModeEnum*_interactMode = nullptr;
215
216 std::string* _axisName = nullptr;
217 yarp::dev::JointTypeEnum* _jointType = nullptr;
218// ImpedanceLimits *_impedance_limits= nullptr; /** impedance limits */
219 double* _limitsMin = nullptr;
220 double* _limitsMax = nullptr;
221 double* _kinematic_mj = nullptr;
222 //double *_currentLimits= nullptr; /** current limits */
223// MotorCurrentLimits *_currentLimits= nullptr;
224 double* _minJntCmdVelocity = nullptr;
225 double* _maxJntCmdVelocity = nullptr;
226 double* _maxMotorVelocity = nullptr;
227 int* _velocityShifts = nullptr;
228 int* _velocityTimeout = nullptr;
229 double* _kbemf = nullptr;
230 double* _ktau = nullptr;
231 int* _kbemf_scale = nullptr;
232 int* _ktau_scale = nullptr;
233 double* _viscousPos = nullptr;
234 double* _viscousNeg = nullptr;
235 double* _coulombPos = nullptr;
236 double* _coulombNeg = nullptr;
237 double* _velocityThres = nullptr;
238 int* _filterType = nullptr;
239 int* _torqueSensorId = nullptr;
240 int* _torqueSensorChan = nullptr;
241 double* _maxTorque = nullptr;
242 double* _newtonsToSensor = nullptr;
243 bool* checking_motiondone = nullptr; /* flag telling if I'm already waiting for motion done */
244 double* _last_position_move_time = nullptr;
245 double* _motorPwmLimits = nullptr;
246 double* _torques = nullptr;
247 bool* _braked= nullptr;
248 bool* _autobraked= nullptr;
249
250// ImpedanceParameters *_impedance_params; /** impedance parameters */
251
252 bool verbosewhenok;
253 bool useRawEncoderData;
254 bool _pwmIsLimited;
255 bool _torqueControlEnabled;
257 enum torqueControlUnitsType {T_MACHINE_UNITS=0, T_METRIC_UNITS=1};
258 torqueControlUnitsType _torqueControlUnits;
259
260 enum positionControlUnitsType {P_MACHINE_UNITS=0, P_METRIC_UNITS=1};
261 positionControlUnitsType _positionControlUnits;
262
263 // internal stuff
264 bool velocity_watchdog_enabled = false; //false for testing purposes. On the real robot is true.
265 bool openloop_watchdog_enabled = false; //false for testing purposes. On the real robot is true.
266 int *_controlModes = nullptr;
267 int *_hwfault_code = nullptr;
268 std::string *_hwfault_message = nullptr;
269 bool *_enabledAmp = nullptr; // Middle step toward a full enabled motor controller. Amp (pwm) plus Pid enable command must be sent in order to get the joint into an active state.
270 bool *_enabledPid = nullptr; // Depends on enabledAmp. When both are set, the joint exits the idle mode and goes into position mode. If one of them is disabled, it falls to idle.
271 bool *_calibrated = nullptr; // Flag to know if the calibrate function has been called for the joint
272 double *_posCtrl_references = nullptr; // used for position control.
273 double *_posDir_references = nullptr; // used for position Direct control.
274 double *_ref_speeds = nullptr; // used for position control.
275 double *_command_speeds = nullptr; // used for velocity control.
276 double *_dir_vel_commands = nullptr; // used for direct velocity control.
277 double *_ref_accs = nullptr; // for velocity control, in position min jerk eq is used.
278 double *_ref_torques = nullptr; // for torque control.
279 double *_ref_currents = nullptr;
280
281 double *_stiffness = nullptr;
282 double *_damping = nullptr;
283 double *_force_offset = nullptr;
284
285 yarp::sig::Vector current, nominalCurrent, maxCurrent, peakCurrent;
286 yarp::sig::Vector pwm, pwmLimit, refpwm, supplyVoltage,last_velocity_command, last_pwm_command;
287 yarp::sig::Vector pos, dpos, vel, speed, acc, loc, amp;
288 double prev_time;
289 bool opened;
290
291 // debugging
292 VerboseLevel verbose;
293public:
294
297
298 // Device Driver
299 bool open(yarp::os::Searchable &par) override;
300 bool close() override;
301 bool fromConfig(yarp::os::Searchable &config);
302
303 virtual bool initialised();
304
308 bool alloc(int njoints);
309
313 void resizeBuffers();
314
315 bool threadInit() override;
316 void threadRelease() override;
317
319 yarp::dev::ReturnValue getAvailablePidsRaw(int j, std::vector<yarp::dev::PidControlTypeEnum>& avail) override;
320 yarp::dev::ReturnValue setPidRaw(const yarp::dev::PidControlTypeEnum& pidtype,int j, const yarp::dev::Pid &pid) override;
322 yarp::dev::ReturnValue setPidReferenceRaw(const yarp::dev::PidControlTypeEnum& pidtype,int j, double ref) override;
323 yarp::dev::ReturnValue setPidReferencesRaw(const yarp::dev::PidControlTypeEnum& pidtype,const double *refs) override;
324 yarp::dev::ReturnValue setPidErrorLimitRaw(const yarp::dev::PidControlTypeEnum& pidtype,int j, double limit) override;
325 yarp::dev::ReturnValue setPidErrorLimitsRaw(const yarp::dev::PidControlTypeEnum& pidtype,const double *limits) override;
326 yarp::dev::ReturnValue getPidErrorRaw(const yarp::dev::PidControlTypeEnum& pidtype,int j, double *err) override;
327 yarp::dev::ReturnValue getPidErrorsRaw(const yarp::dev::PidControlTypeEnum& pidtype, double *errs) override;
328 yarp::dev::ReturnValue getPidOutputRaw(const yarp::dev::PidControlTypeEnum& pidtype,int j, double *out) override;
329 yarp::dev::ReturnValue getPidOutputsRaw(const yarp::dev::PidControlTypeEnum& pidtype,double *outs) override;
332 yarp::dev::ReturnValue getPidReferenceRaw(const yarp::dev::PidControlTypeEnum& pidtype,int j, double *ref) override;
334 yarp::dev::ReturnValue getPidErrorLimitRaw(const yarp::dev::PidControlTypeEnum& pidtype,int j, double *limit) override;
335 yarp::dev::ReturnValue getPidErrorLimitsRaw(const yarp::dev::PidControlTypeEnum& pidtype,double *limits) override;
339 yarp::dev::ReturnValue setPidOffsetRaw(const yarp::dev::PidControlTypeEnum& pidtype,int j, double v) override;
340 yarp::dev::ReturnValue setPidFeedforwardRaw(const yarp::dev::PidControlTypeEnum& pidtype,int j, double v) override;
341 yarp::dev::ReturnValue getPidOffsetRaw(const yarp::dev::PidControlTypeEnum& pidtype,int j, double& v) override;
342 yarp::dev::ReturnValue getPidFeedforwardRaw(const yarp::dev::PidControlTypeEnum& pidtype,int j, double& v) override;
343 yarp::dev::ReturnValue isPidEnabledRaw(const yarp::dev::PidControlTypeEnum& pidtype, int j, bool& enabled) override;
345 yarp::dev::ReturnValue getPidExtraInfosRaw(const yarp::dev::PidControlTypeEnum& pidtype, std::vector<yarp::dev::PidExtraInfo>& units) override;
346
347 // POSITION CONTROL INTERFACE RAW
348 yarp::dev::ReturnValue getAxes(size_t& ax) override;
349 yarp::dev::ReturnValue positionMoveRaw(int j, double ref) override;
350 yarp::dev::ReturnValue positionMoveRaw(const double *refs) override;
351 yarp::dev::ReturnValue relativeMoveRaw(int j, double delta) override;
352 yarp::dev::ReturnValue relativeMoveRaw(const double *deltas) override;
353 yarp::dev::ReturnValue checkMotionDoneRaw(bool& flag) override;
354 yarp::dev::ReturnValue checkMotionDoneRaw(int j, bool& flag) override;
355 yarp::dev::ReturnValue setTrajSpeedRaw(int j, double sp) override;
356 yarp::dev::ReturnValue setTrajSpeedsRaw(const double *spds) override;
357 yarp::dev::ReturnValue getTrajSpeedRaw(int j, double *ref) override;
358 yarp::dev::ReturnValue getTrajSpeedsRaw(double *spds) override;
359 yarp::dev::ReturnValue setTrajAccelerationRaw(int j, double acc) override;
360 yarp::dev::ReturnValue setTrajAccelerationsRaw(const double *accs) override;
361 yarp::dev::ReturnValue getTrajAccelerationRaw(int j, double *acc) override;
362 yarp::dev::ReturnValue getTrajAccelerationsRaw(double *accs) override;
363 yarp::dev::ReturnValue stopRaw(int j) override;
365 yarp::dev::ReturnValue positionMoveRaw(const int n_joint, const int *joints, const double *refs) override;
366 yarp::dev::ReturnValue relativeMoveRaw(const int n_joint, const int *joints, const double *deltas) override;
367 yarp::dev::ReturnValue checkMotionDoneRaw(const std::vector<int>& joints, bool& flag) override;
368 yarp::dev::ReturnValue setTrajSpeedsRaw(const int n_joint, const int *joints, const double *spds) override;
369 yarp::dev::ReturnValue setTrajAccelerationsRaw(const int n_joint, const int *joints, const double *accs) override;
370 yarp::dev::ReturnValue getTrajSpeedsRaw(const int n_joint, const int *joints, double *spds) override;
371 yarp::dev::ReturnValue getTrajAccelerationsRaw(const int n_joint, const int *joints, double *accs) override;
372 yarp::dev::ReturnValue stopRaw(const int n_joint, const int *joints) override;
373 yarp::dev::ReturnValue getTargetPositionRaw(const int joint, double *ref) override;
374 yarp::dev::ReturnValue getTargetPositionsRaw(double *refs) override;
375 yarp::dev::ReturnValue getTargetPositionsRaw(const int n_joint, const int *joints, double *refs) override;
376
377 // IJointFault
378 yarp::dev::ReturnValue getLastJointFaultRaw(int j, int& fault, std::string& message) override;
379
380 // calibration2raw
382 yarp::dev::ReturnValue calibrateAxisWithParamsRaw(int axis, unsigned int type, double p1, double p2, double p3) override;
385
387 yarp::dev::ReturnValue getAvailableControlModesRaw(int j, std::vector<yarp::dev::SelectableControlModeEnum>& avail) override;
389 yarp::dev::ReturnValue getControlModesRaw(const std::vector<int>& joints, std::vector<yarp::dev::ControlModeEnum>& modes) override;
390 yarp::dev::ReturnValue getControlModesRaw(std::vector<yarp::dev::ControlModeEnum>& mode) override;
392 yarp::dev::ReturnValue setControlModesRaw(const std::vector<int>& joints, const std::vector<yarp::dev::SelectableControlModeEnum>& modes) override;
393 yarp::dev::ReturnValue setControlModesRaw(const std::vector<yarp::dev::SelectableControlModeEnum>& mode) override;
394
396
400 yarp::dev::ReturnValue setEncoderRaw(int j, double val) override;
401 yarp::dev::ReturnValue setEncodersRaw(const double *vals) override;
402 yarp::dev::ReturnValue getEncoderRaw(int j, double *v) override;
403 yarp::dev::ReturnValue getEncodersRaw(double *encs) override;
404 yarp::dev::ReturnValue getEncoderSpeedRaw(int j, double *sp) override;
405 yarp::dev::ReturnValue getEncoderSpeedsRaw(double *spds) override;
406 yarp::dev::ReturnValue getEncoderAccelerationRaw(int j, double *spds) override;
409
410 yarp::dev::ReturnValue getEncodersTimedRaw(double *encs, double *stamps) override;
411 yarp::dev::ReturnValue getEncoderTimedRaw(int j, double *encs, double *stamp) override;
412
417 yarp::dev::ReturnValue setMotorEncoderRaw(int m, const double val) override;
418 yarp::dev::ReturnValue setMotorEncodersRaw(const double *vals) override;
419 yarp::dev::ReturnValue getMotorEncoderRaw(int m, double *v) override;
420 yarp::dev::ReturnValue getMotorEncodersRaw(double *encs) override;
421 yarp::dev::ReturnValue getMotorEncoderSpeedRaw(int m, double *sp) override;
423 yarp::dev::ReturnValue getMotorEncoderAccelerationRaw(int m, double *spds) override;
425 yarp::dev::ReturnValue getMotorEncodersTimedRaw(double *encs, double *stamps) override;
426 yarp::dev::ReturnValue getMotorEncoderTimedRaw(int m, double *encs, double *stamp) override;
428 yarp::dev::ReturnValue setMotorEncoderCountsPerRevolutionRaw(int m, const double cpr) override;
430
432 yarp::dev::ReturnValue getAxisNameRaw(int axis, std::string& name) override;
435
436 //Internal use, not exposed by YARP (yet)
437 virtual bool getRotorEncoderResolutionRaw(int m, double &rotres);
438 virtual bool getJointEncoderResolutionRaw(int m, double &jntres);
439 virtual bool getJointEncoderTypeRaw(int j, int &type);
440 virtual bool getRotorEncoderTypeRaw(int j, int &type);
441 virtual bool getKinematicMJRaw(int j, double &rotres);
442 virtual bool getHasTempSensorsRaw(int j, int& ret);
443 virtual bool getHasHallSensorRaw(int j, int& ret);
444 virtual bool getHasRotorEncoderRaw(int j, int& ret);
445 virtual bool getHasRotorEncoderIndexRaw(int j, int& ret);
446 virtual bool getMotorPolesRaw(int j, int& poles);
447 virtual bool getRotorIndexOffsetRaw(int j, double& rotorOffset);
448 virtual bool getTorqueControlFilterType(int j, int& type);
449
451 yarp::dev::ReturnValue enableAmpRaw(int j) override;
453 yarp::dev::ReturnValue getCurrentsRaw(double *vals) override;
454 yarp::dev::ReturnValue getCurrentRaw(int j, double *val) override;
455 yarp::dev::ReturnValue getNominalCurrentRaw(int m, double *val) override;
456 yarp::dev::ReturnValue setNominalCurrentRaw(int m, const double val) override;
457 yarp::dev::ReturnValue setMaxCurrentRaw(int j, double val) override;
458 yarp::dev::ReturnValue getMaxCurrentRaw(int j, double *val) override;
459 yarp::dev::ReturnValue getPeakCurrentRaw(int m, double *val) override;
460 yarp::dev::ReturnValue setPeakCurrentRaw(int m, const double val) override;
461 yarp::dev::ReturnValue getAmpStatusRaw(int *st) override;
462 yarp::dev::ReturnValue getAmpStatusRaw(int j, int *st) override;
463 yarp::dev::ReturnValue getPWMRaw(int j, double* val) override;
464 yarp::dev::ReturnValue getPWMLimitRaw(int j, double* val) override;
465 yarp::dev::ReturnValue setPWMLimitRaw(int j, const double val) override;
466 yarp::dev::ReturnValue getPowerSupplyVoltageRaw(int j, double* val) override;
468
469 // Limits
470 yarp::dev::ReturnValue setPosLimitsRaw(int axis, double min, double max) override;
471 yarp::dev::ReturnValue getPosLimitsRaw(int axis, double *min, double *max) override;
472 yarp::dev::ReturnValue setVelLimitsRaw(int axis, double min, double max) override;
473 yarp::dev::ReturnValue getVelLimitsRaw(int axis, double *min, double *max) override;
474
475 // Torque control
476 yarp::dev::ReturnValue getTorqueRaw(int j, double *t) override;
477 yarp::dev::ReturnValue getTorquesRaw(double *t) override;
478 yarp::dev::ReturnValue getTorqueRangeRaw(int j, double *min, double *max) override;
479 yarp::dev::ReturnValue getTorqueRangesRaw(double *min, double *max) override;
480 yarp::dev::ReturnValue setRefTorquesRaw(const double *t) override;
481 yarp::dev::ReturnValue setRefTorqueRaw(int j, double t) override;
482 yarp::dev::ReturnValue setRefTorquesRaw(const int n_joint, const int *joints, const double *t) override;
483 yarp::dev::ReturnValue getRefTorquesRaw(double *t) override;
484 yarp::dev::ReturnValue getRefTorqueRaw(int j, double *t) override;
487
488 // IVelocityControl interface
489 yarp::dev::ReturnValue velocityMoveRaw(int j, double sp) override;
490 yarp::dev::ReturnValue velocityMoveRaw(const double *sp) override;
491 yarp::dev::ReturnValue velocityMoveRaw(const int n_joint, const int *joints, const double *spds) override;
492 yarp::dev::ReturnValue getTargetVelocityRaw(const int joint, double *ref) override;
493 yarp::dev::ReturnValue getTargetVelocitiesRaw(double *refs) override;
494 yarp::dev::ReturnValue getTargetVelocitiesRaw(const int n_joint, const int *joints, double *refs) override;
495
496 // Impedance interface
497 yarp::dev::ReturnValue getImpedanceRaw(int j, double *stiffness, double *damping) override;
498 yarp::dev::ReturnValue setImpedanceRaw(int j, double stiffness, double damping) override;
499 yarp::dev::ReturnValue setImpedanceOffsetRaw(int j, double offset) override;
500 yarp::dev::ReturnValue getImpedanceOffsetRaw(int j, double *offset) override;
501 yarp::dev::ReturnValue getCurrentImpedanceLimitRaw(int j, double *min_stiff, double *max_stiff, double *min_damp, double *max_damp) override;
502
503 // PositionDirect Interface
504 yarp::dev::ReturnValue setPositionRaw(int j, double ref) override;
505 yarp::dev::ReturnValue setPositionsRaw(const int n_joint, const int *joints, const double *refs) override;
506 yarp::dev::ReturnValue setPositionsRaw(const double *refs) override;
507 yarp::dev::ReturnValue getRefPositionRaw(const int joint, double *ref) override;
508 yarp::dev::ReturnValue getRefPositionsRaw(double *refs) override;
509 yarp::dev::ReturnValue getRefPositionsRaw(const int n_joint, const int *joints, double *refs) override;
510
511 // InteractionMode interface
513 yarp::dev::ReturnValue getInteractionModesRaw(const std::vector<int>& joints, std::vector<yarp::dev::InteractionModeEnum>& modes) override;
514 yarp::dev::ReturnValue getInteractionModesRaw(std::vector<yarp::dev::InteractionModeEnum>& modes) override;
516 yarp::dev::ReturnValue setInteractionModesRaw(const std::vector<int>& joints, const std::vector<yarp::dev::InteractionModeEnum>& modes) override;
517 yarp::dev::ReturnValue setInteractionModesRaw(const std::vector<yarp::dev::InteractionModeEnum>& modes) override;
518
519 // IMotor interface
521 yarp::dev::ReturnValue getTemperatureRaw(int m, double* val) override;
522 yarp::dev::ReturnValue getTemperaturesRaw(double *vals) override;
523 yarp::dev::ReturnValue getTemperatureLimitRaw(int m, double *temp) override;
524 yarp::dev::ReturnValue setTemperatureLimitRaw(int m, const double temp) override;
525 yarp::dev::ReturnValue getGearboxRatioRaw(int m, double* gearbox) override;
526 yarp::dev::ReturnValue setGearboxRatioRaw(int m, const double val) override;
527
528 // PWM interface
529 yarp::dev::ReturnValue setRefDutyCycleRaw(int j, double v) override;
530 yarp::dev::ReturnValue setRefDutyCyclesRaw(const double *v) override;
531 yarp::dev::ReturnValue getRefDutyCycleRaw(int j, double *v) override;
533 yarp::dev::ReturnValue getDutyCycleRaw(int j, double *v) override;
534 yarp::dev::ReturnValue getDutyCyclesRaw(double *v) override;
535
536 //IJointBrake
537 yarp::dev::ReturnValue isJointBrakedRaw(int j, bool& braked) const override;
538 yarp::dev::ReturnValue setManualBrakeActiveRaw(int j, bool active) override;
539 yarp::dev::ReturnValue setAutoBrakeEnabledRaw(int j, bool enabled) override;
540 yarp::dev::ReturnValue getAutoBrakeEnabledRaw(int j, bool& enabled) const override;
541
542 // IVelocityDirect
543 yarp::dev::ReturnValue setRefVelocityRaw(int jnt, double vel) override;
544 yarp::dev::ReturnValue setRefVelocityRaw(const std::vector<double>& vels) override;
545 yarp::dev::ReturnValue setRefVelocityRaw(const std::vector<int>& jnts, const std::vector<double>& vels) override;
546 yarp::dev::ReturnValue getRefVelocityRaw(const int jnt, double& vel) override;
547 yarp::dev::ReturnValue getRefVelocityRaw(std::vector<double>& vels) override;
548 yarp::dev::ReturnValue getRefVelocityRaw(const std::vector<int>& jnts, std::vector<double>& vels) override;
549
550 // Current interface
551 //yarp::dev::ReturnValue getAxes(size_t& ax) override;
552 //yarp::dev::ReturnValue getCurrentRaw(int j, double *t) override;
553 //yarp::dev::ReturnValue getCurrentsRaw(double *t) override;
554 yarp::dev::ReturnValue getCurrentRangeRaw(int j, double *min, double *max) override;
555 yarp::dev::ReturnValue getCurrentRangesRaw(double *min, double *max) override;
556 yarp::dev::ReturnValue setRefCurrentsRaw(const double *t) override;
557 yarp::dev::ReturnValue setRefCurrentRaw(int j, double t) override;
558 yarp::dev::ReturnValue setRefCurrentsRaw(const int n_joint, const int *joints, const double *t) override;
559 yarp::dev::ReturnValue getRefCurrentsRaw(double *t) override;
560 yarp::dev::ReturnValue getRefCurrentRaw(int j, double *t) override;
561
565 bool updateVirtualAnalogSensorMeasureRaw(int ch, double &measure) override;
566
567 void run() override;
568private:
569 void cleanup();
570 bool dealloc();
571 void setInfoPPids(int j);
572 void setInfoVPids(int j);
573 void setInfoPDPids(int j);
574 void setInfoVDPids(int j);
575 void setInfoTPids(int j);
576 void setInfoCPids(int j);
577 void setInfoMPids(int j);
578
579 //bool parsePositionPidsGroup(yarp::os::Bottle& pidsGroup, yarp::dev::Pid myPid[]);
580 //bool parseTorquePidsGroup(yarp::os::Bottle& pidsGroup, yarp::dev::Pid myPid[], double kbemf[], double ktau[], int filterType[], double viscousPos[], double viscousNeg[], double coulombPos[], double coulombNeg[], double velocityThres[]);
581 //bool parseImpedanceGroup_NewFormat(yarp::os::Bottle& pidsGroup, ImpedanceParameters vals[]);
582 //bool extractGroup(yarp::os::Bottle &input, yarp::os::Bottle &out, const std::string &key1, const std::string &txt, int size);
583};
584
585#endif // YARP_DEVICE_FAKE_MOTIONCONTROL
define control board standard interfaces
FeatureMode mode
virtual analog sensor interface
contains the definition of a Vector type
This class is the parameters parser for class FakeMotionControl.
fakeMotionControl: The aim of this device is to mimic the expected behavior of a real motion control ...
yarp::dev::ReturnValue setPosLimitsRaw(int axis, double min, double max) override
Set the software limits for a particular axis, the behavior of the control card when these limits are...
virtual bool getHasTempSensorsRaw(int j, int &ret)
yarp::dev::ReturnValue setInteractionModesRaw(const std::vector< int > &joints, const std::vector< yarp::dev::InteractionModeEnum > &modes) override
Set the interaction mode of the robot for a set of joints, values can be stiff or compliant.
yarp::dev::ReturnValue getInteractionModeRaw(int j, yarp::dev::InteractionModeEnum &_mode) override
Get the current interaction mode of the robot, values can be stiff or compliant.
yarp::dev::ReturnValue getPosLimitsRaw(int axis, double *min, double *max) override
Get the software limits for a particular axis.
yarp::dev::ReturnValue getRefDutyCycleRaw(int j, double *v) override
Gets the last reference sent using the setRefDutyCycleRaw function.
yarp::dev::ReturnValue setMotorEncoderRaw(int m, const double val) override
Set the value of the motor encoder for a given motor.
yarp::dev::ReturnValue getMotorEncoderSpeedsRaw(double *spds) override
Read the instantaneous speed of all motor encoders.
yarp::dev::ReturnValue getPidOutputRaw(const yarp::dev::PidControlTypeEnum &pidtype, int j, double *out) override
Get the output of the controller (e.g.
yarp::dev::ReturnValue setPidReferenceRaw(const yarp::dev::PidControlTypeEnum &pidtype, int j, double ref) override
Set the controller reference for a given axis.
yarp::dev::ReturnValue getEncoderTimedRaw(int j, double *encs, double *stamp) override
Read the instantaneous acceleration of all axes.
yarp::dev::ReturnValue velocityMoveRaw(int j, double sp) override
Start motion at a given speed, single joint.
yarp::dev::ReturnValue getPidOffsetRaw(const yarp::dev::PidControlTypeEnum &pidtype, int j, double &v) override
Get the currently set offset value for the specified PID controller.
yarp::dev::ReturnValue setTemperatureLimitRaw(int m, const double temp) override
Set the temperature limit for a specific motor.
yarp::dev::ReturnValue getImpedanceRaw(int j, double *stiffness, double *damping) override
Get current impedance parameters (stiffness,damping,offset) for a specific joint.
yarp::dev::ReturnValue setImpedanceRaw(int j, double stiffness, double damping) override
Set current impedance parameters (stiffness,damping) for a specific joint.
yarp::dev::ReturnValue setVelLimitsRaw(int axis, double min, double max) override
Set the software speed limits for a particular axis, the behavior of the control card when these limi...
yarp::dev::ReturnValue isPidEnabledRaw(const yarp::dev::PidControlTypeEnum &pidtype, int j, bool &enabled) override
Get the current status (enabled/disabled) of the PID controller.
yarp::dev::ReturnValue getEncoderAccelerationRaw(int j, double *spds) override
Read the instantaneous acceleration of an axis.
yarp::dev::ReturnValue setPidOffsetRaw(const yarp::dev::PidControlTypeEnum &pidtype, int j, double v) override
Set an offset value for a given controller.
yarp::dev::ReturnValue getInteractionModesRaw(const std::vector< int > &joints, std::vector< yarp::dev::InteractionModeEnum > &modes) override
Get the current interaction mode of the robot for a set of joints, values can be stiff or compliant.
yarp::dev::ReturnValue setAutoBrakeEnabledRaw(int j, bool enabled) override
virtual bool getJointEncoderTypeRaw(int j, int &type)
yarp::dev::ReturnValue getEncoderAccelerationsRaw(double *accs) override
Read the instantaneous acceleration of all axes.
yarp::dev::ReturnValue getTemperatureLimitRaw(int m, double *temp) override
Retrieves the current temperature limit for a specific motor.
yarp::dev::ReturnValue setPositionsRaw(const int n_joint, const int *joints, const double *refs) override
Set new reference point for all axes.
yarp::dev::ReturnValue getMaxCurrentRaw(int j, double *val) override
Returns the maximum electric current allowed for a given motor.
yarp::dev::ReturnValue setTrajSpeedsRaw(const double *spds) override
Set reference speed on all joints.
yarp::dev::ReturnValue setPidFeedforwardRaw(const yarp::dev::PidControlTypeEnum &pidtype, int j, double v) override
Set the feedforward value for the specified PID controller.
yarp::dev::ReturnValue getPidFeedforwardRaw(const yarp::dev::PidControlTypeEnum &pidtype, int j, double &v) override
Get the currently set feedforward value for the specified PID controller.
yarp::dev::ReturnValue getCurrentRangesRaw(double *min, double *max) override
Get the full scale of the current measurements for all motors motor (e.g.
yarp::dev::ReturnValue getTrajSpeedRaw(int j, double *ref) override
Get reference speed for a joint.
bool open(yarp::os::Searchable &par) override
Open the DeviceDriver.
yarp::dev::ReturnValue getImpedanceOffsetRaw(int j, double *offset) override
Get current force Offset for a specific joint.
yarp::dev::ReturnValue resetMotorEncoderRaw(int m) override
Reset motor encoder, single motor.
yarp::dev::ReturnValue getRefCurrentsRaw(double *t) override
Get the reference value of the currents for all motors.
yarp::dev::ReturnValue getVelLimitsRaw(int axis, double *min, double *max) override
Get the software speed limits for a particular axis.
virtual bool getHasHallSensorRaw(int j, int &ret)
yarp::dev::ReturnValue getEncoderSpeedsRaw(double *spds) override
Read the instantaneous acceleration of an axis.
yarp::dev::ReturnValue disablePidRaw(const yarp::dev::PidControlTypeEnum &pidtype, int j) override
Disable the PID computation for a joint.
yarp::dev::ReturnValue getMotorEncoderTimedRaw(int m, double *encs, double *stamp) override
Read the instantaneous position of a motor encoder.
yarp::dev::ReturnValue setPidErrorLimitRaw(const yarp::dev::PidControlTypeEnum &pidtype, int j, double limit) override
Set the error limit for the controller on a specific joint.
yarp::dev::ReturnValue getMotorEncodersTimedRaw(double *encs, double *stamps) override
Read the instantaneous position of all motor encoders.
virtual bool initialised()
yarp::dev::ReturnValue setTrajAccelerationsRaw(const double *accs) override
Set reference acceleration on all joints.
yarp::dev::ReturnValue setMotorEncoderCountsPerRevolutionRaw(int m, const double cpr) override
Sets number of counts per revolution for motor encoder m.
bool threadInit() override
Initialization method.
yarp::dev::ReturnValue calibrateAxisWithParamsRaw(int axis, unsigned int type, double p1, double p2, double p3) override
Start calibration, this method is very often platform specific.
yarp::dev::ReturnValue getRefDutyCyclesRaw(double *v) override
Gets the last reference sent using the setRefDutyCyclesRaw function.
yarp::dev::VAS_status getVirtualAnalogSensorStatusRaw(int ch) override
Check the status of a given channel.
yarp::dev::ReturnValue positionMoveRaw(int j, double ref) override
Set new reference point for a single axis.
yarp::dev::ReturnValue getMotorEncodersRaw(double *encs) override
Read the position of all motor encoders.
yarp::dev::ReturnValue getTorqueRaw(int j, double *t) override
Get the value of the torque on a given joint (this is the feedback if you have a torque sensor).
yarp::dev::ReturnValue getLastJointFaultRaw(int j, int &fault, std::string &message) override
yarp::dev::ReturnValue setRefDutyCycleRaw(int j, double v) override
Sets the reference dutycycle of a single motor.
yarp::dev::ReturnValue setRefTorquesRaw(const double *t) override
Set the reference value of the torque for all joints.
int getVirtualAnalogSensorChannelsRaw() override
Get the number of channels of the virtual sensor.
yarp::dev::ReturnValue setMotorTorqueParamsRaw(int j, const yarp::dev::MotorTorqueParameters params) override
Set the motor parameters.
yarp::dev::ReturnValue getTrajSpeedsRaw(double *spds) override
Get reference speed of all joints.
yarp::dev::ReturnValue getTorqueRangesRaw(double *min, double *max) override
Get the full scale of the torque sensors of all joints.
yarp::dev::ReturnValue setRefDutyCyclesRaw(const double *v) override
Sets the reference dutycycle for all motors.
yarp::dev::ReturnValue resetEncodersRaw() override
Reset encoders.
yarp::dev::ReturnValue getPidReferenceRaw(const yarp::dev::PidControlTypeEnum &pidtype, int j, double *ref) override
Get the current reference of the PID controller for a specific joint.
yarp::dev::ReturnValue getMotorEncoderAccelerationRaw(int m, double *spds) override
Read the instantaneous acceleration of a motor encoder.
yarp::dev::ReturnValue getTorqueRangeRaw(int j, double *min, double *max) override
Get the full scale of the torque sensor of a given joint.
yarp::dev::ReturnValue getMotorTorqueParamsRaw(int j, yarp::dev::MotorTorqueParameters *params) override
Get the motor parameters.
yarp::dev::ReturnValue setRefTorqueRaw(int j, double t) override
Set the reference value of the torque for a given joint.
yarp::dev::ReturnValue setEncoderRaw(int j, double val) override
Set the value of the encoder for a given joint.
bool fromConfig(yarp::os::Searchable &config)
yarp::dev::ReturnValue getPidErrorsRaw(const yarp::dev::PidControlTypeEnum &pidtype, double *errs) override
Get the error of all joints.
yarp::dev::ReturnValue setManualBrakeActiveRaw(int j, bool active) override
yarp::dev::ReturnValue setRefVelocityRaw(int jnt, double vel) override
Set the velocity of single joint.
yarp::dev::ReturnValue getRefTorquesRaw(double *t) override
Get the reference value of the torque for all joints.
yarp::dev::ReturnValue getAmpStatusRaw(int *st) override
yarp::dev::ReturnValue setMotorEncodersRaw(const double *vals) override
Set the value of all motor encoders.
yarp::dev::ReturnValue getRefPositionRaw(const int joint, double *ref) override
Get the last position reference for the specified axis.
yarp::dev::ReturnValue getControlModeRaw(int j, yarp::dev::ControlModeEnum &mode) override
yarp::dev::ReturnValue setPidErrorLimitsRaw(const yarp::dev::PidControlTypeEnum &pidtype, const double *limits) override
Get the error limit for the controller on all joints.
yarp::dev::ReturnValue getTargetVelocityRaw(const int joint, double *ref) override
Get the last reference speed set by velocityMove for single joint.
virtual bool getHasRotorEncoderIndexRaw(int j, int &ret)
bool updateVirtualAnalogSensorMeasureRaw(yarp::sig::Vector &measure) override
Set a vector of torque values for virtual sensor.
yarp::dev::ReturnValue setTrajAccelerationRaw(int j, double acc) override
Set reference acceleration for a joint.
yarp::dev::ReturnValue getPidOutputsRaw(const yarp::dev::PidControlTypeEnum &pidtype, double *outs) override
Get the output of the controllers (e.g.
void resizeBuffers()
Resize previously allocated buffers.
yarp::dev::ReturnValue getGearboxRatioRaw(int m, double *gearbox) override
Get the gearbox ratio for a specific motor.
yarp::dev::ReturnValue isJointBrakedRaw(int j, bool &braked) const override
yarp::dev::ReturnValue getDutyCyclesRaw(double *v) override
Gets the current dutycycle of the output of the amplifier (i.e.
yarp::dev::ReturnValue getTargetPositionsRaw(double *refs) override
Get the last position reference for all axes.
void threadRelease() override
Release method.
yarp::dev::ReturnValue getCurrentsRaw(double *vals) override
yarp::dev::ReturnValue getEncodersRaw(double *encs) override
Read the position of all axes.
yarp::dev::ReturnValue getPidExtraInfosRaw(const yarp::dev::PidControlTypeEnum &pidtype, std::vector< yarp::dev::PidExtraInfo > &units) override
Get PID extra info and measurement units for a specific joint.
virtual bool getMotorPolesRaw(int j, int &poles)
yarp::dev::ReturnValue getTemperaturesRaw(double *vals) override
Get temperature of all the motors.
yarp::dev::ReturnValue getTargetPositionRaw(const int joint, double *ref) override
Get the last position reference for the specified axis.
yarp::dev::ReturnValue getRefVelocityRaw(const int jnt, double &vel) override
Get the last reference velocity set by setRefVelocity() for a single joint.
yarp::dev::ReturnValue getNumberOfMotorsRaw(int *num) override
Get the number of available motors.
yarp::dev::ReturnValue setPidReferencesRaw(const yarp::dev::PidControlTypeEnum &pidtype, const double *refs) override
Set the controller reference, multiple axes.
yarp::dev::ReturnValue getEncoderSpeedRaw(int j, double *sp) override
Read the instantaneous speed of an axis.
yarp::dev::ReturnValue setEncodersRaw(const double *vals) override
Set the value of all encoders.
virtual bool getRotorIndexOffsetRaw(int j, double &rotorOffset)
yarp::dev::ReturnValue setRefCurrentRaw(int j, double t) override
Set the reference value of the current for a single motor.
yarp::dev::ReturnValue getTargetVelocitiesRaw(double *refs) override
Get the last reference speed set by velocityMove for all joints.
yarp::dev::ReturnValue checkMotionDoneRaw(bool &flag) override
Check if the current trajectory all joints is terminated.
yarp::dev::ReturnValue getDutyCycleRaw(int j, double *v) override
Gets the current dutycycle of the output of the amplifier (i.e.
yarp::dev::ReturnValue getMotorEncoderRaw(int m, double *v) override
Read the value of a motor encoder.
yarp::dev::ReturnValue getCurrentImpedanceLimitRaw(int j, double *min_stiff, double *max_stiff, double *min_damp, double *max_damp) override
Get the current impedance limits for a specific joint.
yarp::dev::ReturnValue getRefCurrentRaw(int j, double *t) override
Get the reference value of the current for a single motor.
yarp::dev::ReturnValue getPidRaw(const yarp::dev::PidControlTypeEnum &pidtype, int j, yarp::dev::Pid *pid) override
Get current PID value for a specific joint.
yarp::dev::ReturnValue getAutoBrakeEnabledRaw(int j, bool &enabled) const override
yarp::dev::ReturnValue getPowerSupplyVoltageRaw(int j, double *val) override
yarp::dev::ReturnValue setPWMLimitRaw(int j, const double val) override
virtual bool getKinematicMJRaw(int j, double &rotres)
yarp::dev::ReturnValue getRefTorqueRaw(int j, double *t) override
Set the reference value of the torque for a given joint.
virtual bool getJointEncoderResolutionRaw(int m, double &jntres)
yarp::dev::ReturnValue getPidReferencesRaw(const yarp::dev::PidControlTypeEnum &pidtype, double *refs) override
Get the current reference of all PID controllers.
yarp::dev::ReturnValue disableAmpRaw(int j) override
Disable the amplifier on a specific joint.
yarp::dev::ReturnValue setImpedanceOffsetRaw(int j, double offset) override
Set current force Offset for a specific joint.
yarp::dev::ReturnValue setCalibrationParametersRaw(int axis, const yarp::dev::CalibrationParameters &params) override
Start calibration, this method is very often platform specific.
yarp::dev::ReturnValue resetPidRaw(const yarp::dev::PidControlTypeEnum &pidtype, int j) override
Reset the controller of a given joint, usually sets the current status of the joint as the reference ...
bool alloc(int njoints)
Allocated buffers.
yarp::dev::ReturnValue getNumberOfMotorEncodersRaw(int *num) override
Get the number of available motor encoders.
yarp::dev::ReturnValue setPidRaw(const yarp::dev::PidControlTypeEnum &pidtype, int j, const yarp::dev::Pid &pid) override
Set new PID value for a joint axis.
yarp::dev::ReturnValue getCurrentRaw(int j, double *val) override
yarp::dev::ReturnValue getJointTypeRaw(int axis, yarp::dev::JointTypeEnum &type) override
yarp::dev::ReturnValue setPeakCurrentRaw(int m, const double val) override
virtual bool getRotorEncoderTypeRaw(int j, int &type)
yarp::dev::ReturnValue getEncodersTimedRaw(double *encs, double *stamps) override
Read the instantaneous acceleration of all axes.
yarp::dev::ReturnValue getNominalCurrentRaw(int m, double *val) override
yarp::dev::ReturnValue calibrationDoneRaw(int j) override
Check if the calibration is terminated, on a particular joint.
yarp::dev::ReturnValue getPidErrorRaw(const yarp::dev::PidControlTypeEnum &pidtype, int j, double *err) override
Get the current error for a joint.
yarp::dev::ReturnValue getTrajAccelerationRaw(int j, double *acc) override
Get reference acceleration for a joint.
yarp::dev::ReturnValue resetEncoderRaw(int j) override
Reset encoder, single joint.
yarp::dev::ReturnValue getTemperatureRaw(int m, double *val) override
Get temperature of a motor.
yarp::dev::ReturnValue getPidExtraInfoRaw(const yarp::dev::PidControlTypeEnum &pidtype, int j, yarp::dev::PidExtraInfo &units) override
Get PID extra info and measurement units for a specific joint.
yarp::dev::ReturnValue setPidsRaw(const yarp::dev::PidControlTypeEnum &pidtype, const yarp::dev::Pid *pids) override
Set new PID value on multiple axes.
yarp::dev::ReturnValue setMaxCurrentRaw(int j, double val) override
yarp::dev::ReturnValue setControlModeRaw(int j, yarp::dev::SelectableControlModeEnum mode) override
bool close() override
Close the DeviceDriver.
yarp::dev::ReturnValue relativeMoveRaw(int j, double delta) override
Set relative position.
yarp::dev::ReturnValue getMotorEncoderAccelerationsRaw(double *accs) override
Read the instantaneous acceleration of all motor encoders.
yarp::dev::ReturnValue getMotorEncoderSpeedRaw(int m, double *sp) override
Read the instantaneous speed of a motor encoder.
yarp::dev::ReturnValue resetMotorEncodersRaw() override
Reset motor encoders.
yarp::dev::ReturnValue getCurrentRangeRaw(int j, double *min, double *max) override
Get the full scale of the current measurement for a given motor (e.g.
yarp::dev::ReturnValue getMotorEncoderCountsPerRevolutionRaw(int m, double *v) override
Gets number of counts per revolution for motor encoder m.
yarp::dev::ReturnValue enablePidRaw(const yarp::dev::PidControlTypeEnum &pidtype, int j) override
Enable the PID computation for a joint.
yarp::dev::ReturnValue getRefPositionsRaw(double *refs) override
Get the last position reference for all axes.
yarp::dev::ReturnValue setTrajSpeedRaw(int j, double sp) override
Set reference speed for a joint, this is the speed used during the interpolation of the trajectory.
yarp::dev::ReturnValue getPidErrorLimitRaw(const yarp::dev::PidControlTypeEnum &pidtype, int j, double *limit) override
Get the error limit for the controller on a specific joint.
yarp::dev::ReturnValue setNominalCurrentRaw(int m, const double val) override
yarp::dev::ReturnValue setControlModesRaw(const std::vector< int > &joints, const std::vector< yarp::dev::SelectableControlModeEnum > &modes) override
yarp::dev::ReturnValue setRefCurrentsRaw(const double *t) override
Set the reference value of the currents for all motors.
yarp::dev::ReturnValue getPWMRaw(int j, double *val) override
yarp::dev::ReturnValue setInteractionModeRaw(int j, yarp::dev::InteractionModeEnum _mode) override
Set the interaction mode of the robot, values can be stiff or compliant.
yarp::dev::ReturnValue getTorquesRaw(double *t) override
Get the value of the torque for all joints (this is the feedback if you have torque sensors).
yarp::dev::ReturnValue getAvailableControlModesRaw(int j, std::vector< yarp::dev::SelectableControlModeEnum > &avail) override
yarp::dev::ReturnValue enableAmpRaw(int j) override
Enable the amplifier on a specific joint.
yarp::dev::ReturnValue getPeakCurrentRaw(int m, double *val) override
yarp::dev::ReturnValue getControlModesRaw(const std::vector< int > &joints, std::vector< yarp::dev::ControlModeEnum > &modes) override
yarp::dev::ReturnValue setGearboxRatioRaw(int m, const double val) override
Set the gearbox ratio for a specific motor.
virtual bool getRotorEncoderResolutionRaw(int m, double &rotres)
virtual bool getHasRotorEncoderRaw(int j, int &ret)
yarp::dev::ReturnValue getPidsRaw(const yarp::dev::PidControlTypeEnum &pidtype, yarp::dev::Pid *pids) override
Get current PID value for a specific joint.
yarp::dev::ReturnValue getPWMLimitRaw(int j, double *val) override
yarp::dev::ReturnValue getAxisNameRaw(int axis, std::string &name) override
void run() override
Loop function.
yarp::dev::ReturnValue stopRaw() override
Stop motion, multiple joints.
yarp::dev::ReturnValue getAxes(size_t &ax) override
Get the number of controlled axes.
yarp::dev::ReturnValue getEncoderRaw(int j, double *v) override
Read the value of an encoder.
virtual bool getTorqueControlFilterType(int j, int &type)
yarp::dev::ReturnValue getTrajAccelerationsRaw(double *accs) override
Get reference acceleration of all joints.
yarp::dev::ReturnValue getAvailablePidsRaw(int j, std::vector< yarp::dev::PidControlTypeEnum > &avail) override
Return a list of available pid types mode for the given joint.
yarp::dev::ReturnValue setPositionRaw(int j, double ref) override
Set new position for a single axis.
yarp::dev::ReturnValue getPidErrorLimitsRaw(const yarp::dev::PidControlTypeEnum &pidtype, double *limits) override
Get the error limit for all controllers.
Interface implemented by all device drivers.
Interface for control devices, amplifier commands.
Interface for getting information about specific axes, if available.
Definition IAxisInfo.h:73
Interface for control devices, calibration commands.
Interface for control devices.
Interface for setting control mode in control board.
Interface for control boards implementing current control.
Control board, extend encoder raw interface adding timestamps.
Interface for control boards implementing impedance control.
Interface settings the way the robot interacts with the environment: basic interaction types are Stif...
Interface for controlling a joint equipped with brakes (hardware or simulated).
Definition IJointBrake.h:70
Interface for getting info about the fault which may occur on a robot.
Definition IJointFault.h:36
Control board, encoder interface.
Control board, encoder interface.
Definition IMotor.h:25
Interface for controlling an axis, by sending directly a PWM reference signal to a motor.
Definition IPWMControl.h:85
Interface for a generic control board device implementing a PID controller.
Definition IPidControl.h:31
Interface for a generic control board device implementing position control in encoder coordinates.
Interface for a generic control board device implementing position control in encoder coordinates.
Interface for control boards implementing torque control.
Interface for control boards implementing velocity control in encoder coordinates.
Interface for control boards implementing direct velocity control.
A generic interface to a virtual sensors.
class ImplementControlLimits; class StubImplControlLimitsRaw;
Interface settings the way the robot interacts with the environment: basic interaction types are Stif...
Default implementation of the IPositionControl interface.
Default implementation of the IPositionDirect interface.
Contains the parameters for a PID.
An abstraction for a periodic thread.
A base class for nested structures that can be searched.
Definition Searchable.h:31
SelectableControlModeEnum
PidControlTypeEnum
Definition PidEnums.h:15
ImpedanceLimits limits