YARP
Yet Another Robot Platform
fakeMotionControl.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
3  * All rights reserved.
4  *
5  * This software may be modified and distributed under the terms of the
6  * BSD-3-Clause license. See the accompanying LICENSE file for details.
7  */
8 
9 #ifndef YARP_DEVICE_FAKE_MOTIONCONTROL
10 #define YARP_DEVICE_FAKE_MOTIONCONTROL
11 
12 #include <yarp/os/Time.h>
13 #include <yarp/os/Bottle.h>
14 #include <yarp/sig/Vector.h>
15 #include <yarp/os/PeriodicThread.h>
16 #include <yarp/dev/DeviceDriver.h>
21 
22 #include <mutex>
23 
24 
26 {
27  double min_stiff;
28  double max_stiff;
29  double min_damp;
30  double max_damp;
31  double param_a;
32  double param_b;
33  double param_c;
34 
35 public:
37  {
38  min_stiff=0;
39  max_stiff=0;
40  min_damp=0;
41  max_damp=0;
42  param_a=0;
43  param_b=0;
44  param_c=0;
45  }
46 
47  double get_min_stiff()
48  {
49  return min_stiff;
50  }
51  double get_max_stiff()
52  {
53  return max_stiff;
54  }
55  double get_min_damp()
56  {
57  return min_damp;
58  }
59  double get_max_damp()
60  {
61  return max_damp;
62  }
63 };
64 
66 {
67  double stiffness;
68  double damping;
71 };
72 
88 // public yarp::dev::DeviceResponder,
95  public yarp::dev::IMotorRaw,
126 {
127 private:
128  enum VerboseLevel
129  {
130  MUTE = 0, // only errors that prevent device from working
131  QUIET = 1, // adds errors that can cause malfunctioning
132  DEFAULT = 2, // adds warnings // DEFAULT // show noisy messages about back-compatible changes
133  CHATTY = 3, // adds info messages
134  VERBOSE = 4, // adds debug messages
135  VERY_VERBOSE = 5, // adds trace of events (shows thread running and catch if they get stuck)
136  VERY_VERY_VERBOSE = 6 // adds messages printed every cycle, so too much verbose for usage, only for deep debugging
137  };
138 
139  std::mutex _mutex;
140  int _njoints;
141  int *_axisMap;
142  double *_angleToEncoder;
143  double *_encodersStamp;
144  double *_ampsToSensor;
145  double *_dutycycleToPWM;
146  float *_DEPRECATED_encoderconversionfactor;
147  float *_DEPRECATED_encoderconversionoffset;
148 // uint8_t *_jointEncoderType; /** joint encoder type*/
149  int *_jointEncoderRes;
150  int *_rotorEncoderRes;
151 // uint8_t *_rotorEncoderType; /** rotor encoder type*/
152  double *_gearbox;
153  bool *_hasHallSensor;
154  bool *_hasTempSensor;
155  bool *_hasRotorEncoder;
156  bool *_hasRotorEncoderIndex;
157  int *_rotorIndexOffset;
158  int *_motorPoles;
159  double *_rotorlimits_max;
160  double *_rotorlimits_min;
161  yarp::dev::Pid *_ppids;
162  yarp::dev::Pid *_tpids;
163  yarp::dev::Pid *_cpids;
164  yarp::dev::Pid *_vpids;
165  bool *_ppids_ena;
166  bool *_tpids_ena;
167  bool *_cpids_ena;
168  bool *_vpids_ena;
169  double *_ppids_lim;
170  double *_tpids_lim;
171  double *_cpids_lim;
172  double *_vpids_lim;
173  double *_ppids_ref;
174  double *_tpids_ref;
175  double *_cpids_ref;
176  double *_vpids_ref;
177 
178  std::string *_axisName;
179  yarp::dev::JointTypeEnum *_jointType;
180 // ImpedanceLimits *_impedance_limits; /** impedance limits */
181  double *_limitsMin;
182  double *_limitsMax;
183  double *_kinematic_mj;
184  //double *_currentLimits; /** current limits */
185 // MotorCurrentLimits *_currentLimits;
186  double *_maxJntCmdVelocity;
187  double *_maxMotorVelocity;
188  int *_velocityShifts;
189  int *_velocityTimeout;
190  double *_kbemf;
191  double *_ktau;
192  int *_kbemf_scale;
193  int *_ktau_scale;
194  int * _filterType;
195  int *_torqueSensorId;
196  int *_torqueSensorChan;
197  double *_maxTorque;
198  double *_newtonsToSensor;
199  bool *checking_motiondone; /* flag telling if I'm already waiting for motion done */
200  double *_last_position_move_time;
201  double *_motorPwmLimits;
202  double *_torques;
204 // ImpedanceParameters *_impedance_params; /** impedance parameters */
205 
206  bool verbosewhenok;
207  bool useRawEncoderData;
208  bool _pwmIsLimited;
209  bool _torqueControlEnabled;
211  enum torqueControlUnitsType {T_MACHINE_UNITS=0, T_METRIC_UNITS=1};
212  torqueControlUnitsType _torqueControlUnits;
213 
214  enum positionControlUnitsType {P_MACHINE_UNITS=0, P_METRIC_UNITS=1};
215  positionControlUnitsType _positionControlUnits;
216 
217  // internal stuff
218  int *_controlModes;
219  int *_interactMode;
220  bool *_enabledAmp; // 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.
221  bool *_enabledPid; // 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.
222  bool *_calibrated; // Flag to know if the calibrate function has been called for the joint
223  double *_posCtrl_references; // used for position control.
224  double *_posDir_references; // used for position Direct control.
225  double *_ref_speeds; // used for position control.
226  double *_command_speeds; // used for velocity control.
227  double *_ref_accs; // for velocity control, in position min jerk eq is used.
228  double *_ref_torques; // for torque control.
229  double *_ref_currents;
230  yarp::sig::Vector current, nominalCurrent, maxCurrent, peakCurrent;
231  yarp::sig::Vector pwm, pwmLimit, refpwm, supplyVoltage,last_velocity_command, last_pwm_command;
232  yarp::sig::Vector pos, dpos, vel, speed, acc, loc, amp;
233  double prev_time;
234  bool opened;
235 
236  // debugging
237  VerboseLevel verbose;
238 public:
239 
242 
243  // Device Driver
244  bool open(yarp::os::Searchable &par) override;
245  bool close() override;
246  bool fromConfig(yarp::os::Searchable &config);
247 
248  virtual bool initialised();
249 
253  bool alloc(int njoints);
254 
258  void resizeBuffers();
259 
260  bool threadInit() override;
261  void threadRelease() override;
262 
264  bool setPidRaw(const yarp::dev::PidControlTypeEnum& pidtype,int j, const yarp::dev::Pid &pid) override;
265  bool setPidsRaw(const yarp::dev::PidControlTypeEnum& pidtype,const yarp::dev::Pid *pids) override;
266  bool setPidReferenceRaw(const yarp::dev::PidControlTypeEnum& pidtype,int j, double ref) override;
267  bool setPidReferencesRaw(const yarp::dev::PidControlTypeEnum& pidtype,const double *refs) override;
268  bool setPidErrorLimitRaw(const yarp::dev::PidControlTypeEnum& pidtype,int j, double limit) override;
269  bool setPidErrorLimitsRaw(const yarp::dev::PidControlTypeEnum& pidtype,const double *limits) override;
270  bool getPidErrorRaw(const yarp::dev::PidControlTypeEnum& pidtype,int j, double *err) override;
271  bool getPidErrorsRaw(const yarp::dev::PidControlTypeEnum& pidtype, double *errs) override;
272  bool getPidOutputRaw(const yarp::dev::PidControlTypeEnum& pidtype,int j, double *out) override;
273  bool getPidOutputsRaw(const yarp::dev::PidControlTypeEnum& pidtype,double *outs) override;
274  bool getPidRaw(const yarp::dev::PidControlTypeEnum& pidtype,int j, yarp::dev::Pid *pid) override;
275  bool getPidsRaw(const yarp::dev::PidControlTypeEnum& pidtype, yarp::dev::Pid *pids) override;
276  bool getPidReferenceRaw(const yarp::dev::PidControlTypeEnum& pidtype,int j, double *ref) override;
277  bool getPidReferencesRaw(const yarp::dev::PidControlTypeEnum& pidtype,double *refs) override;
278  bool getPidErrorLimitRaw(const yarp::dev::PidControlTypeEnum& pidtype,int j, double *limit) override;
279  bool getPidErrorLimitsRaw(const yarp::dev::PidControlTypeEnum& pidtype,double *limits) override;
280  bool resetPidRaw(const yarp::dev::PidControlTypeEnum& pidtype,int j) override;
281  bool disablePidRaw(const yarp::dev::PidControlTypeEnum& pidtype,int j) override;
282  bool enablePidRaw(const yarp::dev::PidControlTypeEnum& pidtype,int j) override;
283  bool setPidOffsetRaw(const yarp::dev::PidControlTypeEnum& pidtype,int j, double v) override;
284  bool isPidEnabledRaw(const yarp::dev::PidControlTypeEnum& pidtype, int j, bool* enabled) override;
285 
286  // POSITION CONTROL INTERFACE RAW
287  bool getAxes(int *ax) override;
288  bool positionMoveRaw(int j, double ref) override;
289  bool positionMoveRaw(const double *refs) override;
290  bool relativeMoveRaw(int j, double delta) override;
291  bool relativeMoveRaw(const double *deltas) override;
292  bool checkMotionDoneRaw(bool *flag) override;
293  bool checkMotionDoneRaw(int j, bool *flag) override;
294  bool setRefSpeedRaw(int j, double sp) override;
295  bool setRefSpeedsRaw(const double *spds) override;
296  bool setRefAccelerationRaw(int j, double acc) override;
297  bool setRefAccelerationsRaw(const double *accs) override;
298  bool getRefSpeedRaw(int j, double *ref) override;
299  bool getRefSpeedsRaw(double *spds) override;
300  bool getRefAccelerationRaw(int j, double *acc) override;
301  bool getRefAccelerationsRaw(double *accs) override;
302  bool stopRaw(int j) override;
303  bool stopRaw() override;
304 
305  // Position Control2 Interface
306  bool positionMoveRaw(const int n_joint, const int *joints, const double *refs) override;
307  bool relativeMoveRaw(const int n_joint, const int *joints, const double *deltas) override;
308  bool checkMotionDoneRaw(const int n_joint, const int *joints, bool *flags) override;
309  bool setRefSpeedsRaw(const int n_joint, const int *joints, const double *spds) override;
310  bool setRefAccelerationsRaw(const int n_joint, const int *joints, const double *accs) override;
311  bool getRefSpeedsRaw(const int n_joint, const int *joints, double *spds) override;
312  bool getRefAccelerationsRaw(const int n_joint, const int *joints, double *accs) override;
313  bool stopRaw(const int n_joint, const int *joints) override;
314  bool getTargetPositionRaw(const int joint, double *ref) override;
315  bool getTargetPositionsRaw(double *refs) override;
316  bool getTargetPositionsRaw(const int n_joint, const int *joints, double *refs) override;
317 
318  // Velocity control interface raw
319  bool velocityMoveRaw(int j, double sp) override;
320  bool velocityMoveRaw(const double *sp) override;
321 
322 
323  // calibration2raw
324  bool setCalibrationParametersRaw(int axis, const yarp::dev::CalibrationParameters& params) override;
325  bool calibrateAxisWithParamsRaw(int axis, unsigned int type, double p1, double p2, double p3) override;
326  bool calibrationDoneRaw(int j) override;
327 
328 
330 
331  // ControlMode
332  bool getControlModeRaw(int j, int *v) override;
333  bool getControlModesRaw(int *v) override;
334 
335  // ControlMode 2
336  bool getControlModesRaw(const int n_joint, const int *joints, int *modes) override;
337  bool setControlModeRaw(const int j, const int mode) override;
338  bool setControlModesRaw(const int n_joint, const int *joints, int *modes) override;
339  bool setControlModesRaw(int *modes) override;
340 
342  bool resetEncoderRaw(int j) override;
343  bool resetEncodersRaw() override;
344  bool setEncoderRaw(int j, double val) override;
345  bool setEncodersRaw(const double *vals) override;
346  bool getEncoderRaw(int j, double *v) override;
347  bool getEncodersRaw(double *encs) override;
348  bool getEncoderSpeedRaw(int j, double *sp) override;
349  bool getEncoderSpeedsRaw(double *spds) override;
350  bool getEncoderAccelerationRaw(int j, double *spds) override;
351  bool getEncoderAccelerationsRaw(double *accs) override;
353 
354  bool getEncodersTimedRaw(double *encs, double *stamps) override;
355  bool getEncoderTimedRaw(int j, double *encs, double *stamp) override;
356 
358  bool getNumberOfMotorEncodersRaw(int * num) override;
359  bool resetMotorEncoderRaw(int m) override;
360  bool resetMotorEncodersRaw() override;
361  bool setMotorEncoderRaw(int m, const double val) override;
362  bool setMotorEncodersRaw(const double *vals) override;
363  bool getMotorEncoderRaw(int m, double *v) override;
364  bool getMotorEncodersRaw(double *encs) override;
365  bool getMotorEncoderSpeedRaw(int m, double *sp) override;
366  bool getMotorEncoderSpeedsRaw(double *spds) override;
367  bool getMotorEncoderAccelerationRaw(int m, double *spds) override;
368  bool getMotorEncoderAccelerationsRaw(double *accs) override;
369  bool getMotorEncodersTimedRaw(double *encs, double *stamps) override;
370  bool getMotorEncoderTimedRaw(int m, double *encs, double *stamp) override;\
371  bool getMotorEncoderCountsPerRevolutionRaw(int m, double *v) override;
372  bool setMotorEncoderCountsPerRevolutionRaw(int m, const double cpr) override;
374 
376  bool getAxisNameRaw(int axis, std::string& name) override;
377  bool getJointTypeRaw(int axis, yarp::dev::JointTypeEnum& type) override;
379 
380  //Internal use, not exposed by Yarp (yet)
381  bool getGearboxRatioRaw(int m, double *gearbox) override;
382  virtual bool getRotorEncoderResolutionRaw(int m, double &rotres);
383  virtual bool getJointEncoderResolutionRaw(int m, double &jntres);
384  virtual bool getJointEncoderTypeRaw(int j, int &type);
385  virtual bool getRotorEncoderTypeRaw(int j, int &type);
386  virtual bool getKinematicMJRaw(int j, double &rotres);
387  virtual bool getHasTempSensorsRaw(int j, int& ret);
388  virtual bool getHasHallSensorRaw(int j, int& ret);
389  virtual bool getHasRotorEncoderRaw(int j, int& ret);
390  virtual bool getHasRotorEncoderIndexRaw(int j, int& ret);
391  virtual bool getMotorPolesRaw(int j, int& poles);
392  virtual bool getRotorIndexOffsetRaw(int j, double& rotorOffset);
393  virtual bool getTorqueControlFilterType(int j, int& type);
394 
396  bool enableAmpRaw(int j) override;
397  bool disableAmpRaw(int j) override;
398  bool getCurrentsRaw(double *vals) override;
399  bool getCurrentRaw(int j, double *val) override;
400  bool getNominalCurrentRaw(int m, double *val) override;
401  bool setNominalCurrentRaw(int m, const double val) override;
402  bool setMaxCurrentRaw(int j, double val) override;
403  bool getMaxCurrentRaw(int j, double *val) override;
404  bool getPeakCurrentRaw(int m, double *val) override;
405  bool setPeakCurrentRaw(int m, const double val) override;
406  bool getAmpStatusRaw(int *st) override;
407  bool getAmpStatusRaw(int j, int *st) override;
408  bool getPWMRaw(int j, double* val) override;
409  bool getPWMLimitRaw(int j, double* val) override;
410  bool setPWMLimitRaw(int j, const double val) override;
411  bool getPowerSupplyVoltageRaw(int j, double* val) override;
413 
414  // Limits
415  bool setLimitsRaw(int axis, double min, double max) override;
416  bool getLimitsRaw(int axis, double *min, double *max) override;
417  // Limits 2
418  bool setVelLimitsRaw(int axis, double min, double max) override;
419  bool getVelLimitsRaw(int axis, double *min, double *max) override;
420 
421  // Torque control
422  bool getTorqueRaw(int j, double *t) override;
423  bool getTorquesRaw(double *t) override;
424  bool getTorqueRangeRaw(int j, double *min, double *max) override;
425  bool getTorqueRangesRaw(double *min, double *max) override;
426  bool setRefTorquesRaw(const double *t) override;
427  bool setRefTorqueRaw(int j, double t) override;
428  bool setRefTorquesRaw(const int n_joint, const int *joints, const double *t) override;
429  bool getRefTorquesRaw(double *t) override;
430  bool getRefTorqueRaw(int j, double *t) override;
431  bool getMotorTorqueParamsRaw(int j, yarp::dev::MotorTorqueParameters *params) override;
432  bool setMotorTorqueParamsRaw(int j, const yarp::dev::MotorTorqueParameters params) override;
433 // int32_t getRefSpeedInTbl(uint8_t boardNum, int j, eOmeas_position_t pos) override;
434 
435  // IVelocityControl2
436  bool velocityMoveRaw(const int n_joint, const int *joints, const double *spds) override;
437  bool getRefVelocityRaw(const int joint, double *ref) override;
438  bool getRefVelocitiesRaw(double *refs) override;
439  bool getRefVelocitiesRaw(const int n_joint, const int *joints, double *refs) override;
440 
441  // Impedance interface
442  bool getImpedanceRaw(int j, double *stiffness, double *damping) override;
443  bool setImpedanceRaw(int j, double stiffness, double damping) override;
444  bool setImpedanceOffsetRaw(int j, double offset) override;
445  bool getImpedanceOffsetRaw(int j, double *offset) override;
446  bool getCurrentImpedanceLimitRaw(int j, double *min_stiff, double *max_stiff, double *min_damp, double *max_damp) override;
447 
448  // PositionDirect Interface
449  bool setPositionRaw(int j, double ref) override;
450  bool setPositionsRaw(const int n_joint, const int *joints, const double *refs) override;
451  bool setPositionsRaw(const double *refs) override;
452  bool getRefPositionRaw(const int joint, double *ref) override;
453  bool getRefPositionsRaw(double *refs) override;
454  bool getRefPositionsRaw(const int n_joint, const int *joints, double *refs) override;
455 
456  // InteractionMode interface
457  bool getInteractionModeRaw(int j, yarp::dev::InteractionModeEnum* _mode) override;
458  bool getInteractionModesRaw(int n_joints, int *joints, yarp::dev::InteractionModeEnum* modes) override;
460  bool setInteractionModeRaw(int j, yarp::dev::InteractionModeEnum _mode) override;
461  bool setInteractionModesRaw(int n_joints, int *joints, yarp::dev::InteractionModeEnum* modes) override;
463 
464  // IMotor interface
465  bool getNumberOfMotorsRaw(int * num) override;
466  bool getTemperatureRaw(int m, double* val) override;
467  bool getTemperaturesRaw(double *vals) override;
468  bool getTemperatureLimitRaw(int m, double *temp) override;
469  bool setTemperatureLimitRaw(int m, const double temp) override;
470 
471  // PWM interface
472  bool setRefDutyCycleRaw(int j, double v) override;
473  bool setRefDutyCyclesRaw(const double *v) override;
474  bool getRefDutyCycleRaw(int j, double *v) override;
475  bool getRefDutyCyclesRaw(double *v) override;
476  bool getDutyCycleRaw(int j, double *v) override;
477  bool getDutyCyclesRaw(double *v) override;
478 
479  // Current interface
480  //bool getAxes(int *ax) override;
481  //bool getCurrentRaw(int j, double *t) override;
482  //bool getCurrentsRaw(double *t) override;
483  bool getCurrentRangeRaw(int j, double *min, double *max) override;
484  bool getCurrentRangesRaw(double *min, double *max) override;
485  bool setRefCurrentsRaw(const double *t) override;
486  bool setRefCurrentRaw(int j, double t) override;
487  bool setRefCurrentsRaw(const int n_joint, const int *joints, const double *t) override;
488  bool getRefCurrentsRaw(double *t) override;
489  bool getRefCurrentRaw(int j, double *t) override;
490 
492  int getVirtualAnalogSensorChannelsRaw() override;
494  bool updateVirtualAnalogSensorMeasureRaw(int ch, double &measure) override;
495 
496  void run() override;
497 private:
498  void cleanup();
499  bool dealloc();
500  bool parsePositionPidsGroup(yarp::os::Bottle& pidsGroup, yarp::dev::Pid myPid[]);
501  bool parseTorquePidsGroup(yarp::os::Bottle& pidsGroup, yarp::dev::Pid myPid[], double kbemf[], double ktau[], int filterType[]);
502  bool parseImpedanceGroup_NewFormat(yarp::os::Bottle& pidsGroup, ImpedanceParameters vals[]);
503 
504  bool extractGroup(yarp::os::Bottle &input, yarp::os::Bottle &out, const std::string &key1, const std::string &txt, int size);
505 };
506 
507 #endif // YARP_DEVICE_FAKE_MOTIONCONTROL
yarp::dev::IMotorEncodersRaw
Control board, encoder interface.
Definition: IMotorEncoders.h:28
FakeMotionControl::getHasHallSensorRaw
virtual bool getHasHallSensorRaw(int j, int &ret)
Definition: fakeMotionControl.cpp:2664
FakeMotionControl::getTorqueRangesRaw
bool getTorqueRangesRaw(double *min, double *max) override
Get the full scale of the torque sensors of all joints.
Definition: fakeMotionControl.cpp:2751
FakeMotionControl::getPidRaw
bool getPidRaw(const yarp::dev::PidControlTypeEnum &pidtype, int j, yarp::dev::Pid *pid) override
Get current pid value for a specific joint.
Definition: fakeMotionControl.cpp:1593
yarp::os::Bottle
A simple collection of objects that can be described and transmitted in a portable way.
Definition: Bottle.h:73
FakeMotionControl::setPositionRaw
bool setPositionRaw(int j, double ref) override
Set new position for a single axis.
Definition: fakeMotionControl.cpp:2841
FakeMotionControl::setPidErrorLimitRaw
bool setPidErrorLimitRaw(const yarp::dev::PidControlTypeEnum &pidtype, int j, double limit) override
Set the error limit for the controller on a specific joint.
Definition: fakeMotionControl.cpp:1529
FakeMotionControl::checkMotionDoneRaw
bool checkMotionDoneRaw(bool *flag) override
Check if the current trajectory is terminated.
Definition: fakeMotionControl.cpp:1970
yarp::dev::ImplementMotorEncoders
Definition: ImplementMotorEncoders.h:32
FakeMotionControl::getNominalCurrentRaw
bool getNominalCurrentRaw(int m, double *val) override
Definition: fakeMotionControl.cpp:2574
FakeMotionControl::getMotorEncoderTimedRaw
bool getMotorEncoderTimedRaw(int m, double *encs, double *stamp) override
Read the instantaneous position of a motor encoder.
Definition: fakeMotionControl.cpp:2493
yarp::dev::ImplementCurrentControl
Definition: ImplementCurrentControl.h:33
FakeMotionControl::getEncoderAccelerationRaw
bool getEncoderAccelerationRaw(int j, double *spds) override
Read the instantaneous acceleration of an axis.
Definition: fakeMotionControl.cpp:2355
FakeMotionControl::setEncodersRaw
bool setEncodersRaw(const double *vals) override
Set the value of all encoders.
Definition: fakeMotionControl.cpp:2300
FakeMotionControl::getPidErrorLimitsRaw
bool getPidErrorLimitsRaw(const yarp::dev::PidControlTypeEnum &pidtype, double *limits) override
Get the error limit for all controllers.
Definition: fakeMotionControl.cpp:1686
yarp::os::Searchable
A base class for nested structures that can be searched.
Definition: Searchable.h:69
FakeMotionControl::getRefAccelerationRaw
bool getRefAccelerationRaw(int j, double *acc) override
Get reference acceleration for a joint.
Definition: fakeMotionControl.cpp:2062
FakeMotionControl::getPidErrorRaw
bool getPidErrorRaw(const yarp::dev::PidControlTypeEnum &pidtype, int j, double *err) override
Get the current error for a joint.
Definition: fakeMotionControl.cpp:1561
yarp::dev::ImplementControlMode
Definition: ImplementControlMode.h:33
yarp::dev::ImplementPositionControl
Default implementation of the IPositionControl interface.
Definition: ImplementPositionControl.h:39
ImpedanceLimits::min_stiff
double min_stiff
Definition: fakeMotionControl.h:27
FakeMotionControl::getRefDutyCycleRaw
bool getRefDutyCycleRaw(int j, double *v) override
Gets the last reference sent using the setRefDutyCycleRaw function.
Definition: fakeMotionControl.cpp:3079
yarp::dev::ImplementAmplifierControl
Definition: ImplementAmplifierControl.h:24
Vector.h
contains the definition of a Vector type
FakeMotionControl::setMotorEncodersRaw
bool setMotorEncodersRaw(const double *vals) override
Set the value of all motor encoders.
Definition: fakeMotionControl.cpp:2408
FakeMotionControl::setPidReferenceRaw
bool setPidReferenceRaw(const yarp::dev::PidControlTypeEnum &pidtype, int j, double ref) override
Set the controller reference for a given axis.
Definition: fakeMotionControl.cpp:1497
t
float t
Definition: FfmpegWriter.cpp:74
FakeMotionControl::resetMotorEncodersRaw
bool resetMotorEncodersRaw() override
Reset motor encoders.
Definition: fakeMotionControl.cpp:2428
FakeMotionControl::setRefCurrentRaw
bool setRefCurrentRaw(int j, double t) override
Set the reference value of the current for a single motor.
Definition: fakeMotionControl.cpp:3150
FakeMotionControl::run
void run() override
Loop function.
Definition: fakeMotionControl.cpp:40
FakeMotionControl::getAxes
bool getAxes(int *ax) override
Get the number of controlled axes.
Definition: fakeMotionControl.cpp:1880
FakeMotionControl::getInteractionModeRaw
bool getInteractionModeRaw(int j, yarp::dev::InteractionModeEnum *_mode) override
Get the current interaction mode of the robot, values can be stiff or compliant.
Definition: fakeMotionControl.cpp:2968
yarp::dev::ImplementInteractionMode
Interface settings the way the robot interacts with the environment: basic interaction types are Stif...
Definition: ImplementInteractionMode.h:41
FakeMotionControl::setPidRaw
bool setPidRaw(const yarp::dev::PidControlTypeEnum &pidtype, int j, const yarp::dev::Pid &pid) override
Set new pid value for a joint axis.
Definition: fakeMotionControl.cpp:1464
FakeMotionControl::getAmpStatusRaw
bool getAmpStatusRaw(int *st) override
Definition: fakeMotionControl.cpp:2552
FakeMotionControl::getHasRotorEncoderRaw
virtual bool getHasRotorEncoderRaw(int j, int &ret)
Definition: fakeMotionControl.cpp:2669
FakeMotionControl::setPWMLimitRaw
bool setPWMLimitRaw(int j, const double val) override
Definition: fakeMotionControl.cpp:2598
FakeMotionControl::velocityMoveRaw
bool velocityMoveRaw(int j, double sp) override
Start motion at a given speed, single joint.
Definition: fakeMotionControl.cpp:1827
FakeMotionControl::FakeMotionControl
FakeMotionControl()
Definition: fakeMotionControl.cpp:358
FakeMotionControl::setEncoderRaw
bool setEncoderRaw(int j, double val) override
Set the value of the encoder for a given joint.
Definition: fakeMotionControl.cpp:2295
yarp::dev::MotorTorqueParameters
Definition: ITorqueControl.h:24
FakeMotionControl::getPidErrorLimitRaw
bool getPidErrorLimitRaw(const yarp::dev::PidControlTypeEnum &pidtype, int j, double *limit) override
Get the error limit for the controller on a specific joint.
Definition: fakeMotionControl.cpp:1664
FakeMotionControl::~FakeMotionControl
~FakeMotionControl()
Definition: fakeMotionControl.cpp:463
FakeMotionControl::stopRaw
bool stopRaw() override
Stop motion, multiple joints.
Definition: fakeMotionControl.cpp:2079
FakeMotionControl::enablePidRaw
bool enablePidRaw(const yarp::dev::PidControlTypeEnum &pidtype, int j) override
Enable the pid computation for a joint.
Definition: fakeMotionControl.cpp:1723
FakeMotionControl::resetPidRaw
bool 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 ...
Definition: fakeMotionControl.cpp:1696
yarp::dev::IPWMControlRaw
Interface for controlling an axis, by sending directly a PWM reference signal to a motor.
Definition: IPWMControl.h:88
FakeMotionControl::getCurrentRangeRaw
bool getCurrentRangeRaw(int j, double *min, double *max) override
Get the full scale of the current measurement for a given motor (e.g.
Definition: fakeMotionControl.cpp:3121
FakeMotionControl::getEncoderAccelerationsRaw
bool getEncoderAccelerationsRaw(double *accs) override
Read the instantaneous acceleration of all axes.
Definition: fakeMotionControl.cpp:2363
FakeMotionControl::relativeMoveRaw
bool relativeMoveRaw(int j, double delta) override
Set relative position.
Definition: fakeMotionControl.cpp:1924
yarp::dev::DeviceDriver
Interface implemented by all device drivers.
Definition: DeviceDriver.h:38
ImpedanceLimits::param_a
double param_a
Definition: fakeMotionControl.h:31
FakeMotionControl::threadInit
bool threadInit() override
Initialization method.
Definition: fakeMotionControl.cpp:474
yarp::dev::ImplementPidControl
Definition: ImplementPidControl.h:32
FakeMotionControl::getCurrentRaw
bool getCurrentRaw(int j, double *val) override
Definition: fakeMotionControl.cpp:2516
yarp::dev::ITorqueControlRaw
Interface for control boards implementing torque control.
Definition: ITorqueControl.h:139
ImpedanceParameters::ImpedanceParameters
ImpedanceParameters()
Definition: fakeMotionControl.h:70
FakeMotionControl::getPeakCurrentRaw
bool getPeakCurrentRaw(int m, double *val) override
Definition: fakeMotionControl.cpp:2562
FakeMotionControl::getPidsRaw
bool getPidsRaw(const yarp::dev::PidControlTypeEnum &pidtype, yarp::dev::Pid *pids) override
Get current pid value for a specific joint.
Definition: fakeMotionControl.cpp:1616
FakeMotionControl::getControlModesRaw
bool getControlModesRaw(int *v) override
Definition: fakeMotionControl.cpp:2223
FakeMotionControl::setPidErrorLimitsRaw
bool setPidErrorLimitsRaw(const yarp::dev::PidControlTypeEnum &pidtype, const double *limits) override
Get the error limit for the controller on all joints.
Definition: fakeMotionControl.cpp:1551
FakeMotionControl::resetEncodersRaw
bool resetEncodersRaw() override
Reset encoders.
Definition: fakeMotionControl.cpp:2310
FakeMotionControl::setRefDutyCycleRaw
bool setRefDutyCycleRaw(int j, double v) override
Sets the reference dutycycle of a single motor.
Definition: fakeMotionControl.cpp:3062
yarp::dev::IMotorRaw
Control board, encoder interface.
Definition: IMotor.h:29
yarp::dev::IControlCalibrationRaw
Interface for control devices, calibration commands.
Definition: IControlCalibration.h:48
FakeMotionControl::setControlModesRaw
bool setControlModesRaw(const int n_joint, const int *joints, int *modes) override
Definition: fakeMotionControl.cpp:2266
ret
bool ret
Definition: ImplementAxisInfo.cpp:72
FakeMotionControl::getMotorEncodersRaw
bool getMotorEncodersRaw(double *encs) override
Read the position of all motor encoders.
Definition: fakeMotionControl.cpp:2439
yarp::dev::IVirtualAnalogSensorRaw
A generic interface to a virtual sensors.
Definition: IVirtualAnalogSensor.h:84
FakeMotionControl::getVirtualAnalogSensorChannelsRaw
int getVirtualAnalogSensorChannelsRaw() override
Get the number of channels of the virtual sensor.
Definition: fakeMotionControl.cpp:3192
ControlBoardInterfaces.h
define control board standard interfaces
FakeMotionControl::getMotorPolesRaw
virtual bool getMotorPolesRaw(int j, int &poles)
Definition: fakeMotionControl.cpp:2679
FakeMotionControl::calibrateAxisWithParamsRaw
bool calibrateAxisWithParamsRaw(int axis, unsigned int type, double p1, double p2, double p3) override
Start calibration, this method is very often platform specific.
Definition: fakeMotionControl.cpp:1863
FakeMotionControl::getTemperaturesRaw
bool getTemperaturesRaw(double *vals) override
Get temperature of all the motors.
Definition: fakeMotionControl.cpp:3041
FakeMotionControl::getRotorEncoderTypeRaw
virtual bool getRotorEncoderTypeRaw(int j, int &type)
Definition: fakeMotionControl.cpp:2648
FakeMotionControl::disableAmpRaw
bool disableAmpRaw(int j) override
Disable the amplifier on a specific joint.
Definition: fakeMotionControl.cpp:2511
FakeMotionControl::setImpedanceRaw
bool setImpedanceRaw(int j, double stiffness, double damping) override
Set current impedance parameters (stiffness,damping) for a specific joint.
Definition: fakeMotionControl.cpp:2789
FakeMotionControl::getNumberOfMotorEncodersRaw
bool getNumberOfMotorEncodersRaw(int *num) override
Get the number of available motor encoders.
Definition: fakeMotionControl.cpp:2397
ImpedanceParameters
Definition: fakeMotionControl.h:66
FakeMotionControl::getEncoderRaw
bool getEncoderRaw(int j, double *v) override
Read the value of an encoder.
Definition: fakeMotionControl.cpp:2315
FakeMotionControl::setLimitsRaw
bool setLimitsRaw(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...
Definition: fakeMotionControl.cpp:2612
FakeMotionControl::initialised
virtual bool initialised()
Definition: fakeMotionControl.cpp:469
FakeMotionControl::getRotorEncoderResolutionRaw
virtual bool getRotorEncoderResolutionRaw(int m, double &rotres)
Definition: fakeMotionControl.cpp:2633
ImpedanceLimits::get_max_damp
double get_max_damp()
Definition: fakeMotionControl.h:59
FakeMotionControl::setMotorEncoderCountsPerRevolutionRaw
bool setMotorEncoderCountsPerRevolutionRaw(int m, const double cpr) override
Sets number of counts per revolution for motor encoder m.
Definition: fakeMotionControl.cpp:2413
FakeMotionControl::getTemperatureLimitRaw
bool getTemperatureLimitRaw(int m, double *temp) override
Retreives the current temperature limit for a specific motor.
Definition: fakeMotionControl.cpp:3051
FakeMotionControl::getNumberOfMotorsRaw
bool getNumberOfMotorsRaw(int *num) override
Retrieves the number of controlled motors from the current physical interface.
Definition: fakeMotionControl.cpp:3030
yarp::dev::IImpedanceControlRaw
Interface for control boards implementing impedance control.
Definition: IImpedanceControl.h:28
FakeMotionControl::setInteractionModesRaw
bool setInteractionModesRaw(int n_joints, int *joints, yarp::dev::InteractionModeEnum *modes) override
Set the interaction mode of the robot for a set of joints, values can be stiff or compliant.
Definition: fakeMotionControl.cpp:3009
FakeMotionControl::getHasTempSensorsRaw
virtual bool getHasTempSensorsRaw(int j, int &ret)
Definition: fakeMotionControl.cpp:2659
yarp::sig::VectorOf< double >
FakeMotionControl::getPidErrorsRaw
bool getPidErrorsRaw(const yarp::dev::PidControlTypeEnum &pidtype, double *errs) override
Get the error of all joints.
Definition: fakeMotionControl.cpp:1583
ImplementVirtualAnalogSensor.h
yarp::dev::ICurrentControlRaw
Interface for control boards implementing current control.
Definition: ICurrentControl.h:114
yarp::dev::ImplementAxisInfo
Definition: ImplementAxisInfo.h:21
FakeMotionControl::getHasRotorEncoderIndexRaw
virtual bool getHasRotorEncoderIndexRaw(int j, int &ret)
Definition: fakeMotionControl.cpp:2674
yarp::dev::IInteractionModeRaw
Interface settings the way the robot interacts with the environment: basic interaction types are Stif...
Definition: IInteractionMode.h:122
yarp::dev::IControlModeRaw
Interface for setting control mode in control board.
Definition: IControlMode.h:104
FakeMotionControl::getRefTorqueRaw
bool getRefTorqueRaw(int j, double *t) override
Set the reference value of the torque for a given joint.
Definition: fakeMotionControl.cpp:2779
FakeMotionControl::getImpedanceRaw
bool getImpedanceRaw(int j, double *stiffness, double *damping) override
Get current impedance parameters (stiffness,damping,offset) for a specific joint.
Definition: fakeMotionControl.cpp:2784
FakeMotionControl::getJointTypeRaw
bool getJointTypeRaw(int axis, yarp::dev::JointTypeEnum &type) override
Definition: fakeMotionControl.cpp:2703
FakeMotionControl::getDutyCycleRaw
bool getDutyCycleRaw(int j, double *v) override
Gets the current dutycycle of the output of the amplifier (i.e.
Definition: fakeMotionControl.cpp:3094
FakeMotionControl::getRefAccelerationsRaw
bool getRefAccelerationsRaw(double *accs) override
Get reference acceleration of all joints.
Definition: fakeMotionControl.cpp:2068
FakeMotionControl::setInteractionModeRaw
bool setInteractionModeRaw(int j, yarp::dev::InteractionModeEnum _mode) override
Set the interaction mode of the robot, values can be stiff or compliant.
Definition: fakeMotionControl.cpp:2998
yarp::dev::ImplementVirtualAnalogSensor
Definition: ImplementVirtualAnalogSensor.h:24
ImpedanceLimits::param_c
double param_c
Definition: fakeMotionControl.h:33
FakeMotionControl::setPeakCurrentRaw
bool setPeakCurrentRaw(int m, const double val) override
Definition: fakeMotionControl.cpp:2568
FakeMotionControl::setRefSpeedRaw
bool setRefSpeedRaw(int j, double sp) override
Set reference speed for a joint, this is the speed used during the interpolation of the trajectory.
Definition: fakeMotionControl.cpp:1987
FakeMotionControl::updateVirtualAnalogSensorMeasureRaw
bool updateVirtualAnalogSensorMeasureRaw(yarp::sig::Vector &measure) override
Set a vector of torque values for virtual sensor.
Definition: fakeMotionControl.cpp:3197
yarp::dev::ImplementEncodersTimed
Definition: ImplementEncodersTimed.h:32
FakeMotionControl::resetMotorEncoderRaw
bool resetMotorEncoderRaw(int m) override
Reset motor encoder, single motor.
Definition: fakeMotionControl.cpp:2423
ImpedanceLimits::min_damp
double min_damp
Definition: fakeMotionControl.h:29
FakeMotionControl::getTemperatureRaw
bool getTemperatureRaw(int m, double *val) override
Get temperature of a motor.
Definition: fakeMotionControl.cpp:3036
FakeMotionControl::getPidOutputRaw
bool getPidOutputRaw(const yarp::dev::PidControlTypeEnum &pidtype, int j, double *out) override
Get the output of the controller (e.g.
Definition: fakeMotionControl.cpp:1790
yarp::dev::PidControlTypeEnum
PidControlTypeEnum
Definition: PidEnums.h:21
ImpedanceLimits::get_min_damp
double get_min_damp()
Definition: fakeMotionControl.h:55
FakeMotionControl::setControlModeRaw
bool setControlModeRaw(const int j, const int mode) override
Definition: fakeMotionControl.cpp:2248
FakeMotionControl::getEncoderTimedRaw
bool getEncoderTimedRaw(int j, double *encs, double *stamp) override
Read the instantaneous acceleration of all axes.
Definition: fakeMotionControl.cpp:2385
FakeMotionControl::fromConfig
bool fromConfig(yarp::os::Searchable &config)
Definition: fakeMotionControl.cpp:854
FakeMotionControl::close
bool close() override
Close the DeviceDriver.
Definition: fakeMotionControl.cpp:1430
yarp::dev::ImplementImpedanceControl
Definition: ImplementImpedanceControl.h:22
FakeMotionControl::setRefAccelerationRaw
bool setRefAccelerationRaw(int j, double acc) override
Set reference acceleration for a joint.
Definition: fakeMotionControl.cpp:2007
FakeMotionControl::getMotorEncoderAccelerationRaw
bool getMotorEncoderAccelerationRaw(int m, double *spds) override
Read the instantaneous acceleration of a motor encoder.
Definition: fakeMotionControl.cpp:2466
yarp::dev::ImplementPWMControl
Definition: ImplementPWMControl.h:35
yarp::dev::IPositionDirectRaw
Interface for a generic control board device implementing position control in encoder coordinates.
Definition: IPositionDirect.h:118
yarp::dev::InteractionModeEnum
InteractionModeEnum
Definition: IInteractionMode.h:21
yarp::dev::ImplementControlCalibration::temp
double * temp
Definition: ImplementControlCalibration.h:28
FakeMotionControl::getTargetPositionsRaw
bool getTargetPositionsRaw(double *refs) override
Get the last position reference for all axes.
Definition: fakeMotionControl.cpp:2884
FakeMotionControl::isPidEnabledRaw
bool isPidEnabledRaw(const yarp::dev::PidControlTypeEnum &pidtype, int j, bool *enabled) override
Get the current status (enabled/disabled) of the pid controller.
Definition: fakeMotionControl.cpp:1768
FakeMotionControl::positionMoveRaw
bool positionMoveRaw(int j, double ref) override
Set new reference point for a single axis.
Definition: fakeMotionControl.cpp:1887
FakeMotionControl::setPidOffsetRaw
bool setPidOffsetRaw(const yarp::dev::PidControlTypeEnum &pidtype, int j, double v) override
Set an offset value on the ourput of pid controller.
Definition: fakeMotionControl.cpp:1745
FakeMotionControl::setPidReferencesRaw
bool setPidReferencesRaw(const yarp::dev::PidControlTypeEnum &pidtype, const double *refs) override
Set the controller reference, multiple axes.
Definition: fakeMotionControl.cpp:1519
FakeMotionControl::getGearboxRatioRaw
bool getGearboxRatioRaw(int m, double *gearbox) override
Get the gearbox ratio for a specific motor.
Definition: fakeMotionControl.cpp:2623
FakeMotionControl::setCalibrationParametersRaw
bool setCalibrationParametersRaw(int axis, const yarp::dev::CalibrationParameters &params) override
Start calibration, this method is very often platform specific.
Definition: fakeMotionControl.cpp:1857
FakeMotionControl::setPidsRaw
bool setPidsRaw(const yarp::dev::PidControlTypeEnum &pidtype, const yarp::dev::Pid *pids) override
Set new pid value on multiple axes.
Definition: fakeMotionControl.cpp:1487
FakeMotionControl::getPidReferencesRaw
bool getPidReferencesRaw(const yarp::dev::PidControlTypeEnum &pidtype, double *refs) override
Get the current reference of all pid controllers.
Definition: fakeMotionControl.cpp:1651
FakeMotionControl::getRefCurrentsRaw
bool getRefCurrentsRaw(double *t) override
Get the reference value of the currents for all motors.
Definition: fakeMotionControl.cpp:3167
FakeMotionControl::getAxisNameRaw
bool getAxisNameRaw(int axis, std::string &name) override
Definition: fakeMotionControl.cpp:2689
FakeMotionControl::getRefDutyCyclesRaw
bool getRefDutyCyclesRaw(double *v) override
Gets the last reference sent using the setRefDutyCyclesRaw function.
Definition: fakeMotionControl.cpp:3085
FakeMotionControl::getEncodersTimedRaw
bool getEncodersTimedRaw(double *encs, double *stamps) override
Read the instantaneous acceleration of all axes.
Definition: fakeMotionControl.cpp:2375
FakeMotionControl::setMotorTorqueParamsRaw
bool setMotorTorqueParamsRaw(int j, const yarp::dev::MotorTorqueParameters params) override
Set the motor parameters.
Definition: fakeMotionControl.cpp:2819
FakeMotionControl::getImpedanceOffsetRaw
bool getImpedanceOffsetRaw(int j, double *offset) override
Get current force Offset for a specific joint.
Definition: fakeMotionControl.cpp:2799
ImpedanceLimits::ImpedanceLimits
ImpedanceLimits()
Definition: fakeMotionControl.h:36
yarp::dev::ImplementMotor
Definition: ImplementMotor.h:33
yarp::dev::IPidControlRaw
Interface for a generic control board device implementing a PID controller.
Definition: IPidControl.h:32
FakeMotionControl::getJointEncoderResolutionRaw
virtual bool getJointEncoderResolutionRaw(int m, double &jntres)
Definition: fakeMotionControl.cpp:2638
FakeMotionControl::getMotorEncoderSpeedsRaw
bool getMotorEncoderSpeedsRaw(double *spds) override
Read the instantaneous speed of all motor encoders.
Definition: fakeMotionControl.cpp:2456
ImpedanceLimits::max_damp
double max_damp
Definition: fakeMotionControl.h:30
FakeMotionControl::getRefVelocitiesRaw
bool getRefVelocitiesRaw(double *refs) override
Get the last reference speed set by velocityMove for all joints.
Definition: fakeMotionControl.cpp:2908
yarp::os::PeriodicThread
An abstraction for a periodic thread.
Definition: PeriodicThread.h:25
yarp::dev::IControlLimitsRaw
Interface for control devices.
Definition: IControlLimits.h:83
ImpedanceLimits::get_max_stiff
double get_max_stiff()
Definition: fakeMotionControl.h:51
ImpedanceLimits::max_stiff
double max_stiff
Definition: fakeMotionControl.h:28
FakeMotionControl::alloc
bool alloc(int njoints)
Allocated buffers.
Definition: fakeMotionControl.cpp:191
FakeMotionControl::getMotorEncoderRaw
bool getMotorEncoderRaw(int m, double *v) override
Read the value of a motor encoder.
Definition: fakeMotionControl.cpp:2433
PeriodicThread.h
FakeMotionControl::setRefDutyCyclesRaw
bool setRefDutyCyclesRaw(const double *v) override
Sets the reference dutycycle for all motors.
Definition: fakeMotionControl.cpp:3070
FakeMotionControl::setRefTorqueRaw
bool setRefTorqueRaw(int j, double t) override
Set the reference value of the torque for a given joint.
Definition: fakeMotionControl.cpp:2764
FakeMotionControl::getMotorEncoderSpeedRaw
bool getMotorEncoderSpeedRaw(int m, double *sp) override
Read the istantaneous speed of a motor encoder.
Definition: fakeMotionControl.cpp:2450
FakeMotionControl::setVelLimitsRaw
bool 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...
Definition: fakeMotionControl.cpp:2717
FakeMotionControl::getRefPositionsRaw
bool getRefPositionsRaw(double *refs) override
Get the last position reference for all axes.
Definition: fakeMotionControl.cpp:2946
FakeMotionControl::getTargetPositionRaw
bool getTargetPositionRaw(const int joint, double *ref) override
Get the last position reference for the specified axis.
Definition: fakeMotionControl.cpp:2866
yarp::dev::VAS_status
VAS_status
Definition: IVirtualAnalogSensor.h:31
FakeMotionControl::getMaxCurrentRaw
bool getMaxCurrentRaw(int j, double *val) override
Returns the maximum electric current allowed for a given motor.
Definition: fakeMotionControl.cpp:2540
FakeMotionControl::getLimitsRaw
bool getLimitsRaw(int axis, double *min, double *max) override
Get the software limits for a particular axis.
Definition: fakeMotionControl.cpp:2618
FakeMotionControl::resetEncoderRaw
bool resetEncoderRaw(int j) override
Reset encoder, single joint.
Definition: fakeMotionControl.cpp:2305
yarp::dev::IEncodersTimedRaw
Control board, extend encoder raw interface adding timestamps.
Definition: IEncodersTimed.h:28
FakeMotionControl::getRotorIndexOffsetRaw
virtual bool getRotorIndexOffsetRaw(int j, double &rotorOffset)
Definition: fakeMotionControl.cpp:2684
FakeMotionControl::getTorqueRaw
bool 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).
Definition: fakeMotionControl.cpp:2731
FakeMotionControl::getEncoderSpeedsRaw
bool getEncoderSpeedsRaw(double *spds) override
Read the instantaneous acceleration of an axis.
Definition: fakeMotionControl.cpp:2345
FakeMotionControl::getPWMRaw
bool getPWMRaw(int j, double *val) override
Definition: fakeMotionControl.cpp:2586
FakeMotionControl::getVelLimitsRaw
bool getVelLimitsRaw(int axis, double *min, double *max) override
Get the software speed limits for a particular axis.
Definition: fakeMotionControl.cpp:2722
ImpedanceLimits
Definition: fakeMotionControl.h:26
ImpedanceParameters::stiffness
double stiffness
Definition: fakeMotionControl.h:67
FakeMotionControl::setRefCurrentsRaw
bool setRefCurrentsRaw(const double *t) override
Set the reference value of the currents for all motors.
Definition: fakeMotionControl.cpp:3140
FakeMotionControl::enableAmpRaw
bool enableAmpRaw(int j) override
Enable the amplifier on a specific joint.
Definition: fakeMotionControl.cpp:2506
yarp::dev::ImplementVelocityControl
Definition: ImplementVelocityControl.h:35
ImpedanceLimits::param_b
double param_b
Definition: fakeMotionControl.h:32
ImpedanceLimits::get_min_stiff
double get_min_stiff()
Definition: fakeMotionControl.h:47
FakeMotionControl::getKinematicMJRaw
virtual bool getKinematicMJRaw(int j, double &rotres)
Definition: fakeMotionControl.cpp:2653
FakeMotionControl::setMaxCurrentRaw
bool setMaxCurrentRaw(int j, double val) override
Definition: fakeMotionControl.cpp:2534
yarp::dev::IAxisInfoRaw
Interface for getting information about specific axes, if available.
Definition: IAxisInfo.h:69
FakeMotionControl::getJointEncoderTypeRaw
virtual bool getJointEncoderTypeRaw(int j, int &type)
Definition: fakeMotionControl.cpp:2643
yarp::dev::IPositionControlRaw
Interface for a generic control board device implementing position control in encoder coordinates.
Definition: IPositionControl.h:30
FakeMotionControl::getRefVelocityRaw
bool getRefVelocityRaw(const int joint, double *ref) override
Get the last reference speed set by velocityMove for single joint.
Definition: fakeMotionControl.cpp:2902
yarp::dev::ImplementControlLimits
class ImplementControlLimits; class StubImplControlLimitsRaw;
Definition: ImplementControlLimits.h:29
ControlBoardInterfacesImpl.h
FakeMotionControl::getEncodersRaw
bool getEncodersRaw(double *encs) override
Read the position of all axes.
Definition: fakeMotionControl.cpp:2326
FakeMotionControl
fakeMotionControl: Documentation to be added
Definition: fakeMotionControl.h:126
ImpedanceParameters::limits
ImpedanceLimits limits
Definition: fakeMotionControl.h:69
FakeMotionControl::calibrationDoneRaw
bool calibrationDoneRaw(int j) override
Check if the calibration is terminated, on a particular joint.
Definition: fakeMotionControl.cpp:1869
FakeMotionControl::getPidReferenceRaw
bool getPidReferenceRaw(const yarp::dev::PidControlTypeEnum &pidtype, int j, double *ref) override
Get the current reference of the pid controller for a specific joint.
Definition: fakeMotionControl.cpp:1629
FakeMotionControl::getRefSpeedsRaw
bool getRefSpeedsRaw(double *spds) override
Get reference speed of all joints.
Definition: fakeMotionControl.cpp:2056
FakeMotionControl::setRefSpeedsRaw
bool setRefSpeedsRaw(const double *spds) override
Set reference speed on all joints.
Definition: fakeMotionControl.cpp:1996
FakeMotionControl::setTemperatureLimitRaw
bool setTemperatureLimitRaw(int m, const double temp) override
Set the temperature limit for a specific motor.
Definition: fakeMotionControl.cpp:3056
yarp::dev::ImplementControlCalibration
Definition: ImplementControlCalibration.h:24
FakeMotionControl::setRefTorquesRaw
bool setRefTorquesRaw(const double *t) override
Set the reference value of the torque for all joints.
Definition: fakeMotionControl.cpp:2756
yarp::dev::Pid
Contains the parameters for a PID.
Definition: ControlBoardPid.h:29
FakeMotionControl::getInteractionModesRaw
bool getInteractionModesRaw(int n_joints, int *joints, yarp::dev::InteractionModeEnum *modes) override
Get the current interaction mode of the robot for a set of joints, values can be stiff or compliant.
Definition: fakeMotionControl.cpp:2976
Time.h
FakeMotionControl::getRefTorquesRaw
bool getRefTorquesRaw(double *t) override
Get the reference value of the torque for all joints.
Definition: fakeMotionControl.cpp:2774
yarp::dev::CalibrationParameters
Definition: IControlCalibration.h:32
FakeMotionControl::getDutyCyclesRaw
bool getDutyCyclesRaw(double *v) override
Gets the current dutycycle of the output of the amplifier (i.e.
Definition: fakeMotionControl.cpp:3100
FakeMotionControl::getTorqueControlFilterType
virtual bool getTorqueControlFilterType(int j, int &type)
Definition: fakeMotionControl.cpp:2628
FakeMotionControl::getControlModeRaw
bool getControlModeRaw(int j, int *v) override
Definition: fakeMotionControl.cpp:2213
yarp::dev::ImplementTorqueControl
Definition: ImplementTorqueControl.h:33
FakeMotionControl::getMotorEncoderCountsPerRevolutionRaw
bool getMotorEncoderCountsPerRevolutionRaw(int m, double *v) override
Gets number of counts per revolution for motor encoder m.
Definition: fakeMotionControl.cpp:2418
FakeMotionControl::getCurrentRangesRaw
bool getCurrentRangesRaw(double *min, double *max) override
Get the full scale of the current measurements for all motors motor (e.g.
Definition: fakeMotionControl.cpp:3129
FakeMotionControl::getMotorEncoderAccelerationsRaw
bool getMotorEncoderAccelerationsRaw(double *accs) override
Read the instantaneous acceleration of all motor encoders.
Definition: fakeMotionControl.cpp:2472
yarp::dev::IVelocityControlRaw
Interface for control boards implementig velocity control in encoder coordinates.
Definition: IVelocityControl.h:29
FakeMotionControl::getVirtualAnalogSensorStatusRaw
yarp::dev::VAS_status getVirtualAnalogSensorStatusRaw(int ch) override
Check the status of a given channel.
Definition: fakeMotionControl.cpp:3187
FakeMotionControl::getEncoderSpeedRaw
bool getEncoderSpeedRaw(int j, double *sp) override
Read the instantaneous speed of an axis.
Definition: fakeMotionControl.cpp:2338
FakeMotionControl::getTorqueRangeRaw
bool getTorqueRangeRaw(int j, double *min, double *max) override
Get the full scale of the torque sensor of a given joint.
Definition: fakeMotionControl.cpp:2746
yarp::dev::IAmplifierControlRaw
Interface for control devices, amplifier commands.
Definition: IAmplifierControl.h:179
FakeMotionControl::open
bool open(yarp::os::Searchable &par) override
Open the DeviceDriver.
Definition: fakeMotionControl.cpp:499
IVirtualAnalogSensor.h
virtual analog sensor interface
FakeMotionControl::getCurrentImpedanceLimitRaw
bool getCurrentImpedanceLimitRaw(int j, double *min_stiff, double *max_stiff, double *min_damp, double *max_damp) override
Get the current impedandance limits for a specific joint.
Definition: fakeMotionControl.cpp:2804
FakeMotionControl::getTorquesRaw
bool getTorquesRaw(double *t) override
Get the value of the torque for all joints (this is the feedback if you have torque sensors).
Definition: fakeMotionControl.cpp:2737
FakeMotionControl::getRefCurrentRaw
bool getRefCurrentRaw(int j, double *t) override
Get the reference value of the current for a single motor.
Definition: fakeMotionControl.cpp:3176
FakeMotionControl::getRefPositionRaw
bool getRefPositionRaw(const int joint, double *ref) override
Get the last position reference for the specified axis.
Definition: fakeMotionControl.cpp:2928
FakeMotionControl::getPowerSupplyVoltageRaw
bool getPowerSupplyVoltageRaw(int j, double *val) override
Definition: fakeMotionControl.cpp:2604
FakeMotionControl::setPositionsRaw
bool setPositionsRaw(const int n_joint, const int *joints, const double *refs) override
Set new reference point for all axes.
Definition: fakeMotionControl.cpp:2847
FakeMotionControl::setRefAccelerationsRaw
bool setRefAccelerationsRaw(const double *accs) override
Set reference acceleration on all joints.
Definition: fakeMotionControl.cpp:2028
FakeMotionControl::setImpedanceOffsetRaw
bool setImpedanceOffsetRaw(int j, double offset) override
Set current force Offset for a specific joint.
Definition: fakeMotionControl.cpp:2794
FakeMotionControl::getMotorEncodersTimedRaw
bool getMotorEncodersTimedRaw(double *encs, double *stamps) override
Read the instantaneous position of all motor encoders.
Definition: fakeMotionControl.cpp:2482
FakeMotionControl::disablePidRaw
bool disablePidRaw(const yarp::dev::PidControlTypeEnum &pidtype, int j) override
Disable the pid computation for a joint.
Definition: fakeMotionControl.cpp:1701
FakeMotionControl::threadRelease
void threadRelease() override
Release method.
Definition: fakeMotionControl.cpp:495
FakeMotionControl::getPidOutputsRaw
bool getPidOutputsRaw(const yarp::dev::PidControlTypeEnum &pidtype, double *outs) override
Get the output of the controllers (e.g.
Definition: fakeMotionControl.cpp:1813
yarp::dev::ImplementPositionDirect
Default implementation of the IPositionDirect interface.
Definition: ImplementPositionDirect.h:39
FakeMotionControl::setNominalCurrentRaw
bool setNominalCurrentRaw(int m, const double val) override
Definition: fakeMotionControl.cpp:2580
FakeMotionControl::getCurrentsRaw
bool getCurrentsRaw(double *vals) override
Definition: fakeMotionControl.cpp:2523
yarp::dev::JointTypeEnum
JointTypeEnum
Definition: IAxisInfo.h:29
FakeMotionControl::resizeBuffers
void resizeBuffers()
Resize previously allocated buffers.
Definition: fakeMotionControl.cpp:151
FakeMotionControl::getRefSpeedRaw
bool getRefSpeedRaw(int j, double *ref) override
Get reference speed for a joint.
Definition: fakeMotionControl.cpp:2050
FakeMotionControl::getMotorTorqueParamsRaw
bool getMotorTorqueParamsRaw(int j, yarp::dev::MotorTorqueParameters *params) override
Get the motor parameters.
Definition: fakeMotionControl.cpp:2809
Bottle.h
FakeMotionControl::getPWMLimitRaw
bool getPWMLimitRaw(int j, double *val) override
Definition: fakeMotionControl.cpp:2592
DeviceDriver.h
FakeMotionControl::setMotorEncoderRaw
bool setMotorEncoderRaw(int m, const double val) override
Set the value of the motor encoder for a given motor.
Definition: fakeMotionControl.cpp:2403
ImpedanceParameters::damping
double damping
Definition: fakeMotionControl.h:68