5、Data conversion and point cloud

5.1、ROS and PCD

Start up interl camera

Point cloud display: rviz (start the rviz command, select the corresponding topic, modify the parameters, and present different effects); pcl_visualization tool.

(1)pointcloud_to_pcd

Save the ROS point cloud message in the specified PCD file.

(2)convert_pcd_to_image

Load a PCD file and publish it as a ROS image message five times per second.

(3)convert_pointcloud_to_image

Subscribe to a topic of ROS point cloud and publish it with image information.

(4)pcd_to_pointcloud

Load a PCD file and publish one or more times as a ROS point cloud messag

(5)bag_to_pcd

rosbag Record

Command: rosbag record topic1 [topic2 topic3 ...]

bag_to_pcd

Read a package file and save the ROS point cloud message in the specified PCD file. This requires a bag file.

5.2、PCL 3D point cloud

5.2.1、start up

Release point cloud, the launch file contains the launch of rviz. So I can clearly see a cloud of dots flashing in the middle of rviz.

image-20210903152536091

Another way to start, this way you need to manually start [rviz], and add the component [PointCloud2] to select the topic [/color_cloud].

Path: ~/astra_ws/src/astra_visual/src/pub_pointCloud.cpp

5.2.2、Point cloud visualization

Start up command

image-20210903153621551

【Ctrl】+【-】

【Shift】+【+】

【Alt】+【-】

【Alt】+【+】

The mouse wheel and left and right buttons can also be controlled.

Path: ~/astra_ws/src/astra_visual/src/pcl_visualize.cpp