Detecting Environmental Objects in ROS
Utilizling K-Means algorithm to determine the number of objects in an environment
In this small project, the goal is determine the number of objects that are given in an environment. We assume that the robot is an infinite environment and is static.
By reading the laser sensor on the TurtleBot3, we retrieve the following raw values.
When we first run this, we do not know how many objects there are. To determine the number of objects there are we run the model for 1 to 11 clusters and then graph the average of the euclidean suared distance from the centroids to each cluster.
Utilizing the elbow method, we know that there are around 4 clusters. Although there are 5 cylinders, two of the cylinders are really close almost in essence one object.
Finally, graphing the total clusters is shown as below.
While the results are not exact, it’s relatively accurate in terms of utilizing the K-Means Algorithm. However, one thing that I noticed is how it lacks to differentiate clusters that are close yet still distinct. In the future, I plan to explore more behind the intricacy like maybe if there’s another algorithm that could solve this problem. Some of the research that I have done says that I could possibly test out utilizing DBSCAN (Density-Based Spatial Clustering of Applications with Noise) to group objects based on there denisty.
I would like to thank the Construct for helping me learn and implement this mini project.