Fawkes API Fawkes Development Version
roll_calibration.h
1/***************************************************************************
2 * roll_calibration.h - Calibrate roll transform of the back laser
3 *
4 * Created: Tue 18 Jul 2017 16:28:05 CEST 16:28
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 ROLL_CALIBRATION_H
22#define ROLL_CALIBRATION_H
23
24#include "laser_calibration.h"
25
27{
28public:
30 fawkes::tf::Transformer * tf_transformer,
32 std::string config_path);
33
34 virtual void calibrate();
35
36protected:
37 float get_lr_mean_diff();
38 float get_new_roll(float mean_error, float old_roll);
39 PointCloudPtr filter_calibration_cloud(PointCloudPtr input);
40
41protected:
42 // TODO: make threshold and min_points configurable
43 /** The threshold of the left-right difference to stop calibration */
44 constexpr static float threshold = 0.00001;
45};
46
47#endif /* !ROLL_CALIBRATION_H */
Abstract base class for laser calibration.
Calibrate the roll angle of a laser.
static constexpr float threshold
The threshold of the left-right difference to stop calibration.
RollCalibration(LaserInterface *laser, fawkes::tf::Transformer *tf_transformer, fawkes::NetworkConfiguration *config, std::string config_path)
Constructor.
float get_new_roll(float mean_error, float old_roll)
Compute a new roll angle based on the mean error and the old roll.
virtual void calibrate()
The actual calibration.
PointCloudPtr filter_calibration_cloud(PointCloudPtr input)
Filter the input cloud to be useful for roll calibration.
float get_lr_mean_diff()
Get the difference of the mean of z of the left and right pointclouds.
Laser360Interface Fawkes BlackBoard Interface.
Remote configuration via Fawkes net.
Definition: netconf.h:50
Coordinate transforms between any two frames in a system.
Definition: transformer.h:65