6#ifndef YARP_DEVICE_FAKE_MOTIONCONTROL
7#define YARP_DEVICE_FAKE_MOTIONCONTROL
143 VERY_VERY_VERBOSE = 6
148 std::recursive_mutex _mutex;
149 double _cycleTimestamp;
151 int *_axisMap=
nullptr;
152 double* _angleToEncoder =
nullptr;
153 double* _encodersStamp =
nullptr;
154 double* _ampsToSensor =
nullptr;
155 double* _dutycycleToPWM =
nullptr;
156 double* _tempLimit =
nullptr;
157 float* _DEPRECATED_encoderconversionfactor =
nullptr;
158 float* _DEPRECATED_encoderconversionoffset =
nullptr;
160 int* _jointEncoderRes =
nullptr;
161 int* _rotorEncoderRes =
nullptr;
163 double* _gearbox =
nullptr;
164 bool* _hasHallSensor =
nullptr;
165 bool* _hasTempSensor =
nullptr;
166 bool* _hasRotorEncoder =
nullptr;
167 bool* _hasRotorEncoderIndex =
nullptr;
168 int* _rotorIndexOffset =
nullptr;
169 int* _motorPoles =
nullptr;
170 double* _rotorlimits_max =
nullptr;
171 double* _rotorlimits_min =
nullptr;
172 std::vector<yarp::dev::PidWithExtraInfo>* _ppids =
nullptr;
173 std::vector<yarp::dev::PidWithExtraInfo>* _tpids =
nullptr;
174 std::vector<yarp::dev::PidWithExtraInfo>* _cpids =
nullptr;
175 std::vector<yarp::dev::PidWithExtraInfo>* _vpids =
nullptr;
176 std::vector<yarp::dev::PidWithExtraInfo>* _pdpids =
nullptr;
177 std::vector<yarp::dev::PidWithExtraInfo>* _vdpids =
nullptr;
178 std::vector<yarp::dev::PidWithExtraInfo>* _mpids =
nullptr;
180 std::vector<bool> *_ppids_ena =
nullptr;
181 std::vector<bool> *_tpids_ena =
nullptr;
182 std::vector<bool> *_cpids_ena =
nullptr;
183 std::vector<bool> *_vpids_ena =
nullptr;
184 std::vector<bool> *_pdpids_ena =
nullptr;
185 std::vector<bool> *_vdpids_ena =
nullptr;
186 std::vector<bool> *_mpids_ena =
nullptr;
188 std::vector<double> *_ppids_lim =
nullptr;
189 std::vector<double> *_tpids_lim =
nullptr;
190 std::vector<double> *_cpids_lim =
nullptr;
191 std::vector<double> *_vpids_lim =
nullptr;
192 std::vector<double> *_pdpids_lim =
nullptr;
193 std::vector<double> *_vdpids_lim =
nullptr;
194 std::vector<double> *_mpids_lim =
nullptr;
196 std::vector<double> *_ppids_ref =
nullptr;
197 std::vector<double> *_tpids_ref =
nullptr;
198 std::vector<double> *_cpids_ref =
nullptr;
199 std::vector<double> *_vpids_ref =
nullptr;
200 std::vector<double> *_pdpids_ref =
nullptr;
201 std::vector<double> *_vdpids_ref =
nullptr;
202 std::vector<double> *_mpids_ref =
nullptr;
204 std::vector<double> *_ppids_ffd =
nullptr;
205 std::vector<double> *_tpids_ffd =
nullptr;
206 std::vector<double> *_cpids_ffd =
nullptr;
207 std::vector<double> *_vpids_ffd =
nullptr;
208 std::vector<double> *_pdpids_ffd =
nullptr;
209 std::vector<double> *_vdpids_ffd =
nullptr;
210 std::vector<double> *_mpids_ffd =
nullptr;
212 std::vector<yarp::dev::SelectableControlModeEnum>* _availableControlModes =
nullptr;
213 std::vector<yarp::dev::PidControlTypeEnum>* _availablePids =
nullptr;
216 std::string* _axisName =
nullptr;
219 double* _limitsMin =
nullptr;
220 double* _limitsMax =
nullptr;
221 double* _kinematic_mj =
nullptr;
224 double* _minJntCmdVelocity =
nullptr;
225 double* _maxJntCmdVelocity =
nullptr;
226 double* _maxMotorVelocity =
nullptr;
227 int* _velocityShifts =
nullptr;
228 int* _velocityTimeout =
nullptr;
229 double* _kbemf =
nullptr;
230 double* _ktau =
nullptr;
231 int* _kbemf_scale =
nullptr;
232 int* _ktau_scale =
nullptr;
233 double* _viscousPos =
nullptr;
234 double* _viscousNeg =
nullptr;
235 double* _coulombPos =
nullptr;
236 double* _coulombNeg =
nullptr;
237 double* _velocityThres =
nullptr;
238 int* _filterType =
nullptr;
239 int* _torqueSensorId =
nullptr;
240 int* _torqueSensorChan =
nullptr;
241 double* _maxTorque =
nullptr;
242 double* _newtonsToSensor =
nullptr;
243 bool* checking_motiondone =
nullptr;
244 double* _last_position_move_time =
nullptr;
245 double* _motorPwmLimits =
nullptr;
246 double* _torques =
nullptr;
247 bool* _braked=
nullptr;
248 bool* _autobraked=
nullptr;
253 bool useRawEncoderData;
255 bool _torqueControlEnabled;
257 enum torqueControlUnitsType {T_MACHINE_UNITS=0, T_METRIC_UNITS=1};
258 torqueControlUnitsType _torqueControlUnits;
260 enum positionControlUnitsType {P_MACHINE_UNITS=0, P_METRIC_UNITS=1};
261 positionControlUnitsType _positionControlUnits;
264 bool velocity_watchdog_enabled =
false;
265 bool openloop_watchdog_enabled =
false;
266 int *_controlModes =
nullptr;
267 int *_hwfault_code =
nullptr;
268 std::string *_hwfault_message =
nullptr;
269 bool *_enabledAmp =
nullptr;
270 bool *_enabledPid =
nullptr;
271 bool *_calibrated =
nullptr;
272 double *_posCtrl_references =
nullptr;
273 double *_posDir_references =
nullptr;
274 double *_ref_speeds =
nullptr;
275 double *_command_speeds =
nullptr;
276 double *_dir_vel_commands =
nullptr;
277 double *_ref_accs =
nullptr;
278 double *_ref_torques =
nullptr;
279 double *_ref_currents =
nullptr;
281 double *_stiffness =
nullptr;
282 double *_damping =
nullptr;
283 double *_force_offset =
nullptr;
286 yarp::sig::Vector pwm, pwmLimit, refpwm, supplyVoltage,last_velocity_command, last_pwm_command;
292 VerboseLevel verbose;
300 bool close()
override;
308 bool alloc(
int njoints);
571 void setInfoPPids(
int j);
572 void setInfoVPids(
int j);
573 void setInfoPDPids(
int j);
574 void setInfoVDPids(
int j);
575 void setInfoTPids(
int j);
576 void setInfoCPids(
int j);
577 void setInfoMPids(
int j);
define control board standard interfaces
virtual analog sensor interface
contains the definition of a Vector type
This class is the parameters parser for class FakeMotionControl.
fakeMotionControl: The aim of this device is to mimic the expected behavior of a real motion control ...
yarp::dev::ReturnValue setPosLimitsRaw(int axis, double min, double max) override
Set the software limits for a particular axis, the behavior of the control card when these limits are...
virtual bool getHasTempSensorsRaw(int j, int &ret)
yarp::dev::ReturnValue setInteractionModesRaw(const std::vector< int > &joints, const std::vector< yarp::dev::InteractionModeEnum > &modes) override
Set the interaction mode of the robot for a set of joints, values can be stiff or compliant.
yarp::dev::ReturnValue getInteractionModeRaw(int j, yarp::dev::InteractionModeEnum &_mode) override
Get the current interaction mode of the robot, values can be stiff or compliant.
yarp::dev::ReturnValue getPosLimitsRaw(int axis, double *min, double *max) override
Get the software limits for a particular axis.
yarp::dev::ReturnValue getRefDutyCycleRaw(int j, double *v) override
Gets the last reference sent using the setRefDutyCycleRaw function.
yarp::dev::ReturnValue setMotorEncoderRaw(int m, const double val) override
Set the value of the motor encoder for a given motor.
yarp::dev::ReturnValue getMotorEncoderSpeedsRaw(double *spds) override
Read the instantaneous speed of all motor encoders.
yarp::dev::ReturnValue getPidOutputRaw(const yarp::dev::PidControlTypeEnum &pidtype, int j, double *out) override
Get the output of the controller (e.g.
yarp::dev::ReturnValue setPidReferenceRaw(const yarp::dev::PidControlTypeEnum &pidtype, int j, double ref) override
Set the controller reference for a given axis.
yarp::dev::ReturnValue getEncoderTimedRaw(int j, double *encs, double *stamp) override
Read the instantaneous acceleration of all axes.
yarp::dev::ReturnValue velocityMoveRaw(int j, double sp) override
Start motion at a given speed, single joint.
yarp::dev::ReturnValue getPidOffsetRaw(const yarp::dev::PidControlTypeEnum &pidtype, int j, double &v) override
Get the currently set offset value for the specified PID controller.
yarp::dev::ReturnValue setTemperatureLimitRaw(int m, const double temp) override
Set the temperature limit for a specific motor.
yarp::dev::ReturnValue getImpedanceRaw(int j, double *stiffness, double *damping) override
Get current impedance parameters (stiffness,damping,offset) for a specific joint.
yarp::dev::ReturnValue setImpedanceRaw(int j, double stiffness, double damping) override
Set current impedance parameters (stiffness,damping) for a specific joint.
yarp::dev::ReturnValue setVelLimitsRaw(int axis, double min, double max) override
Set the software speed limits for a particular axis, the behavior of the control card when these limi...
yarp::dev::ReturnValue isPidEnabledRaw(const yarp::dev::PidControlTypeEnum &pidtype, int j, bool &enabled) override
Get the current status (enabled/disabled) of the PID controller.
yarp::dev::ReturnValue getEncoderAccelerationRaw(int j, double *spds) override
Read the instantaneous acceleration of an axis.
yarp::dev::ReturnValue setPidOffsetRaw(const yarp::dev::PidControlTypeEnum &pidtype, int j, double v) override
Set an offset value for a given controller.
yarp::dev::ReturnValue getInteractionModesRaw(const std::vector< int > &joints, std::vector< yarp::dev::InteractionModeEnum > &modes) override
Get the current interaction mode of the robot for a set of joints, values can be stiff or compliant.
yarp::dev::ReturnValue setAutoBrakeEnabledRaw(int j, bool enabled) override
virtual bool getJointEncoderTypeRaw(int j, int &type)
yarp::dev::ReturnValue getEncoderAccelerationsRaw(double *accs) override
Read the instantaneous acceleration of all axes.
yarp::dev::ReturnValue getTemperatureLimitRaw(int m, double *temp) override
Retrieves the current temperature limit for a specific motor.
yarp::dev::ReturnValue setPositionsRaw(const int n_joint, const int *joints, const double *refs) override
Set new reference point for all axes.
yarp::dev::ReturnValue getMaxCurrentRaw(int j, double *val) override
Returns the maximum electric current allowed for a given motor.
yarp::dev::ReturnValue setTrajSpeedsRaw(const double *spds) override
Set reference speed on all joints.
yarp::dev::ReturnValue setPidFeedforwardRaw(const yarp::dev::PidControlTypeEnum &pidtype, int j, double v) override
Set the feedforward value for the specified PID controller.
yarp::dev::ReturnValue getPidFeedforwardRaw(const yarp::dev::PidControlTypeEnum &pidtype, int j, double &v) override
Get the currently set feedforward value for the specified PID controller.
yarp::dev::ReturnValue getCurrentRangesRaw(double *min, double *max) override
Get the full scale of the current measurements for all motors motor (e.g.
yarp::dev::ReturnValue getTrajSpeedRaw(int j, double *ref) override
Get reference speed for a joint.
bool open(yarp::os::Searchable &par) override
Open the DeviceDriver.
yarp::dev::ReturnValue getImpedanceOffsetRaw(int j, double *offset) override
Get current force Offset for a specific joint.
yarp::dev::ReturnValue resetMotorEncoderRaw(int m) override
Reset motor encoder, single motor.
yarp::dev::ReturnValue getRefCurrentsRaw(double *t) override
Get the reference value of the currents for all motors.
yarp::dev::ReturnValue getVelLimitsRaw(int axis, double *min, double *max) override
Get the software speed limits for a particular axis.
virtual bool getHasHallSensorRaw(int j, int &ret)
yarp::dev::ReturnValue getEncoderSpeedsRaw(double *spds) override
Read the instantaneous acceleration of an axis.
yarp::dev::ReturnValue disablePidRaw(const yarp::dev::PidControlTypeEnum &pidtype, int j) override
Disable the PID computation for a joint.
yarp::dev::ReturnValue getMotorEncoderTimedRaw(int m, double *encs, double *stamp) override
Read the instantaneous position of a motor encoder.
yarp::dev::ReturnValue setPidErrorLimitRaw(const yarp::dev::PidControlTypeEnum &pidtype, int j, double limit) override
Set the error limit for the controller on a specific joint.
yarp::dev::ReturnValue getMotorEncodersTimedRaw(double *encs, double *stamps) override
Read the instantaneous position of all motor encoders.
virtual bool initialised()
yarp::dev::ReturnValue setTrajAccelerationsRaw(const double *accs) override
Set reference acceleration on all joints.
yarp::dev::ReturnValue setMotorEncoderCountsPerRevolutionRaw(int m, const double cpr) override
Sets number of counts per revolution for motor encoder m.
bool threadInit() override
Initialization method.
yarp::dev::ReturnValue calibrateAxisWithParamsRaw(int axis, unsigned int type, double p1, double p2, double p3) override
Start calibration, this method is very often platform specific.
yarp::dev::ReturnValue getRefDutyCyclesRaw(double *v) override
Gets the last reference sent using the setRefDutyCyclesRaw function.
yarp::dev::VAS_status getVirtualAnalogSensorStatusRaw(int ch) override
Check the status of a given channel.
yarp::dev::ReturnValue positionMoveRaw(int j, double ref) override
Set new reference point for a single axis.
yarp::dev::ReturnValue getMotorEncodersRaw(double *encs) override
Read the position of all motor encoders.
yarp::dev::ReturnValue getTorqueRaw(int j, double *t) override
Get the value of the torque on a given joint (this is the feedback if you have a torque sensor).
yarp::dev::ReturnValue getLastJointFaultRaw(int j, int &fault, std::string &message) override
yarp::dev::ReturnValue setRefDutyCycleRaw(int j, double v) override
Sets the reference dutycycle of a single motor.
yarp::dev::ReturnValue setRefTorquesRaw(const double *t) override
Set the reference value of the torque for all joints.
int getVirtualAnalogSensorChannelsRaw() override
Get the number of channels of the virtual sensor.
yarp::dev::ReturnValue setMotorTorqueParamsRaw(int j, const yarp::dev::MotorTorqueParameters params) override
Set the motor parameters.
yarp::dev::ReturnValue getTrajSpeedsRaw(double *spds) override
Get reference speed of all joints.
yarp::dev::ReturnValue getTorqueRangesRaw(double *min, double *max) override
Get the full scale of the torque sensors of all joints.
yarp::dev::ReturnValue setRefDutyCyclesRaw(const double *v) override
Sets the reference dutycycle for all motors.
yarp::dev::ReturnValue resetEncodersRaw() override
Reset encoders.
yarp::dev::ReturnValue getPidReferenceRaw(const yarp::dev::PidControlTypeEnum &pidtype, int j, double *ref) override
Get the current reference of the PID controller for a specific joint.
yarp::dev::ReturnValue getMotorEncoderAccelerationRaw(int m, double *spds) override
Read the instantaneous acceleration of a motor encoder.
yarp::dev::ReturnValue getTorqueRangeRaw(int j, double *min, double *max) override
Get the full scale of the torque sensor of a given joint.
yarp::dev::ReturnValue getMotorTorqueParamsRaw(int j, yarp::dev::MotorTorqueParameters *params) override
Get the motor parameters.
yarp::dev::ReturnValue setRefTorqueRaw(int j, double t) override
Set the reference value of the torque for a given joint.
yarp::dev::ReturnValue setEncoderRaw(int j, double val) override
Set the value of the encoder for a given joint.
bool fromConfig(yarp::os::Searchable &config)
yarp::dev::ReturnValue getPidErrorsRaw(const yarp::dev::PidControlTypeEnum &pidtype, double *errs) override
Get the error of all joints.
yarp::dev::ReturnValue setManualBrakeActiveRaw(int j, bool active) override
yarp::dev::ReturnValue setRefVelocityRaw(int jnt, double vel) override
Set the velocity of single joint.
yarp::dev::ReturnValue getRefTorquesRaw(double *t) override
Get the reference value of the torque for all joints.
yarp::dev::ReturnValue getAmpStatusRaw(int *st) override
yarp::dev::ReturnValue setMotorEncodersRaw(const double *vals) override
Set the value of all motor encoders.
yarp::dev::ReturnValue getRefPositionRaw(const int joint, double *ref) override
Get the last position reference for the specified axis.
yarp::dev::ReturnValue getControlModeRaw(int j, yarp::dev::ControlModeEnum &mode) override
yarp::dev::ReturnValue setPidErrorLimitsRaw(const yarp::dev::PidControlTypeEnum &pidtype, const double *limits) override
Get the error limit for the controller on all joints.
yarp::dev::ReturnValue getTargetVelocityRaw(const int joint, double *ref) override
Get the last reference speed set by velocityMove for single joint.
virtual bool getHasRotorEncoderIndexRaw(int j, int &ret)
bool updateVirtualAnalogSensorMeasureRaw(yarp::sig::Vector &measure) override
Set a vector of torque values for virtual sensor.
yarp::dev::ReturnValue setTrajAccelerationRaw(int j, double acc) override
Set reference acceleration for a joint.
yarp::dev::ReturnValue getPidOutputsRaw(const yarp::dev::PidControlTypeEnum &pidtype, double *outs) override
Get the output of the controllers (e.g.
void resizeBuffers()
Resize previously allocated buffers.
yarp::dev::ReturnValue getGearboxRatioRaw(int m, double *gearbox) override
Get the gearbox ratio for a specific motor.
yarp::dev::ReturnValue isJointBrakedRaw(int j, bool &braked) const override
yarp::dev::ReturnValue getDutyCyclesRaw(double *v) override
Gets the current dutycycle of the output of the amplifier (i.e.
yarp::dev::ReturnValue getTargetPositionsRaw(double *refs) override
Get the last position reference for all axes.
void threadRelease() override
Release method.
yarp::dev::ReturnValue getCurrentsRaw(double *vals) override
yarp::dev::ReturnValue getEncodersRaw(double *encs) override
Read the position of all axes.
yarp::dev::ReturnValue getPidExtraInfosRaw(const yarp::dev::PidControlTypeEnum &pidtype, std::vector< yarp::dev::PidExtraInfo > &units) override
Get PID extra info and measurement units for a specific joint.
virtual bool getMotorPolesRaw(int j, int &poles)
yarp::dev::ReturnValue getTemperaturesRaw(double *vals) override
Get temperature of all the motors.
yarp::dev::ReturnValue getTargetPositionRaw(const int joint, double *ref) override
Get the last position reference for the specified axis.
yarp::dev::ReturnValue getRefVelocityRaw(const int jnt, double &vel) override
Get the last reference velocity set by setRefVelocity() for a single joint.
yarp::dev::ReturnValue getNumberOfMotorsRaw(int *num) override
Get the number of available motors.
yarp::dev::ReturnValue setPidReferencesRaw(const yarp::dev::PidControlTypeEnum &pidtype, const double *refs) override
Set the controller reference, multiple axes.
yarp::dev::ReturnValue getEncoderSpeedRaw(int j, double *sp) override
Read the instantaneous speed of an axis.
yarp::dev::ReturnValue setEncodersRaw(const double *vals) override
Set the value of all encoders.
virtual bool getRotorIndexOffsetRaw(int j, double &rotorOffset)
yarp::dev::ReturnValue setRefCurrentRaw(int j, double t) override
Set the reference value of the current for a single motor.
yarp::dev::ReturnValue getTargetVelocitiesRaw(double *refs) override
Get the last reference speed set by velocityMove for all joints.
yarp::dev::ReturnValue checkMotionDoneRaw(bool &flag) override
Check if the current trajectory all joints is terminated.
yarp::dev::ReturnValue getDutyCycleRaw(int j, double *v) override
Gets the current dutycycle of the output of the amplifier (i.e.
yarp::dev::ReturnValue getMotorEncoderRaw(int m, double *v) override
Read the value of a motor encoder.
yarp::dev::ReturnValue getCurrentImpedanceLimitRaw(int j, double *min_stiff, double *max_stiff, double *min_damp, double *max_damp) override
Get the current impedance limits for a specific joint.
yarp::dev::ReturnValue getRefCurrentRaw(int j, double *t) override
Get the reference value of the current for a single motor.
yarp::dev::ReturnValue getPidRaw(const yarp::dev::PidControlTypeEnum &pidtype, int j, yarp::dev::Pid *pid) override
Get current PID value for a specific joint.
yarp::dev::ReturnValue getAutoBrakeEnabledRaw(int j, bool &enabled) const override
yarp::dev::ReturnValue getPowerSupplyVoltageRaw(int j, double *val) override
yarp::dev::ReturnValue setPWMLimitRaw(int j, const double val) override
virtual bool getKinematicMJRaw(int j, double &rotres)
yarp::dev::ReturnValue getRefTorqueRaw(int j, double *t) override
Set the reference value of the torque for a given joint.
virtual bool getJointEncoderResolutionRaw(int m, double &jntres)
yarp::dev::ReturnValue getPidReferencesRaw(const yarp::dev::PidControlTypeEnum &pidtype, double *refs) override
Get the current reference of all PID controllers.
yarp::dev::ReturnValue disableAmpRaw(int j) override
Disable the amplifier on a specific joint.
yarp::dev::ReturnValue setImpedanceOffsetRaw(int j, double offset) override
Set current force Offset for a specific joint.
yarp::dev::ReturnValue setCalibrationParametersRaw(int axis, const yarp::dev::CalibrationParameters ¶ms) override
Start calibration, this method is very often platform specific.
yarp::dev::ReturnValue resetPidRaw(const yarp::dev::PidControlTypeEnum &pidtype, int j) override
Reset the controller of a given joint, usually sets the current status of the joint as the reference ...
bool alloc(int njoints)
Allocated buffers.
yarp::dev::ReturnValue getNumberOfMotorEncodersRaw(int *num) override
Get the number of available motor encoders.
yarp::dev::ReturnValue setPidRaw(const yarp::dev::PidControlTypeEnum &pidtype, int j, const yarp::dev::Pid &pid) override
Set new PID value for a joint axis.
yarp::dev::ReturnValue getCurrentRaw(int j, double *val) override
yarp::dev::ReturnValue getJointTypeRaw(int axis, yarp::dev::JointTypeEnum &type) override
yarp::dev::ReturnValue setPeakCurrentRaw(int m, const double val) override
virtual bool getRotorEncoderTypeRaw(int j, int &type)
yarp::dev::ReturnValue getEncodersTimedRaw(double *encs, double *stamps) override
Read the instantaneous acceleration of all axes.
yarp::dev::ReturnValue getNominalCurrentRaw(int m, double *val) override
yarp::dev::ReturnValue calibrationDoneRaw(int j) override
Check if the calibration is terminated, on a particular joint.
yarp::dev::ReturnValue getPidErrorRaw(const yarp::dev::PidControlTypeEnum &pidtype, int j, double *err) override
Get the current error for a joint.
yarp::dev::ReturnValue getTrajAccelerationRaw(int j, double *acc) override
Get reference acceleration for a joint.
yarp::dev::ReturnValue resetEncoderRaw(int j) override
Reset encoder, single joint.
yarp::dev::ReturnValue getTemperatureRaw(int m, double *val) override
Get temperature of a motor.
yarp::dev::ReturnValue getPidExtraInfoRaw(const yarp::dev::PidControlTypeEnum &pidtype, int j, yarp::dev::PidExtraInfo &units) override
Get PID extra info and measurement units for a specific joint.
yarp::dev::ReturnValue setPidsRaw(const yarp::dev::PidControlTypeEnum &pidtype, const yarp::dev::Pid *pids) override
Set new PID value on multiple axes.
yarp::dev::ReturnValue setMaxCurrentRaw(int j, double val) override
yarp::dev::ReturnValue setControlModeRaw(int j, yarp::dev::SelectableControlModeEnum mode) override
bool close() override
Close the DeviceDriver.
yarp::dev::ReturnValue relativeMoveRaw(int j, double delta) override
Set relative position.
yarp::dev::ReturnValue getMotorEncoderAccelerationsRaw(double *accs) override
Read the instantaneous acceleration of all motor encoders.
yarp::dev::ReturnValue getMotorEncoderSpeedRaw(int m, double *sp) override
Read the instantaneous speed of a motor encoder.
yarp::dev::ReturnValue resetMotorEncodersRaw() override
Reset motor encoders.
yarp::dev::ReturnValue getCurrentRangeRaw(int j, double *min, double *max) override
Get the full scale of the current measurement for a given motor (e.g.
yarp::dev::ReturnValue getMotorEncoderCountsPerRevolutionRaw(int m, double *v) override
Gets number of counts per revolution for motor encoder m.
yarp::dev::ReturnValue enablePidRaw(const yarp::dev::PidControlTypeEnum &pidtype, int j) override
Enable the PID computation for a joint.
yarp::dev::ReturnValue getRefPositionsRaw(double *refs) override
Get the last position reference for all axes.
yarp::dev::ReturnValue setTrajSpeedRaw(int j, double sp) override
Set reference speed for a joint, this is the speed used during the interpolation of the trajectory.
yarp::dev::ReturnValue getPidErrorLimitRaw(const yarp::dev::PidControlTypeEnum &pidtype, int j, double *limit) override
Get the error limit for the controller on a specific joint.
yarp::dev::ReturnValue setNominalCurrentRaw(int m, const double val) override
yarp::dev::ReturnValue setControlModesRaw(const std::vector< int > &joints, const std::vector< yarp::dev::SelectableControlModeEnum > &modes) override
yarp::dev::ReturnValue setRefCurrentsRaw(const double *t) override
Set the reference value of the currents for all motors.
yarp::dev::ReturnValue getPWMRaw(int j, double *val) override
yarp::dev::ReturnValue setInteractionModeRaw(int j, yarp::dev::InteractionModeEnum _mode) override
Set the interaction mode of the robot, values can be stiff or compliant.
yarp::dev::ReturnValue getTorquesRaw(double *t) override
Get the value of the torque for all joints (this is the feedback if you have torque sensors).
yarp::dev::ReturnValue getAvailableControlModesRaw(int j, std::vector< yarp::dev::SelectableControlModeEnum > &avail) override
yarp::dev::ReturnValue enableAmpRaw(int j) override
Enable the amplifier on a specific joint.
yarp::dev::ReturnValue getPeakCurrentRaw(int m, double *val) override
yarp::dev::ReturnValue getControlModesRaw(const std::vector< int > &joints, std::vector< yarp::dev::ControlModeEnum > &modes) override
yarp::dev::ReturnValue setGearboxRatioRaw(int m, const double val) override
Set the gearbox ratio for a specific motor.
virtual bool getRotorEncoderResolutionRaw(int m, double &rotres)
virtual bool getHasRotorEncoderRaw(int j, int &ret)
yarp::dev::ReturnValue getPidsRaw(const yarp::dev::PidControlTypeEnum &pidtype, yarp::dev::Pid *pids) override
Get current PID value for a specific joint.
yarp::dev::ReturnValue getPWMLimitRaw(int j, double *val) override
yarp::dev::ReturnValue getAxisNameRaw(int axis, std::string &name) override
void run() override
Loop function.
yarp::dev::ReturnValue stopRaw() override
Stop motion, multiple joints.
yarp::dev::ReturnValue getAxes(size_t &ax) override
Get the number of controlled axes.
yarp::dev::ReturnValue getEncoderRaw(int j, double *v) override
Read the value of an encoder.
virtual bool getTorqueControlFilterType(int j, int &type)
yarp::dev::ReturnValue getTrajAccelerationsRaw(double *accs) override
Get reference acceleration of all joints.
yarp::dev::ReturnValue getAvailablePidsRaw(int j, std::vector< yarp::dev::PidControlTypeEnum > &avail) override
Return a list of available pid types mode for the given joint.
yarp::dev::ReturnValue setPositionRaw(int j, double ref) override
Set new position for a single axis.
yarp::dev::ReturnValue getPidErrorLimitsRaw(const yarp::dev::PidControlTypeEnum &pidtype, double *limits) override
Get the error limit for all controllers.
Interface implemented by all device drivers.
Interface for control devices, amplifier commands.
Interface for getting information about specific axes, if available.
Interface for control devices, calibration commands.
Interface for control devices.
Interface for setting control mode in control board.
Interface for control boards implementing current control.
Control board, extend encoder raw interface adding timestamps.
Interface for control boards implementing impedance control.
Interface settings the way the robot interacts with the environment: basic interaction types are Stif...
Interface for controlling a joint equipped with brakes (hardware or simulated).
Interface for getting info about the fault which may occur on a robot.
Control board, encoder interface.
Control board, encoder interface.
Interface for controlling an axis, by sending directly a PWM reference signal to a motor.
Interface for a generic control board device implementing a PID controller.
Interface for a generic control board device implementing position control in encoder coordinates.
Interface for a generic control board device implementing position control in encoder coordinates.
Interface for control boards implementing torque control.
Interface for control boards implementing velocity control in encoder coordinates.
Interface for control boards implementing direct velocity control.
A generic interface to a virtual sensors.
class ImplementControlLimits; class StubImplControlLimitsRaw;
Interface settings the way the robot interacts with the environment: basic interaction types are Stif...
Default implementation of the IPositionControl interface.
Default implementation of the IPositionDirect interface.
Contains the parameters for a PID.
An abstraction for a periodic thread.
A base class for nested structures that can be searched.
SelectableControlModeEnum