5、Data conversion and point cloud5.1、ROS and PCD(1)pointcloud_to_pcd(2)convert_pcd_to_image(3)convert_pointcloud_to_image(4)pcd_to_pointcloud(5)bag_to_pcd5.2、PCL 3D point cloud5.2.1、start up5.2.2、Point cloud visualization
Start up interl camera
roslaunch astra_camera astraproplus.launchPoint cloud display: rviz (start the rviz command, select the corresponding topic, modify the parameters, and present different effects); pcl_visualization tool.
xxxxxxxxxxroslaunch astra_visual pointCloud_visualize.launch cloud_topic:=/camera/depth_registered/pointsxxxxxxxxxxrosrun pcl_ros pointcloud_to_pcd input:=/camera/depth/points rosrun pcl_ros pointcloud_to_pcd input:=/camera/depth_registered/points Save the ROS point cloud message in the specified PCD file.
xxxxxxxxxxrosrun pcl_ros convert_pcd_to_image <cloud.pcd>Load a PCD file and publish it as a ROS image message five times per second.
xxxxxxxxxxrosrun pcl_ros convert_pointcloud_to_image input:=/camera/depth_registered/points output:=/my_imageView image: rosrun image_view image_view image:=/my_imageSubscribe to a topic of ROS point cloud and publish it with image information.
xxxxxxxxxxrosrun pcl_ros pcd_to_pointcloud <file.pcd> [ <interval> ]
Load a PCD file and publish one or more times as a ROS point cloud messag
xxxxxxxxxxroslaunch astra_visual pointCloud_visualize.launch cloud_topic:=/cloud_pcdrosbag Record
Command: rosbag record topic1 [topic2 topic3 ...]
xxxxxxxxxxrosbag record /camera/depth_registered/points
bag_to_pcd
xxxxxxxxxxrosrun pcl_ros bag_to_pcd <input_file.bag> <topic> <output_directory># E.g:rosrun pcl_ros bag_to_pcd 2021-09-09-11-41-56.bag /camera/depth_registered/points my_pcdRead a package file and save the ROS point cloud message in the specified PCD file. This requires a bag file.
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.
xxxxxxxxxxroslaunch astra_visual pointCloud_pub.launch

Another way to start, this way you need to manually start [rviz], and add the component [PointCloud2] to select the topic [/color_cloud].
xxxxxxxxxxroscorerosrun astra_visual pointCloud_pub
Path: ~/astra_ws/src/astra_visual/src/pub_pointCloud.cpp
xxxxxxxxxxrviz
Start up command
xxxxxxxxxxroslaunch astra_visual pointCloud_visualize.launchrosrun astra_visual pointCloud_visualize

【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