Introduction
In recent years, the use of point clouds in research and development related to robot perception has become increasingly active. A point cloud represents the three-dimensional structure of a measured object as a collection of points. Methods such as distance image cameras and 3D Lidar are widely used to acquire point clouds in real-time.
In the previous article, we introduced PCL (Point Cloud Library). This time, we will explain a point cloud data generation application using the Open3D library and Realsense cameras. Compared to PCL, Open3D requires significantly less code, builds faster, and is easier to implement. It has basic preprocessing functions already implemented and supports RGBD image processing. Additionally, it features beautiful visualization and strong support for scene reconstruction.
Basics of Processing with Open3D
Open3D provides Python instances for point clouds, images, and configuration parameters. These instances can be modified using class methods.
Point Cloud Data Generation with Pyrealsense + Open3D + ROS
The basics of Open3D are as described above. Now, let's introduce a practical application. The goal is to generate point cloud data from an Intel Realsense camera and develop a scanning system using a robot. Robot control will be developed with ROS, and we plan to use the ROS Wrapper for the camera (https://github.com/IntelRealSense/realsense-ros). Once the Realsense ROS node is started, image and point cloud data can be handled via ROS topics, but since the data is transmitted through TCP communication, the data quality is not very good.
Therefore, we use Pyrealsense to directly acquire images from the camera driver and generate point cloud data from RGB and depth images, as well as camera parameters. The source code is as follows:
object_mask refers to the RGB image, while depth_image is the depth image.
The images are converted to RGBD format once, and point clouds are generated using camera parameters (intrinsic).
Since the coordinate systems of Realsense and Open3D are reversed, a flip transformation is necessary.
Comments