In this course we will be talking about sensor fusion, whch 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.
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.
Radar data is typically very sparse and in a limited range, however it can directly tell us how fast an object is moving in a certain direction. This ability makes radars a very pratical sensor for doing things like cruise control where its important to know how fast the car infront of you is traveling. Radar sensors are also very affordable and common now of days in newer cars.
Sensor Fusion by combing lidar's high resolution imaging with radar's ability to measure velocity of objects we can get a better understanding of the sorrounding environment than we could using one of the sensors alone.
In this project I have implemented the full pipeline for Lidar obstacle detection from scratch. First the dense input point cloud is downsampled using Voxel grid downsampling to reduce the number of points for faster processing. After preprocessing the data Planar RANSAC segmenetation was performed to differentiate the road points from the obstacle points. Once we obtained the road and obstacle point indices I clustered them using Euclidean Clustering and Kd-Tree and then finally based on the clusters projected a bounding box over the clouds.
The workspace provided in the SFND classroom comes preinstallated with everything that you need to finish the exercises and projects. Versions used by Udacity for this ND are as follows:
- Ubuntu 16.04
- PCL - v1.7.2
- C++ v11
- gcc v5.5
Note The [CMakeLists.txt] file provided in this repo can be used locally if you have the same package versions as mentioned above. If you want to run this project locally (outside the Udacity workspace), please follow the steps under the Local Installation section.
-
Clone this github repo:
cd ~ git clone https://github.com/udacity/SFND_Lidar_Obstacle_Detection.git
-
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 ~/SFND_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 classroom exercises and project with this setup.
-
install homebrew
-
update homebrew
$> brew update
-
add homebrew science tap
$> brew tap brewsci/science
-
view pcl install options
$> brew options pcl
-
install PCL
$> brew install pcl
-
Clone this github repo
cd ~ git clone https://github.com/udacity/SFND_Lidar_Obstacle_Detection.git
-
Edit the CMakeLists.txt file as shown in Step 2 of Ubuntu installation instructions above.
-
Execute the following commands in a terminal
cd ~/SFND_Lidar_Obstacle_Detection mkdir build && cd build cmake .. make ./environment
-
Follow the steps here to install PCL.
-
Clone this github repo
cd ~ git clone https://github.com/udacity/SFND_Lidar_Obstacle_Detection.git
-
Edit the CMakeLists.txt file as shown in Step 2 of Ubuntu installation instructions above.
-
Execute the following commands in Powershell or Terminal
cd ~/SFND_Lidar_Obstacle_Detection mkdir build && cd build cmake .. make ./environment