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 {
28 public:
30  fawkes::MotorInterface * motor,
31  fawkes::tf::Transformer * tf_transformer,
33  std::string config_path);
34 
35  virtual void calibrate();
36 
37 protected:
38  PointCloudPtr get_lasercloud(LaserInterface *laser);
39 
40 protected:
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 */
TimeOffsetCalibration
Definition: time_offset_calibration.h:26
TimeOffsetCalibration::rotation_time_
constexpr static float rotation_time_
The time to rotate.
Definition: time_offset_calibration.h:55
fawkes::tf::Transformer
Definition: transformer.h:74
TimeOffsetCalibration::calibrate
virtual void calibrate()
Calibrate the time offset.
Definition: time_offset_calibration.cpp:76
fawkes::MotorInterface
Definition: MotorInterface.h:39
LaserCalibration
Definition: laser_calibration.h:66
TimeOffsetCalibration::motor_
fawkes::MotorInterface * motor_
The motor interface used to control the rotation of the robot.
Definition: time_offset_calibration.h:49
TimeOffsetCalibration::frequency_
const static unsigned int frequency_
The frequency for motor commands.
Definition: time_offset_calibration.h:53
TimeOffsetCalibration::sleep_time_
const static long sleep_time_
Time in micro seconds to sleep after each iteration.
Definition: time_offset_calibration.h:47
fawkes::NetworkConfiguration
Definition: netconf.h:55
TimeOffsetCalibration::TimeOffsetCalibration
TimeOffsetCalibration(LaserInterface *laser, fawkes::MotorInterface *motor, fawkes::tf::Transformer *tf_transformer, fawkes::NetworkConfiguration *config, std::string config_path)
Constructor.
Definition: time_offset_calibration.cpp:57
TimeOffsetCalibration::step_
float step_
The current step size for the time offset.
Definition: time_offset_calibration.h:57
TimeOffsetCalibration::get_lasercloud
PointCloudPtr get_lasercloud(LaserInterface *laser)
Prepare the laser data for calibration.
Definition: time_offset_calibration.cpp:161
fawkes::Laser360Interface
Definition: Laser360Interface.h:39
TimeOffsetCalibration::omega_
constexpr static float omega_
The angular velocity to use to rotate.
Definition: time_offset_calibration.h:51