YARP
Yet Another Robot Platform
RemoteControlBoard.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
3  * Copyright (C) 2006-2010 RobotCub Consortium
4  * All rights reserved.
5  *
6  * This software may be modified and distributed under the terms of the
7  * BSD-3-Clause license. See the accompanying LICENSE file for details.
8  */
9 
10 #ifndef YARP_DEV_REMOTECONTROLBOARD_REMOTECONTROLBOARD_H
11 #define YARP_DEV_REMOTECONTROLBOARD_REMOTECONTROLBOARD_H
12 
13 #include <yarp/sig/Vector.h>
14 
15 #include <yarp/dev/IPidControl.h>
20 #include <yarp/dev/IMotor.h>
23 #include <yarp/dev/IAxisInfo.h>
28 #include <yarp/dev/IControlMode.h>
29 #include <yarp/dev/DeviceDriver.h>
34 #include <yarp/dev/IPWMControl.h>
37 
38 #include "stateExtendedReader.h"
39 
41 {
42  int major{0};
43  int minor{0};
44  int tweak{0};
45 };
46 
47 class DiagnosticThread;
48 
49 
73  public yarp::dev::IMotor,
76  public yarp::dev::IAxisInfo,
89 {
90 protected:
94 
99 
100  // Buffer associated to the extendedOutputStatePort port; in this case we will use the type generated
101  // from the YARP .thrift file
102 // yarp::os::PortReaderBuffer<jointData> extendedInputState_buffer; // Buffer storing new data
103  StateExtendedInputPort extendedIntputStatePort; // Buffered port storing new data
104  std::mutex extendedPortMutex;
105  yarp::dev::impl::jointData last_singleJoint; // tmp to store last received data for a particular joint
106 // yarp::os::Port extendedIntputStatePort; // Port /stateExt:i reading the state of the joints
107  yarp::dev::impl::jointData last_wholePart; // tmp to store last received data for whole part
108 
109  std::string remote;
110  std::string local;
111  mutable Stamp lastStamp; //this is shared among all calls that read encoders
112  size_t nj{0};
113  bool njIsKnown{false};
114 
116 
117  // Check for number of joints, if needed.
118  // This is to allow for delayed connection to the remote control board.
119  bool isLive();
120 
121  bool checkProtocolVersion(bool ignore);
122 
123  bool send1V(int v);
124  bool send2V(int v1, int v2);
125  bool send2V1I(int v1, int v2, int axis);
126  bool send1V1I(int v, int axis);
127  bool send3V1I(int v1, int v2, int v3, int j);
128 
134  bool set1V(int code);
135 
143  bool set1V2D(int code, double v);
144 
152  bool set1V1I(int code, int v);
153 
160  bool get1V1D(int code, double& v) const;
161 
168  bool get1V1I(int code, int& v) const;
169 
177  bool set1V1I1D(int code, int j, double val);
178 
179  bool set1V1I2D(int code, int j, double val1, double val2);
180 
187  bool set1VDA(int v, const double *val);
188  bool set2V1DA(int v1, int v2, const double *val);
189  bool set2V2DA(int v1, int v2, const double *val1, const double *val2);
190  bool set1V1I1IA1DA(int v, const int len, const int *val1, const double *val2);
191  bool set2V1I1D(int v1, int v2, int axis, double val);
192  bool setValWithPidType(int voc, PidControlTypeEnum type, int axis, double val);
193  bool setValWithPidType(int voc, PidControlTypeEnum type, const double* val_arr);
194  bool getValWithPidType(int voc, PidControlTypeEnum type, int j, double *val);
195  bool getValWithPidType(int voc, PidControlTypeEnum type, double *val);
196  bool set2V1I(int v1, int v2, int axis);
197 
205  bool get1V1I1D(int v, int j, double *val);
206 
214  bool get1V1I1I(int v, int j, int *val);
215  bool get2V1I1D(int v1, int v2, int j, double *val);
216  bool get2V1I2D(int v1, int v2, int j, double *val1, double *val2);
217  bool get1V1I2D(int code, int axis, double *v1, double *v2);
218 
226  bool get1V1I1B(int v, int j, bool &val);
227  bool get1V1I1IA1B(int v, const int len, const int *val1, bool &retVal);
228  bool get2V1I1IA1DA(int v1, int v2, const int n_joints, const int *joints, double *retVals, std::string functionName = "");
229  bool get1V1B(int v, bool &val);
230 
237  bool get1VIA(int v, int *val);
238 
245  bool get1VDA(int v, double *val);
246 
253  bool get1V1DA(int v1, double *val);
254 
262  bool get2V1DA(int v1, int v2, double *val);
263 
264  bool get2V2DA(int v1, int v2, double *val1, double *val2);
265 
266  bool get1V1I1S(int code, int j, std::string &name);
267 
268  bool get1V1I1IA1DA(int v, const int len, const int *val1, double *val2);
269 
270 public:
271  RemoteControlBoard() = default;
276  ~RemoteControlBoard() override = default;
277 
278  bool open(Searchable& config) override;
279 
284  bool close() override;
285 
286  bool getAxes(int *ax) override;
287 
288  // IPidControl
289  bool setPid(const PidControlTypeEnum& pidtype, int j, const Pid &pid) override;
290  bool setPids(const PidControlTypeEnum& pidtype, const Pid *pids) override;
291  bool setPidReference(const PidControlTypeEnum& pidtype, int j, double ref) override;
292  bool setPidReferences(const PidControlTypeEnum& pidtype, const double *refs) override;
293  bool setPidErrorLimit(const PidControlTypeEnum& pidtype, int j, double limit) override;
294  bool setPidErrorLimits(const PidControlTypeEnum& pidtype, const double *limits) override;
295  bool getPidError(const PidControlTypeEnum& pidtype, int j, double *err) override;
296  bool getPidErrors(const PidControlTypeEnum& pidtype, double *errs) override;
297  bool getPid(const PidControlTypeEnum& pidtype, int j, Pid *pid) override;
298  bool getPids(const PidControlTypeEnum& pidtype, Pid *pids) override;
299  bool getPidReference(const PidControlTypeEnum& pidtype, int j, double *ref) override;
300  bool getPidReferences(const PidControlTypeEnum& pidtype, double *refs) override;
301  bool getPidErrorLimit(const PidControlTypeEnum& pidtype, int j, double *limit) override;
302  bool getPidErrorLimits(const PidControlTypeEnum& pidtype, double *limits) override;
303  bool resetPid(const PidControlTypeEnum& pidtype, int j) override;
304  bool disablePid(const PidControlTypeEnum& pidtype, int j) override;
305  bool enablePid(const PidControlTypeEnum& pidtype, int j) override;
306  bool isPidEnabled(const PidControlTypeEnum& pidtype, int j, bool* enabled) override;
307  bool getPidOutput(const PidControlTypeEnum& pidtype, int j, double *out) override;
308  bool getPidOutputs(const PidControlTypeEnum& pidtype, double *outs) override;
309  bool setPidOffset(const PidControlTypeEnum& pidtype, int j, double v) override;
310 
311  // IEncoder
312  bool resetEncoder(int j) override;
313  bool resetEncoders() override;
314  bool setEncoder(int j, double val) override;
315  bool setEncoders(const double *vals) override;
316  bool getEncoder(int j, double *v) override;
317  bool getEncoderTimed(int j, double *v, double *t) override;
318  bool getEncoders(double *encs) override;
319  bool getEncodersTimed(double *encs, double *ts) override;
320  bool getEncoderSpeed(int j, double *sp) override;
321  bool getEncoderSpeeds(double *spds) override;
322  bool getEncoderAcceleration(int j, double *acc) override;
323  bool getEncoderAccelerations(double *accs) override;
324 
325  // IRemoteVariable
326  bool getRemoteVariable(std::string key, yarp::os::Bottle& val) override;
327  bool setRemoteVariable(std::string key, const yarp::os::Bottle& val) override;
328  bool getRemoteVariablesList(yarp::os::Bottle* listOfKeys) override;
329 
330  // IMotor
331  bool getNumberOfMotors(int *num) override;
332  bool getTemperature(int m, double* val) override;
333  bool getTemperatures(double *vals) override;
334  bool getTemperatureLimit (int m, double* val) override;
335  bool setTemperatureLimit (int m, const double val) override;
336  bool getGearboxRatio(int m, double* val) override;
337  bool setGearboxRatio(int m, const double val) override;
338 
339  // IMotorEncoder
340  bool resetMotorEncoder(int j) override;
341  bool resetMotorEncoders() override;
342  bool setMotorEncoder(int j, const double val) override;
343  bool setMotorEncoderCountsPerRevolution(int m, const double cpr) override;
344  bool getMotorEncoderCountsPerRevolution(int m, double *cpr) override;
345  bool setMotorEncoders(const double *vals) override;
346  bool getMotorEncoder(int j, double *v) override;
347  bool getMotorEncoderTimed(int j, double *v, double *t) override;
348  bool getMotorEncoders(double *encs) override;
349  bool getMotorEncodersTimed(double *encs, double *ts) override;
350  bool getMotorEncoderSpeed(int j, double *sp) override;
351  bool getMotorEncoderSpeeds(double *spds) override;
352  bool getMotorEncoderAcceleration(int j, double *acc) override;
353  bool getMotorEncoderAccelerations(double *accs) override;
354  bool getNumberOfMotorEncoders(int *num) override;
355 
356  // IPreciselyTimed
357  Stamp getLastInputStamp() override;
358 
359  // IPositionControl
360  bool positionMove(int j, double ref) override;
361  bool positionMove(const int n_joint, const int *joints, const double *refs) override;
362  bool positionMove(const double *refs) override;
363  bool getTargetPosition(const int joint, double *ref) override;
364  bool getTargetPositions(double *refs) override;
365  bool getTargetPositions(const int n_joint, const int *joints, double *refs) override;
366  bool relativeMove(int j, double delta) override;
367  bool relativeMove(const int n_joint, const int *joints, const double *refs) override;
368  bool relativeMove(const double *deltas) override;
369  bool checkMotionDone(int j, bool *flag) override;
370  bool checkMotionDone(const int n_joint, const int *joints, bool *flag) override;
371  bool checkMotionDone(bool *flag) override;
372  bool setRefSpeed(int j, double sp) override;
373  bool setRefSpeeds(const int n_joint, const int *joints, const double *spds) override;
374  bool setRefSpeeds(const double *spds) override;
375  bool setRefAcceleration(int j, double acc) override;
376  bool setRefAccelerations(const int n_joint, const int *joints, const double *accs) override;
377  bool setRefAccelerations(const double *accs) override;
378  bool getRefSpeed(int j, double *ref) override;
379  bool getRefSpeeds(const int n_joint, const int *joints, double *spds) override;
380  bool getRefSpeeds(double *spds) override;
381  bool getRefAcceleration(int j, double *acc) override;
382  bool getRefAccelerations(const int n_joint, const int *joints, double *accs) override;
383  bool getRefAccelerations(double *accs) override;
384  bool stop(int j) override;
385  bool stop(const int len, const int *val1) override;
386  bool stop() override;
387 
388  // IVelocityControl
389  bool velocityMove(int j, double v) override;
390  bool velocityMove(const double *v) override;
391 
392  // IAmplifierControl
393  bool enableAmp(int j) override;
394  bool disableAmp(int j) override;
395  bool getAmpStatus(int *st) override;
396  bool getAmpStatus(int j, int *st) override;
397  bool setMaxCurrent(int j, double v) override;
398  bool getMaxCurrent(int j, double *v) override;
399  bool getNominalCurrent(int m, double *val) override;
400  bool setNominalCurrent(int m, const double val) override;
401  bool getPeakCurrent(int m, double *val) override;
402  bool setPeakCurrent(int m, const double val) override;
403  bool getPWM(int m, double* val) override;
404  bool getPWMLimit(int m, double* val) override;
405  bool setPWMLimit(int m, const double val) override;
406  bool getPowerSupplyVoltage(int m, double* val) override;
407 
408  // IControlLimits
409  bool setLimits(int axis, double min, double max) override;
410  bool getLimits(int axis, double *min, double *max) override;
411  bool setVelLimits(int axis, double min, double max) override;
412  bool getVelLimits(int axis, double *min, double *max) override;
413 
414  // IAxisInfo
415  bool getAxisName(int j, std::string& name) override;
416  bool getJointType(int j, yarp::dev::JointTypeEnum& type) override;
417 
418  // IControlCalibration
419  bool calibrateRobot() override;
420  bool abortCalibration() override;
421  bool abortPark() override;
422  bool park(bool wait=true) override;
423  bool calibrateAxisWithParams(int j, unsigned int ui, double v1, double v2, double v3) override;
424  bool setCalibrationParameters(int j, const CalibrationParameters& params) override;
425  bool calibrationDone(int j) override;
426 
427  // ITorqueControl
428  bool getRefTorque(int j, double *t) override;
429  bool getRefTorques(double *t) override;
430  bool setRefTorques(const double *t) override;
431  bool setRefTorque(int j, double v) override;
432  bool setRefTorques(const int n_joint, const int *joints, const double *t) override;
433  bool setMotorTorqueParams(int j, const MotorTorqueParameters params) override;
434  bool getMotorTorqueParams(int j, MotorTorqueParameters *params) override;
435  bool getTorque(int j, double *t) override;
436  bool getTorques(double *t) override;
437  bool getTorqueRange(int j, double *min, double* max) override;
438  bool getTorqueRanges(double *min, double *max) override;
439 
440  // IImpedanceControl
441  bool getImpedance(int j, double *stiffness, double *damping) override;
442  bool getImpedanceOffset(int j, double *offset) override;
443  bool setImpedance(int j, double stiffness, double damping) override;
444  bool setImpedanceOffset(int j, double offset) override;
445  bool getCurrentImpedanceLimit(int j, double *min_stiff, double *max_stiff, double *min_damp, double *max_damp) override;
446 
447  // IControlMode
448  bool getControlMode(int j, int *mode) override;
449  bool getControlModes(int *modes) override;
450  bool getControlModes(const int n_joint, const int *joints, int *modes) override;
451  bool setControlMode(const int j, const int mode) override;
452  bool setControlModes(const int n_joint, const int *joints, int *modes) override;
453  bool setControlModes(int *modes) override;
454 
455  // IPositionDirect
456  bool setPosition(int j, double ref) override;
457  bool setPositions(const int n_joint, const int *joints, const double *refs) override;
458  bool setPositions(const double *refs) override;
459  bool getRefPosition(const int joint, double* ref) override;
460  bool getRefPositions(double* refs) override;
461  bool getRefPositions(const int n_joint, const int* joints, double* refs) override;
462 
463  // IVelocityControl
464  bool velocityMove(const int n_joint, const int *joints, const double *spds) override;
465  bool getRefVelocity(const int joint, double* vel) override;
466  bool getRefVelocities(double* vels) override;
467  bool getRefVelocities(const int n_joint, const int* joints, double* vels) override;
468 
469  // IInteractionMode
470  bool getInteractionMode(int axis, yarp::dev::InteractionModeEnum* mode) override;
471  bool getInteractionModes(int n_joints, int *joints, yarp::dev::InteractionModeEnum* modes) override;
473  bool setInteractionMode(int axis, yarp::dev::InteractionModeEnum mode) override;
474  bool setInteractionModes(int n_joints, int *joints, yarp::dev::InteractionModeEnum* modes) override;
476 
477  // IRemoteCalibrator
478  bool isCalibratorDevicePresent(bool *isCalib) override;
479  bool calibrateSingleJoint(int j) override;
480  bool calibrateWholePart() override;
481  bool homingSingleJoint(int j) override;
482  bool homingWholePart() override;
483  bool parkSingleJoint(int j, bool _wait=true) override;
484  bool parkWholePart() override;
485  bool quitCalibrate() override;
486  bool quitPark() override;
487 
488  // ICurrentControl
489  bool getRefCurrents(double *t) override;
490  bool getRefCurrent(int j, double *t) override;
491  bool setRefCurrents(const double *refs) override;
492  bool setRefCurrent(int j, double ref) override;
493  bool setRefCurrents(const int n_joint, const int *joints, const double *refs) override;
494  bool getCurrents(double *vals) override;
495  bool getCurrent(int j, double *val) override;
496  bool getCurrentRange(int j, double *min, double *max) override;
497  bool getCurrentRanges(double *min, double *max) override;
498 
499  // IPWMControl
500  bool setRefDutyCycle(int j, double v) override;
501  bool setRefDutyCycles(const double *v) override;
502  bool getRefDutyCycle(int j, double *ref) override;
503  bool getRefDutyCycles(double *refs) override;
504  bool getDutyCycle(int j, double *out) override;
505  bool getDutyCycles(double *outs) override;
506 };
507 
508 
509 
510 #endif // YARP_DEV_REMOTECONTROLBOARD_REMOTECONTROLBOARD_H
RemoteControlBoard::getJointType
bool getJointType(int j, yarp::dev::JointTypeEnum &type) override
Definition: RemoteControlBoard.cpp:1947
RemoteControlBoard::getRemoteVariable
bool getRemoteVariable(std::string key, yarp::os::Bottle &val) override
Definition: RemoteControlBoard.cpp:1434
RemoteControlBoard::diagnosticThread
DiagnosticThread * diagnosticThread
Definition: RemoteControlBoard.h:93
RemoteControlBoard::abortCalibration
bool abortCalibration() override
Definition: RemoteControlBoard.cpp:1960
IRemoteVariables.h
yarp::os::Bottle
A simple collection of objects that can be described and transmitted in a portable way.
Definition: Bottle.h:73
RemoteControlBoard::setRemoteVariable
bool setRemoteVariable(std::string key, const yarp::os::Bottle &val) override
Definition: RemoteControlBoard.cpp:1450
RemoteControlBoard::send2V
bool send2V(int v1, int v2)
Definition: RemoteControlBoard.cpp:413
RemoteControlBoard::getMotorEncoder
bool getMotorEncoder(int j, double *v) override
Read the value of a motor encoder.
Definition: RemoteControlBoard.cpp:1555
RemoteControlBoard::getMotorEncoderCountsPerRevolution
bool getMotorEncoderCountsPerRevolution(int m, double *cpr) override
Gets number of counts per revolution for motor encoder m.
Definition: RemoteControlBoard.cpp:1545
yarp::dev::IRemoteVariables
IRemoteVariables interface.
Definition: IRemoteVariables.h:51
RemoteControlBoard::disableAmp
bool disableAmp(int j) override
Disable the amplifier on a specific joint.
Definition: RemoteControlBoard.cpp:1845
RemoteControlBoard::getRefPositions
bool getRefPositions(double *refs) override
Get the last position reference for all axes.
Definition: RemoteControlBoard.cpp:2395
RemoteControlBoard::getTemperatureLimit
bool getTemperatureLimit(int m, double *val) override
Retreives the current temperature limit for a specific motor.
Definition: RemoteControlBoard.cpp:1501
RemoteControlBoard::getTargetPositions
bool getTargetPositions(double *refs) override
Get the last position reference for all axes.
Definition: RemoteControlBoard.cpp:1680
RemoteControlBoard::getImpedance
bool getImpedance(int j, double *stiffness, double *damping) override
Get current impedance gains (stiffness,damping,offset) for a specific joint.
Definition: RemoteControlBoard.cpp:2162
RemoteControlBoard::get1V1DA
bool get1V1DA(int v1, double *val)
Helper method to get an array of double from the remote peer.
Definition: RemoteControlBoard.cpp:947
RemoteControlBoard::setEncoders
bool setEncoders(const double *vals) override
Set the value of all encoders.
Definition: RemoteControlBoard.cpp:1344
RemoteControlBoard::send3V1I
bool send3V1I(int v1, int v2, int v3, int j)
Definition: RemoteControlBoard.cpp:450
stateExtendedReader.h
yarp::os::Searchable
A base class for nested structures that can be searched.
Definition: Searchable.h:69
RemoteControlBoard::local
std::string local
Definition: RemoteControlBoard.h:110
StateExtendedInputPort
Definition: stateExtendedReader.h:44
RemoteControlBoard::getPidErrorLimit
bool getPidErrorLimit(const PidControlTypeEnum &pidtype, int j, double *limit) override
Get the error limit for the controller on a specific joint.
Definition: RemoteControlBoard.cpp:1244
RemoteControlBoard::enableAmp
bool enableAmp(int j) override
Enable the amplifier on a specific joint.
Definition: RemoteControlBoard.cpp:1840
RemoteControlBoard::setPids
bool setPids(const PidControlTypeEnum &pidtype, const Pid *pids) override
Set new pid value on multiple axes.
Definition: RemoteControlBoard.cpp:1111
Vector.h
contains the definition of a Vector type
RemoteControlBoard::getRefCurrent
bool getRefCurrent(int j, double *t) override
Get the reference value of the current for a single motor.
Definition: RemoteControlBoard.cpp:2631
RemoteControlBoard::protocolVersion
ProtocolVersion protocolVersion
Definition: RemoteControlBoard.h:115
t
float t
Definition: FfmpegWriter.cpp:74
yarp::dev::IImpedanceControl
Interface for control boards implementing impedance control.
Definition: IImpedanceControl.h:75
RemoteControlBoard::resetEncoder
bool resetEncoder(int j) override
Reset encoder, single joint.
Definition: RemoteControlBoard.cpp:1329
RemoteControlBoard::getAxes
bool getAxes(int *ax) override
Get the number of controlled axes.
Definition: RemoteControlBoard.cpp:1081
RemoteControlBoard::getMotorEncoderTimed
bool getMotorEncoderTimed(int j, double *v, double *t) override
Read the instantaneous position of a motor encoder.
Definition: RemoteControlBoard.cpp:1565
RemoteControlBoard::calibrateRobot
bool calibrateRobot() override
Calibrate robot by using an external calibrator.
Definition: RemoteControlBoard.cpp:1955
RemoteControlBoard::setPidReferences
bool setPidReferences(const PidControlTypeEnum &pidtype, const double *refs) override
Set the controller reference, multiple axes.
Definition: RemoteControlBoard.cpp:1143
RemoteControlBoard::calibrationDone
bool calibrationDone(int j) override
Check if the calibration is terminated, on a particular joint.
Definition: RemoteControlBoard.cpp:2014
RemoteControlBoard::resetPid
bool resetPid(const PidControlTypeEnum &pidtype, int j) override
Reset the controller of a given joint, usually sets the current status of the joint as the reference ...
Definition: RemoteControlBoard.cpp:1254
yarp::dev::MotorTorqueParameters
Definition: ITorqueControl.h:24
RemoteControlBoard::setRefTorque
bool setRefTorque(int j, double v) override
Set the reference value of the torque for a given joint.
Definition: RemoteControlBoard.cpp:2050
RemoteControlBoard::getMotorEncodersTimed
bool getMotorEncodersTimed(double *encs, double *ts) override
Read the instantaneous position of all motor encoders.
Definition: RemoteControlBoard.cpp:1587
RemoteControlBoard::getTargetPosition
bool getTargetPosition(const int joint, double *ref) override
Get the last position reference for the specified axis.
Definition: RemoteControlBoard.cpp:1675
RemoteControlBoard::rpc_p
yarp::os::Port rpc_p
Definition: RemoteControlBoard.h:91
RemoteControlBoard::resetMotorEncoders
bool resetMotorEncoders() override
Reset motor encoders.
Definition: RemoteControlBoard.cpp:1530
ProtocolVersion::minor
int minor
Definition: RemoteControlBoard.h:43
RemoteControlBoard::getDutyCycle
bool getDutyCycle(int j, double *out) override
Gets the current dutycycle of the output of the amplifier (i.e.
Definition: RemoteControlBoard.cpp:2775
IPreciselyTimed.h
yarp::dev::DeviceDriver
Interface implemented by all device drivers.
Definition: DeviceDriver.h:38
IPositionDirect.h
RemoteControlBoard::isPidEnabled
bool isPidEnabled(const PidControlTypeEnum &pidtype, int j, bool *enabled) override
Get the current status (enabled/disabled) of the pid.
Definition: RemoteControlBoard.cpp:1293
RemoteControlBoard::getRefAcceleration
bool getRefAcceleration(int j, double *acc) override
Get reference acceleration for a joint.
Definition: RemoteControlBoard.cpp:1765
RemoteControlBoard::command_buffer
yarp::os::PortWriterBuffer< CommandMessage > command_buffer
Definition: RemoteControlBoard.h:96
RemoteControlBoard::operator=
RemoteControlBoard & operator=(RemoteControlBoard &&)=delete
RemoteControlBoard::getPeakCurrent
bool getPeakCurrent(int m, double *val) override
Definition: RemoteControlBoard.cpp:1880
RemoteControlBoard::getRefTorques
bool getRefTorques(double *t) override
Get the reference value of the torque for all joints.
Definition: RemoteControlBoard.cpp:2028
RemoteControlBoard::getCurrentRange
bool getCurrentRange(int j, double *min, double *max) override
Get the full scale of the current measurement for a given motor (e.g.
Definition: RemoteControlBoard.cpp:2698
ProtocolVersion::major
int major
Definition: RemoteControlBoard.h:42
RemoteControlBoard::getDutyCycles
bool getDutyCycles(double *outs) override
Gets the current dutycycle of the output of the amplifier (i.e.
Definition: RemoteControlBoard.cpp:2784
ControlBoardHelpers.h
RemoteControlBoard::setMotorEncoder
bool setMotorEncoder(int j, const double val) override
Set the value of the motor encoder for a given motor.
Definition: RemoteControlBoard.cpp:1535
RemoteControlBoard::isLive
bool isLive()
Definition: RemoteControlBoard.cpp:105
yarp::os::PortReaderBuffer< yarp::sig::Vector >
RemoteControlBoard::setPid
bool setPid(const PidControlTypeEnum &pidtype, int j, const Pid &pid) override
Set new pid value for a joint axis.
Definition: RemoteControlBoard.cpp:1088
yarp::os::PortWriterBuffer
Buffer outgoing data to a port.
Definition: PortWriterBuffer.h:70
RemoteControlBoard::relativeMove
bool relativeMove(int j, double delta) override
Set relative position.
Definition: RemoteControlBoard.cpp:1690
RemoteControlBoard::getPidErrorLimits
bool getPidErrorLimits(const PidControlTypeEnum &pidtype, double *limits) override
Get the error limit for all controllers.
Definition: RemoteControlBoard.cpp:1249
RemoteControlBoard
remote_controlboard: The client side of the control board, connects to a remote controlboard using th...
Definition: RemoteControlBoard.h:89
RemoteControlBoard::setMotorEncoders
bool setMotorEncoders(const double *vals) override
Set the value of all motor encoders.
Definition: RemoteControlBoard.cpp:1550
RemoteControlBoard::getRefSpeed
bool getRefSpeed(int j, double *ref) override
Get reference speed for a joint.
Definition: RemoteControlBoard.cpp:1750
RemoteControlBoard::getPidOutputs
bool getPidOutputs(const PidControlTypeEnum &pidtype, double *outs) override
Get the output of the controllers (e.g.
Definition: RemoteControlBoard.cpp:1315
RemoteControlBoard::set1V1I1IA1DA
bool set1V1I1IA1DA(int v, const int len, const int *val1, const double *val2)
Definition: RemoteControlBoard.cpp:606
RemoteControlBoard::quitCalibrate
bool quitCalibrate() override
quitCalibrate: interrupt the calibration procedure
Definition: RemoteControlBoard.cpp:2602
RemoteControlBoard::getLimits
bool getLimits(int axis, double *min, double *max) override
Get the software limits for a particular axis.
Definition: RemoteControlBoard.cpp:1923
RemoteControlBoard::getPidError
bool getPidError(const PidControlTypeEnum &pidtype, int j, double *err) override
Get the current error for a joint.
Definition: RemoteControlBoard.cpp:1158
RemoteControlBoard::get2V1DA
bool get2V1DA(int v1, int v2, double *val)
Helper method to get an array of double from the remote peer.
Definition: RemoteControlBoard.cpp:970
RemoteControlBoard::get2V1I1IA1DA
bool get2V1I1IA1DA(int v1, int v2, const int n_joints, const int *joints, double *retVals, std::string functionName="")
Definition: RemoteControlBoard.cpp:844
RemoteControlBoard::getCurrent
bool getCurrent(int j, double *val) override
Definition: RemoteControlBoard.cpp:2689
RemoteControlBoard::getTemperature
bool getTemperature(int m, double *val) override
Get temperature of a motor.
Definition: RemoteControlBoard.cpp:1491
RemoteControlBoard::getRefVelocity
bool getRefVelocity(const int joint, double *vel) override
Get the last reference speed set by velocityMove for single joint.
Definition: RemoteControlBoard.cpp:2427
RemoteControlBoard::getRefDutyCycles
bool getRefDutyCycles(double *refs) override
Gets the last reference sent using the setRefDutyCycles function.
Definition: RemoteControlBoard.cpp:2770
RemoteControlBoard::getCurrents
bool getCurrents(double *vals) override
Definition: RemoteControlBoard.cpp:2680
RemoteControlBoard::extendedPortMutex
std::mutex extendedPortMutex
Definition: RemoteControlBoard.h:104
RemoteControlBoard::quitPark
bool quitPark() override
quitPark: interrupt the park procedure
Definition: RemoteControlBoard.cpp:2612
RemoteControlBoard::command_p
yarp::os::Port command_p
Definition: RemoteControlBoard.h:92
RemoteControlBoard::setMotorTorqueParams
bool setMotorTorqueParams(int j, const MotorTorqueParameters params) override
Set a subset of motor parameters (bemf, ktau etc) useful for torque control.
Definition: RemoteControlBoard.cpp:2087
RemoteControlBoard::velocityMove
bool velocityMove(int j, double v) override
Start motion at a given speed, single joint.
Definition: RemoteControlBoard.cpp:1810
RemoteControlBoard::parkSingleJoint
bool parkSingleJoint(int j, bool _wait=true) override
parkSingleJoint(): start the parking procedure for the single joint
Definition: RemoteControlBoard.cpp:2587
RemoteControlBoard::getPidReferences
bool getPidReferences(const PidControlTypeEnum &pidtype, double *refs) override
Get the current reference of all pid controllers.
Definition: RemoteControlBoard.cpp:1239
RemoteControlBoard::getRefCurrents
bool getRefCurrents(double *t) override
Get the reference value of the currents for all motors.
Definition: RemoteControlBoard.cpp:2626
RemoteControlBoard::setRefSpeeds
bool setRefSpeeds(const int n_joint, const int *joints, const double *spds) override
Set reference speed on all joints.
Definition: RemoteControlBoard.cpp:1725
yarp::dev::impl::jointData
Definition: jointData.h:29
RemoteControlBoard::setPidOffset
bool setPidOffset(const PidControlTypeEnum &pidtype, int j, double v) override
Set offset value for a given controller.
Definition: RemoteControlBoard.cpp:1320
RemoteControlBoard::getVelLimits
bool getVelLimits(int axis, double *min, double *max) override
Get the software speed limits for a particular axis.
Definition: RemoteControlBoard.cpp:1933
RemoteControlBoard::get1VIA
bool get1VIA(int v, int *val)
Helper method to get an array of integers from the remote peer.
Definition: RemoteControlBoard.cpp:901
RemoteControlBoard::setTemperatureLimit
bool setTemperatureLimit(int m, const double val) override
Set the temperature limit for a specific motor.
Definition: RemoteControlBoard.cpp:1506
RemoteControlBoard::getCurrentImpedanceLimit
bool getCurrentImpedanceLimit(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: RemoteControlBoard.cpp:2232
RemoteControlBoard::setValWithPidType
bool setValWithPidType(int voc, PidControlTypeEnum type, int axis, double val)
Definition: RemoteControlBoard.cpp:636
RemoteControlBoard::getTemperatures
bool getTemperatures(double *vals) override
Get temperature of all the motors.
Definition: RemoteControlBoard.cpp:1496
yarp::os::Port
A mini-server for network communication.
Definition: Port.h:50
RemoteControlBoard::getPids
bool getPids(const PidControlTypeEnum &pidtype, Pid *pids) override
Get current pid value for a specific joint.
Definition: RemoteControlBoard.cpp:1197
RemoteControlBoard::getRefVelocities
bool getRefVelocities(double *vels) override
Get the last reference speed set by velocityMove for all joints.
Definition: RemoteControlBoard.cpp:2432
yarp::dev::IInteractionMode
Interface settings the way the robot interacts with the environment: basic interaction types are Stif...
Definition: IInteractionMode.h:43
RemoteControlBoard::getPidErrors
bool getPidErrors(const PidControlTypeEnum &pidtype, double *errs) override
Get the error of all joints.
Definition: RemoteControlBoard.cpp:1163
RemoteControlBoard::set1V
bool set1V(int code)
Send a SET command without parameters and wait for a reply.
Definition: RemoteControlBoard.cpp:464
RemoteControlBoard::getEncoderTimed
bool getEncoderTimed(int j, double *v, double *t) override
Read the instantaneous acceleration of all axes.
Definition: RemoteControlBoard.cpp:1359
RemoteControlBoard::get2V1I1D
bool get2V1I1D(int v1, int v2, int j, double *val)
Definition: RemoteControlBoard.cpp:754
RemoteControlBoard::setLimits
bool setLimits(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: RemoteControlBoard.cpp:1918
RemoteControlBoard::getPid
bool getPid(const PidControlTypeEnum &pidtype, int j, Pid *pid) override
Get current pid value for a specific joint.
Definition: RemoteControlBoard.cpp:1168
RemoteControlBoard::setControlModes
bool setControlModes(const int n_joint, const int *joints, int *modes) override
Set the current control mode for a subset of axes.
Definition: RemoteControlBoard.cpp:2308
RemoteControlBoard::setPidReference
bool setPidReference(const PidControlTypeEnum &pidtype, int j, double ref) override
Set the controller reference for a given axis.
Definition: RemoteControlBoard.cpp:1138
RemoteControlBoard::set1V1I1D
bool set1V1I1D(int code, int j, double val)
Helper method to set a double value to a single axis.
Definition: RemoteControlBoard.cpp:538
RemoteControlBoard::get2V1I2D
bool get2V1I2D(int v1, int v2, int j, double *val1, double *val2)
Definition: RemoteControlBoard.cpp:773
RemoteControlBoard::getGearboxRatio
bool getGearboxRatio(int m, double *val) override
Get the gearbox ratio for a specific motor.
Definition: RemoteControlBoard.cpp:1511
RemoteControlBoard::set1VDA
bool set1VDA(int v, const double *val)
Helper method used to set an array of double to all axes.
Definition: RemoteControlBoard.cpp:562
ProtocolVersion::tweak
int tweak
Definition: RemoteControlBoard.h:44
RemoteControlBoard::getMaxCurrent
bool getMaxCurrent(int j, double *v) override
Returns the maximum electric current allowed for a given motor.
Definition: RemoteControlBoard.cpp:1865
RemoteControlBoard::getNumberOfMotors
bool getNumberOfMotors(int *num) override
Retrieves the number of controlled axes from the current physical interface.
Definition: RemoteControlBoard.cpp:1486
yarp::dev::IControlMode
Interface for setting control mode in control board.
Definition: IControlMode.h:28
RemoteControlBoard::setNominalCurrent
bool setNominalCurrent(int m, const double val) override
Definition: RemoteControlBoard.cpp:1875
ITorqueControl.h
DiagnosticThread
Definition: RemoteControlBoard.cpp:66
RemoteControlBoard::getValWithPidType
bool getValWithPidType(int voc, PidControlTypeEnum type, int j, double *val)
Definition: RemoteControlBoard.cpp:665
RemoteControlBoard::getPWM
bool getPWM(int m, double *val) override
Definition: RemoteControlBoard.cpp:1890
RemoteControlBoard::setMaxCurrent
bool setMaxCurrent(int j, double v) override
Definition: RemoteControlBoard.cpp:1860
RemoteControlBoard::setPositions
bool setPositions(const int n_joint, const int *joints, const double *refs) override
Set new reference point for all axes.
Definition: RemoteControlBoard.cpp:2362
RemoteControlBoard::last_wholePart
yarp::dev::impl::jointData last_wholePart
Definition: RemoteControlBoard.h:107
yarp::dev::IControlCalibration
Interface for control devices, calibration commands.
Definition: IControlCalibration.h:85
RemoteControlBoard::getRefSpeeds
bool getRefSpeeds(const int n_joint, const int *joints, double *spds) override
Get reference speed of all joints.
Definition: RemoteControlBoard.cpp:1755
RemoteControlBoard::getNominalCurrent
bool getNominalCurrent(int m, double *val) override
Definition: RemoteControlBoard.cpp:1870
RemoteControlBoard::remote
std::string remote
Definition: RemoteControlBoard.h:109
RemoteControlBoard::setPWMLimit
bool setPWMLimit(int m, const double val) override
Definition: RemoteControlBoard.cpp:1904
RemoteControlBoard::calibrateSingleJoint
bool calibrateSingleJoint(int j) override
calibrateSingleJoint: call the calibration procedure for the single joint
Definition: RemoteControlBoard.cpp:2556
yarp::dev::IAxisInfo
Interface for getting information about specific axes, if available.
Definition: IAxisInfo.h:43
RemoteControlBoard::setImpedanceOffset
bool setImpedanceOffset(int j, double offset) override
Set current force Offset for a specific joint.
Definition: RemoteControlBoard.cpp:2217
yarp::dev::PidControlTypeEnum
PidControlTypeEnum
Definition: PidEnums.h:21
RemoteControlBoard::setEncoder
bool setEncoder(int j, double val) override
Set the value of the encoder for a given joint.
Definition: RemoteControlBoard.cpp:1339
RemoteControlBoard::setRefCurrents
bool setRefCurrents(const double *refs) override
Set the reference value of the currents for all motors.
Definition: RemoteControlBoard.cpp:2636
RemoteControlBoard::get1V1B
bool get1V1B(int v, bool &val)
Definition: RemoteControlBoard.cpp:887
RemoteControlBoard::send1V1I
bool send1V1I(int v, int axis)
Definition: RemoteControlBoard.cpp:438
RemoteControlBoard::getEncoders
bool getEncoders(double *encs) override
Read the position of all axes.
Definition: RemoteControlBoard.cpp:1370
RemoteControlBoard::get1V1I1B
bool get1V1I1B(int v, int j, bool &val)
Helper method used to get a double value from the remote peer.
Definition: RemoteControlBoard.cpp:809
IAmplifierControl.h
define control board standard interfaces
RemoteControlBoard::park
bool park(bool wait=true) override
Definition: RemoteControlBoard.cpp:1970
RemoteControlBoard::RemoteControlBoard
RemoteControlBoard(RemoteControlBoard &&)=delete
RemoteControlBoard::last_singleJoint
yarp::dev::impl::jointData last_singleJoint
Definition: RemoteControlBoard.h:105
yarp::dev::IControlLimits
Interface for control devices, commands to get/set position and veloity limits.
Definition: IControlLimits.h:33
RemoteControlBoard::getPidOutput
bool getPidOutput(const PidControlTypeEnum &pidtype, int j, double *out) override
Get the output of the controller (e.g.
Definition: RemoteControlBoard.cpp:1310
IControlCalibration.h
RemoteControlBoard::checkProtocolVersion
bool checkProtocolVersion(bool ignore)
Definition: RemoteControlBoard.cpp:119
yarp::dev::InteractionModeEnum
InteractionModeEnum
Definition: IInteractionMode.h:21
RemoteControlBoard::getControlModes
bool getControlModes(int *modes) override
Get the current control mode (multiple joints).
Definition: RemoteControlBoard.cpp:2267
RemoteControlBoard::getInteractionMode
bool getInteractionMode(int axis, yarp::dev::InteractionModeEnum *mode) override
Get the current interaction mode of the robot, values can be stiff or compliant.
Definition: RemoteControlBoard.cpp:2446
RemoteControlBoard::setRefTorques
bool setRefTorques(const double *t) override
Set the reference value of the torque for all joints.
Definition: RemoteControlBoard.cpp:2033
RemoteControlBoard::nj
size_t nj
Definition: RemoteControlBoard.h:112
RemoteControlBoard::set1V2D
bool set1V2D(int code, double v)
Send a SET command and an additional double valued variable and then wait for a reply.
Definition: RemoteControlBoard.cpp:474
RemoteControlBoard::setPeakCurrent
bool setPeakCurrent(int m, const double val) override
Definition: RemoteControlBoard.cpp:1885
RemoteControlBoard::getMotorEncoderSpeeds
bool getMotorEncoderSpeeds(double *spds) override
Read the instantaneous speed of all motor encoders.
Definition: RemoteControlBoard.cpp:1607
RemoteControlBoard::abortPark
bool abortPark() override
Definition: RemoteControlBoard.cpp:1965
RemoteControlBoard::calibrateAxisWithParams
bool calibrateAxisWithParams(int j, unsigned int ui, double v1, double v2, double v3) override
Start calibration, this method is very often platform specific.
Definition: RemoteControlBoard.cpp:1975
RemoteControlBoard::getPidReference
bool getPidReference(const PidControlTypeEnum &pidtype, int j, double *ref) override
Get the current reference of the pid controller for a specific joint.
Definition: RemoteControlBoard.cpp:1234
IAxisInfo.h
define control board standard interfaces
RemoteControlBoard::getMotorEncoderAcceleration
bool getMotorEncoderAcceleration(int j, double *acc) override
Read the instantaneous acceleration of a motor encoder.
Definition: RemoteControlBoard.cpp:1616
yarp::dev::IPWMControl
Interface for controlling an axis, by sending directly a PWM reference signal to a motor.
Definition: IPWMControl.h:28
IControlMode.h
RemoteControlBoard::open
bool open(Searchable &config) override
Open the DeviceDriver.
Definition: RemoteControlBoard.cpp:177
RemoteControlBoard::setPidErrorLimit
bool setPidErrorLimit(const PidControlTypeEnum &pidtype, int j, double limit) override
Set the error limit for the controller on a specifi joint.
Definition: RemoteControlBoard.cpp:1148
IVelocityControl.h
RemoteControlBoard::isCalibratorDevicePresent
bool isCalibratorDevicePresent(bool *isCalib) override
isCalibratorDevicePresent: check if a calibrator device has been set
Definition: RemoteControlBoard.cpp:2541
RemoteControlBoard::setRefDutyCycles
bool setRefDutyCycles(const double *v) override
Sets the reference dutycycle for all the motors.
Definition: RemoteControlBoard.cpp:2729
RemoteControlBoard::operator=
RemoteControlBoard & operator=(const RemoteControlBoard &)=delete
RemoteControlBoard::stop
bool stop() override
Stop motion, multiple joints.
Definition: RemoteControlBoard.cpp:1801
RemoteControlBoard::setGearboxRatio
bool setGearboxRatio(int m, const double val) override
Set the gearbox ratio for a specific motor.
Definition: RemoteControlBoard.cpp:1516
IImpedanceControl.h
RemoteControlBoard::get2V2DA
bool get2V2DA(int v1, int v2, double *val1, double *val2)
Definition: RemoteControlBoard.cpp:994
RemoteControlBoard::setRefAccelerations
bool setRefAccelerations(const int n_joint, const int *joints, const double *accs) override
Set reference acceleration on all joints.
Definition: RemoteControlBoard.cpp:1740
RemoteControlBoard::disablePid
bool disablePid(const PidControlTypeEnum &pidtype, int j) override
Disable the pid computation for a joint.
Definition: RemoteControlBoard.cpp:1267
RemoteControlBoard::enablePid
bool enablePid(const PidControlTypeEnum &pidtype, int j) override
Enable the pid computation for a joint.
Definition: RemoteControlBoard.cpp:1280
RemoteControlBoard::extendedIntputStatePort
StateExtendedInputPort extendedIntputStatePort
Definition: RemoteControlBoard.h:103
RemoteControlBoard::getTorque
bool getTorque(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: RemoteControlBoard.cpp:2130
RemoteControlBoard::getPWMLimit
bool getPWMLimit(int m, double *val) override
Definition: RemoteControlBoard.cpp:1899
RemoteControlBoard::setControlMode
bool setControlMode(const int j, const int mode) override
Set the current control mode.
Definition: RemoteControlBoard.cpp:2294
RemoteControlBoard::resetEncoders
bool resetEncoders() override
Reset encoders.
Definition: RemoteControlBoard.cpp:1334
RemoteControlBoard::RemoteControlBoard
RemoteControlBoard(const RemoteControlBoard &)=delete
RemoteControlBoard::send2V1I
bool send2V1I(int v1, int v2, int axis)
Definition: RemoteControlBoard.cpp:425
RemoteControlBoard::lastStamp
Stamp lastStamp
Definition: RemoteControlBoard.h:111
RemoteControlBoard::getRefAccelerations
bool getRefAccelerations(const int n_joint, const int *joints, double *accs) override
Get reference acceleration for a joint.
Definition: RemoteControlBoard.cpp:1770
yarp::dev::IMotorEncoders
Control board, encoder interface.
Definition: IMotorEncoders.h:155
RemoteControlBoard::getTorques
bool getTorques(double *t) override
Get the value of the torque for all joints (this is the feedback if you have torque sensors).
Definition: RemoteControlBoard.cpp:2139
RemoteControlBoard::getRefTorque
bool getRefTorque(int j, double *t) override
Get the reference value of the torque for a given joint.
Definition: RemoteControlBoard.cpp:2023
RemoteControlBoard::getLastInputStamp
Stamp getLastInputStamp() override
Get the time stamp for the last read data.
Definition: RemoteControlBoard.cpp:1647
yarp::dev::IAmplifierControl
Interface for control devices, amplifier commands.
Definition: IAmplifierControl.h:33
RemoteControlBoard::getEncodersTimed
bool getEncodersTimed(double *encs, double *ts) override
Read the instantaneous acceleration of all axes.
Definition: RemoteControlBoard.cpp:1381
RemoteControlBoard::setRefDutyCycle
bool setRefDutyCycle(int j, double v) override
Sets the reference dutycycle to a single motor.
Definition: RemoteControlBoard.cpp:2711
RemoteControlBoard::get1V1I1IA1DA
bool get1V1I1IA1DA(int v, const int len, const int *val1, double *val2)
Definition: RemoteControlBoard.cpp:1044
IEncodersTimed.h
RemoteControlBoard::get1V1I1S
bool get1V1I1S(int code, int j, std::string &name)
Definition: RemoteControlBoard.cpp:1028
RemoteControlBoard::getEncoderAccelerations
bool getEncoderAccelerations(double *accs) override
Read the instantaneous acceleration of all axes.
Definition: RemoteControlBoard.cpp:1421
yarp::dev::IMotor
Control board, encoder interface.
Definition: IMotor.h:99
RemoteControlBoard::getEncoder
bool getEncoder(int j, double *v) override
Read the value of an encoder.
Definition: RemoteControlBoard.cpp:1349
RemoteControlBoard::getRefPosition
bool getRefPosition(const int joint, double *ref) override
Get the last position reference for the specified axis.
Definition: RemoteControlBoard.cpp:2390
RemoteControlBoard::getMotorEncoderSpeed
bool getMotorEncoderSpeed(int j, double *sp) override
Read the istantaneous speed of a motor encoder.
Definition: RemoteControlBoard.cpp:1598
RemoteControlBoard::get1V1I1I
bool get1V1I1I(int v, int j, int *val)
Helper method used to get an integer value from the remote peer.
Definition: RemoteControlBoard.cpp:737
yarp::dev::IVelocityControl
Interface for control boards implementing velocity control.
Definition: IVelocityControl.h:160
RemoteControlBoard::checkMotionDone
bool checkMotionDone(int j, bool *flag) override
Check if the current trajectory is terminated.
Definition: RemoteControlBoard.cpp:1705
RemoteControlBoard::positionMove
bool positionMove(int j, double ref) override
Set new reference point for a single axis.
Definition: RemoteControlBoard.cpp:1660
RemoteControlBoard::getMotorEncoderAccelerations
bool getMotorEncoderAccelerations(double *accs) override
Read the instantaneous acceleration of all motor encoders.
Definition: RemoteControlBoard.cpp:1625
RemoteControlBoard::set1V1I
bool set1V1I(int code, int v)
Send a SET command with an additional integer valued variable and then wait for a reply.
Definition: RemoteControlBoard.cpp:486
yarp::os::Stamp
An abstraction for a time stamp and/or sequence number.
Definition: Stamp.h:25
IPidControl.h
RemoteControlBoard::getInteractionModes
bool getInteractionModes(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: RemoteControlBoard.cpp:2455
RemoteControlBoard::get1V1I
bool get1V1I(int code, int &v) const
Send a GET command expecting an integer value in return.
Definition: RemoteControlBoard.cpp:518
IPositionControl.h
yarp::dev::ICurrentControl
Interface for control boards implementing current control.
Definition: ICurrentControl.h:28
yarp::dev::IPidControl
Interface for a generic control board device implementing a PID controller, with scaled arguments.
Definition: IPidControl.h:211
ICurrentControl.h
RemoteControlBoard::getEncoderSpeeds
bool getEncoderSpeeds(double *spds) override
Read the instantaneous speed of all axes.
Definition: RemoteControlBoard.cpp:1402
RemoteControlBoard::calibrateWholePart
bool calibrateWholePart() override
calibrateWholePart: call the procedure for calibrating the whole device
Definition: RemoteControlBoard.cpp:2561
RemoteControlBoard::setMotorEncoderCountsPerRevolution
bool setMotorEncoderCountsPerRevolution(int m, const double cpr) override
Sets number of counts per revolution for motor encoder m.
Definition: RemoteControlBoard.cpp:1540
RemoteControlBoard::getTorqueRange
bool getTorqueRange(int j, double *min, double *max) override
Get the full scale of the torque sensor of a given joint.
Definition: RemoteControlBoard.cpp:2148
RemoteControlBoard::state_buffer
yarp::os::PortReaderBuffer< yarp::sig::Vector > state_buffer
Definition: RemoteControlBoard.h:95
yarp::dev::IPositionDirect
Interface for a generic control board device implementing position control.
Definition: IPositionDirect.h:32
yarp::dev::IEncodersTimed
Control board, extend encoder interface with timestamps.
Definition: IEncodersTimed.h:59
RemoteControlBoard::RemoteControlBoard
RemoteControlBoard()=default
RemoteControlBoard::setRefAcceleration
bool setRefAcceleration(int j, double acc) override
Set reference acceleration for a joint.
Definition: RemoteControlBoard.cpp:1735
RemoteControlBoard::set2V1I1D
bool set2V1I1D(int v1, int v2, int axis, double val)
Definition: RemoteControlBoard.cpp:624
RemoteControlBoard::getMotorEncoders
bool getMotorEncoders(double *encs) override
Read the position of all motor encoders.
Definition: RemoteControlBoard.cpp:1576
IMotorEncoders.h
ProtocolVersion
Definition: RemoteControlBoard.h:41
RemoteControlBoard::setPidErrorLimits
bool setPidErrorLimits(const PidControlTypeEnum &pidtype, const double *limits) override
Get the error limit for the controller on all joints.
Definition: RemoteControlBoard.cpp:1153
IRemoteCalibrator.h
RemoteControlBoard::getRefDutyCycle
bool getRefDutyCycle(int j, double *ref) override
Gets the last reference sent using the setRefDutyCycle function.
Definition: RemoteControlBoard.cpp:2747
RemoteControlBoard::getPowerSupplyVoltage
bool getPowerSupplyVoltage(int m, double *val) override
Definition: RemoteControlBoard.cpp:1909
RemoteControlBoard::getAxisName
bool getAxisName(int j, std::string &name) override
Definition: RemoteControlBoard.cpp:1942
IControlLimits.h
define control board standard interfaces
RemoteControlBoard::~RemoteControlBoard
~RemoteControlBoard() override=default
yarp::dev::Pid
Contains the parameters for a PID.
Definition: ControlBoardPid.h:29
RemoteControlBoard::getAmpStatus
bool getAmpStatus(int *st) override
Definition: RemoteControlBoard.cpp:1850
yarp::dev::ITorqueControl
Interface for control boards implementing torque control.
Definition: ITorqueControl.h:39
yarp::dev::CalibrationParameters
Definition: IControlCalibration.h:32
RemoteControlBoard::set2V2DA
bool set2V2DA(int v1, int v2, const double *val1, const double *val2)
Definition: RemoteControlBoard.cpp:589
RemoteControlBoard::setImpedance
bool setImpedance(int j, double stiffness, double damping) override
Set current impedance gains (stiffness,damping) for a specific joint.
Definition: RemoteControlBoard.cpp:2201
IInteractionMode.h
RemoteControlBoard::getEncoderSpeed
bool getEncoderSpeed(int j, double *sp) override
Read the istantaneous speed of an axis.
Definition: RemoteControlBoard.cpp:1392
RemoteControlBoard::getRemoteVariablesList
bool getRemoteVariablesList(yarp::os::Bottle *listOfKeys) override
Definition: RemoteControlBoard.cpp:1465
RemoteControlBoard::close
bool close() override
Close the device driver and stop the port connections.
Definition: RemoteControlBoard.cpp:382
RemoteControlBoard::getNumberOfMotorEncoders
bool getNumberOfMotorEncoders(int *num) override
Get the number of available motor encoders.
Definition: RemoteControlBoard.cpp:1634
RemoteControlBoard::setInteractionMode
bool setInteractionMode(int axis, yarp::dev::InteractionModeEnum mode) override
Set the interaction mode of the robot, values can be stiff or compliant.
Definition: RemoteControlBoard.cpp:2482
RemoteControlBoard::parkWholePart
bool parkWholePart() override
parkWholePart: start the parking procedure for the whole part
Definition: RemoteControlBoard.cpp:2592
RemoteControlBoard::getTorqueRanges
bool getTorqueRanges(double *min, double *max) override
Get the full scale of the torque sensors of all joints.
Definition: RemoteControlBoard.cpp:2153
RemoteControlBoard::setVelLimits
bool setVelLimits(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: RemoteControlBoard.cpp:1928
RemoteControlBoard::njIsKnown
bool njIsKnown
Definition: RemoteControlBoard.h:113
RemoteControlBoard::set2V1DA
bool set2V1DA(int v1, int v2, const double *val)
Definition: RemoteControlBoard.cpp:575
RemoteControlBoard::set2V1I
bool set2V1I(int v1, int v2, int axis)
Definition: RemoteControlBoard.cpp:708
RemoteControlBoard::get1V1D
bool get1V1D(int code, double &v) const
Send a GET command expecting a double value in return.
Definition: RemoteControlBoard.cpp:498
yarp::dev::IRemoteCalibrator
IRemoteCalibrator interface is meant to remotize the access of the calibration device in order to all...
Definition: IRemoteCalibrator.h:30
RemoteControlBoard::getImpedanceOffset
bool getImpedanceOffset(int j, double *offset) override
Get current force Offset for a specific joint.
Definition: RemoteControlBoard.cpp:2182
yarp::dev::IPreciselyTimed
Definition: IPreciselyTimed.h:21
yarp::dev::JointTypeEnum
JointTypeEnum
Definition: IAxisInfo.h:29
RemoteControlBoard::homingWholePart
bool homingWholePart() override
homingWholePart: call the homing procedure for a the whole part/device
Definition: RemoteControlBoard.cpp:2576
RemoteControlBoard::set1V1I2D
bool set1V1I2D(int code, int j, double val1, double val2)
Definition: RemoteControlBoard.cpp:549
yarp::dev::IPositionControl
Interface for a generic control board device implementing position control.
Definition: IPositionControl.h:257
RemoteControlBoard::get1V1I2D
bool get1V1I2D(int code, int axis, double *v1, double *v2)
Definition: RemoteControlBoard.cpp:792
RemoteControlBoard::getMotorTorqueParams
bool getMotorTorqueParams(int j, MotorTorqueParameters *params) override
Get a subset of motor parameters (bemf, ktau etc) useful for torque control.
Definition: RemoteControlBoard.cpp:2103
RemoteControlBoard::setInteractionModes
bool setInteractionModes(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: RemoteControlBoard.cpp:2497
RemoteControlBoard::setRefCurrent
bool setRefCurrent(int j, double ref) override
Set the reference value of the current for a single motor.
Definition: RemoteControlBoard.cpp:2649
RemoteControlBoard::homingSingleJoint
bool homingSingleJoint(int j) override
homingSingleJoint: call the homing procedure for a single joint
Definition: RemoteControlBoard.cpp:2571
RemoteControlBoard::get1V1I1D
bool get1V1I1D(int v, int j, double *val)
Helper method used to get a double value from the remote peer.
Definition: RemoteControlBoard.cpp:719
RemoteControlBoard::send1V
bool send1V(int v)
Definition: RemoteControlBoard.cpp:402
RemoteControlBoard::setRefSpeed
bool setRefSpeed(int j, double sp) override
Set reference speed for a joint, this is the speed used during the interpolation of the trajectory.
Definition: RemoteControlBoard.cpp:1720
RemoteControlBoard::get1VDA
bool get1VDA(int v, double *val)
Helper method to get an array of double from the remote peer.
Definition: RemoteControlBoard.cpp:924
RemoteControlBoard::getControlMode
bool getControlMode(int j, int *mode) override
Get the current control mode.
Definition: RemoteControlBoard.cpp:2258
RemoteControlBoard::resetMotorEncoder
bool resetMotorEncoder(int j) override
Reset motor encoder, single motor.
Definition: RemoteControlBoard.cpp:1525
RemoteControlBoard::setPosition
bool setPosition(int j, double ref) override
Set new position for a single axis.
Definition: RemoteControlBoard.cpp:2349
IPWMControl.h
RemoteControlBoard::get1V1I1IA1B
bool get1V1I1IA1B(int v, const int len, const int *val1, bool &retVal)
Definition: RemoteControlBoard.cpp:824
RemoteControlBoard::writeStrict_singleJoint
bool writeStrict_singleJoint
Definition: RemoteControlBoard.h:97
RemoteControlBoard::setCalibrationParameters
bool setCalibrationParameters(int j, const CalibrationParameters &params) override
Start calibration, this method is very often platform specific.
Definition: RemoteControlBoard.cpp:1994
DeviceDriver.h
RemoteControlBoard::writeStrict_moreJoints
bool writeStrict_moreJoints
Definition: RemoteControlBoard.h:98
RemoteControlBoard::getCurrentRanges
bool getCurrentRanges(double *min, double *max) override
Get the full scale of the current measurements for all motors motor (e.g.
Definition: RemoteControlBoard.cpp:2703
RemoteControlBoard::getEncoderAcceleration
bool getEncoderAcceleration(int j, double *acc) override
Read the instantaneous acceleration of an axis.
Definition: RemoteControlBoard.cpp:1412
IMotor.h