Skip to content

Commit c97c3b1

Browse files
Feature/update docs (#26)
* condense docs and remove old documentation * fix formatting * fix link * use permalink instead * fix another link * update semantic_inference instructions to ros2 * update docs and rviz camera settings * add oom note
1 parent b0344e8 commit c97c3b1

File tree

6 files changed

+143
-190
lines changed

6 files changed

+143
-190
lines changed

README.md

Lines changed: 118 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Hydra-ROS
1+
# Hydra-ROS
22

33
This repository contains the ROS interface for [Hydra](https://github.com/MIT-SPARK/Hydra) and is based on the following papers:
44
- ["Hydra: A Real-time Spatial Perception System for 3D Scene Graph Construction and Optimization"](http://www.roboticsproceedings.org/rss18/p050.pdf)
@@ -26,29 +26,134 @@ If you find this code relevant for your work, please consider citing us. A bibte
2626
}
2727
```
2828

29-
### Acknowledgements and Disclaimer
29+
## Table of Contents
3030

31-
**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.
32-
33-
**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.
31+
- [Getting Started](#getting-started)
32+
- [Installation](#installation)
33+
- [Dataset Setup](#dataset-setup)
34+
- [Running Hydra](#running-hydra)
35+
- [Filing Issues](#filing-issues)
36+
- [Additional Resources](#additional-resources)
37+
- [Acknowledgements](#acknowledgements)
3438

35-
### Getting started
39+
## Getting started
3640

3741
> :warning: **Warning** <br>
38-
> The ROS2 version of this package is in active development and is not guaranteed to build, run or have documentation. You have been warned!
42+
> The ROS2 version of Hydra is in active development and is unstable and may not fully be feature-complete.
43+
44+
Hydra has been tested on Ubuntu 22.04 & ROS2 Iron and Ubuntu 24.04 & ROS2 Jazzy. It **should** build on newer distributions. It **will not** build on older ROS2 distributions than Iron (it depends on the `NodeInterfaces` suite of classes that were introduced in Iron).
45+
46+
You can follow the instructions [here](https://docs.ros.org/en/jazzy/Installation.html) to install ROS2 if you haven't already. The link points to Jazzy currently, pay attention to the distribution!
47+
48+
### Installation
49+
50+
#### Dependencies
51+
52+
First, make sure you have some general requirements
53+
```shell
54+
# this is an optional package in the ROS2 installation directions
55+
sudo apt install ros-dev-tools
56+
```
57+
and make sure you have set rosdep up:
58+
```shell
59+
sudo rosdep init
60+
rosdep update
61+
```
62+
63+
#### Building
64+
65+
To get started:
66+
67+
```shell
68+
mkdir -p ~/hydra_ws/src
69+
cd ~/hydra_ws
70+
# you may find it convenient to set the build type, etc.
71+
# you may also want to set `symlink-install: true`
72+
echo "build: {cmake-args: [-DCMAKE_BUILD_TYPE=Release]}" > colcon_defaults.yaml
73+
74+
cd src
75+
git clone [email protected]:MIT-SPARK/Hydra-ROS.git hydra_ros -b ros2
76+
vcs import . < hydra_ros/install/ros2.yaml
77+
rosdep install --from-paths . --ignore-src -r -y
78+
79+
cd ..
80+
colcon build --continue-on-error
81+
```
82+
83+
> **Note**<br>
84+
> Depending on the amount of RAM available on your machine, you may run out of memory when compiling with `colcon build` directly (which will result in a `GCC killed` error). If this occurs, you can either specify fewer threads for colcon via `MAKEFLAGS="-j2" colcon build --parallel-workers 2` (which builds 2 packages at a time with 2 threads for 4 threads total) or compile certain larger packages directly first by building them specifically.
85+
86+
> :warning: **Warning**</br>
87+
> In the `vcs import` step, GitHub may block too many concurrent requests. If you receive `kex_exchange_identification: read: Connection reset by peer` errors, try running `vcs import . < hydra/install/hydra.rosinstall --workers 1`.
88+
89+
### Dataset Setup
90+
91+
We've switched to the v2 version of uhumans2. Download the ROS1 bag for the office scene [here](https://drive.google.com/file/d/1awAzQ7R1hdS5O1Z2zOcpYjK7F4_APq_p/view?usp=drive_link).
92+
Then install [rosbags](https://pypi.org/project/rosbags/) via pip (i.e., `pip install rosbags` into a virtual environment).
93+
94+
To convert the bag:
95+
```shell
96+
rosbags-convert --src path/to/office.bag --dst path/to/office
97+
```
3998

40-
Hydra has been tested on Ubuntu 22.04 & ROS2 Iron and Ubuntu 24.04 & ROS2 Jazzy. See [here](doc/ros2_setup.md) to get started with Hydra and ROS2.
99+
Make sure to create a override for latching static tf topics:
100+
```shell
101+
echo "/tf_static: {depth: 1, durability: transient_local}" > ~/.tf_overrides.yaml
102+
```
41103

42104
### Running Hydra
43105

44-
See our documentation [here](doc/quickstart.md).
106+
> **:warning: Warning**<br>
107+
> This guide is written assuming you use `zsh`. If you don't, source the right setup file for your shell
108+
109+
To start Hydra:
110+
```shell
111+
# this will break autocomplete, see group wiki for correct way to do this
112+
source ~/hydra_ws/install/setup.zsh
113+
ros2 launch hydra_ros uhumans2.launch.yaml
114+
```
115+
116+
Then, start the rosbag in a separate terminal:
117+
```shell
118+
ros2 bag play path/to/rosbag --clock --qos-profile-overrides-path ~/.tf_overrides.yaml
119+
```
45120

46-
### Design Information
121+
#### Running with Semantic Segmentation
122+
123+
See [here](https://github.com/MIT-SPARK/semantic_inference/blob/main/docs/closed_set.md#getting-dependencies) for installation information for `semantic_inference`.
124+
125+
For the uHumans2 office scene, start Hydra via
126+
```
127+
source ~/hydra_ws/install/setup.zsh
128+
ros2 launch hydra_ros uhumans2.launch.yaml use_gt_semantics:=false
129+
```
130+
131+
You may need to wait for about a minute for TensorRT to compile the model the first time you run the launch file. Once Hydra initializes, then run
132+
```
133+
ros2 bag play path/to/rosbag --clock --qos-profile-overrides-path ~/.tf_overrides.yaml
134+
```
135+
136+
## Filing Issues
137+
138+
Please understand that this is research code maintained by busy graduate students, **which comes with some caveats**:
139+
1. We do our best to maintain and keep the code up-to-date, but things may break or change occasionally
140+
2. We do not have bandwidth to help adapt the code to new applications
141+
3. The documentation, code-base and installation instructions are geared towards practitioners familiar with ROS and 3D scene graph research.
142+
143+
> **:warning: Warning**<br>
144+
> We don't support other platforms. Issues requesting support on other platforms (e.g., Ubuntu 18.04, Windows) will be summarily closed.
145+
146+
Depending on the nature of the issue, it may be helpful to browse [this](doc/debugging.md) page about debugging Hydra first.
147+
148+
Thank you in advance for your understanding!
149+
150+
## Additional Resources
47151

48152
We maintain information on the ROS2 interfaces that Hydra uses [here](doc/hydra_ros_interfaces.md) that may be useful if you are trying to understand how to use Hydra with a new dataset.
153+
We also have a preliminary guide to setting up Hydra with the Zed2i camera [here](doc/setting_up_a_new_sensor.md).
49154

50-
### Filing Issues
155+
## Acknowledgements
51156

52-
:warning: We don't support other platforms. Issues requesting support on other platforms (e.g. Ubuntu 16.04, Windows) will be summarily closed.
157+
**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.
53158

54-
Depending on the nature of the issue, it may be helpful to browse [this](https://github.com/MIT-SPARK/Hydra/blob/main/doc/debugging.md) page about debugging Hydra first.
159+
**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.

doc/hydra_ros_interfaces.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Most parsing happens from the initialization of `hydra::HydraRosPipeline` withou
1919

2020
With the exception of the input configuration (discussed below), most defaults in Hydra *should* be sane enough for the pipeline to run (though this is untested).
2121
Labelspace information is required for the objects and the 2D places to be created (which is considered part of the input configuration discussed below).
22-
You may need to check the backend module configuration to make sure appropriate update functors (pieces of code that process the scene graph to correct it) are configured properly (see [here](https://github.mit.edu/SPARK/Hydra/blob/d2b290612be0893ca3abd6e7676f326a4f5a9991/config/datasets/uhumans2.yaml#L68)) for the scene graph to appropriately deform after optimization and contain rooms.
22+
You may need to check the backend module configuration to make sure appropriate update functors (pieces of code that process the scene graph to correct it) are configured properly (see [here](https://github.com/MIT-SPARK/Hydra/blob/2d2322d88d11121108add39508c61eb319a0688e/config/datasets/uhumans2.yaml#L72)) for the scene graph to appropriately deform after optimization and contain rooms.
2323

2424
It may also be helpful to run Hydra with higher verbosity (i.e., set `glog_verbosity: 1` as a parameter) to see the currently parsed configuration.
2525
If you are parsing sensor information from `sensor_msgs::msg::CameraInfo` messages or via `tf` (discussed below), you will likely need to start the dataset to let Hydra resolve this information before printing configuration information for the frontend, backend, active window, and loop closure detection.

doc/quickstart.md

Lines changed: 0 additions & 94 deletions
This file was deleted.

doc/ros2_setup.md

Lines changed: 0 additions & 73 deletions
This file was deleted.

doc/setting_up_a_new_sensor.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Hydra does its best to follow [REP 105](https://www.ros.org/reps/rep-0105.html).
1717
- **odom_frame**: This is `odom` in REP 105. This serves as a reference frame for the robot and sensor poses (i.e., Hydra looks up `odom_T_robot` and `odom_T_sensor`).
1818
- **map_frame**: This is `map` in REP 105. Hydra can optionally broadcast `map_T_odom` as the relative transform between the last optimized and unoptimized robot pose.
1919

20-
Finally, you will need to have set up `semantic_inference` following [these](https://github.com/MIT-SPARK/semantic_inference/blob/ros2/docs/closed_set.md) instructions, or have another 2D closed set dense semantic segmentation network capable of producing category labels.
20+
Finally, you will need to have set up `semantic_inference` following [these](https://github.com/MIT-SPARK/semantic_inference/blob/main/docs/closed_set.md) instructions, or have another 2D closed set dense semantic segmentation network capable of producing category labels.
2121

2222
### Putting together the launch file
2323

0 commit comments

Comments
 (0)