Aditya Nisal
Email : anisal@wpi.edu
Description
Aim:
To cluster and detect objects in point clouds generated by lidar or depth cameras and tracking them using bounding boxes.
​
Methodology:
-
Conversion of ROS Point Cloud Message to PCL Point Cloud:
-
Receive a point cloud message (sensor_msgs::msg::PointCloud2) from a topic named "/kitti/point_cloud".
-
Convert this ROS point cloud message to a format that PCL can use (pcl::PointCloud<PointT>).
-
-
Cropping of Point Cloud Along X and Y Axes:
-
Define a filtering object (pcl::PassThrough) and set up filter parameters for filtering along the X and Y axes to remove points that are not within a predefined range (defined by radius).
-
Apply the passthrough filter along the X-axis, and then the Y-axis, thereby cropping the point cloud data to retain only points within a "cuboid" centered around the origin (X=0, Y=0).
-
-
Voxel Grid Downsampling:
-
Create a voxel grid filter and define a leaf size for downsampling.
-
Apply this filter to the cropped point cloud, reducing its size by averaging nearby points into voxels (small cubes of a fixed size), which also reduces computational complexity in the subsequent steps.
-
-
Estimation of Surface Normals:
-
Estimate the normals of the point cloud using k-Nearest Neighbors (where k is set to 30).
-
This is likely done to facilitate the subsequent step which involves identifying a road plane using surface normals.
-
-
Road Surface Segmentation:
-
Define a model for segmenting the planar road surface using the previously calculated normals, utilizing the RANSAC algorithm for robust model estimation.
-
Extract the inliers and coefficients of the plane model and subtract these inliers from the original point cloud, resulting in a point cloud (road_cloud) presumably containing only objects/obstacles above the road surface.
-
-
Euclidean Clustering for Traffic Object Segmentation:
-
Perform Euclidean clustering to group together points that are close to each other in the road_cloud.
-
For each cluster identified, check if its size falls within a reasonable range (defined by min_reasonable_size and max_reasonable_size), and if so, identify it as an object/obstacle of interest.
-
-
Bounding Box Computation:
-
Compute a 3D axis-aligned bounding box around each identified cluster.
-
Store the minimum and maximum coordinates of each bounding box along with potential RGB color values in a structured manner.
-
-
Visualization of Results:
-
Create and visualize bounding boxes around detected objects.
-
Employ several markers (top and bottom squares, connecting lines, corner spheres) to represent each bounding box in 3D space using ROS visualization messages.
-
Publish the markers to a ROS topic named "visualization_marker_array" for visualization in a ROS visualization tool (e.g., RViz).
-
Figure 1. Orignal Kitti dataset
Figure 2. Downsampled Kitti dataset
Figure 3. Segmented road
Figure 4. Visualized bounding boxes