22 using TechnosoftIposBase::TechnosoftIposBase;
26 bool open(yarp::os::Searchable & config)
override;
27 bool close()
override;
36 bool getControlModeRaw(
int j,
int * mode)
override;
37 bool setControlModeRaw(
int j,
int mode)
override;
41 bool getImpedanceRaw(
int j,
double * stiffness,
double * damping)
override;
42 bool setImpedanceRaw(
int j,
double stiffness,
double damping)
override;
43 bool setImpedanceOffsetRaw(
int j,
double offset)
override;
44 bool getImpedanceOffsetRaw(
int j,
double * offset)
override;
45 bool getCurrentImpedanceLimitRaw(
int j,
double * min_stiff,
double * max_stiff,
double * min_damp,
double * max_damp)
override;
49 bool getInteractionModeRaw(
int axis, yarp::dev::InteractionModeEnum * mode)
override;
50 bool setInteractionModeRaw(
int axis, yarp::dev::InteractionModeEnum mode)
override;
54 bool setPidRaw(
const yarp::dev::PidControlTypeEnum & pidtype,
int j,
const yarp::dev::Pid & pid)
override;
55 bool setPidReferenceRaw(
const yarp::dev::PidControlTypeEnum & pidtype,
int j,
double ref)
override;
56 bool setPidErrorLimitRaw(
const yarp::dev::PidControlTypeEnum & pidtype,
int j,
double limit)
override;
57 bool getPidErrorRaw(
const yarp::dev::PidControlTypeEnum & pidtype,
int j,
double * err)
override;
58 bool getPidOutputRaw(
const yarp::dev::PidControlTypeEnum & pidtype,
int j,
double * out)
override;
59 bool getPidRaw(
const yarp::dev::PidControlTypeEnum & pidtype,
int j, yarp::dev::Pid * pid)
override;
60 bool getPidReferenceRaw(
const yarp::dev::PidControlTypeEnum & pidtype,
int j,
double * ref)
override;
61 bool getPidErrorLimitRaw(
const yarp::dev::PidControlTypeEnum & pidtype,
int j,
double * limit)
override;
62 bool resetPidRaw(
const yarp::dev::PidControlTypeEnum & pidtype,
int j)
override;
63 bool disablePidRaw(
const yarp::dev::PidControlTypeEnum & pidtype,
int j)
override;
64 bool enablePidRaw(
const yarp::dev::PidControlTypeEnum & pidtype,
int j)
override;
65 bool setPidOffsetRaw(
const yarp::dev::PidControlTypeEnum & pidtype,
int j,
double v)
override;
66 bool isPidEnabledRaw(
const yarp::dev::PidControlTypeEnum & pidtype,
int j,
bool * enabled)
override;
70 bool positionMoveRaw(
int j,
double ref)
override;
71 bool relativeMoveRaw(
int j,
double delta)
override;
72 bool checkMotionDoneRaw(
int j,
bool * flag)
override;
73 bool setRefSpeedRaw(
int j,
double sp)
override;
74 bool setRefAccelerationRaw(
int j,
double acc)
override;
75 bool getRefSpeedRaw(
int j,
double * ref)
override;
76 bool getRefAccelerationRaw(
int j,
double * acc)
override;
77 bool stopRaw(
int j)
override;
78 bool getTargetPositionRaw(
int joint,
double * ref)
override;
82 bool setPositionRaw(
int j,
double ref)
override;
83 bool getRefPositionRaw(
int joint,
double * ref)
override;
87 bool getRemoteVariableRaw(std::string key, yarp::os::Bottle & val)
override;
88 bool setRemoteVariableRaw(std::string key,
const yarp::os::Bottle & val)
override;
89 bool getRemoteVariablesListRaw(yarp::os::Bottle * listOfKeys)
override;
93 bool velocityMoveRaw(
int j,
double sp)
override;
94 bool getRefVelocityRaw(
int joint,
double * vel)
override;
97 void interpretModesOfOperation(std::int8_t modesOfOperation)
override;
98 void onPositionLimitTriggered()
override;
99 void reset()
override;
101 yarp::conf::vocab32_t initialInteractionMode {0};
102 std::atomic<yarp::dev::InteractionModeEnum> actualInteractionMode {yarp::dev::InteractionModeEnum::VOCAB_IM_UNKNOWN};
106 yarp::dev::Pid * activePid {
nullptr};
107 yarp::dev::Pid positionPid;
108 yarp::dev::Pid impedancePid;
110 double positionReference {0.0};
111 double errorLimit {0.0};
112 double proportionalError {0.0};
113 double integralError {0.0};
117 std::atomic<bool> enableCsv {
false};