Skip to content

Commit 9fc199c

Browse files
authored
Merge pull request #18 from leggedrobotics/dev/hugging_face_examples
Dev/hugging face examples
2 parents abd7bb4 + 783d2c0 commit 9fc199c

18 files changed

+4436
-5665
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,6 @@ venv/
3030
examples_ros1/data/*
3131
examples_hugging_face/.venv/*
3232
*checkpoint.ipynb
33+
examples_hugging_face/data/*
34+
*.egg-info*
35+
examples_hugging_face/debug/*

README.md

Lines changed: 72 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,20 @@
1111
<a href="#hugging-face-instructions">Hugging Face</a> •
1212
<a href="#ros1-instructions">ROS1</a> •
1313
<a href="#contributing">Contributing</a> •
14+
<a href="#news">News</a> •
1415
<a href="#citation">Citation</a>
1516
</p>
1617

18+
1719
## References
1820

19-
More instructions can be found on the [official webpage](https://grand-tour.leggedrobotics.com/).
21+
Please, at first, visit the [official webpage](https://grand-tour.leggedrobotics.com/) to learn more about the available data & hardware setup & registration.
22+
23+
Visit our [sponsors and partners](https://grand-tour.leggedrobotics.com/about).
24+
25+
---
2026

21-
- Recording Setup
22-
- Dataset Explorer
23-
- Benchmarks
27+
<br>
2428

2529
## Projects using the GrandTour Dataset
2630

@@ -31,52 +35,68 @@ More instructions can be found on the [official webpage](https://grand-tour.legg
3135
| [**Holistic Fusion**](https://github.com/leggedrobotics/holistic_fusion) <br> *Holistic State Estimation.* | <img src="assets/projects/nubert2025.png" height="64"/>|
3236
| [**RESPLE: Recursive Spline LIO**](https://asig-x.github.io/resple_web/) <br> *SoTA LiDAR Inertial Odometry.* | <img src="assets/projects/cao2025.png" height="64"/> |
3337

38+
---
39+
40+
<br>
3441

35-
## Hugging Face Instructions (Data comeing soon)
42+
## Hugging Face Instructions
3643

37-
You can find Jupyter Notebooks with full instructions in the [`examples_hugging_face`](./examples_hugging_face).
38-
Requirements: Python>=3.11
39-
Examples Tested with: zarr==3.0.7
44+
You can find Jupyter Notebooks and Scripts with full instructions in the [`examples_hugging_face`](./examples_hugging_face) directory.
45+
46+
### Installation Instructions
4047

4148
<details>
42-
<summary> Installation Instructions (UV with no preinstalled Python 3.11)</summary>
49+
<summary> Click for installation details</summary>
50+
51+
These steps assume you are using **[uv](https://github.com/astral-sh/uv)** for dependency management.
4352

44-
#### Step 1: Install `uv` for Dependency Management
53+
### 1. Install using `uv`
4554

4655
```bash
4756
pip3 install uv
4857
uv install
58+
cd examples_hugging_face
59+
uv sync
60+
uv run scripts/download_data.py
4961
```
5062

51-
#### Step 2: Install Python 3.11 (if not already installed)
5263

53-
```bash
54-
sudo add-apt-repository ppa:deadsnakes/ppa
55-
sudo apt update
56-
sudo apt install -y python3.11 python3.11-venv python3.11-distutils
57-
```
64+
</details>
5865

59-
#### Step 3: Set Up the Virtual Environment
6066

61-
```bash
62-
cd ~/git/grand_tour_dataset/examples_hugging_face
63-
mkdir .venv; cd .venv
64-
python3.11 -m venv grandtour
65-
source grandtour/bin/activate
66-
cd ..; uv pip install -r pyproject.toml
67-
jupyter notebook
68-
```
67+
### 📒 Jupyter Notebook Examples
6968

70-
</details>
69+
* **[Accessing/Downloading GrandTour Data](./examples_hugging_face/notebooks/access.ipynb)** <br>*Learn how to download the GrandTour datasets from HuggingFace.*
70+
71+
* **[Exploring GrandTour Data](./examples_hugging_face/notebooks/explore.ipynb)** <br>*Explore the dataset structure and learn how to work with Zarr data.*
72+
73+
74+
### 🐍 Python Scripts
75+
76+
* **[zarr\_transforms.py](./examples_hugging_face/scripts/zarr_transforms.py)** <br>*Demonstrates how to use transforms and provides helper functions for Zarr data.*
7177

72-
List of examples:
78+
* **[plot\_lidar\_3d.py](./examples_hugging_face/scripts/plot_lidar_3d.py)** <br>*Visualize LiDAR data in 3D space.*
7379

74-
- [Accessing GrandTour Data](./examples_hugging_face/[0]_Accessing_GrandTour_Data.ipynb)
75-
- [Exploring GrandTour Data](./examples_hugging_face/[1]_Exploring_GrandTour_Data.ipynb)
80+
* **[project\_lidar\_on\_image.py](./examples_hugging_face/scripts/project_lidar_on_image.py)** <br>*Project LiDAR points onto camera images, accounting for camera distortion and relative motion.*
81+
82+
* **[dynamic\_points\_filtering\_using\_images.py](./examples_hugging_face/scripts/dynamic_points_filtering_using_images.py)** <br>*Removes dynamic objects from LiDAR point clouds using image segmentation and saves results in Zarr format.*
83+
84+
* **[generate\_elevation\_maps.py](./examples_hugging_face/scripts/generate_elevation_maps.py)** <br>*Generates elevation maps from LiDAR and depth cameras.*
85+
86+
* **[nerfstudio\_convert.py](./examples_hugging_face/scripts/nerfstudio_convert.py)** <br>*Converts datasets into nerfstudio format for training Gaussian Splatting models.*
87+
88+
---
89+
90+
<br>
7691

7792
## ROS1 Instructions
7893

79-
### Downloading Rosbags
94+
95+
### Download
96+
97+
<details>
98+
<summary> Click here</summary>
99+
80100

81101
To access and download the GrandTour dataset rosbags, please follow these steps:
82102

@@ -109,16 +129,19 @@ python3 examples_kleinkram/kleinkram_cli_example.py
109129
python3 examples_kleinkram/kleinkram_extract_images.py
110130
```
111131

112-
---
113132

114133
**Option 2 – Web Interface:**
115134

116135
- Use the [GrandTour Dataset Web Interface](https://datasets.leggedrobotics.com/#/) to browse and download data directly.
117136

118-
---
137+
</details>
119138

120-
### Create Folders
139+
### Installation
121140

141+
<details>
142+
<summary> Click here</summary>
143+
144+
### Create Folders
122145
```shell
123146
mkdir -p ~/grand_tour_ws/src
124147
mkdir -p ~/git
@@ -163,7 +186,9 @@ klein login
163186
klein download --mission 3c97a27e-4180-4e40-b8af-59714de54a87
164187
```
165188

166-
### Run the Example
189+
</details>
190+
191+
### Examples
167192

168193
#### Terminal 1: Launch LiDARs
169194

@@ -233,6 +258,10 @@ rosrun grand_tour_ros1 rosbag_play.sh --imus --ap20
233258
**Example Output:**
234259
![assets/rqt-multiplot.png](assets/rqt-multiplot.png)
235260

261+
---
262+
263+
<br>
264+
236265
## Contributing
237266

238267
We warmly welcome contributions to help us improve and expand this project. Whether you're interested in adding new examples, enhancing existing ones, or simply offering suggestions — we'd love to hear from you! Feel free to open an issue or reach out directly.
@@ -244,12 +273,20 @@ We are particularly looking for contributions in the following areas:
244273
- Visualization tools (e.g., Viser, etc.)
245274
- Hosting and deployment support in Asia
246275

247-
### Upcoming Plans
276+
---
277+
278+
<br>
279+
280+
## News
248281

249282
We're organizing a workshop at ICRA 2026 in Vienna and are currently looking for co-organizers and collaborators. We are also planning to write a community paper about this project. Everyone who contributes meaningfully will be included as a co-author.
250283

251284
Let’s build this together — your input matters!
252285

286+
---
287+
288+
<br>
289+
253290
## Citation
254291

255292
```bibtex

examples_hugging_face/README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# 🔧 For manual installation if you dont use UV
2+
3+
Some scripts require extra dependencies beyond the base installation.
4+
5+
---
6+
7+
## 🖼 Dynamic Points Filtering & Nerfstudio Conversion
8+
9+
For:
10+
11+
* `dynamic_points_filtering_using_images.py`
12+
* `nerfstudio_convert.py`
13+
14+
These scripts require **PyTorch** and the **Transformers** library:
15+
16+
```bash
17+
# Assumes you have the grand_tour venv sourced.
18+
uv pip install torch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1 \
19+
--index-url https://download.pytorch.org/whl/cu121
20+
uv pip install transformers
21+
```
22+
23+
---
24+
25+
## 🗺 Elevation Map Generation
26+
27+
For:
28+
29+
* `generate_elevation_maps.py`
30+
31+
We provide a Python-only installable version of **Elevation Mapping** (medium-tested, but stable enough for use).
32+
33+
```bash
34+
# Assumes you have the grand_tour venv sourced.
35+
cd ~/git
36+
git clone git@github.com:leggedrobotics/elevation_mapping_cupy.git -b dev/python_library_installation
37+
cd elevation_mapping_cupy
38+
uv pip install -e ./
39+
```

0 commit comments

Comments
 (0)