Fawkes API Fawkes Development Version
time_offset_calibration.h
1/***************************************************************************
2 * time_offset_calibration.h - Laser time offset calibration
3 *
4 * Created: Tue 18 Jul 2017 17:21:50 CEST 17:21
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 TIME_OFFSET_CALIBRATION_H
22#define TIME_OFFSET_CALIBRATION_H
23
24#include "laser_calibration.h"
25
27{
28public:
31 fawkes::tf::Transformer * tf_transformer,
33 std::string config_path);
34
35 virtual void calibrate();
36
37protected:
38 PointCloudPtr get_lasercloud(LaserInterface *laser);
39
40protected:
41 /** Time in micro seconds to sleep after each iteration */
42 const static long sleep_time_ = 2000000;
43 /** The motor interface used to control the rotation of the robot */
45 /** The angular velocity to use to rotate */
46 constexpr static float omega_ = 2.0;
47 /** The frequency for motor commands */
48 const static unsigned int frequency_ = 100;
49 /** The time to rotate */
50 constexpr static float rotation_time_ = 1.;
51 /** The current step size for the time offset */
52 float step_;
53};
54
55#endif /* !TIME_OFFSET_CALIBRATION_H */
Abstract base class for laser calibration.
Calibrate the time offset of a laser.
fawkes::MotorInterface * motor_
The motor interface used to control the rotation of the robot.
TimeOffsetCalibration(LaserInterface *laser, fawkes::MotorInterface *motor, fawkes::tf::Transformer *tf_transformer, fawkes::NetworkConfiguration *config, std::string config_path)
Constructor.
PointCloudPtr get_lasercloud(LaserInterface *laser)
Prepare the laser data for calibration.
static constexpr float omega_
The angular velocity to use to rotate.
static const long sleep_time_
Time in micro seconds to sleep after each iteration.
static constexpr float rotation_time_
The time to rotate.
float step_
The current step size for the time offset.
static const unsigned int frequency_
The frequency for motor commands.
virtual void calibrate()
Calibrate the time offset.
Laser360Interface Fawkes BlackBoard Interface.
MotorInterface 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