I apply a clustering technique called DBSCAN to identify which points in a point cloud belong to the same object.
-
This is the second perception exercise from Udacity's RoboND.
-
This builds upon my solution for the first perception exercise where I apply techniques to separate our objects of interest.
- https://github.com/mithi/point-cloud-clusters/blob/master/src/sensor_stick/scripts/clustering.py
- https://github.com/mithi/point-cloud-clusters/blob/master/src/sensor_stick/scripts/filtering_helper.py
- https://github.com/mithi/point-cloud-clusters/blob/master/src/sensor_stick/scripts/pcl_helper.py
You can learn more about PCL here. You can learn more about DBSCAN in the following links:
- https://www.naftaliharris.com/blog/visualizing-dbscan-clustering/
- http://scikit-learn.org/stable/auto_examples/cluster/plot_dbscan.html
- You need an Ubuntu 16.04.2 with ROS full-desktop-version which includes RViz and Gazebo
- You must clone the repository, go inside the directory and install the dependencies:
$ rosdep install --from-paths src --ignore-src --rosdistro=kinetic -y
$ catkin_make
- Add the following to your
.bashrc
file:
export GAZEBO_MODEL_PATH=~/catkin_ws/src/sensor_stick/models
source ~/catkin_ws/devel/setup.bash
- On one terminal run
$ roslaunch sensor_stick robot_spawn.launch
- On another terminal go inside
/src/sensor_stick/scripts/
folder in this repository - Then run
$ python clustering.py
RViz
should run, select the/pcl_cluster
from the Topics dropdown