Study notes 36--D435 depth camera point cloud data is converted to pcd and viewed

Environment: ubuntu16.04 ros-kinetic rviz

Background: People in the
field generally know that when doing real d435 camera calibration (point cloud matching), you need to use pcd files, and d435 sends pointcloud2 point cloud data, which needs to be converted.

It is assumed here that the d435 related driver and the example display package are installed according to the official. Then, ros-kinetic and rviz can also be used normally, and then the launch file of the camera is ok, and this method is used.

Steps:
1. Set the parameters in the launchfile in the local d435 package allow_no_texture_pointsto true, such as:

<arg name="allow_no_texture_points"   default="true"/>

Launch file source:https://github.com/IntelRealSense/realsense-ros/blob/development/realsense2_camera/launch/rs_d435_camera_with_model.launch

Use usb to link d435 to the computer, start the launch file, and view the time data collected by d435 through rviz

2. In the terminal, go cdto the specified folder and run:

rosrun pcl_ros pointcloud_to_pcd input:=//d435_01/depth/color/points
//这里假设我的d435发布的点云数据topic为d435_01/depth/color/points

You can refer to:http://wiki.ros.org/pcl_ros

After running, pcd files will be continuously generated in the folder, which are automatically named by the system; use Ctrl+c to terminate the generation of pcd files.

3. View the pcd file. Install the pcl-toolstoolkit, usesudo apt-get install pcl-tools

4. Then run in the terminal under the corresponding folder: pcl_viewer xxx.pcd
Reference:https://answers.ros.org/question/27483/how-to-visualize-pcd-file/

After obtaining the pcd file, the calibration of the multi-d435 camera can also continue.

######################
Good memory is not as good as bad writing
, –20200730

Guess you like

Origin blog.csdn.net/qq_45701501/article/details/107685385