12 #ifndef _LASER_NAV_CALIB_H
13 #define _LASER_NAV_CALIB_H
20 #include <pcl/common/common_headers.h>
178 double pos_x,
double pos_y,
double pos_z
179 ,
double phi,
double theta,
double psi
180 , std::string name =
"Transformation");
190 Eigen::Affine3d* transformation_to_print
191 , std::string name =
"Transformation");
201 Eigen::Matrix4d* transformation_to_print
202 , std::string name =
"Transformation");
214 static bool exists(
const std::string& name);
230 , std::string filename);
245 , pointCloud::Ptr latest
246 ,
double* icp_fitness_score
260 , pointCloud::Ptr latest);
263 pointCloud::Ptr first
264 , pointCloud::Ptr second
304 double pos_x = 0.0,
double pos_y = 0.0,
double pos_z = 0.0
420 virtual void update(pointCloud::Ptr cloud_to_draw);
423 #endif // _LASER_NAV_CALIB_H
static bool bilateral_filtering
When true: bilateral-filtering is used (computes fpfh-features!)
unsigned int scan_counter
Counts the scans between last and latest point-cloud.
void print(double pos_x, double pos_y, double pos_z, double phi, double theta, double psi, std::string name="Transformation")
Print the given transformation on command-line-interface.
void resetDataSet(void)
Reset/Remove all point-cloud-pairs from the data-set.
bool init
Initializes the optimization-array for the Levenberg-Marquardt using ctor. given parameters.
pointCloud::Ptr cloud_to_draw
The cloud-ptr provided by another source (work is based on this)
static void getMountingPose(const double *par, int m_dat, const void *data, double *fvec, int *info)
Optimized the mounting-pose as part of the Levenberg-Marquardt.
const pointCloud::Ptr getLastCloud(void) const
Returns the last stable cloud.
static bool exists(const std::string &name)
Checks if the given filename-at-path exists.
double sampled_scans
Contains the number of all sampled scans.
double mounting_pose[nr_unknowns]
The data-array used by the Levenberg-Marquardt lmmin-optimizer.
bool getInitialAligning(void)
Retrieves if the initial alignment is activated.
double pos_x
Class-wide latest position (this is altered after optimization)
static bool initial_aligning
When true: Initial Alignment is calculated using Sample-Consensus (untested)
bool getBilateralFiltering(void)
Retrieves if the bilateral filter is activated.
std::vector< last_and_latest > data_set
Holds the data-set of point-cloud-pairs (known as key-sequences in the thesis)
static e_registrationMethod ICPMethod
Selector for the calibration-method (not supported atm)
Filter to calibrate the Laser mounting Pose according to NAV-data.
static Eigen::Matrix4d getMovementFrom(pointCloud::Ptr last, pointCloud::Ptr latest)
Retrieves the movement of the Navigation-Data between the last and latest point-cloud.
e_registrationMethod
Selector for the calibration-method (not supported atm)
static const unsigned int nr_unknowns
Number of unknowns.
std::pair< pointCloud::Ptr, pointCloud::Ptr > last_and_latest
Typedef for shorter call (used as data-set for the levenberg-marquardt data)
pcl::PointCloud< pcl::PointNormal > pointCloud
Typedef for shorter call of point-cloud-pointer-type.
void setCovarianceSampling(bool new_state)
Sets the covariance-sampling of point-normals.
virtual ~LaserNAVCalibration()
Virtual std. dtor.
void setInitialAligning(bool new_state)
Sets the initial alignment of point-normals.
static double worst_score
Holds the worst ICP-fitness-score for the according point-cloud-pair.
virtual void update(pointCloud::Ptr cloud_to_draw)
Updates the mounting-pose using Levenberg-Marquardt non-linear optimization.
void setBilateralFiltering(bool new_state)
Sets the bilateral filter.
static unsigned int scans_between_last_and_latest
Number of scans between point-cloud-pairs (those are simply dropped)
bool add_to_data_set
Set to true on button press when the user requested to add a data-set to the key-sequences.
void setDownsampling(bool new_state)
Sets the filter voxel-grid.
static bool downsampling
When true: all point-clouds are downsampled using Voxel-Grids.
bool getCalculateNormals(void)
Retrieves if the bilateral filter is activated.
bool getDownsampling(void)
Retrieves if the voxel-grid filter is activated.
static bool calculate_normals
When true: calculate normals (basis for covariance-sampling and initial-alignment) ...
static void plot(std::string header, std::string data, std::string filename)
Plot the given header + data to file.
static size_t worst_pair
Index of the point-cloud-pair with the worst ICP-fitness-score.
static Eigen::Matrix4d getScanTransformationFrom(pointCloud::Ptr last, pointCloud::Ptr latest, double *icp_fitness_score, double iterations)
Retrieves the transformation from last to latest point-cloud.
pointCloud::Ptr last
Cloud-ptr that stores the last point-cloud.
LaserNAVCalibration(double pos_x=0.0, double pos_y=0.0, double pos_z=0.0, double phi=math::c_DEG_TO_RAD *0.0, double theta=math::c_DEG_TO_RAD *0.0, double psi=math::c_DEG_TO_RAD *0.0)
std. ctor.
bool getCovarianceSampling(void)
Retrieves if the covariance-sampling is activated.
void setCalculateNormals(bool new_state)
Sets the calculation of point-normals.
pointCloud::Ptr latest
Cloud-ptr that stores the latest point-cloud.
static double avr_cal_err
Mean of the summed ICP-fitness-score's (updated each iteration)
const pointCloud::Ptr getLatestCloud(void) const
Returns the latest stable cloud.
void optimizeDataSet(void)
Deletes the worst-pair according to its ICP-fitness-score.
bool calibration_wanted
Set to true when calibration is wanted.
static double evaluateICPFitnessScore(pointCloud::Ptr first, pointCloud::Ptr second, double pos_x, double pos_y, double pos_z, double phi, double theta, double psi)
unsigned int nr_scan_pairs
holds the number of elements in the data-set (std::vector.size() takes too long)
bool plot_all_movements
Check all scans and plot all movements to a file.
void addToDataSet(void)
Sets the boolean to add the point-clouds at the active index to the data-set-pairs.
static pointCloud::Ptr latest_to_draw
Cloud-ptr that stores the latest point-cloud that will be drawn (stable, switched after registration-...
std::stringstream filename
Variable to store a class-wide filename (can be used to group different plots according to a naming s...
static bool covariance_sampling
When true: Samples the point-cloud using covariance-matrices.
void setScansBetweenLastAndLatest(unsigned int scans_between_last_and_latest)
Sets the number of scans to skip between one registration.
static pointCloud::Ptr last_to_draw
Cloud-ptr that stores the last point-cloud that will be drawn (stable, switched after registration-pr...