YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
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
14namespace yarp::dev {
15class IControlCalibrationRaw;
16#ifndef YARP_NO_DEPRECATED // Since YARP 3.0.0
17YARP_DEPRECATED_TYPEDEF_MSG("Use yarp::dev::IControlCalibrationRaw instead") IControlCalibrationRaw IControlCalibration2Raw;
18#endif
20#ifndef YARP_NO_DEPRECATED // Since YARP 3.0.0
21YARP_DEPRECATED_TYPEDEF_MSG("Use yarp::dev::IControlCalibration instead") IControlCalibration IControlCalibration2;
22#endif
24} // namespace yarp::dev
25
27{
28 unsigned int type;
29 double param1;
30 double param2;
31 double param3;
32 double param4;
33 double param5;
34 double paramZero;
35 CalibrationParameters() { type = 0; param1 = 0; param2 = 0; param3 = 0; param4 = 0; param5 = 0; paramZero = 0; }
36};
37
44{
45public:
51
57 virtual bool calibrationDoneRaw(int j)=0;
58
64 virtual bool calibrateAxisWithParamsRaw(int axis, unsigned int type, double p1, double p2, double p3)=0;
65
71 virtual bool setCalibrationParametersRaw(int axis, const CalibrationParameters& params) { return false; }
72
73};
74
81{
82private:
83 ICalibrator *calibrator;
84
85public:
91
97 virtual bool calibrateAxisWithParams(int axis, unsigned int type, double p1, double p2, double p3)=0;
98
104 virtual bool setCalibrationParameters(int axis, const CalibrationParameters& params) { return false; }
105
111 virtual bool calibrationDone(int j)=0;
112
118 virtual bool setCalibrator(ICalibrator *c);
119
126 virtual bool calibrateRobot();
127
128 virtual bool park(bool wait=true);
129
130 /* Abort calibration, force the function calibrate() to return.*/
131 virtual bool abortCalibration();
132
133 /* Abort parking, force the function park() to return.*/
134 virtual bool abortPark();
135};
136
137
138/* Vocabs representing the above interfaces */
139
148
149#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 a calibrator device.
Definition ICalibrator.h:21
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
For streams capable of holding different kinds of content, check what they actually have.
Definition jointData.cpp:13
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:27
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