Skip to content

ubcuas/collision-detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LiDAR-Based Obstacle Detection System

Overview

This repository contains a C++ implementation of an advanced obstacle detection system designed for use in various environments, leveraging LiDAR (Light Detection and Ranging) data. The system focuses on detecting obstacles with high precision, utilizing the Point Cloud Library (PCL) for data manipulation and analysis. Our approach combines several preprocessing and postprocessing techniques to enhance detection accuracy, reduce computational resources, and improve the reliability of the detected obstacles.

Features

High Detection Accuracy: Utilizes the Random Sample Consensus (RANSAC) algorithm for robust plane segmentation, achieving a high detection rate of obstacles in planar and complex environments.

Intensity-Focused Filtering: Implements an intensity-based filtering mechanism to eliminate noise from LiDAR data, significantly improving the quality of the input point cloud.

Computational Efficiency: Employs voxelization and downsampling techniques to decrease the density of the point cloud data, resulting in a 50% reduction in computational overhead.

Optimized Clustering: Applies Euclidean cluster extraction using a k-d tree data structure, enabling efficient clustering of segmented point clouds for precise obstacle detection. Technical Implementation

Data Reading: Reads and processes LiDAR data from CSV and PLY files, converting raw data into structured point cloud format.

Point Cloud Filtering and Downsampling: Utilizes a conditional removal filter based on intensity values and a VoxelGrid filter for downsampling, enhancing the point cloud's manageability and processing speed.

Segmentation: Divides the point cloud into planes (e.g., ground) and obstacles using RANSAC segmentation, isolating elements of interest for further analysis.

Clustering: Identifies distinct obstacles within the segmented point cloud through Euclidean clustering, allowing for the individual processing of detected objects. Bounding Box Calculation: Calculates and draws 3D bounding boxes around detected obstacles, providing clear visual identification and spatial dimensions of each obstacle.

Visualization: Incorporates PCL visualization tools for real-time display of the original, filtered, segmented, and clustered point clouds with annotated bounding boxes for detected obstacles.

Getting Started

To use this obstacle detection system, you will need to have the Point Cloud Library (PCL) installed on your machine. This project is developed and tested with PCL version 1.9.1, but it should be compatible with newer versions as well.

Dependencies

C++17 or newer Point Cloud Library (PCL) 1.9.1 or newer Compilation Compile the project using CMake and your preferred C++ compiler. Ensure all PCL dependencies are correctly configured in your environment.

  mkdir build && cd build
  cmake ..
  make

Running the Application

To run the application, navigate to the compiled binary location and execute it, providing the directory path containing your LiDAR data files in PLY format.

  ./pcd_write_test

Example Usage and Output

Example Data We have included a sample dataset in the data folder to help you get started and to demonstrate the functionality of our obstacle detection system. This dataset represents typical LiDAR data that the system can process. Found under /Data/Scene_28.pointcloud.ply

Running the Example To run the example with the provided dataset, follow these steps: Ensure you've compiled the project as described in the Getting Started section.

  ./pcd_write_test

Expected Output Upon running the example, the system will process the input LiDAR data, perform obstacle detection, and visualize the results. An example output visualization might look like this:

Wireframe-based representation Surface-based representation

This image shows the original point cloud data, the filtered and downsampled cloud, segmented planes, detected obstacles, and bounding boxes drawn around each detected obstacle.

About

No description, website, or topics provided.

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published