File size: 11,046 Bytes
213db09
 
5bfb078
 
 
 
 
 
 
 
 
213db09
5bfb078
 
 
4b8b87b
 
 
5bfb078
 
 
 
 
 
 
 
 
 
 
 
 
 
e5f58d9
5bfb078
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e5f58d9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5bfb078
 
 
 
 
 
 
 
 
 
 
 
e5f58d9
5bfb078
 
 
 
 
 
 
 
 
 
 
 
399c8aa
5bfb078
 
399c8aa
5bfb078
 
399c8aa
5bfb078
 
 
399c8aa
 
5bfb078
399c8aa
 
5bfb078
 
399c8aa
 
 
 
08b6404
399c8aa
 
 
 
 
 
5bfb078
399c8aa
 
 
 
 
 
5bfb078
 
 
 
399c8aa
5bfb078
 
399c8aa
5bfb078
 
 
399c8aa
5bfb078
399c8aa
 
5bfb078
 
399c8aa
 
 
 
 
 
 
 
 
 
 
5bfb078
 
e5f58d9
 
 
 
 
 
08b6404
 
399c8aa
e5f58d9
 
 
 
 
 
 
399c8aa
e5f58d9
399c8aa
e5f58d9
 
 
 
399c8aa
e5f58d9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
de8ba40
e5f58d9
 
 
de8ba40
e5f58d9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5bfb078
 
 
e5f58d9
 
 
5bfb078
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
---
license: mit
language:
  - en
pretty_name: STDP Dataset
tags:
  - robotics
  - visual-navigation
  - trajectory-planning
  - unmanned-aerial-vehicles
  - signal-temporal-logic
---

# STDP Dataset

This repository provides the data used to train, validate, and evaluate Signal
Temporal Logic-Guided Diffusion Policy (STDP) for UAV Visual Navigation without
Global Semantic Maps.

## Dataset Contents

Each trajectory sample combines a temporal-logic navigation instruction,
multi-view visual observations, and a reference motion trajectory.

| Component | Contents | Intended use |
|---|---|---|
| Semantic STL specification | Object-level temporal and logical constraints | Defines the navigation task presented to the policy |
| Coordinate-grounded STL specification | The same specification with object references mapped to XYZ coordinates | Supports supervision, analysis, and geometry-aware evaluation |
| Multi-view RGB observations | Synchronized front, down, left, and right camera images | Provides local visual context without a task-level global semantic map |
| Reference trajectory | CSV records containing absolute XYZ positions, camera yaw, frame indices, and image filenames | Supplies waypoint supervision and synchronizes motion with observations |
| Split manifests | JSONL records linking instructions, scenes, trajectories, and image directories | Defines the released training, validation, and evaluation subsets |
| Trajectory archives | One tar archive per trajectory | Enables selective downloading while preserving the original directory layout |
| Simulation environment | Four Gazebo Classic worlds, drone and base models, plugin source, materials, and capture scripts | Supports rebuilding the scenes and replaying trajectories |

## Scenes and Task Types

The data covers four furnished indoor scenes. `world_v1` is the primary scene
used by the training, validation, and same-scene evaluation splits.
`world_v2`, `world_v3`, and `world_v4` provide different indoor layouts for
cross-layout evaluation.

The released trajectories cover four task families:

| Task type | Objective |
|---|---|
| Reach-Avoid | Reach a specified target while avoiding constrained regions |
| Multi-Target | Visit multiple targets under temporal and logical constraints |
| Either-Or | Satisfy one of multiple valid target alternatives |
| Door Puzzle | Obey ordered reachability and avoidance requirements |

## Data Splits

| Manifest | Purpose |
|---|---|
| `splits/train.jsonl` | Stage 1 policy training in the primary scene |
| `splits/validation.jsonl` | Model selection and validation in the primary scene |
| `splits/test_same.jsonl` | Evaluation on held-out trajectories from the primary scene |
| `splits/test_cross.jsonl` | Evaluation in the three cross-layout scenes |

Each line in a split manifest is a JSON object with the following main fields:

