• Stars
    star
    583
  • Rank 76,663 (Top 2 %)
  • Language
    C++
  • License
    BSD 2-Clause "Sim...
  • Created over 2 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Hydra

This repository contains code to incrementally build 3D Dynamic Scene Graphs (DSGs) in real-time and is primarily based on the paper "Hydra: A Real-time Spatial Perception System for 3D Scene Graph Construction and Optimization". If you find this code relevant for your work, please consider citing this paper. A bibtex entry is provided below:

@article{hughes2022hydra,
    title={Hydra: A Real-time Spatial Perception System for {3D} Scene Graph Construction and Optimization},
    fullauthor={Nathan Hughes, Yun Chang, and Luca Carlone},
    author={N. Hughes and Y. Chang and L. Carlone},
    booktitle={Robotics: Science and Systems (RSS)},
    pdf={http://www.roboticsproceedings.org/rss18/p050.pdf},
    year={2022},
}

Update (05/20/23): We recently authored the following paper "Foundations of Spatial Perception for Robotics: Hierarchical Representations and Real-time Systems". Associated updates to Hydra from this paper will be released soon (current target 06/09/23). We also plan to release additional code, most notably for training the room classification networks and GNN-based descriptors as described in the above paper. This will likely take slightly longer (and is likely to be in a different repository, which will be linked to). In the meantime, if you find our new paper relevant for your work, please consider also citing this paper. A bibtex entry is provided below:

@article{hughes2023foundations,
         title={Foundations of Spatial Perception for Robotics: Hierarchical Representations and Real-time Systems},
         author={Nathan Hughes and Yun Chang and Siyi Hu and Rajat Talak and Rumaisa Abdulhai and Jared Strader and Luca Carlone},
         year={2023},
         eprint={2305.07154},
         archivePrefix={arXiv},
         primaryClass={cs.RO}
}

Acknowledgements and Disclaimer

Acknowledgements: This work was partially funded by the AIA CRA FA8750-19-2-1000, ARL DCIST CRA W911NF-17-2-0181, and ONR RAIDER N00014-18-1-2828.

Disclaimer: Research was sponsored by the United States Air Force Research Laboratory and the United States Air Force Artificial Intelligence Accelerator and was accomplished under Cooperative Agreement Number FA8750-19-2-1000. The views and conclusions contained in this document are those of the authors and should not be interpreted as representing the official policies, either expressed or implied, of the United States Air Force or the U.S. Government. The U.S. Government is authorized to reproduce and distribute reprints for Government purposes notwithstanding any copyright notation herein.

General Requirements

Hydra has been tested on the following systems:

  • Ubuntu 18.04 and ROS Melodic
  • Ubuntu 20.04 and ROS Noetic (recommended)

You can follow the instructions here to install ROS if you haven't already.

Then, make sure you have some general requirements:

For melodic:

sudo apt install python-rosdep python-catkin-tools python3-vcstool

For noetic:

sudo apt install python3-rosdep python3-catkin-tools python3-vcstool

Finally, if you haven't set up rosdep yet:

sudo rosdep init
rosdep update

Building Hydra

To get started:

mkdir -p catkin_ws/src
cd catkin_ws
catkin init
catkin config -DCMAKE_BUILD_TYPE=Release -DGTSAM_TANGENT_PREINTEGRATION=OFF \
              -DGTSAM_BUILD_WITH_MARCH_NATIVE=OFF -DOPENGV_BUILD_WITH_MARCH_NATIVE=OFF
catkin config --blacklist hdf5_map_io mesh_msgs_hdf5 label_manager mesh_tools \
                          rviz_map_plugin minkindr_python

cd src
git clone [email protected]:MIT-SPARK/Hydra.git hydra
vcs import . < hydra/install/hydra.rosinstall

rosdep install --from-paths . --ignore-src -r -y
sudo apt install libprotobuf-dev protobuf-compiler

cd ..
catkin build

⚠️ Depending on the amount of RAM available on your machine and whether or not you are compiling Kimera-VIO as well, you may run out of memory when compiling with catkin build directly (which will result in a GCC killed error). If this occurs, you can either specify fewer threads for catkin via catkin build -j NUM_THREADS or compile certain larger packages (e.g. gtsam) directly first by building them specifically, e.g. catkin build gtsam.

Please help us by creating new issues when you run into problems with these instructions!

Finally, if you'd prefer to use the older wstool instead of vcs, you can do the following instead of vcs import:

wstool init
wstool merge hydra/install/hydra.rosinstall
wstool up

Running Hydra (Quickstart)

The only dataset that is supported out-of-the-box is uHumans2. To test Hydra out, you can just download a single scene (the office scene without humans is recommended, and can be found here. Make sure to decompress the rosbag (rosbag decompress path/to/bagfile) before running!

⚠️ Also make sure to source the workspace before starting (typically source path/to/catkin_ws/devel/setup.bash, though if you use zsh you should use the correct setup file for that).

To start Hydra:

roslaunch hydra_dsg_builder uhumans2_incremental_dsg.launch start_visualizer:=true

Then, start the rosbag in a separate terminal:

rosbag play path/to/rosbag --clock

Using Kimera-VIO

⚠️ Kimera-VIO functionality is in a pre-release state. Support is limited (and functionality may be brittle).

You can configure your workspace to also include Kimera-VIO by:

roscd && cd ../src
vcs import . < hydra/install/vio_public_overlay.rosinstall

catkin build

Running Using VIO Only

First, start Kimera:

roslaunch kimera_vio_ros kimera_vio_ros kimera_vio_ros_uhumans2.launch online:=true viz_type:=1 use_lcd:=false

and in a separate terminal, run:

roslaunch hydra_dsg_builder uhumans2_incremental_dsg.launch \
     start_visualizer:=true \
     use_gt_frame:=false

Running Using VIO and External Visual Loop Closures

First, start Kimera:

roslaunch kimera_vio_ros kimera_vio_ros kimera_vio_ros_uhumans2.launch online:=true viz_type:=1 \
    use_lcd:=true \
    lcd_no_optimize:=true

and in a separate terminal, run the same command for Hydra:

roslaunch hydra_dsg_builder uhumans2_incremental_dsg.launch \
     start_visualizer:=true \
     use_gt_frame:=false

⚠️ To achieve the best results with Kimera-VIO, you should wait for the LCD vocabulary to finish loading before starting the rosbag.

Running Using VIO and DSG Loop Closures

First, start Kimera:

roslaunch kimera_vio_ros kimera_vio_ros kimera_vio_ros_uhumans2.launch online:=true viz_type:=1 \
     use_lcd:=true \
     lcd_no_detection:=true

and in a separate terminal, run the same command for Hydra:

roslaunch hydra_dsg_builder uhumans2_incremental_dsg.launch \
     start_visualizer:=true \
     use_gt_frame:=false \
     enable_dsg_lcd:=true

⚠️ To achieve the best results with Kimera-VIO, you should wait for the LCD vocabulary to finish loading before starting the rosbag.

Using a Semantic Segmentation Network

⚠️ This package is not public (yet)

Add semantic_recolor to your workspace via:

roscd && cd ../src
vcs import . < hydra/install/semantic_overlay.rosinstall

Then, follow the instructions to install cuda and other dependencies for the semantic_recolor package (which can be found here).

Finally, build your workspace:

catkin build

Components

See the following for more information:

Filing Issues

⚠️ We don't support other platforms. Issues requesting support on other platforms (e.g. Ubuntu 16.04, Windows) will be summarily closed.

Depending on the nature of the issue, it may be helpful to browse this page about debugging Hydra first.

More Repositories

1

Kimera

Index repo for Kimera code
1,800
star
2

TEASER-plusplus

A fast and robust point cloud registration library
C++
1,753
star
3

Kimera-VIO

Visual Inertial Odometry with SLAM capabilities and 3D Mesh generation.
C++
1,534
star
4

Kimera-Semantics

Real-Time 3D Semantic Reconstruction from 2D data
C++
640
star
5

Kimera-RPGO

Robust Pose Graph Optimization
C++
468
star
6

Kimera-VIO-ROS

ROS wrapper for Kimera-VIO
C++
371
star
7

Kimera-Multi

Index repo for Kimera-Multi system
Shell
327
star
8

Khronos

Spatio-Temporal Metric-Semantic SLAM
C++
273
star
9

Loc-NeRF

Monte Carlo Localization using Neural Radiance Fields
Python
259
star
10

Kimera-Multi-Data

A large-scale multi-robot dataset for multi-robot SLAM
149
star
11

GNC-and-ADAPT

Graduated Non-Convexity (GNC) and Adaptive Trimming (ADAPT) algorithms for outlier robust estimation
MATLAB
112
star
12

CertifiablyRobustPerception

Certifiable Outlier-Robust Geometric Perception
MATLAB
107
star
13

PD-MeshNet

Primal-Dual Mesh Convolutional Neural Networks
Python
106
star
14

GlobalOptimizationTutorial

Hands-on Tutorial for Global Optimization in Matlab
MATLAB
104
star
15

llm_scene_understanding

HTML
71
star
16

STRIDE

Solver for Large-Scale Rank-One Semidefinite Relaxations
MATLAB
66
star
17

Clio

66
star
18

VNAV-labs

Labs for MIT 16.485
Python
64
star
19

Spatial-Hash

Minimal C++ library for spatial data structures based on voxel hashing
C++
57
star
20

KISS-Matcher

52
star
21

Hydra-ROS

Hydra ROS Interface
C++
39
star
22

Spark-DSG

Scene Graph API (C++ and Python)
C++
37
star
23

Kimera-VIO-ROS2

C++
36
star
24

Kimera-Multi-LCD

C++
34
star
25

Kimera-VIO-Evaluation

Code to automatically evaluate and tune parameters for Kimera-VIO pipeline.
Python
33
star
26

Kimera-PGMO

C++
33
star
27

ROBIN

C++
31
star
28

config_utilities

Automatic C++ config structs and tools.
C++
28
star
29

pose_graph_tools

C++
26
star
30

pose-baselines

Jupyter Notebook
25
star
31

estimation-contracts

MATLAB
25
star
32

neural_tree

Python
22
star
33

C-3PO

Python
21
star
34

Kimera-Distributed

C++
21
star
35

MiDiffusion

Python
17
star
36

LP2

Long-term Human Trajectory Prediction using 3D DSGs
15
star
37

GlobalOptimization-ICCV2019

ICCV 2019 Tutorial: Global Optimization for Geometric Understanding with Provable Guarantees
TeX
14
star
38

FUSES

C++
11
star
39

Hydra-GNN

Room classification network training and inference code
Python
10
star
40

certifiable_tracking

MATLAB
8
star
41

PACE

Index repo for the PACE project
Python
7
star
42

robotRepresentations-RSS2023

Robot Representations Workshop @ RSS 2023
SCSS
6
star
43

ensemble_pose

Self-training for an ensemble of object pose estimators
Python
5
star
44

ford-paper-params

Parameters for competitor pipelines for the Kimera Multicamera project
5
star
45

CertifiablePerception-RSS2020

Workshop website on Certifiable Robot Perception for RSS2020
TeX
5
star
46

Longterm-Perception-WS

Workshop on Long-term Perception for Autonomy in Dynamic Human-shared Environments
SCSS
4
star
47

ThreedFront

Python
4
star
48

PerceptionMonitoring

Python
3
star
49

dbow2_catkin

CMake
2
star
50

PAL-ICRA2020

Ruby
2
star
51

kimera-multi-vocab

Vocabulary file for Kimera-Multi in the Kimera-Multi dataset
2
star
52

VNAV2020-handouts

Handouts/webpage for VNAV 2020
HTML
1
star