Home▸Articles▸Robotics & Kinematics

2D LiDAR Ray-Casting: Point Cloud & Occupancy Grid

Understanding how 2D LiDAR systems create detailed maps of environments for autonomous navigation.

mysimulator teamUpdated June 2026≈ 3 min read▶ Open the simulation

What is 2D LiDAR Ray-Casting?

LiDAR (Light Detection and Ranging) is a remote sensing technology that uses laser light to measure distances and create detailed maps of the environment. In a 2D LiDAR setup, a rotating sensor emits line-of-sight rays across a plane, detecting obstacles or features by measuring the time it takes for the reflected light to return.

The process involves firing out numerous rays from a single point at various angles, collecting data on each ray's path and interaction with objects in its path. This data is then used to build a 2D representation of the environment.

Generating Point Clouds

A point cloud is a set of data points in space, typically representing the surface of an object or the ground plane in this case. Each point corresponds to a measurement taken by the LiDAR sensor, providing precise coordinates and often additional information like intensity (brightness) or reflectivity.

By plotting these points on a 2D map, we can visualize the environment as it is perceived by the LiDAR system, which is crucial for tasks such as obstacle avoidance and path planning.

live demo · related simulation● LIVE

Building Occupancy Grids

An occupancy grid is a probabilistic representation of an area that indicates the probability that a given cell in the map contains an object. Each cell in the grid can be assigned a value between 0 and 1, where 0 represents free space with high certainty (no obstacles) and 1 represents occupied space with high certainty (obstacles).

This probabilistic approach is particularly useful for handling uncertainty in sensor measurements, allowing robots to make more informed decisions about their movements.

Practical Applications

2D LiDAR ray-casting and the resulting point clouds and occupancy grids are fundamental technologies used in various applications such as autonomous vehicles, drones, and robotics. They enable these systems to navigate safely by providing a detailed and accurate representation of their surroundings.

For instance, self-driving cars use LiDAR data to detect obstacles, plan routes, and avoid collisions, making them safer and more reliable on the road.

Frequently asked questions

How does range noise affect 2D LiDAR performance?

Range noise introduces uncertainty in the distance measurements taken by the LiDAR sensor. High range noise can lead to inaccurate point cloud generation and less reliable occupancy grids, affecting the overall accuracy of autonomous navigation systems.

Why is angular resolution important in 2D LiDAR systems?

Angular resolution determines how finely the environment is divided into sectors. Higher angular resolution means more detailed maps but also higher computational demands and potentially increased noise due to more rays being fired at smaller angles.

Can 2D LiDAR be used in indoor environments?

Yes, 2D LiDAR is commonly used for mapping indoor spaces. It can effectively detect walls, furniture, and other obstacles, making it ideal for applications like robot navigation in warehouses or hospitals.

What are the limitations of using 2D LiDAR?

While 2D LiDAR is effective for mapping flat surfaces, it may struggle with complex 3D environments and vertical structures. Additionally, it can be affected by environmental factors like dust or reflective surfaces.

Try it live

Everything above runs in your browser — open 2D LiDAR Ray-Casting: Point Cloud & Occupancy Grid and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.

▶ Open 2D LiDAR Ray-Casting: Point Cloud & Occupancy Grid simulation

What did you find?

Add reproduction steps (optional)