Fawkes API  Fawkes Development Version
PitchCalibration Class Reference

#include "pitch_calibration.h"

Inheritance diagram for PitchCalibration:

Public Member Functions

 PitchCalibration (LaserInterface *laser, fawkes::tf::Transformer *tf_transformer, fawkes::NetworkConfiguration *config, std::string config_path)
 Constructor. More...
 
virtual void calibrate ()
 The actual calibration. More...
 
- Public Member Functions inherited from LaserCalibration
 LaserCalibration (LaserInterface *laser, fawkes::tf::Transformer *tf_transformer, fawkes::NetworkConfiguration *config, std::string config_path)
 Constructor. More...
 
virtual ~LaserCalibration ()
 Destructor. More...
 

Protected Member Functions

float get_new_pitch (float z, float old_pitch)
 Compute the new pitch based on the old pitch and the mean z. More...
 
- Protected Member Functions inherited from LaserCalibration
PointCloudPtr laser_to_pointcloud (const LaserInterface &laser)
 Convert the laser data into a pointcloud. More...
 
void transform_pointcloud (const std::string &target_frame, PointCloudPtr cloud)
 Transform the points in a pointcloud. More...
 
PointCloudPtr filter_cloud_in_rear (PointCloudPtr input)
 Remove points in the rear of the robot. More...
 
float get_mean_z (PointCloudPtr cloud)
 Compute the mean z value of all points in the given pointcloud. More...
 
PointCloudPtr filter_left_cloud (PointCloudPtr input)
 Remove all points that are left of the robot. More...
 
PointCloudPtr filter_right_cloud (PointCloudPtr input)
 Remove all points that are right of the robot. More...
 
PointCloudPtr filter_out_ground (PointCloudPtr input)
 Remove all points that belong to the ground. More...
 
float get_matching_cost (PointCloudPtr cloud1, PointCloudPtr cloud2, float *rot_yaw)
 Compare two pointclouds with ICP. More...
 
PointCloudPtr filter_center_cloud (PointCloudPtr input)
 Remove the center of a pointcloud This removes all points around the origin of the pointcloud. More...
 

Static Protected Attributes

constexpr static float threshold = 0.001
 The threshold of the mean of z to stop calibration. More...
 
- Static Protected Attributes inherited from LaserCalibration
const static long sleep_time_ = 50000
 Time in micro seconds to sleep between iterations. More...
 
const static uint max_iterations_ = 100
 The number of iterations to run before aborting the calibration. More...
 
const static size_t min_points = 10
 The number of points required in a pointcloud to use it as input data. More...
 

Additional Inherited Members

- Protected Attributes inherited from LaserCalibration
LaserInterfacelaser_
 The laser that provides the input data. More...
 
fawkes::tf::Transformertf_transformer_
 The transformer used to compute transforms. More...
 
fawkes::NetworkConfigurationconfig_
 The network config to use for reading and updating config values. More...
 
const std::string config_path_
 The config path to use for reading and updating config values. More...
 

Detailed Description

Calibrate the pitch angle of the laser. Compute the angle by computing the mean z value of all points in the rear of the robot and update the angle accordingly.

Author
Till Hofmann

Definition at line 25 of file pitch_calibration.h.

Constructor & Destructor Documentation

◆ PitchCalibration()

PitchCalibration::PitchCalibration ( LaserInterface laser,
fawkes::tf::Transformer tf_transformer,
fawkes::NetworkConfiguration config,
std::string  config_path 
)

Constructor.

Parameters
laserThe laser interface to fetch data from
tf_transformerThe transformer to use to compute transforms
configThe network config to read from and write updates to
config_pathThe config path to read from and write updates to

Definition at line 40 of file pitch_calibration.cpp.

Member Function Documentation

◆ calibrate()

◆ get_new_pitch()

float PitchCalibration::get_new_pitch ( float  z,
float  old_pitch 
)
protected

Compute the new pitch based on the old pitch and the mean z.

Parameters
zThe mean z value of all points in the rear of the robot.
old_pitchThe pitch that was configured when recording the mean z.
Returns
The new pitch angle.

Definition at line 86 of file pitch_calibration.cpp.

Referenced by calibrate().

Member Data Documentation

◆ threshold

constexpr static float PitchCalibration::threshold = 0.001
staticconstexprprotected

The threshold of the mean of z to stop calibration.

Definition at line 43 of file pitch_calibration.h.

Referenced by calibrate().


The documentation for this class was generated from the following files: