Fawkes API
Fawkes Development Version
pitch_calibration.h
1
/***************************************************************************
2
* pitch_calibration.h - Calibrate pitch transform of the back laser
3
*
4
* Created: Tue 18 Jul 2017 16:47:17 CEST 16:47
5
* Copyright 2017 Till Hofmann <hofmann@kbsg.rwth-aachen.de>
6
****************************************************************************/
7
8
/* This program is free software; you can redistribute it and/or modify
9
* it under the terms of the GNU General Public License as published by
10
* the Free Software Foundation; either version 2 of the License, or
11
* (at your option) any later version.
12
*
13
* This program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU Library General Public License for more details.
17
*
18
* Read the full text in the LICENSE.GPL file in the doc directory.
19
*/
20
21
#ifndef PITCH_CALIBRATION_H
22
#define PITCH_CALIBRATION_H
23
24
#include "laser_calibration.h"
25
26
class
PitchCalibration
:
public
LaserCalibration
27
{
28
public
:
29
PitchCalibration
(
LaserInterface
* laser,
30
fawkes::tf::Transformer
* tf_transformer,
31
fawkes::NetworkConfiguration
*config,
32
std::string config_path);
33
virtual
void
calibrate
();
34
35
protected
:
36
float
get_new_pitch
(
float
z,
float
old_pitch);
37
38
protected
:
39
/** The threshold of the mean of z to stop calibration */
40
constexpr
static
float
threshold
= 0.001;
41
};
42
43
#endif
/* !PITCH_CALIBRATION_H */
PitchCalibration::get_new_pitch
float get_new_pitch(float z, float old_pitch)
Compute the new pitch based on the old pitch and the mean z.
Definition:
pitch_calibration.cpp:87
fawkes::tf::Transformer
Definition:
transformer.h:74
PitchCalibration
Definition:
pitch_calibration.h:26
PitchCalibration::threshold
constexpr static float threshold
The threshold of the mean of z to stop calibration.
Definition:
pitch_calibration.h:45
LaserCalibration
Definition:
laser_calibration.h:66
PitchCalibration::calibrate
virtual void calibrate()
The actual calibration.
Definition:
pitch_calibration.cpp:54
fawkes::NetworkConfiguration
Definition:
netconf.h:55
PitchCalibration::PitchCalibration
PitchCalibration(LaserInterface *laser, fawkes::tf::Transformer *tf_transformer, fawkes::NetworkConfiguration *config, std::string config_path)
Constructor.
Definition:
pitch_calibration.cpp:41
fawkes::Laser360Interface
Definition:
Laser360Interface.h:39
src
tools
laser_calibration
pitch_calibration.h
Generated by
1.8.17