Sensor fusion is the process of taking data from multiple sensors and combining it to give us a better understanding of the world around us. we will mostly be focusing on two sensors, lidar, and radar. By the end we will be fusing the data from these two sensors to track multiple cars on the road, estimating their positions and speed.
In this project I have implemented a Lidar Obstacle Detection module, which detects and tracks obstacles on the road using Lidar point clouds, 3D RANSAC Planar Segmentation, 3D Kd-Tree and Euclidean Clustering algorithms also using several Point Cloud Library methods such as Filtering, Extracting Indices, Crop Box, etc.
Lidar sensing gives us high resolution data by sending out thousands of laser signals. These lasers bounce off objects, returning to the sensor where we can then determine how far away objects are by timing how long it takes for the signal to return. Also we can tell a little bit about the object that was hit by measuring the intesity of the returned signal. Each laser ray is in the infrared spectrum, and is sent out at many different angles, usually in a 360 degree range. While lidar sensors gives us very high accurate models for the world around us in 3D, they are currently very expensive, upwards of $60,000 for a standard unit.
- Ubuntu 16.04 LTS / Windows 11
- C++11
- Eigen
- CMake Build System
- Doxygen
- PCL - v1.11.1
- gcc v5.5
Demo Obstacle Detection:
Demo Tracking a Bicyclist:
- All obstacle movement is in the X-Y plane
- RANSAC plane segmentation needs some tuning for Dataset-2 to avoid flat objects on the ground
- Install PCL 1.11.1 on Windows using this link. Refer PCL(Windows 11)
-
Clone this github repo:
cd ~ git clone --recursive https://github.com/iamjadhav/lidar_obstacle_detection
-
Edit CMakeLists.txt as follows:
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
add_definitions(-std=c++14)
set(CXX_FLAGS "-Wall")
set(CMAKE_CXX_FLAGS, "${CXX_FLAGS}")
project(playback)
find_package(PCL 1.11 REQUIRED)
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
list(REMOVE_ITEM PCL_LIBRARIES "vtkproj4")
add_executable (environment src/environment.cpp src/render/render.cpp src/processPointClouds.cpp)
target_link_libraries (environment ${PCL_LIBRARIES})
-
Execute the following commands in a terminal
sudo apt install libpcl-dev cd ~/lidar_obstacle_detection mkdir build && cd build cmake .. make ./environment
This should install the latest version of PCL. You should be able to do all the project with this setup.
Note The library version of PCL being distributed by the apt repository for 18.04 and 20.04 are both older than v1.11. The following links have the information regarding the versions-
You can either build PCL from source (for v1.11) or use the older version.
git clone --recursive https://github.com/iamjadhav/lidar_obstacle_detection
cd lidar_obstacle_detection
mkdir build
cd build
cmake ..
Run environment.cpp
Final Output and Overview -->
lidar_obstacle_detection.mp4
PCL Documentation --> Link