13 #include <pcl/common/io.h>
14 #include <pcl/io/pcd_io.h>
21 std::vector<std::string>
open(std::string path =
".") {
24 std::vector<std::string> scans;
26 dir = opendir(path.c_str());
28 while ((pdir = readdir(dir))) {
29 scans.push_back(path + pdir->d_name);
32 scans.erase(std::find(scans.begin(), scans.end(), path +
"."));
33 scans.erase(std::find(scans.begin(), scans.end(), path +
".."));
38 int main(
int argc,
char* argv[]) {
43 std::vector<std::string> scans =
open(argv[1]);
46 for (
auto scan : scans) {
51 pointCloud::Ptr new_cloud_data (
new pointCloud);
52 pcl::io::loadPCDFile(scan, *new_cloud_data);
53 calibrator.
update(new_cloud_data);
std::vector< std::string > open(std::string path=".")
Filter to calibrate the Laser mounting Pose according to NAV-data.
This file introduces the class LaserNAVCalibration which is used to calibrate the laser-pose with nav...
pcl::PointCloud< pcl::PointNormal > pointCloud
Typedef for shorter call of point-cloud-pointer-type.
virtual void update(pointCloud::Ptr cloud_to_draw)
Updates the mounting-pose using Levenberg-Marquardt non-linear optimization.
pcl::PointCloud< PointT > pointCloud
int main(int argc, char *argv[])
void setScansBetweenLastAndLatest(unsigned int scans_between_last_and_latest)
Sets the number of scans to skip between one registration.