29 #include <pcl/io/hdl_grabber.h>
30 #include <pcl/io/vlp_grabber.h>
40 #include <pcl/visualization/cloud_viewer.h>
44 #include <pcl/point_cloud.h>
45 #include <pcl/point_types.h>
46 #include <pcl/common/time.h>
47 #include <pcl/visualization/point_cloud_color_handlers.h>
48 #include <pcl/visualization/cloud_viewer.h>
49 #include <pcl/visualization/image_viewer.h>
50 #include <pcl/console/parse.h>
54 using namespace pcl::console;
60 "rtabmap-lidar_viewer IP PORT driver\n"
61 " driver Driver number to use: 0=VLP16 (default IP and port are 192.168.1.201 2368)\n");
69 printf(
"\nSignal %d caught...\n", sig);
91 driver = atoi(
argv[3]);
92 if(driver < 0 || driver > 0)
94 UERROR(
"driver should be 0.");
98 printf(
"Using driver %d (ip=%s port=%d)\n", driver, ip.c_str(), port);
112 printf(
"Lidar init failed! Please select another driver (see \"--help\").\n");
117 pcl::visualization::CloudViewer * viewer =
new pcl::visualization::CloudViewer(
"cloud");
125 while(!
data.laserScanRaw().empty() && (viewer==0 || !viewer->wasStopped()) &&
running)
128 viewer->showCloud(cloud,
"cloud");
129 printf(
"Scan size: %ld points\n", cloud->size());
131 int c = cv::waitKey(10);
137 printf(
"Closing...\n");