1 Install ROS
For details, please refer to other tutorials
2 start ROS
Open terminal 1, enter roscore to start ros, as shown in the figure below
roscore
3 open rviz
Open terminal 2 and enter rosrun rviz rviz, as shown in the figure below
rosrun rviz rviz
4 View bag package information
Open terminal 3, execute rosbag info your_bag_file_name.bag to view topic information, as shown in the figure below
rosbag info yourbagname.bag
6 Locally publish the point cloud information of the bag package
As shown below
rosbag play yourbagname.bag
5 read bag package
1) Click the Add button in the lower left corner: Add, select PointCloud2 in by display type, and click ok;
2) Modify Fixed Feame to base_link;
3) Modify Topic to bag corresponding Topic;
4) Modify Style to Points. (in the form of a point cloud)
6 Convert bag data to pcd format
rosrun pcl_ros bag_to_pcd yourbagname.bag yourbagtopic outputpath
yourbagname.bag: your bag file
yourbagtopic: the topic corresponding to your bag file
outputpath: pcd point cloud save path