The Problem
Mobile robots need more than raw point clouds or occupancy maps to make decisions. They need a structured understanding of their environment—rooms, places, objects, and how those entities relate. Building that hierarchical representation online, while the robot is moving, is computationally hard and typically requires stitching together multiple research prototypes. Hydra addresses that gap by providing a unified, real-time pipeline for incremental 3D scene graph construction.
What This Does
Hydra is a C++ perception system that incrementally builds a hierarchical 3D scene graph from sensor data (RGB-D, LiDAR, odometry). The pipeline is organized into modules under include/hydra/: input handles sensor ingestion, frontend extracts geometric places and meshes, backend performs pose graph optimization and maintains the scene graph layers (rooms, places, objects), and loopclosure detects revisited locations. The reconstruction module maintains a volumetric map and extracts meshes via marchingcubes.h.
The system supports open-set semantic labeling via an openset module (embedding-based, not fixed class lists) and includes a gnn module for learned room classification. A Python evaluation package lives in eval/python/hydraeval/ with tools for computing room and place metrics against ground truth. Dataset configurations for common robotics platforms (Spot, Jackal, KITTI-360, Habitat) are in config/datasets/.
How To Use It
The README indicates this is a ROS2 package (ROS1 is archived on a separate branch). Build commands are not shown in the excerpt, but the presence of CMakeLists.txt, colcon.pkg, and .gitmodules implies a colcon build workflow within a ROS2 workspace. The repo uses configutilities for YAML-based configuration (files in config/), and the Python eval package in eval/pyproject.toml can be installed via pip.
Expected workflow (verify against README for exact commands)
cd ~/ros2ws vcs import src < hydra.rosinstall colcon build --packages-select hydra Run with a dataset config, e.g.: ros2 launch hydra hydra.launch config:=config/datasets/spot.yaml
The eval package is invoked via python -m hydraeval (per eval/python/hydra_eval/main.py) for offline evaluation. The README should be consulted for the exact launch files and dataset preparation steps—the excerpt does not include them.
Real-World Use
A Spot robot equipped with a depth camera and LiDAR patrols an office floor. Hydra ingests the sensor stream, builds a volumetric map, segments it into places and rooms, and maintains a scene graph that the robot's navigation stack can query—e.g., "find the nearest room labeled 'kitchen'" or "is this place already visited?" The open-set embeddings allow the robot to recognize novel object categories without retraining, which matters for unstructured environments.
Code Health & Issues
Med – No test suite detected. The repository has 200 files, but no test files are present. For a perception system with heavy numerical code (GVD extraction, TSDF integration, pose graph optimization), this is a real risk. The CI workflow (.github/workflows/ci.yaml) likely only builds the code. Low – No dependency lockfile. eval/pyproject.toml declares dependencies without pins. Reproducibility of the Python eval environment is not guaranteed. Low – Large header-only surface. 116 header files vs 13 .cpp files suggests much of the logic lives in headers, which can slow compile times and blur interface/implementation separation.
The codebase is well-organized with clear module boundaries, and the presence of .clang-format, .pre-commit-config.yaml, and license headers indicates disciplined engineering. The lack of tests is the main concern.
The Bottom Line
Hydra is a serious research-grade system from MIT-SPARK, backed by two peer-reviewed papers, and it is the reference implementation for real-time 3D scene graphs. It is not a plug-and-play library—expect a significant ROS2 setup effort and a need to write your own tests if you depend on it in production. Best suited for robotics researchers or teams already invested in ROS2 who need hierarchical spatial understanding and can absorb the integration cost.