61 bool calibrate(DeviceDriver *device)
override;
69 virtual bool open (yarp::os::Searchable& config)
override;
75 virtual bool close ()
override;
77 virtual bool park(DeviceDriver *dd,
bool wait=
true)
override;
102 struct PositionSequence
105 std::vector<double> positions;
106 std::vector<double> velocities;
110 bool calibrateJoint(
int j);
111 bool goToStartupPosition(
int j);
112 bool checkCalibrateJointEnded(std::list<int> set);
113 bool checkGoneToZeroThreshold(
int j);
117 yarp::dev::PolyDriver *dev2calibrate;
118 yarp::dev::IControlCalibration *iCalibrate;
119 yarp::dev::IPidControl *iPids;
120 yarp::dev::IEncoders *iEncoders;
121 yarp::dev::IPositionControl *iPosition;
122 yarp::dev::IControlMode *iControlMode;
123 yarp::dev::IAmplifierControl *iAmp;
125 std::list<std::list<int> > joints;
129 yarp::dev::CalibrationParameters* calibParams;
133 double *original_max_pwm;
134 double *limited_max_pwm;
136 double *startupPosThreshold;
137 PositionSequence legacyStartupPosition;
138 PositionSequence legacyParkingPosition;
142 std::atomic<bool> isCalibrated;
143 bool skipCalibration;
144 int *disableHomeAndPark;
145 int *disableStartupPosCheck;
148 int *timeout_goToZero;
149 int *timeout_calibration;
151 int totJointsToCalibrate;
152 std::string deviceName;
153 yarp::os::Bottle calibJointsString;
154 std::list<int> calibJoints;
157 int currentParkingSeq_step;
158 std::vector<PositionSequence> parkingSequence;
159 bool useLegacyParking;
160 bool parseSequenceGroup(yarp::os::Searchable &config, std::string sequence, std::vector<PositionSequence> &seqList);
161 bool moveAndCheck(PositionSequence &
data);
164 bool moveAndCheck_legacy(PositionSequence &
data, std::vector<bool> &cannotPark,
bool wait);