| Field | Description |
|---|---|
| `task_type` | Navigation task family |
| `stl` | Semantic STL specification |
| `world` | Scene identifier |
| `trajectory_name` | Unique trajectory name within a scene |
| `trajectory_path` | Repository-relative path to the reference CSV after extraction |
| `images` | Repository-relative paths to the four camera directories after extraction |

## Repository Layout

```text
README.md
LICENSE
simulation_environment.tar.gz
simulation_environment.tar.gz.sha256
simulation/
  README.md
  world/home_room_v{1,2,3,4}.world
  models/{simple_drone,sun,ground_plane}/
  plugins/{SimpleDronePlugin.cc,CMakeLists.txt}
  media/materials/{scripts,textures}/
  build.sh
  run.sh
  gazebo_env.sh
  datasets_construct.sh
  smoke.sh
  examples/smoke.csv
  ENVIRONMENT.txt
  VALIDATION.md
  SOURCE_FILES.json
  SHA256SUMS
  validation/
splits/
  train.jsonl
  validation.jsonl
  test_same.jsonl
  test_cross.jsonl
archives/
  world_v1/<trajectory_name>.tar
  world_v2/<trajectory_name>.tar
  world_v3/<trajectory_name>.tar
  world_v4/<trajectory_name>.tar
```

Each trajectory archive contains the CSV and all synchronized images using the
original repository-relative paths. For example:

```text
data/world_v1/trajectory/trajectory_0127_01.csv
data/world_v1/images/trajectory_0127_01/images_front/
data/world_v1/images/trajectory_0127_01/images_down/
data/world_v1/images/trajectory_0127_01/images_left/
data/world_v1/images/trajectory_0127_01/images_right/
```

## Usage

Download files through the anonymous dataset endpoint. Install the HTTP client:

```bash
pip install requests
```

The following example downloads one split and its first trajectory archive:

```python
import json
from pathlib import Path
import requests

BASE_URL = "https://anonymous-hf.com/api/a/h8or94tutz4u/resolve/"
DATASET_ROOT = Path("STDP-Dataset")


def download(relative_path):
    destination = DATASET_ROOT / relative_path
    destination.parent.mkdir(parents=True, exist_ok=True)
    partial = destination.with_name(destination.name + ".partial")
    with requests.get(BASE_URL + relative_path, params={"release": "anonymous-20260929-complete"}, stream=True, timeout=120) as response:
        response.raise_for_status()
        with partial.open("wb") as output:
            for chunk in response.iter_content(chunk_size=1024 * 1024):
                output.write(chunk)
    partial.replace(destination)
    return destination


manifest = download("splits/test_same.jsonl")
with manifest.open(encoding="utf-8") as stream:
    sample = json.loads(next(stream))
archive = download(
    f"archives/{sample['world']}/{sample['trajectory_name']}.tar"
)
print(archive)
```

Extract the archive from the root of the local dataset directory:

```bash
tar -xf STDP-Dataset/archives/world_v1/trajectory_0587_05.tar -C STDP-Dataset
```

After extraction, `trajectory_path` and the four entries in `images` resolve
relative to `STDP-Dataset/`.

For all released trajectories, use the helper above to download the four split
manifests and their unique archives. This downloads approximately 145 GiB:

```python
archives = set()
for split in ("train", "validation", "test_same", "test_cross"):
    manifest = download(f"splits/{split}.jsonl")
    with manifest.open(encoding="utf-8") as stream:
        for line in stream:
            sample = json.loads(line)
            archives.add(
                f"archives/{sample['world']}/{sample['trajectory_name']}.tar"
            )
for relative_path in sorted(archives):
    download(relative_path)
```

## Simulation Environment

The simulation release includes all four indoor worlds, the drone's four-view
camera model, `SimpleDronePlugin` source and CMake configuration, base models,
custom materials and their textures, and build/playback/capture scripts.

