13 #ifndef __ICUB_PARAMETRIC_CALIBRATOR__
14 #define __ICUB_PARAMETRIC_CALIBRATOR__
20 #include <yarp/dev/PolyDriver.h>
21 #include <yarp/dev/CalibratorInterfaces.h>
22 #include <yarp/dev/ControlBoardInterfaces.h>
27 class parametricCalibratorEth;
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);
parametricCalibrator: implement calibration routines for the iCub arm(s) (version 1....
virtual bool park(DeviceDriver *dd, bool wait=true) override
virtual bool open(yarp::os::Searchable &config) override
Open the device driver.
virtual bool homingSingleJoint(int j) override
virtual bool parkWholePart() override
virtual bool calibrateSingleJoint(int j) override
virtual bool parkSingleJoint(int j, bool _wait=true) override
virtual bool quitPark() override
virtual bool close() override
Close the device driver.
~parametricCalibratorEth()
Destructor.
virtual bool calibrateWholePart() override
parametricCalibratorEth()
Default constructor.
virtual yarp::dev::IRemoteCalibrator * getCalibratorDevice() override
virtual bool quitCalibrate() override
bool calibrate(DeviceDriver *device) override
Calibrate method.
virtual bool homingWholePart() override
Copyright (C) 2008 RobotCub Consortium.