How dcmlr/groundgrid works
Project Type and Purpose
• This is a ROS (Robot Operating System) perception package (“groundgrid”) written in C++ and Python.
High-Level Architecture
• ROS Master: the central coordinator for topics, services, and parameters.
• Data Ingestion
• scripts/kitti_data_publisher.py – “KITTIPlayback” node: reads raw Velodyne packets or point clouds, publishes sensor_msgs/PointCloud2 on /velodyne_points.
• Processing
• Nodelet Manager (one container process; see nodelet_plugins.xml)
– groundgrid/GroundGridNodelet: subscribes to /velodyne_points, runs GroundGrid::segment() & GroundSegmentation modules, publishes:
· segmented point clouds (ground vs. nonground)
· grid_map_msgs/GridMap (terrain elevation map)
– groundgrid/GroundGridNode (standalone node alternative)
• Dynamic Reconfigure Server: enables runtime tuning of segmentation parameters.
• Service Server: NextCloud.srv – allows external nodes/scripts to request the next segmented cloud on demand.
• Visualization
• grid_map_rviz_plugin for visualizing 2D grid maps.
• Evaluation & Utilities
• scripts/eval_groundpoint_classifier.py – “KITTIEvaluate” node: replays clouds, collects classification stats, prints metrics.
• launch files (launch/*.launch): groups nodes, sets ROS params, ties in dynamic_reconfigure, directs topics to RViz or evaluation script.
Components & Interactions
[KITTI Publisher Node] → publishes “/velodyne_points”
[Nodelet Manager]
├─ [GroundGridNodelet]
│ • subscribes “/velodyne_points”
│ • calls GroundGrid/ GroundSegmentation libraries
│ • publishes “/ground_points” & “/grid_map”
│ • offers “NextCloud” service
└─ [Dynamic Reconfigure Server]
• External scripts/nodes may call the NextCloud service or subscribe to output topics.
• RViz: subscribes to outputs, displays point clouds and grid map overlays.
• Evaluation script: subscribes to same topics, logs metrics.
Architectural Patterns & Design Principles
• Nodelet plugin pattern (zero-copy intra-process transport).
• Clear separation: Data Ingestion → Processing → Visualization/Evaluation.
• Service-oriented for on-demand processing.
• Dynamic reconfigure for runtime parameter tuning.
• Uses grid_map for 2D terrain representation, PCL for point processing, cv_bridge for image conversions if needed.