ros-perception/pointcloud_to_laserscan

Converts a 3D Point Cloud into a 2D laser scan.

What it solves

This project provides tools to convert 3D point cloud data into 2D laser scans and vice versa within the ROS 2 ecosystem. This is useful for simplifying complex 3D sensor data into a format that 2D navigation and obstacle avoidance algorithms can process.

How it works

The package contains two primary components:

  1. PointCloudToLaserScanNode: This node projects 3D PointCloud2 messages into 2D LaserScan messages by sampling a specific height range (defined by min_height and max_height) and calculating distances within a specified angular range.
  2. LaserScanToPointCloudNode: This node performs the reverse operation, re-publishing 2D LaserScan messages as 3D PointCloud2 messages.

Both components support optional coordinate frame transformations using a target_frame parameter to ensure the data is aligned with the robot's coordinate system.

Who it’s for

Robotics developers using ROS 2 who need to bridge the gap between 3D sensors (like LiDAR or depth cameras) and 2D laser scan-based software.

Highlights

  • Bidirectional Conversion: Supports both point cloud to laser scan and laser scan to point cloud conversions.
  • Customizable Sampling: Allows precise control over the height range, angular resolution, and distance limits of the 2D projection.
  • Frame Transformation: Integrated support for transforming data into a specific target frame before conversion.
  • ROS 2 Port: A modernized port of the original ROS 1 package.

Related

  • Project
  • Project
  • Project
  • Project