|
YARP
Yet Another Robot Platform
|
|
Go to the documentation of this file.
10 #ifndef YARP_DEV_REMOTECONTROLBOARD_REMOTECONTROLBOARD_H
11 #define YARP_DEV_REMOTECONTROLBOARD_REMOTECONTROLBOARD_H
124 bool send2V(
int v1,
int v2);
125 bool send2V1I(
int v1,
int v2,
int axis);
127 bool send3V1I(
int v1,
int v2,
int v3,
int j);
134 bool set1V(
int code);
143 bool set1V2D(
int code,
double v);
160 bool get1V1D(
int code,
double& v)
const;
168 bool get1V1I(
int code,
int& v)
const;
177 bool set1V1I1D(
int code,
int j,
double val);
179 bool set1V1I2D(
int code,
int j,
double val1,
double val2);
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);
196 bool set2V1I(
int v1,
int v2,
int axis);
205 bool get1V1I1D(
int v,
int j,
double *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);
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);
245 bool get1VDA(
int v,
double *val);
262 bool get2V1DA(
int v1,
int v2,
double *val);
264 bool get2V2DA(
int v1,
int v2,
double *val1,
double *val2);
266 bool get1V1I1S(
int code,
int j, std::string &name);
268 bool get1V1I1IA1DA(
int v,
const int len,
const int *val1,
double *val2);
284 bool close()
override;
286 bool getAxes(
int *ax)
override;
361 bool positionMove(
const int n_joint,
const int *joints,
const double *refs)
override;
367 bool relativeMove(
const int n_joint,
const int *joints,
const double *refs)
override;
370 bool checkMotionDone(
const int n_joint,
const int *joints,
bool *flag)
override;
373 bool setRefSpeeds(
const int n_joint,
const int *joints,
const double *spds)
override;
376 bool setRefAccelerations(
const int n_joint,
const int *joints,
const double *accs)
override;
379 bool getRefSpeeds(
const int n_joint,
const int *joints,
double *spds)
override;
384 bool stop(
int j)
override;
385 bool stop(
const int len,
const int *val1)
override;
386 bool stop()
override;
403 bool getPWM(
int m,
double* val)
override;
405 bool setPWMLimit(
int m,
const double val)
override;
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;
415 bool getAxisName(
int j, std::string& name)
override;
422 bool park(
bool wait=
true)
override;
432 bool setRefTorques(
const int n_joint,
const int *joints,
const double *
t)
override;
441 bool getImpedance(
int j,
double *stiffness,
double *damping)
override;
443 bool setImpedance(
int j,
double stiffness,
double damping)
override;
445 bool getCurrentImpedanceLimit(
int j,
double *min_stiff,
double *max_stiff,
double *min_damp,
double *max_damp)
override;
450 bool getControlModes(
const int n_joint,
const int *joints,
int *modes)
override;
452 bool setControlModes(
const int n_joint,
const int *joints,
int *modes)
override;
457 bool setPositions(
const int n_joint,
const int *joints,
const double *refs)
override;
461 bool getRefPositions(
const int n_joint,
const int* joints,
double* refs)
override;
464 bool velocityMove(
const int n_joint,
const int *joints,
const double *spds)
override;
467 bool getRefVelocities(
const int n_joint,
const int* joints,
double* vels)
override;
493 bool setRefCurrents(
const int n_joint,
const int *joints,
const double *refs)
override;
510 #endif // YARP_DEV_REMOTECONTROLBOARD_REMOTECONTROLBOARD_H
bool getJointType(int j, yarp::dev::JointTypeEnum &type) override
bool getRemoteVariable(std::string key, yarp::os::Bottle &val) override
DiagnosticThread * diagnosticThread
bool abortCalibration() override
A simple collection of objects that can be described and transmitted in a portable way.
bool setRemoteVariable(std::string key, const yarp::os::Bottle &val) override
bool send2V(int v1, int v2)
bool getMotorEncoder(int j, double *v) override
Read the value of a motor encoder.
bool getMotorEncoderCountsPerRevolution(int m, double *cpr) override
Gets number of counts per revolution for motor encoder m.
IRemoteVariables interface.
bool disableAmp(int j) override
Disable the amplifier on a specific joint.
bool getRefPositions(double *refs) override
Get the last position reference for all axes.
bool getTemperatureLimit(int m, double *val) override
Retreives the current temperature limit for a specific motor.
bool getTargetPositions(double *refs) override
Get the last position reference for all axes.
bool getImpedance(int j, double *stiffness, double *damping) override
Get current impedance gains (stiffness,damping,offset) for a specific joint.
bool get1V1DA(int v1, double *val)
Helper method to get an array of double from the remote peer.
bool setEncoders(const double *vals) override
Set the value of all encoders.
bool send3V1I(int v1, int v2, int v3, int j)
A base class for nested structures that can be searched.
bool getPidErrorLimit(const PidControlTypeEnum &pidtype, int j, double *limit) override
Get the error limit for the controller on a specific joint.
bool enableAmp(int j) override
Enable the amplifier on a specific joint.
bool setPids(const PidControlTypeEnum &pidtype, const Pid *pids) override
Set new pid value on multiple axes.
contains the definition of a Vector type
bool getRefCurrent(int j, double *t) override
Get the reference value of the current for a single motor.
ProtocolVersion protocolVersion
Interface for control boards implementing impedance control.
bool resetEncoder(int j) override
Reset encoder, single joint.
bool getAxes(int *ax) override
Get the number of controlled axes.
bool getMotorEncoderTimed(int j, double *v, double *t) override
Read the instantaneous position of a motor encoder.
bool calibrateRobot() override
Calibrate robot by using an external calibrator.
bool setPidReferences(const PidControlTypeEnum &pidtype, const double *refs) override
Set the controller reference, multiple axes.
bool calibrationDone(int j) override
Check if the calibration is terminated, on a particular joint.
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 ...
bool setRefTorque(int j, double v) override
Set the reference value of the torque for a given joint.
bool getMotorEncodersTimed(double *encs, double *ts) override
Read the instantaneous position of all motor encoders.
bool getTargetPosition(const int joint, double *ref) override
Get the last position reference for the specified axis.
bool resetMotorEncoders() override
Reset motor encoders.
bool getDutyCycle(int j, double *out) override
Gets the current dutycycle of the output of the amplifier (i.e.
Interface implemented by all device drivers.
bool isPidEnabled(const PidControlTypeEnum &pidtype, int j, bool *enabled) override
Get the current status (enabled/disabled) of the pid.
bool getRefAcceleration(int j, double *acc) override
Get reference acceleration for a joint.
yarp::os::PortWriterBuffer< CommandMessage > command_buffer
RemoteControlBoard & operator=(RemoteControlBoard &&)=delete
bool getPeakCurrent(int m, double *val) override
bool getRefTorques(double *t) override
Get the reference value of the torque for all joints.
bool getCurrentRange(int j, double *min, double *max) override
Get the full scale of the current measurement for a given motor (e.g.
bool getDutyCycles(double *outs) override
Gets the current dutycycle of the output of the amplifier (i.e.
bool setMotorEncoder(int j, const double val) override
Set the value of the motor encoder for a given motor.
bool setPid(const PidControlTypeEnum &pidtype, int j, const Pid &pid) override
Set new pid value for a joint axis.
Buffer outgoing data to a port.
bool relativeMove(int j, double delta) override
Set relative position.
bool getPidErrorLimits(const PidControlTypeEnum &pidtype, double *limits) override
Get the error limit for all controllers.
remote_controlboard: The client side of the control board, connects to a remote controlboard using th...
bool setMotorEncoders(const double *vals) override
Set the value of all motor encoders.
bool getRefSpeed(int j, double *ref) override
Get reference speed for a joint.
bool getPidOutputs(const PidControlTypeEnum &pidtype, double *outs) override
Get the output of the controllers (e.g.
bool set1V1I1IA1DA(int v, const int len, const int *val1, const double *val2)
bool quitCalibrate() override
quitCalibrate: interrupt the calibration procedure
bool getLimits(int axis, double *min, double *max) override
Get the software limits for a particular axis.
bool getPidError(const PidControlTypeEnum &pidtype, int j, double *err) override
Get the current error for a joint.
bool get2V1DA(int v1, int v2, double *val)
Helper method to get an array of double from the remote peer.
bool get2V1I1IA1DA(int v1, int v2, const int n_joints, const int *joints, double *retVals, std::string functionName="")
bool getCurrent(int j, double *val) override
bool getTemperature(int m, double *val) override
Get temperature of a motor.
bool getRefVelocity(const int joint, double *vel) override
Get the last reference speed set by velocityMove for single joint.
bool getRefDutyCycles(double *refs) override
Gets the last reference sent using the setRefDutyCycles function.
bool getCurrents(double *vals) override
std::mutex extendedPortMutex
bool quitPark() override
quitPark: interrupt the park procedure
bool setMotorTorqueParams(int j, const MotorTorqueParameters params) override
Set a subset of motor parameters (bemf, ktau etc) useful for torque control.
bool velocityMove(int j, double v) override
Start motion at a given speed, single joint.
bool parkSingleJoint(int j, bool _wait=true) override
parkSingleJoint(): start the parking procedure for the single joint
bool getPidReferences(const PidControlTypeEnum &pidtype, double *refs) override
Get the current reference of all pid controllers.
bool getRefCurrents(double *t) override
Get the reference value of the currents for all motors.
bool setRefSpeeds(const int n_joint, const int *joints, const double *spds) override
Set reference speed on all joints.
bool setPidOffset(const PidControlTypeEnum &pidtype, int j, double v) override
Set offset value for a given controller.
bool getVelLimits(int axis, double *min, double *max) override
Get the software speed limits for a particular axis.
bool get1VIA(int v, int *val)
Helper method to get an array of integers from the remote peer.
bool setTemperatureLimit(int m, const double val) override
Set the temperature limit for a specific motor.
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.
bool setValWithPidType(int voc, PidControlTypeEnum type, int axis, double val)
bool getTemperatures(double *vals) override
Get temperature of all the motors.
A mini-server for network communication.
bool getPids(const PidControlTypeEnum &pidtype, Pid *pids) override
Get current pid value for a specific joint.
bool getRefVelocities(double *vels) override
Get the last reference speed set by velocityMove for all joints.
Interface settings the way the robot interacts with the environment: basic interaction types are Stif...
bool getPidErrors(const PidControlTypeEnum &pidtype, double *errs) override
Get the error of all joints.
bool set1V(int code)
Send a SET command without parameters and wait for a reply.
bool getEncoderTimed(int j, double *v, double *t) override
Read the instantaneous acceleration of all axes.
bool get2V1I1D(int v1, int v2, int j, double *val)
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...
bool getPid(const PidControlTypeEnum &pidtype, int j, Pid *pid) override
Get current pid value for a specific joint.
bool setControlModes(const int n_joint, const int *joints, int *modes) override
Set the current control mode for a subset of axes.
bool setPidReference(const PidControlTypeEnum &pidtype, int j, double ref) override
Set the controller reference for a given axis.
bool set1V1I1D(int code, int j, double val)
Helper method to set a double value to a single axis.
bool get2V1I2D(int v1, int v2, int j, double *val1, double *val2)
bool getGearboxRatio(int m, double *val) override
Get the gearbox ratio for a specific motor.
bool set1VDA(int v, const double *val)
Helper method used to set an array of double to all axes.
bool getMaxCurrent(int j, double *v) override
Returns the maximum electric current allowed for a given motor.
bool getNumberOfMotors(int *num) override
Retrieves the number of controlled axes from the current physical interface.
Interface for setting control mode in control board.
bool setNominalCurrent(int m, const double val) override
bool getValWithPidType(int voc, PidControlTypeEnum type, int j, double *val)
bool getPWM(int m, double *val) override
bool setMaxCurrent(int j, double v) override
bool setPositions(const int n_joint, const int *joints, const double *refs) override
Set new reference point for all axes.
yarp::dev::impl::jointData last_wholePart
Interface for control devices, calibration commands.
bool getRefSpeeds(const int n_joint, const int *joints, double *spds) override
Get reference speed of all joints.
bool getNominalCurrent(int m, double *val) override
bool setPWMLimit(int m, const double val) override
bool calibrateSingleJoint(int j) override
calibrateSingleJoint: call the calibration procedure for the single joint
Interface for getting information about specific axes, if available.
bool setImpedanceOffset(int j, double offset) override
Set current force Offset for a specific joint.
bool setEncoder(int j, double val) override
Set the value of the encoder for a given joint.
bool setRefCurrents(const double *refs) override
Set the reference value of the currents for all motors.
bool get1V1B(int v, bool &val)
bool send1V1I(int v, int axis)
bool getEncoders(double *encs) override
Read the position of all axes.
bool get1V1I1B(int v, int j, bool &val)
Helper method used to get a double value from the remote peer.
define control board standard interfaces
bool park(bool wait=true) override
RemoteControlBoard(RemoteControlBoard &&)=delete
yarp::dev::impl::jointData last_singleJoint
Interface for control devices, commands to get/set position and veloity limits.
bool getPidOutput(const PidControlTypeEnum &pidtype, int j, double *out) override
Get the output of the controller (e.g.
bool checkProtocolVersion(bool ignore)
bool getControlModes(int *modes) override
Get the current control mode (multiple joints).
bool getInteractionMode(int axis, yarp::dev::InteractionModeEnum *mode) override
Get the current interaction mode of the robot, values can be stiff or compliant.
bool setRefTorques(const double *t) override
Set the reference value of the torque for all joints.
bool set1V2D(int code, double v)
Send a SET command and an additional double valued variable and then wait for a reply.
bool setPeakCurrent(int m, const double val) override
bool getMotorEncoderSpeeds(double *spds) override
Read the instantaneous speed of all motor encoders.
bool abortPark() override
bool calibrateAxisWithParams(int j, unsigned int ui, double v1, double v2, double v3) override
Start calibration, this method is very often platform specific.
bool getPidReference(const PidControlTypeEnum &pidtype, int j, double *ref) override
Get the current reference of the pid controller for a specific joint.
define control board standard interfaces
bool getMotorEncoderAcceleration(int j, double *acc) override
Read the instantaneous acceleration of a motor encoder.
Interface for controlling an axis, by sending directly a PWM reference signal to a motor.
bool open(Searchable &config) override
Open the DeviceDriver.
bool setPidErrorLimit(const PidControlTypeEnum &pidtype, int j, double limit) override
Set the error limit for the controller on a specifi joint.
bool isCalibratorDevicePresent(bool *isCalib) override
isCalibratorDevicePresent: check if a calibrator device has been set
bool setRefDutyCycles(const double *v) override
Sets the reference dutycycle for all the motors.
RemoteControlBoard & operator=(const RemoteControlBoard &)=delete
bool stop() override
Stop motion, multiple joints.
bool setGearboxRatio(int m, const double val) override
Set the gearbox ratio for a specific motor.
bool get2V2DA(int v1, int v2, double *val1, double *val2)
bool setRefAccelerations(const int n_joint, const int *joints, const double *accs) override
Set reference acceleration on all joints.
bool disablePid(const PidControlTypeEnum &pidtype, int j) override
Disable the pid computation for a joint.
bool enablePid(const PidControlTypeEnum &pidtype, int j) override
Enable the pid computation for a joint.
StateExtendedInputPort extendedIntputStatePort
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).
bool getPWMLimit(int m, double *val) override
bool setControlMode(const int j, const int mode) override
Set the current control mode.
bool resetEncoders() override
Reset encoders.
RemoteControlBoard(const RemoteControlBoard &)=delete
bool send2V1I(int v1, int v2, int axis)
bool getRefAccelerations(const int n_joint, const int *joints, double *accs) override
Get reference acceleration for a joint.
Control board, encoder interface.
bool getTorques(double *t) override
Get the value of the torque for all joints (this is the feedback if you have torque sensors).
bool getRefTorque(int j, double *t) override
Get the reference value of the torque for a given joint.
Stamp getLastInputStamp() override
Get the time stamp for the last read data.
Interface for control devices, amplifier commands.
bool getEncodersTimed(double *encs, double *ts) override
Read the instantaneous acceleration of all axes.
bool setRefDutyCycle(int j, double v) override
Sets the reference dutycycle to a single motor.
bool get1V1I1IA1DA(int v, const int len, const int *val1, double *val2)
bool get1V1I1S(int code, int j, std::string &name)
bool getEncoderAccelerations(double *accs) override
Read the instantaneous acceleration of all axes.
Control board, encoder interface.
bool getEncoder(int j, double *v) override
Read the value of an encoder.
bool getRefPosition(const int joint, double *ref) override
Get the last position reference for the specified axis.
bool getMotorEncoderSpeed(int j, double *sp) override
Read the istantaneous speed of a motor encoder.
bool get1V1I1I(int v, int j, int *val)
Helper method used to get an integer value from the remote peer.
Interface for control boards implementing velocity control.
bool checkMotionDone(int j, bool *flag) override
Check if the current trajectory is terminated.
bool positionMove(int j, double ref) override
Set new reference point for a single axis.
bool getMotorEncoderAccelerations(double *accs) override
Read the instantaneous acceleration of all motor encoders.
bool set1V1I(int code, int v)
Send a SET command with an additional integer valued variable and then wait for a reply.
An abstraction for a time stamp and/or sequence number.
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.
bool get1V1I(int code, int &v) const
Send a GET command expecting an integer value in return.
Interface for control boards implementing current control.
Interface for a generic control board device implementing a PID controller, with scaled arguments.
bool getEncoderSpeeds(double *spds) override
Read the instantaneous speed of all axes.
bool calibrateWholePart() override
calibrateWholePart: call the procedure for calibrating the whole device
bool setMotorEncoderCountsPerRevolution(int m, const double cpr) override
Sets number of counts per revolution for motor encoder m.
bool getTorqueRange(int j, double *min, double *max) override
Get the full scale of the torque sensor of a given joint.
yarp::os::PortReaderBuffer< yarp::sig::Vector > state_buffer
Interface for a generic control board device implementing position control.
Control board, extend encoder interface with timestamps.
RemoteControlBoard()=default
bool setRefAcceleration(int j, double acc) override
Set reference acceleration for a joint.
bool set2V1I1D(int v1, int v2, int axis, double val)
bool getMotorEncoders(double *encs) override
Read the position of all motor encoders.
bool setPidErrorLimits(const PidControlTypeEnum &pidtype, const double *limits) override
Get the error limit for the controller on all joints.
bool getRefDutyCycle(int j, double *ref) override
Gets the last reference sent using the setRefDutyCycle function.
bool getPowerSupplyVoltage(int m, double *val) override
bool getAxisName(int j, std::string &name) override
define control board standard interfaces
~RemoteControlBoard() override=default
Contains the parameters for a PID.
bool getAmpStatus(int *st) override
Interface for control boards implementing torque control.
bool set2V2DA(int v1, int v2, const double *val1, const double *val2)
bool setImpedance(int j, double stiffness, double damping) override
Set current impedance gains (stiffness,damping) for a specific joint.
bool getEncoderSpeed(int j, double *sp) override
Read the istantaneous speed of an axis.
bool getRemoteVariablesList(yarp::os::Bottle *listOfKeys) override
bool close() override
Close the device driver and stop the port connections.
bool getNumberOfMotorEncoders(int *num) override
Get the number of available motor encoders.
bool setInteractionMode(int axis, yarp::dev::InteractionModeEnum mode) override
Set the interaction mode of the robot, values can be stiff or compliant.
bool parkWholePart() override
parkWholePart: start the parking procedure for the whole part
bool getTorqueRanges(double *min, double *max) override
Get the full scale of the torque sensors of all joints.
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...
bool set2V1DA(int v1, int v2, const double *val)
bool set2V1I(int v1, int v2, int axis)
bool get1V1D(int code, double &v) const
Send a GET command expecting a double value in return.
IRemoteCalibrator interface is meant to remotize the access of the calibration device in order to all...
bool getImpedanceOffset(int j, double *offset) override
Get current force Offset for a specific joint.
bool homingWholePart() override
homingWholePart: call the homing procedure for a the whole part/device
bool set1V1I2D(int code, int j, double val1, double val2)
Interface for a generic control board device implementing position control.
bool get1V1I2D(int code, int axis, double *v1, double *v2)
bool getMotorTorqueParams(int j, MotorTorqueParameters *params) override
Get a subset of motor parameters (bemf, ktau etc) useful for torque control.
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.
bool setRefCurrent(int j, double ref) override
Set the reference value of the current for a single motor.
bool homingSingleJoint(int j) override
homingSingleJoint: call the homing procedure for a single joint
bool get1V1I1D(int v, int j, double *val)
Helper method used to get a double value from the remote peer.
bool setRefSpeed(int j, double sp) override
Set reference speed for a joint, this is the speed used during the interpolation of the trajectory.
bool get1VDA(int v, double *val)
Helper method to get an array of double from the remote peer.
bool getControlMode(int j, int *mode) override
Get the current control mode.
bool resetMotorEncoder(int j) override
Reset motor encoder, single motor.
bool setPosition(int j, double ref) override
Set new position for a single axis.
bool get1V1I1IA1B(int v, const int len, const int *val1, bool &retVal)
bool writeStrict_singleJoint
bool setCalibrationParameters(int j, const CalibrationParameters ¶ms) override
Start calibration, this method is very often platform specific.
bool writeStrict_moreJoints
bool getCurrentRanges(double *min, double *max) override
Get the full scale of the current measurements for all motors motor (e.g.
bool getEncoderAcceleration(int j, double *acc) override
Read the instantaneous acceleration of an axis.