- [Download the environment archive](https://anonymous-hf.com/api/a/h8or94tutz4u/resolve/simulation_environment.tar.gz?release=anonymous-20260929-complete)
- [Download its SHA256 checksum](https://anonymous-hf.com/api/a/h8or94tutz4u/resolve/simulation_environment.tar.gz.sha256?release=anonymous-20260929-complete)
- [Browse the dataset files](https://anonymous-hf.com/a/h8or94tutz4u/) (open `simulation/`)
- [Read the detailed setup guide](simulation/README.md)
- [Read the validation record](simulation/VALIDATION.md)

### Download and Build

Download just the environment without the trajectory archives:

Using the `download` helper from the Usage section:

```python
for filename in (
    "simulation_environment.tar.gz",
    "simulation_environment.tar.gz.sha256",
):
    download(filename)
```

The reference platform is **Ubuntu 20.04.6 LTS and Gazebo Classic 11.15.1**.
The plugin uses the Gazebo C++ API directly and does not require ROS or PX4.
It is not compatible with the newer Gazebo simulator's `gz sim` command.

On Ubuntu 20.04 with a Gazebo 11 package source configured:

```bash
sudo apt-get update
sudo apt-get install gazebo11 libgazebo11-dev build-essential cmake pkg-config \
  python3 python3-numpy python3-pil xvfb x11-utils mesa-utils pciutils

cd STDP-Dataset
sha256sum -c simulation_environment.tar.gz.sha256
tar -xzf simulation_environment.tar.gz
cd simulation_environment
sha256sum -c SHA256SUMS
chmod +x *.sh
bash build.sh
```

Run the build in a system Bash shell, preferably after leaving Conda. The plugin
is compiled locally to `plugins/build/libSimpleDronePlugin.so`; machine-specific
binaries and CMake caches are excluded from the release. If `gazebo11` has no
installation candidate, configure an appropriate Gazebo Classic package source
first. A full repository download also includes the same unpacked files under
`simulation/`; you can build from that directory instead.

### Check Rendering and Replay Released Trajectories

From the environment directory, run a one-waypoint capture check:

```bash
SIMPLE_DRONE_RENDER_BACKEND=xvfb bash smoke.sh v1
```

Use `v2`, `v3`, or `v4` to select another scene. Success prints `PASS` and creates
four 640 x 480 images plus capture metadata in `datasets/smoke_world_vN/`.
Even `gzserver` requires an OpenGL/X rendering context for camera sensors.
Software rendering can be slow; adjust `SIMPLE_DRONE_RUN_TIMEOUT` if needed.

To replay a trajectory downloaded and extracted using the instructions above,
copy its CSV into the matching scene directory. For example, from the environment
directory, with the dataset root one level above the environment directory:

```bash
mkdir -p datasets/world_v1/trajectory
cp ../data/world_v1/trajectory/trajectory_0127_01.csv \
  datasets/world_v1/trajectory/
SIMPLE_DRONE_QUIT_ON_FINISH=1 ./run.sh v1 trajectory_0127_01.csv
```

Use a working copy: capture updates the input CSV in place with frame indices,
captured yaw, and image filenames. Images are written under
`datasets/world_v1/images/trajectory_0127_01/images_{front,down,left,right}/`.
For batch capture, run `./datasets_construct.sh datasets/world_v1`.

### Validation Scope

All four worlds passed resource and structural checks, and the plugin compiled
successfully from source on the reference system. The v1 smoke check passed image
quality validation and produced all four views. Under Xvfb, the plugin used its
existing single-camera sweep fallback after rejecting physical camera frames;
this is not a claim that all four physical cameras captured successfully without
fallback. Runtime capture in v2/v3/v4, installation on a separate clean machine,
and full benchmark reproduction were not validated for this release.

This package reproduces the simulation assets and playback/capture setup.
Training, trajectory planning, policy inference, and paper metrics additionally
require the main project code and data. Exact system versions, file provenance,
checksums, and build/capture logs are included with the environment.

## License

The dataset is released under the MIT License. See `LICENSE` for details.
Bundled third-party Gazebo base models and textures remain subject to their
upstream licenses and are not relicensed by the dataset license. Their sources
are recorded in [simulation/SOURCE_FILES.json](simulation/SOURCE_FILES.json).

## Citation

Coming soon.