YARP
Yet Another Robot Platform
IControlCalibration.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3  * SPDX-FileCopyrightText: 2006-2010 RobotCub Consortium
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #ifndef YARP_DEV_ICONTROLCALIBRATION_H
8 #define YARP_DEV_ICONTROLCALIBRATION_H
9 
10 #include <yarp/os/Vocab.h>
11 #include <yarp/dev/api.h>
12 #include <yarp/dev/CalibratorInterfaces.h> // ICalibrator
13 
14 namespace yarp {
15  namespace dev {
16  class IControlCalibrationRaw;
17 #ifndef YARP_NO_DEPRECATED // Since YARP 3.0.0
18 YARP_DEPRECATED_TYPEDEF_MSG("Use yarp::dev::IControlCalibrationRaw instead") IControlCalibrationRaw IControlCalibration2Raw;
19 #endif
20  class IControlCalibration;
21 #ifndef YARP_NO_DEPRECATED // Since YARP 3.0.0
22 YARP_DEPRECATED_TYPEDEF_MSG("Use yarp::dev::IControlCalibration instead") IControlCalibration IControlCalibration2;
23 #endif
24  struct CalibrationParameters;
25  }
26 }
27 
29 {
30  unsigned int type;
31  double param1;
32  double param2;
33  double param3;
34  double param4;
35  double param5;
36  double paramZero;
37  CalibrationParameters() { type = 0; param1 = 0; param2 = 0; param3 = 0; param4 = 0; param5 = 0; paramZero = 0; }
38 };
39 
45 {
46 public:
52 
58  virtual bool calibrationDoneRaw(int j)=0;
59 
65  virtual bool calibrateAxisWithParamsRaw(int axis, unsigned int type, double p1, double p2, double p3)=0;
66 
72  virtual bool setCalibrationParametersRaw(int axis, const CalibrationParameters& params) { return false; }
73 
74 };
75 
82 {
83 private:
84  ICalibrator *calibrator;
85 
86 public:
91  virtual ~IControlCalibration() {}
92 
98  virtual bool calibrateAxisWithParams(int axis, unsigned int type, double p1, double p2, double p3)=0;
99 
105  virtual bool setCalibrationParameters(int axis, const CalibrationParameters& params) { return false; }
106 
112  virtual bool calibrationDone(int j)=0;
113 
119  virtual bool setCalibrator(ICalibrator *c);
120 
127  virtual bool calibrateRobot();
128 
129  virtual bool park(bool wait=true);
130 
131  /* Abort calibration, force the function calibrate() to return.*/
132  virtual bool abortCalibration();
133 
134  /* Abort parking, force the function park() to return.*/
135  virtual bool abortPark();
136 };
137 
138 
139 /* Vocabs representing the above interfaces */
140 
149 
150 #endif // YARP_DEV_ICONTROLCALIBRATION_H
constexpr yarp::conf::vocab32_t VOCAB_ABORTCALIB
constexpr yarp::conf::vocab32_t VOCAB_CALIBRATE_JOINT_PARAMS
constexpr yarp::conf::vocab32_t VOCAB_ABORTPARK
constexpr yarp::conf::vocab32_t VOCAB_CALIBRATE_DONE
constexpr yarp::conf::vocab32_t VOCAB_CALIBRATE_JOINT
constexpr yarp::conf::vocab32_t VOCAB_CALIBRATE
constexpr yarp::conf::vocab32_t VOCAB_CALIBRATE_CHANNEL
constexpr yarp::conf::vocab32_t VOCAB_PARK
Interface for control devices, calibration commands.
virtual bool setCalibrationParametersRaw(int axis, const CalibrationParameters &params)
Start calibration, this method is very often platform specific.
virtual bool calibrationDoneRaw(int j)=0
Check if the calibration is terminated, on a particular joint.
virtual ~IControlCalibrationRaw()
Destructor.
virtual bool calibrateAxisWithParamsRaw(int axis, unsigned int type, double p1, double p2, double p3)=0
Start calibration, this method is very often platform specific.
Interface for control devices, calibration commands.
virtual bool setCalibrationParameters(int axis, const CalibrationParameters &params)
Start calibration, this method is very often platform specific.
virtual ~IControlCalibration()
Destructor.
virtual bool calibrationDone(int j)=0
Check if the calibration is terminated, on a particular joint.
virtual bool calibrateAxisWithParams(int axis, unsigned int type, double p1, double p2, double p3)=0
Start calibration, this method is very often platform specific.
std::int32_t vocab32_t
Definition: numeric.h:78
constexpr yarp::conf::vocab32_t createVocab32(char a, char b=0, char c=0, char d=0)
Create a vocab from chars.
Definition: Vocab.h:28
The main, catch-all namespace for YARP.
Definition: dirs.h:16
#define YARP_DEPRECATED_TYPEDEF_MSG(x)
Definition: api.h:99
#define YARP_dev_API
Definition: api.h:18