A ROS based obstacle detection module using 2D Lidar scans. The environment contains one or more moving objects. When objects are within the range of 2 meters, a ros message is published as an output containing: the number of obstacles, the distances to the obstacles and the sizes of obstacles.
The approach to the solution is via a custom extended object tracking algorithm. Steps:
- Detect the laser points in the area
- Constructing the clusters of the laser points based on some filtering parameters
- Filter out clusters that are outside the range of 2 meters
- Apply the necessary mathematical operations to find: angle subtended at source, size of the object and average distance.
- Maximum distance between two samples for one to be considered as in the neighborhood
- Minimum number of samples in a neighborhood for a point to be considered
-
Threshold Distance between 2 consecutive 'Non-infinity' points to consider them different clusters is taken as 0.5m.
-
Minimum number of points in a neighborhood for a point to be considered 8.
-
Any object or point within a proximity of 2m from the laser source, fulfilling the above 2 conditions, will be considered as the resulting obstacle.
-
Size is determined in two ways:
a. Distance between extremities of the object
b. Angle subtended from the source to the objects
-
Whenever any point of a cluster comes within the 2m proximity of the laser, the whole cluster will be considered an obstacle.
-
A wall or a static object is within the proximity of 2m from the laser. As it fulfills all the conditions of the cluster, its data is also published on the topic.
- My obstacle detection package can detect obstacles and determine the number of objects, the average distance, and size of the object with a maximum error of ±5% and average error of ±2% and publishes the required data on a topic “/fin_data” with a custom message type “Fin.msg”.