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
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
43{
44public:
50
56 virtual bool calibrationDoneRaw(int j)=0;
57
63 virtual bool calibrateAxisWithParamsRaw(int axis, unsigned int type, double p1, double p2, double p3)=0;
64
70 virtual bool setCalibrationParametersRaw(int axis, const CalibrationParameters& params) { return false; }
71
72};
73
80{
81private:
82 ICalibrator *calibrator;
83
84public:
90
96 virtual bool calibrateAxisWithParams(int axis, unsigned int type, double p1, double p2, double p3)=0;
97
103 virtual bool setCalibrationParameters(int axis, const CalibrationParameters& params) { return false; }
104
110 virtual bool calibrationDone(int j)=0;
111
117 virtual bool setCalibrator(ICalibrator *c);
118
125 virtual bool calibrateRobot();
126
127 virtual bool park(bool wait=true);
128
129 /* Abort calibration, force the function calibrate() to return.*/
130 virtual bool abortCalibration();
131
132 /* Abort parking, force the function park() to return.*/
133 virtual bool abortPark();
134};
135
136
137/* Vocabs representing the above interfaces */
138
147
148#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
For streams capable of holding different kinds of content, check what they actually have.
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