Add reproducible Gazebo simulation environment and English setup documentation
Browse filesAdd four worlds, drone and base models, plugin source, materials, build and capture scripts, validation records, and a checksummed environment archive. Extend the dataset card with download, build, playback, and validation instructions.
- README.md +126 -1
- simulation/.gitignore +5 -0
- simulation/ENVIRONMENT.txt +13 -0
- simulation/README.md +162 -0
- simulation/SHA256SUMS +36 -0
- simulation/SOURCE_FILES.json +38 -0
- simulation/VALIDATION.md +30 -0
- simulation/build.sh +6 -0
- simulation/datasets_construct.sh +377 -0
- simulation/examples/smoke.csv +2 -0
- simulation/gazebo_env.sh +40 -0
- simulation/media/materials/scripts/home.material +127 -0
- simulation/media/materials/textures/bricks.png +3 -0
- simulation/media/materials/textures/ceiling_tiled.jpg +3 -0
- simulation/media/materials/textures/hardwood_floor.jpg +3 -0
- simulation/media/materials/textures/wood.jpg +3 -0
- simulation/models/ground_plane/model-1_2.sdf +39 -0
- simulation/models/ground_plane/model-1_3.sdf +39 -0
- simulation/models/ground_plane/model-1_4.sdf +39 -0
- simulation/models/ground_plane/model.config +19 -0
- simulation/models/ground_plane/model.sdf +39 -0
- simulation/models/simple_drone/model.config +10 -0
- simulation/models/simple_drone/model.sdf +196 -0
- simulation/models/sun/model-1_2.sdf +19 -0
- simulation/models/sun/model-1_3.sdf +19 -0
- simulation/models/sun/model-1_4.sdf +20 -0
- simulation/models/sun/model.config +19 -0
- simulation/models/sun/model.sdf +17 -0
- simulation/plugins/CMakeLists.txt +73 -0
- simulation/plugins/SimpleDronePlugin.cc +1846 -0
- simulation/run.sh +391 -0
- simulation/smoke.sh +33 -0
- simulation/validation/build.log +94 -0
- simulation/validation/smoke.log +50 -0
- simulation/world/home_room_v1.world +825 -0
- simulation/world/home_room_v2.world +825 -0
- simulation/world/home_room_v3.world +825 -0
- simulation/world/home_room_v4.world +825 -0
- simulation_environment.tar.gz +3 -0
- simulation_environment.tar.gz.sha256 +3 -0
README.md
CHANGED
|
@@ -30,6 +30,7 @@ multi-view visual observations, and a reference motion trajectory.
|
|
| 30 |
| Reference trajectory | CSV records containing absolute XYZ positions, camera yaw, frame indices, and image filenames | Supplies waypoint supervision and synchronizes motion with observations |
|
| 31 |
| Split manifests | JSONL records linking instructions, scenes, trajectories, and image directories | Defines the released training, validation, and evaluation subsets |
|
| 32 |
| Trajectory archives | One tar archive per trajectory | Enables selective downloading while preserving the original directory layout |
|
|
|
|
| 33 |
|
| 34 |
## Scenes and Task Types
|
| 35 |
|
|
@@ -72,6 +73,25 @@ Each line in a split manifest is a JSON object with the following main fields:
|
|
| 72 |
```text
|
| 73 |
README.md
|
| 74 |
LICENSE
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 75 |
splits/
|
| 76 |
train.jsonl
|
| 77 |
validation.jsonl
|
|
@@ -84,7 +104,7 @@ archives/
|
|
| 84 |
world_v4/<trajectory_name>.tar
|
| 85 |
```
|
| 86 |
|
| 87 |
-
Each archive contains the
|
| 88 |
original repository-relative paths. For example:
|
| 89 |
|
| 90 |
```text
|
|
@@ -153,9 +173,114 @@ snapshot_download(
|
|
| 153 |
)
|
| 154 |
```
|
| 155 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 156 |
## License
|
| 157 |
|
| 158 |
The dataset is released under the MIT License. See `LICENSE` for details.
|
|
|
|
|
|
|
|
|
|
| 159 |
|
| 160 |
## Citation
|
| 161 |
|
|
|
|
| 30 |
| Reference trajectory | CSV records containing absolute XYZ positions, camera yaw, frame indices, and image filenames | Supplies waypoint supervision and synchronizes motion with observations |
|
| 31 |
| Split manifests | JSONL records linking instructions, scenes, trajectories, and image directories | Defines the released training, validation, and evaluation subsets |
|
| 32 |
| Trajectory archives | One tar archive per trajectory | Enables selective downloading while preserving the original directory layout |
|
| 33 |
+
| Simulation environment | Four Gazebo Classic worlds, drone and base models, plugin source, materials, and capture scripts | Supports rebuilding the scenes and replaying trajectories |
|
| 34 |
|
| 35 |
## Scenes and Task Types
|
| 36 |
|
|
|
|
| 73 |
```text
|
| 74 |
README.md
|
| 75 |
LICENSE
|
| 76 |
+
simulation_environment.tar.gz
|
| 77 |
+
simulation_environment.tar.gz.sha256
|
| 78 |
+
simulation/
|
| 79 |
+
README.md
|
| 80 |
+
world/home_room_v{1,2,3,4}.world
|
| 81 |
+
models/{simple_drone,sun,ground_plane}/
|
| 82 |
+
plugins/{SimpleDronePlugin.cc,CMakeLists.txt}
|
| 83 |
+
media/materials/{scripts,textures}/
|
| 84 |
+
build.sh
|
| 85 |
+
run.sh
|
| 86 |
+
gazebo_env.sh
|
| 87 |
+
datasets_construct.sh
|
| 88 |
+
smoke.sh
|
| 89 |
+
examples/smoke.csv
|
| 90 |
+
ENVIRONMENT.txt
|
| 91 |
+
VALIDATION.md
|
| 92 |
+
SOURCE_FILES.json
|
| 93 |
+
SHA256SUMS
|
| 94 |
+
validation/
|
| 95 |
splits/
|
| 96 |
train.jsonl
|
| 97 |
validation.jsonl
|
|
|
|
| 104 |
world_v4/<trajectory_name>.tar
|
| 105 |
```
|
| 106 |
|
| 107 |
+
Each trajectory archive contains the CSV and all synchronized images using the
|
| 108 |
original repository-relative paths. For example:
|
| 109 |
|
| 110 |
```text
|
|
|
|
| 173 |
)
|
| 174 |
```
|
| 175 |
|
| 176 |
+
## Simulation Environment
|
| 177 |
+
|
| 178 |
+
The simulation release includes all four indoor worlds, the drone's four-view
|
| 179 |
+
camera model, `SimpleDronePlugin` source and CMake configuration, base models,
|
| 180 |
+
custom materials and their textures, and build/playback/capture scripts.
|
| 181 |
+
|
| 182 |
+
- [Download the environment archive](https://huggingface.co/datasets/bfz111/STDP-Dataset/resolve/main/simulation_environment.tar.gz)
|
| 183 |
+
- [Download its SHA256 checksum](https://huggingface.co/datasets/bfz111/STDP-Dataset/resolve/main/simulation_environment.tar.gz.sha256)
|
| 184 |
+
- [Browse the source files](https://huggingface.co/datasets/bfz111/STDP-Dataset/tree/main/simulation)
|
| 185 |
+
- [Read the detailed setup guide](simulation/README.md)
|
| 186 |
+
- [Read the validation record](simulation/VALIDATION.md)
|
| 187 |
+
|
| 188 |
+
### Download and Build
|
| 189 |
+
|
| 190 |
+
Download just the environment without the trajectory archives:
|
| 191 |
+
|
| 192 |
+
```python
|
| 193 |
+
from huggingface_hub import hf_hub_download
|
| 194 |
+
|
| 195 |
+
for filename in (
|
| 196 |
+
"simulation_environment.tar.gz",
|
| 197 |
+
"simulation_environment.tar.gz.sha256",
|
| 198 |
+
):
|
| 199 |
+
hf_hub_download(
|
| 200 |
+
repo_id="bfz111/STDP-Dataset",
|
| 201 |
+
repo_type="dataset",
|
| 202 |
+
filename=filename,
|
| 203 |
+
local_dir="STDP-Dataset",
|
| 204 |
+
)
|
| 205 |
+
```
|
| 206 |
+
|
| 207 |
+
The reference platform is **Ubuntu 20.04.6 LTS and Gazebo Classic 11.15.1**.
|
| 208 |
+
The plugin uses the Gazebo C++ API directly and does not require ROS or PX4.
|
| 209 |
+
It is not compatible with the newer Gazebo simulator's `gz sim` command.
|
| 210 |
+
|
| 211 |
+
On Ubuntu 20.04 with a Gazebo 11 package source configured:
|
| 212 |
+
|
| 213 |
+
```bash
|
| 214 |
+
sudo apt-get update
|
| 215 |
+
sudo apt-get install gazebo11 libgazebo11-dev build-essential cmake pkg-config \
|
| 216 |
+
python3 python3-numpy python3-pil xvfb x11-utils mesa-utils pciutils
|
| 217 |
+
|
| 218 |
+
cd STDP-Dataset
|
| 219 |
+
sha256sum -c simulation_environment.tar.gz.sha256
|
| 220 |
+
tar -xzf simulation_environment.tar.gz
|
| 221 |
+
cd simulation_environment
|
| 222 |
+
sha256sum -c SHA256SUMS
|
| 223 |
+
chmod +x *.sh
|
| 224 |
+
bash build.sh
|
| 225 |
+
```
|
| 226 |
+
|
| 227 |
+
Run the build in a system Bash shell, preferably after leaving Conda. The plugin
|
| 228 |
+
is compiled locally to `plugins/build/libSimpleDronePlugin.so`; machine-specific
|
| 229 |
+
binaries and CMake caches are excluded from the release. If `gazebo11` has no
|
| 230 |
+
installation candidate, configure an appropriate Gazebo Classic package source
|
| 231 |
+
first. A full repository download also includes the same unpacked files under
|
| 232 |
+
`simulation/`; you can build from that directory instead.
|
| 233 |
+
|
| 234 |
+
### Check Rendering and Replay Released Trajectories
|
| 235 |
+
|
| 236 |
+
From the environment directory, run a one-waypoint capture check:
|
| 237 |
+
|
| 238 |
+
```bash
|
| 239 |
+
SIMPLE_DRONE_RENDER_BACKEND=xvfb bash smoke.sh v1
|
| 240 |
+
```
|
| 241 |
+
|
| 242 |
+
Use `v2`, `v3`, or `v4` to select another scene. Success prints `PASS` and creates
|
| 243 |
+
four 640 x 480 images plus capture metadata in `datasets/smoke_world_vN/`.
|
| 244 |
+
Even `gzserver` requires an OpenGL/X rendering context for camera sensors.
|
| 245 |
+
Software rendering can be slow; adjust `SIMPLE_DRONE_RUN_TIMEOUT` if needed.
|
| 246 |
+
|
| 247 |
+
To replay a trajectory downloaded and extracted using the instructions above,
|
| 248 |
+
copy its CSV into the matching scene directory. For example, from the environment
|
| 249 |
+
directory, with the dataset extracted under `/path/to/local_dataset`:
|
| 250 |
+
|
| 251 |
+
```bash
|
| 252 |
+
mkdir -p datasets/world_v1/trajectory
|
| 253 |
+
cp /path/to/local_dataset/data/world_v1/trajectory/trajectory_0127_01.csv \
|
| 254 |
+
datasets/world_v1/trajectory/
|
| 255 |
+
SIMPLE_DRONE_QUIT_ON_FINISH=1 ./run.sh v1 trajectory_0127_01.csv
|
| 256 |
+
```
|
| 257 |
+
|
| 258 |
+
Use a working copy: capture updates the input CSV in place with frame indices,
|
| 259 |
+
captured yaw, and image filenames. Images are written under
|
| 260 |
+
`datasets/world_v1/images/trajectory_0127_01/images_{front,down,left,right}/`.
|
| 261 |
+
For batch capture, run `./datasets_construct.sh datasets/world_v1`.
|
| 262 |
+
|
| 263 |
+
### Validation Scope
|
| 264 |
+
|
| 265 |
+
All four worlds passed resource and structural checks, and the plugin compiled
|
| 266 |
+
successfully from source on the reference system. The v1 smoke check passed image
|
| 267 |
+
quality validation and produced all four views. Under Xvfb, the plugin used its
|
| 268 |
+
existing single-camera sweep fallback after rejecting physical camera frames;
|
| 269 |
+
this is not a claim that all four physical cameras captured successfully without
|
| 270 |
+
fallback. Runtime capture in v2/v3/v4, installation on a separate clean machine,
|
| 271 |
+
and full benchmark reproduction were not validated for this release.
|
| 272 |
+
|
| 273 |
+
This package reproduces the simulation assets and playback/capture setup.
|
| 274 |
+
Training, trajectory planning, policy inference, and paper metrics additionally
|
| 275 |
+
require the main project code and data. Exact system versions, file provenance,
|
| 276 |
+
checksums, and build/capture logs are included with the environment.
|
| 277 |
+
|
| 278 |
## License
|
| 279 |
|
| 280 |
The dataset is released under the MIT License. See `LICENSE` for details.
|
| 281 |
+
Bundled third-party Gazebo base models and textures remain subject to their
|
| 282 |
+
upstream licenses and are not relicensed by the dataset license. Their sources
|
| 283 |
+
are recorded in [simulation/SOURCE_FILES.json](simulation/SOURCE_FILES.json).
|
| 284 |
|
| 285 |
## Citation
|
| 286 |
|
simulation/.gitignore
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
plugins/build/
|
| 2 |
+
datasets/
|
| 3 |
+
drone_images/
|
| 4 |
+
*.log
|
| 5 |
+
__pycache__/
|
simulation/ENVIRONMENT.txt
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Packaging host: Ubuntu 20.04.6 LTS, x86_64
|
| 2 |
+
Gazebo Classic (not gz sim)
|
| 3 |
+
Recorded 2026-09-23 Asia/Shanghai
|
| 4 |
+
|
| 5 |
+
cmake 3.16.3-1ubuntu1.20.04.1
|
| 6 |
+
g++ 4:9.3.0-1ubuntu2
|
| 7 |
+
gazebo11 11.15.1-1~focal
|
| 8 |
+
libgazebo11-dev:amd64 11.15.1-1~focal
|
| 9 |
+
libignition-math6:amd64 6.15.1-1~focal
|
| 10 |
+
libogre-1.9.0v5:amd64 1.9.0+dfsg1-12build1
|
| 11 |
+
python3-numpy 1:1.17.4-5ubuntu3.1
|
| 12 |
+
python3-pil:amd64 7.0.0-4ubuntu0.9
|
| 13 |
+
xvfb 2:1.20.13-1ubuntu1~20.04.20
|
simulation/README.md
ADDED
|
@@ -0,0 +1,162 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# STDP Simulation Environment
|
| 2 |
+
|
| 3 |
+
This package contains the four indoor scenes, drone model, camera capture plugin,
|
| 4 |
+
and trajectory playback tools used by STDP. It targets **Gazebo Classic 11** and
|
| 5 |
+
uses the Gazebo C++ API directly; ROS, PX4, and a flight controller are not required.
|
| 6 |
+
Policy training, trajectory planning, and benchmark evaluation require the main
|
| 7 |
+
project code and datasets and are outside the scope of this environment package.
|
| 8 |
+
|
| 9 |
+
## Contents
|
| 10 |
+
|
| 11 |
+
| Path | Purpose |
|
| 12 |
+
| --- | --- |
|
| 13 |
+
| `world/home_room_v{1,2,3,4}.world` | Scene layouts, furniture, collision geometry, lighting, and drone references |
|
| 14 |
+
| `models/simple_drone/` | Drone SDF and model metadata; front/down/left/right RGB cameras at 640 x 480 and 15 Hz |
|
| 15 |
+
| `plugins/SimpleDronePlugin.cc` | Trajectory playback, command-file control, waypoint capture, image checks, and CSV updates |
|
| 16 |
+
| `plugins/CMakeLists.txt` | C++14 build configuration for `libSimpleDronePlugin.so` |
|
| 17 |
+
| `models/sun/`, `models/ground_plane/` | Referenced base models, bundled to avoid downloading models at runtime |
|
| 18 |
+
| `media/materials/scripts/home.material` | Custom floor, wall, ceiling, and furniture materials |
|
| 19 |
+
| `media/materials/textures/` | The four Gazebo textures referenced by the custom materials |
|
| 20 |
+
| `gazebo_env.sh`, `build.sh` | Environment setup and plugin compilation |
|
| 21 |
+
| `run.sh` | Single-trajectory playback with GUI or background Xorg/Xvfb rendering |
|
| 22 |
+
| `datasets_construct.sh` | Batch capture, image validation, and retries |
|
| 23 |
+
| `examples/smoke.csv`, `smoke.sh` | One-waypoint environment check; not a benchmark trajectory |
|
| 24 |
+
| `SOURCE_FILES.json`, `SHA256SUMS` | Source provenance and release file checksums |
|
| 25 |
+
| `ENVIRONMENT.txt`, `VALIDATION.md`, `validation/` | Reference versions, validation scope, and build/capture logs |
|
| 26 |
+
|
| 27 |
+
Furniture is defined as geometry inside the world files; no additional STL/DAE
|
| 28 |
+
meshes are required. Built-in `Gazebo/*` materials, OGRE, system plugins, and shared
|
| 29 |
+
libraries are provided by the Gazebo installation.
|
| 30 |
+
|
| 31 |
+
## Requirements and Build
|
| 32 |
+
|
| 33 |
+
The reference system is Ubuntu 20.04.6 LTS with Gazebo Classic 11.15.1 and CMake
|
| 34 |
+
3.16.3. The newer Gazebo simulator (`gz sim`) cannot load this Classic plugin
|
| 35 |
+
directly. Exact recorded package versions are listed in `ENVIRONMENT.txt`.
|
| 36 |
+
|
| 37 |
+
On Ubuntu 20.04 with a Gazebo 11 package source configured:
|
| 38 |
+
|
| 39 |
+
```bash
|
| 40 |
+
sudo apt-get update
|
| 41 |
+
sudo apt-get install gazebo11 libgazebo11-dev build-essential cmake pkg-config \
|
| 42 |
+
python3 python3-numpy python3-pil xvfb x11-utils mesa-utils pciutils
|
| 43 |
+
```
|
| 44 |
+
|
| 45 |
+
If `gazebo11` has no installation candidate, configure a Gazebo Classic package
|
| 46 |
+
source appropriate for your system first. Package repositories and GPU drivers
|
| 47 |
+
are not included in this release.
|
| 48 |
+
|
| 49 |
+
From this directory, use a system Bash shell, preferably after leaving Conda:
|
| 50 |
+
|
| 51 |
+
```bash
|
| 52 |
+
sha256sum -c SHA256SUMS
|
| 53 |
+
chmod +x *.sh
|
| 54 |
+
bash build.sh
|
| 55 |
+
```
|
| 56 |
+
|
| 57 |
+
The build produces `plugins/build/libSimpleDronePlugin.so`.
|
| 58 |
+
Downloads of individual source files may not preserve executable permissions;
|
| 59 |
+
the `chmod` command above restores them for the launch and capture scripts.
|
| 60 |
+
Precompiled binaries
|
| 61 |
+
and machine-specific CMake caches are excluded from the archive. `run.sh` also
|
| 62 |
+
builds the plugin automatically when it is missing. Run `build.sh` again after
|
| 63 |
+
changing CMake configuration.
|
| 64 |
+
|
| 65 |
+
## Smoke Check
|
| 66 |
+
|
| 67 |
+
```bash
|
| 68 |
+
bash smoke.sh v1
|
| 69 |
+
# Explicit software rendering when no usable display is available:
|
| 70 |
+
SIMPLE_DRONE_RENDER_BACKEND=xvfb bash smoke.sh v1
|
| 71 |
+
```
|
| 72 |
+
|
| 73 |
+
Replace `v1` with `v2`, `v3`, or `v4` to select another scene. A successful check
|
| 74 |
+
prints `PASS`, writes four PNG files under
|
| 75 |
+
`datasets/smoke_world_v1/images/smoke/images_{front,down,left,right}/`, and records
|
| 76 |
+
capture metadata in the smoke trajectory CSV. Re-running the check resets this
|
| 77 |
+
smoke example's CSV and images.
|
| 78 |
+
|
| 79 |
+
Camera sensors need an OpenGL/X rendering context even under `gzserver`. Xvfb
|
| 80 |
+
software rendering can be slow; increase `SIMPLE_DRONE_RUN_TIMEOUT` if necessary.
|
| 81 |
+
Check `.run_logs/` under the output dataset directory for display startup errors.
|
| 82 |
+
Missing or rejected gray frames do not count as a successful check.
|
| 83 |
+
|
| 84 |
+
The reference v1 smoke check passed using the plugin's existing single-camera
|
| 85 |
+
sweep fallback after physical camera frames were rejected under Xvfb. See
|
| 86 |
+
`VALIDATION.md` for the exact scope and limitations of this result.
|
| 87 |
+
|
| 88 |
+
## Replay a Trajectory
|
| 89 |
+
|
| 90 |
+
Arrange input trajectories as follows:
|
| 91 |
+
|
| 92 |
+
```text
|
| 93 |
+
datasets/world_v1/trajectory/my_trajectory.csv
|
| 94 |
+
datasets/world_v2/trajectory/...
|
| 95 |
+
datasets/world_v3/trajectory/...
|
| 96 |
+
datasets/world_v4/trajectory/...
|
| 97 |
+
```
|
| 98 |
+
|
| 99 |
+
The CSV must have a header, and its first six columns must be ordered as
|
| 100 |
+
`step,x,y,z,yaw_rad,yaw_deg`. Positions are in meters; `yaw_rad` is in radians.
|
| 101 |
+
See `examples/smoke.csv` for a minimal input.
|
| 102 |
+
|
| 103 |
+
```bash
|
| 104 |
+
SIMPLE_DRONE_QUIT_ON_FINISH=1 ./run.sh v1 my_trajectory.csv
|
| 105 |
+
SIMPLE_DRONE_QUIT_ON_FINISH=1 ./run.sh gui v2 my_trajectory.csv
|
| 106 |
+
./datasets_construct.sh datasets/world_v1
|
| 107 |
+
```
|
| 108 |
+
|
| 109 |
+
**Capture updates the input CSV in place**, adding frame indices, captured yaw,
|
| 110 |
+
and image filenames. Use a working copy of your reference trajectory. Images are
|
| 111 |
+
written to `datasets/world_vN/images/<CSV-stem>/images_<view>/`. By default,
|
| 112 |
+
`run.sh` leaves the simulation running after playback; set
|
| 113 |
+
`SIMPLE_DRONE_QUIT_ON_FINISH=1` to exit automatically.
|
| 114 |
+
|
| 115 |
+
For an existing custom dataset directory:
|
| 116 |
+
|
| 117 |
+
```bash
|
| 118 |
+
DATASET_ROOT=/absolute/path/world_v3 SIMPLE_DRONE_QUIT_ON_FINISH=1 \
|
| 119 |
+
./run.sh v3 my_trajectory.csv
|
| 120 |
+
```
|
| 121 |
+
|
| 122 |
+
The batch script defaults to `datasets/world_v3` when called without arguments;
|
| 123 |
+
explicitly pass the desired dataset directory. If its name is not `world_vN`,
|
| 124 |
+
also set `WORLD_VERSION=vN`. The original batch script can skip timed-out
|
| 125 |
+
trajectories, so review its final log and per-trajectory outputs for a full run.
|
| 126 |
+
|
| 127 |
+
## Manual Scene Launch and Command Control
|
| 128 |
+
|
| 129 |
+
After compiling the plugin:
|
| 130 |
+
|
| 131 |
+
```bash
|
| 132 |
+
source ./gazebo_env.sh
|
| 133 |
+
gazebo --verbose world/home_room_v1.world
|
| 134 |
+
```
|
| 135 |
+
|
| 136 |
+
Without dataset playback or command-file settings, the plugin uses its built-in
|
| 137 |
+
waypoints and writes to this package's `drone_images/` directory.
|
| 138 |
+
|
| 139 |
+
For command control, set `SIMPLE_DRONE_COMMAND_FILE` to an absolute command-file
|
| 140 |
+
path before launching. After launch, update the file with `x,y,z,yaw` (target
|
| 141 |
+
position in meters, yaw in radians) to issue a new command. The existing plugin
|
| 142 |
+
clamps targets to x in [-7, 6.5], y in [-4, 4], and z in [1.2, 1.8]. Do not enable
|
| 143 |
+
dataset playback variables at the same time. Policy inference and closed-loop
|
| 144 |
+
training/evaluation still require the main project's Python code, including
|
| 145 |
+
`scripts/stage2_gazebo_common.py` and its dependencies.
|
| 146 |
+
|
| 147 |
+
## Packaging Notes and Third-Party Assets
|
| 148 |
+
|
| 149 |
+
The four world files, plugin source, camera settings, and custom material script
|
| 150 |
+
are unchanged from the source project. The drone model's personal absolute output
|
| 151 |
+
path was replaced with a relative path; `gazebo_env.sh` supplies a package-local
|
| 152 |
+
output directory. Launch scripts use the bundled models and no longer explicitly
|
| 153 |
+
add the original user's model cache. No source-project files were moved.
|
| 154 |
+
|
| 155 |
+
The bundled base models and textures retain their original contents and author
|
| 156 |
+
metadata where present. Their origins are recorded in `SOURCE_FILES.json`; they
|
| 157 |
+
remain subject to their upstream licenses and are not relicensed by this package.
|
| 158 |
+
|
| 159 |
+
Large datasets, captured images, model weights, training outputs, ROS bags,
|
| 160 |
+
OpenVINS, plotting utilities, and old build caches are excluded. Local build and
|
| 161 |
+
smoke outputs may exist after running checks, but are not part of the release
|
| 162 |
+
archive.
|
simulation/SHA256SUMS
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
d687d72fcce6e1d530dfe7b215c96c52592ee77783f7f52fc34ff35000139b50 .gitignore
|
| 2 |
+
0520cd71c571a04a86e14375d906601785479749a31d6caae80ce70fd732a790 ENVIRONMENT.txt
|
| 3 |
+
7ab555dce748c83088a7071885516c3f9825e64b7407b9fcff238e1fc08e2774 README.md
|
| 4 |
+
93fb716cef4fca6b1a5b40d3c8a467ddbf316ee94db52ff0387459ec6b481212 SOURCE_FILES.json
|
| 5 |
+
833b33b004539ec3fb9d205da49e637de0da3fa2e11011b8ba66a7689b4d605b VALIDATION.md
|
| 6 |
+
13645a371e6a928049f7fb3b148b1b2ad4b0c25df1cd44e277097bf300008eac build.sh
|
| 7 |
+
97d208010055b31fa896b6aec71e84676b567b326e5c95056e055f952d26ab34 datasets_construct.sh
|
| 8 |
+
c01210ff2e18b5586fc4cb479e0251e7abd4cf544930c075f44ba0006cf304f6 examples/smoke.csv
|
| 9 |
+
f5c9d81b6c8454fb106eac5b6e2c6408866d2ba70032a2fd77698017ef211e88 gazebo_env.sh
|
| 10 |
+
ebced83a3420a9f5cb576f3f374b9d5ce926f3b92ff610734dc5cbe1bb29505d media/materials/scripts/home.material
|
| 11 |
+
72b40b02b023fa2ae799380a4f081e6896dbea06a363625dfac5ccf1c2831e57 media/materials/textures/bricks.png
|
| 12 |
+
eb82b0ada67a1acd0c8f59a562e6dbb61dded550f6396d653a7f4a20440b0f3e media/materials/textures/ceiling_tiled.jpg
|
| 13 |
+
987b67220d7dd80d1116fd8ac4d23a843519eb5d6b295c73f5b1a6eeadd1cca7 media/materials/textures/hardwood_floor.jpg
|
| 14 |
+
6c2115e90d034f56cd338fcee68d2f9ddc46cc5c6113d1595d57ad8b2225523e media/materials/textures/wood.jpg
|
| 15 |
+
a099ecca53ba1d0af3babacb31a4e802099d896926ea9109d38f2e14e40a28d9 models/ground_plane/model-1_2.sdf
|
| 16 |
+
cc2bf63d600f382bbbe81dbd3cd9363ee0436de6bda1c273cae47dfd8ea65bcf models/ground_plane/model-1_3.sdf
|
| 17 |
+
de8e04148a6b58735b63ea7500811ca1a1bae174d6da3a20f861c679534ddc99 models/ground_plane/model-1_4.sdf
|
| 18 |
+
4fefe57461ff15dd0b8931e249616eb719cf6760767a85db84762d85186ca94b models/ground_plane/model.config
|
| 19 |
+
e68642d3aeca5ff76543d75361279a1b7cd7cb790ede43301ea3d0fd0fc78abe models/ground_plane/model.sdf
|
| 20 |
+
a325e41fc9d065cfbcc15072591a99dd8222b59a55156608d831349b9095927f models/simple_drone/model.config
|
| 21 |
+
ab5e81c6a304b272cb1d2461b7d275fa1b9caaabf3a47c3dd311096753800e60 models/simple_drone/model.sdf
|
| 22 |
+
ec06c2561585112e6acdc77f20ce827541ea0cb1bcf1d2eab08040f34ebddc3c models/sun/model-1_2.sdf
|
| 23 |
+
609613ac8ce6a38dbe6be5e2e1f7a43fa557696c5d4a4a48fa246957573d84a9 models/sun/model-1_3.sdf
|
| 24 |
+
9ecf9281ed55a951e97b2fcb494a6d0e5a7247abff5208b2d53a06acb62b714a models/sun/model-1_4.sdf
|
| 25 |
+
f6d1f0e4b3919c21fc56ad24763275838944ec9acfc60bb86e2d31f23976688c models/sun/model.config
|
| 26 |
+
df64a7139480ca4004629fb7bc3bf1e92b1bddc6ccfc143615a59786c837a4fb models/sun/model.sdf
|
| 27 |
+
6b5762d5b960f8506d41517475573e1c9270262ded70e749adbbf1a526479dd1 plugins/CMakeLists.txt
|
| 28 |
+
ed8ac425d7447bef630c5f9287cff731de6b19ee697e0ab1a522b2579d0d8c10 plugins/SimpleDronePlugin.cc
|
| 29 |
+
82387e61049eb53d1aab7eb00ffee419bcace357a074e41554ed2a3c6544b9f7 run.sh
|
| 30 |
+
e1d47f14c42f41e10948fec290b99253df97fb87dd75ec16840e392ea8b804a3 smoke.sh
|
| 31 |
+
d49845dcd64d38afa11d3b166af9d5dce0c9c4b457f327276472b61be4d1d08c validation/build.log
|
| 32 |
+
a510fd263414fc0018ac1a4e90b9fa71dfead061d397c11438351531b4c8fc65 validation/smoke.log
|
| 33 |
+
0355a93182cbd2b81c5ebb718ecc2edb1ecc7fefeb07ea1531be242c707d8959 world/home_room_v1.world
|
| 34 |
+
f7d3decc18d9ec1680649a2c40b1ba7d53a35aa81598051ef98915e9f1760f8e world/home_room_v2.world
|
| 35 |
+
ab2df75a5a90e95e49800b8d4f712316277c9f78ed16f2bf4a3cd15514da3b6a world/home_room_v3.world
|
| 36 |
+
e008f2e4548e56a0765500c4c94a910281b4b2cd61c2a6ac535eb5d723437c6e world/home_room_v4.world
|
simulation/SOURCE_FILES.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_root": "/data_sda/zbf/home",
|
| 3 |
+
"files": {
|
| 4 |
+
"world/home_room_v1.world": "/data_sda/zbf/home/world/home_room_v1.world",
|
| 5 |
+
"world/home_room_v2.world": "/data_sda/zbf/home/world/home_room_v2.world",
|
| 6 |
+
"world/home_room_v3.world": "/data_sda/zbf/home/world/home_room_v3.world",
|
| 7 |
+
"world/home_room_v4.world": "/data_sda/zbf/home/world/home_room_v4.world",
|
| 8 |
+
"models/simple_drone/model.config": "/data_sda/zbf/home/models/simple_drone/model.config",
|
| 9 |
+
"models/simple_drone/model.sdf": "/data_sda/zbf/home/models/simple_drone/model.sdf",
|
| 10 |
+
"media/materials/scripts/home.material": "/data_sda/zbf/home/media/materials/scripts/home.material",
|
| 11 |
+
"plugins/SimpleDronePlugin.cc": "/data_sda/zbf/home/plugins/SimpleDronePlugin.cc",
|
| 12 |
+
"plugins/CMakeLists.txt": "/data_sda/zbf/home/plugins/CMakeLists.txt",
|
| 13 |
+
"run.sh": "/data_sda/zbf/home/run.sh",
|
| 14 |
+
"gazebo_env.sh": "/data_sda/zbf/home/gazebo_env.sh",
|
| 15 |
+
"datasets_construct.sh": "/data_sda/zbf/home/datasets_construct.sh",
|
| 16 |
+
"models/sun/model-1_2.sdf": "/home/zbf/.gazebo/models/sun/model-1_2.sdf",
|
| 17 |
+
"models/sun/model-1_3.sdf": "/home/zbf/.gazebo/models/sun/model-1_3.sdf",
|
| 18 |
+
"models/sun/model-1_4.sdf": "/home/zbf/.gazebo/models/sun/model-1_4.sdf",
|
| 19 |
+
"models/sun/model.config": "/home/zbf/.gazebo/models/sun/model.config",
|
| 20 |
+
"models/sun/model.sdf": "/home/zbf/.gazebo/models/sun/model.sdf",
|
| 21 |
+
"models/ground_plane/model-1_2.sdf": "/home/zbf/.gazebo/models/ground_plane/model-1_2.sdf",
|
| 22 |
+
"models/ground_plane/model-1_3.sdf": "/home/zbf/.gazebo/models/ground_plane/model-1_3.sdf",
|
| 23 |
+
"models/ground_plane/model-1_4.sdf": "/home/zbf/.gazebo/models/ground_plane/model-1_4.sdf",
|
| 24 |
+
"models/ground_plane/model.config": "/home/zbf/.gazebo/models/ground_plane/model.config",
|
| 25 |
+
"models/ground_plane/model.sdf": "/home/zbf/.gazebo/models/ground_plane/model.sdf",
|
| 26 |
+
"media/materials/textures/hardwood_floor.jpg": "/usr/share/gazebo-11/media/materials/textures/hardwood_floor.jpg",
|
| 27 |
+
"media/materials/textures/bricks.png": "/usr/share/gazebo-11/media/materials/textures/bricks.png",
|
| 28 |
+
"media/materials/textures/wood.jpg": "/usr/share/gazebo-11/media/materials/textures/wood.jpg",
|
| 29 |
+
"media/materials/textures/ceiling_tiled.jpg": "/usr/share/gazebo-11/media/materials/textures/ceiling_tiled.jpg"
|
| 30 |
+
},
|
| 31 |
+
"adjustments": [
|
| 32 |
+
"model.sdf image_dir changed to ./drone_images",
|
| 33 |
+
"launch scripts use bundled models instead of user model cache",
|
| 34 |
+
"gazebo_env.sh sets package-relative SIMPLE_DRONE_IMAGE_DIR",
|
| 35 |
+
"four referenced Gazebo textures bundled",
|
| 36 |
+
"examples/smoke.csv is a synthetic one-point environment check"
|
| 37 |
+
]
|
| 38 |
+
}
|
simulation/VALIDATION.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Validation Record
|
| 2 |
+
|
| 3 |
+
Validated on September 23, 2026 (Asia/Shanghai). See `ENVIRONMENT.txt` for reference
|
| 4 |
+
system and package versions.
|
| 5 |
+
|
| 6 |
+
- Parsed all 13 world/SDF files: four worlds, one drone SDF, and eight base-model
|
| 7 |
+
SDF versions.
|
| 8 |
+
- Resolved every `model://` and `file://` reference to bundled assets or the local
|
| 9 |
+
Gazebo installation. All four custom-material textures and every SDF referenced
|
| 10 |
+
by `model.config` are present.
|
| 11 |
+
- All five shell scripts passed `bash -n`.
|
| 12 |
+
- Starting with an empty build directory, `bash build.sh` successfully generated
|
| 13 |
+
`libSimpleDronePlugin.so`; `ldd` reported no missing shared libraries.
|
| 14 |
+
- `SIMPLE_DRONE_RENDER_BACKEND=xvfb bash smoke.sh v1` exited with status 0. The
|
| 15 |
+
capture script's image quality checks passed; all four PNG files are 640 x 480,
|
| 16 |
+
and the CSV contains capture metadata.
|
| 17 |
+
- Under Xvfb software rendering, physical camera frames were initially rejected
|
| 18 |
+
for excessive gray pixels. The plugin's existing single-camera sweep fallback
|
| 19 |
+
completed capture. This validates playback and fallback capture, not successful
|
| 20 |
+
direct capture from all four physical cameras.
|
| 21 |
+
- Worlds v2/v3/v4 received resource and structural checks only. Full capture in
|
| 22 |
+
those worlds, installation on a separate clean machine, full dataset generation,
|
| 23 |
+
and paper benchmark reproduction were not performed.
|
| 24 |
+
|
| 25 |
+
Build and capture logs, with terminal color codes removed, are available at
|
| 26 |
+
`validation/build.log` and `validation/smoke.log`. Local smoke outputs remain in
|
| 27 |
+
`datasets/smoke_world_v1/` and are excluded from the release archive.
|
| 28 |
+
|
| 29 |
+
Documentation was subsequently translated into English for publication. Simulation
|
| 30 |
+
assets and executable scripts were not changed by that documentation update.
|
simulation/build.sh
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
set -euo pipefail
|
| 3 |
+
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
| 4 |
+
source "${ROOT}/gazebo_env.sh"
|
| 5 |
+
cmake -S "${ROOT}/plugins" -B "${ROOT}/plugins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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
#
|
| 3 |
+
# Build and verify four-view images for dataset trajectories.
|
| 4 |
+
#
|
| 5 |
+
# For each trajectory CSV, this script runs run.sh in dataset playback mode.
|
| 6 |
+
# The Gazebo plugin stops at every waypoint and captures front/down/left/right.
|
| 7 |
+
# After every run, this script verifies that all images referenced by the CSV
|
| 8 |
+
# exist and rejects near-uniform frames or low-texture gray render patches.
|
| 9 |
+
# Failed trajectories are restored and retried.
|
| 10 |
+
#
|
| 11 |
+
# Usage:
|
| 12 |
+
# ./datasets_construct.sh
|
| 13 |
+
# ./datasets_construct.sh gui
|
| 14 |
+
# ./datasets_construct.sh datasets/world_v3
|
| 15 |
+
# DATASET_ROOT=/path/to/world_v3 ./datasets_construct.sh
|
| 16 |
+
|
| 17 |
+
set -euo pipefail
|
| 18 |
+
|
| 19 |
+
PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
| 20 |
+
|
| 21 |
+
MODE_ARGS=()
|
| 22 |
+
if [[ "${1:-}" == "gui" ]]; then
|
| 23 |
+
MODE_ARGS+=(gui)
|
| 24 |
+
shift
|
| 25 |
+
fi
|
| 26 |
+
|
| 27 |
+
ROOTS=()
|
| 28 |
+
if [[ $# -gt 0 ]]; then
|
| 29 |
+
for root in "$@"; do
|
| 30 |
+
ROOTS+=("${root}")
|
| 31 |
+
done
|
| 32 |
+
elif [[ -n "${DATASET_ROOT:-}" ]]; then
|
| 33 |
+
ROOTS+=("${DATASET_ROOT}")
|
| 34 |
+
else
|
| 35 |
+
ROOTS+=("${PROJECT_DIR}/datasets/world_v3")
|
| 36 |
+
fi
|
| 37 |
+
|
| 38 |
+
MAX_ATTEMPTS="${DATASET_CAPTURE_MAX_ATTEMPTS:-5}"
|
| 39 |
+
CAPTURE_LIMIT="${DATASET_CAPTURE_LIMIT:-}"
|
| 40 |
+
VALIDATOR_PY="$(mktemp /tmp/simple_drone_validate.XXXXXX.py)"
|
| 41 |
+
ORIGINAL_CSV=""
|
| 42 |
+
CURRENT_TRAJ=""
|
| 43 |
+
|
| 44 |
+
cleanup() {
|
| 45 |
+
rm -f "${VALIDATOR_PY}"
|
| 46 |
+
if [[ -n "${ORIGINAL_CSV}" && -f "${ORIGINAL_CSV}" && -n "${CURRENT_TRAJ}" ]]; then
|
| 47 |
+
cp "${ORIGINAL_CSV}" "${CURRENT_TRAJ}" 2>/dev/null || true
|
| 48 |
+
fi
|
| 49 |
+
if [[ -n "${ORIGINAL_CSV}" && -f "${ORIGINAL_CSV}" ]]; then
|
| 50 |
+
rm -f "${ORIGINAL_CSV}"
|
| 51 |
+
fi
|
| 52 |
+
}
|
| 53 |
+
trap cleanup EXIT
|
| 54 |
+
|
| 55 |
+
cat > "${VALIDATOR_PY}" <<'PY'
|
| 56 |
+
import csv
|
| 57 |
+
import os
|
| 58 |
+
import shutil
|
| 59 |
+
import sys
|
| 60 |
+
from pathlib import Path
|
| 61 |
+
|
| 62 |
+
try:
|
| 63 |
+
import numpy as np
|
| 64 |
+
from PIL import Image
|
| 65 |
+
except Exception as exc:
|
| 66 |
+
print(f"validator dependency error: {exc}", file=sys.stderr)
|
| 67 |
+
raise SystemExit(2)
|
| 68 |
+
|
| 69 |
+
VIEWS = ("front", "down", "left", "right")
|
| 70 |
+
GRAY_DELTA = int(os.environ.get("DATASET_GRAY_DELTA", "3"))
|
| 71 |
+
GRAY_MIN = int(os.environ.get("DATASET_GRAY_MIN", "120"))
|
| 72 |
+
GRAY_MAX = int(os.environ.get("DATASET_GRAY_MAX", "136"))
|
| 73 |
+
GRAY_MAX_RATIO = min(0.99, max(0.0, float(os.environ.get("DATASET_GRAY_MAX_RATIO", "0.12"))))
|
| 74 |
+
GRAY_TILE_RATIO = min(0.99, max(0.0, float(os.environ.get("DATASET_GRAY_TILE_RATIO", "0.90"))))
|
| 75 |
+
GRAY_SCANLINE_RATIO = min(0.99, max(0.0, float(os.environ.get("DATASET_GRAY_SCANLINE_RATIO", "0.95"))))
|
| 76 |
+
MIN_LUMA_STD = float(os.environ.get("DATASET_MIN_LUMA_STD", "4.0"))
|
| 77 |
+
MIN_RGB_RANGE = int(os.environ.get("DATASET_MIN_RGB_RANGE", "12"))
|
| 78 |
+
|
| 79 |
+
|
| 80 |
+
def rows_and_required(csv_path: Path):
|
| 81 |
+
with csv_path.open(newline="", encoding="utf-8") as f:
|
| 82 |
+
reader = csv.DictReader(f)
|
| 83 |
+
required = {
|
| 84 |
+
"capture_frame",
|
| 85 |
+
"captured_yaw_rad",
|
| 86 |
+
"captured_yaw_deg",
|
| 87 |
+
"front_image",
|
| 88 |
+
"down_image",
|
| 89 |
+
"left_image",
|
| 90 |
+
"right_image",
|
| 91 |
+
}
|
| 92 |
+
if not reader.fieldnames or not required.issubset(reader.fieldnames):
|
| 93 |
+
return None, "missing capture/image columns"
|
| 94 |
+
rows = list(reader)
|
| 95 |
+
if not rows:
|
| 96 |
+
return None, "empty trajectory CSV"
|
| 97 |
+
return rows, ""
|
| 98 |
+
|
| 99 |
+
|
| 100 |
+
def validate_image(path: Path):
|
| 101 |
+
try:
|
| 102 |
+
with Image.open(path) as image:
|
| 103 |
+
rgb = image.convert("RGB")
|
| 104 |
+
arr = np.asarray(rgb, dtype=np.uint8)
|
| 105 |
+
except Exception as exc:
|
| 106 |
+
return False, f"cannot open image: {path} ({exc})"
|
| 107 |
+
|
| 108 |
+
if arr.ndim != 3 or arr.shape[0] < 8 or arr.shape[1] < 8:
|
| 109 |
+
return False, f"bad image dimensions: {path}"
|
| 110 |
+
|
| 111 |
+
channel_min = arr.min(axis=2).astype(np.int16)
|
| 112 |
+
channel_max = arr.max(axis=2).astype(np.int16)
|
| 113 |
+
luma = arr.mean(axis=2)
|
| 114 |
+
rgb_range = int(arr.max()) - int(arr.min())
|
| 115 |
+
luma_std = float(luma.std())
|
| 116 |
+
|
| 117 |
+
if rgb_range < MIN_RGB_RANGE:
|
| 118 |
+
return False, f"all/near-gray image: {path} range={rgb_range} luma_std={luma_std:.3f}"
|
| 119 |
+
|
| 120 |
+
neutral = (channel_max - channel_min) <= GRAY_DELTA
|
| 121 |
+
medium_gray = (luma >= GRAY_MIN) & (luma <= GRAY_MAX)
|
| 122 |
+
gray_mask = neutral & medium_gray
|
| 123 |
+
gray_ratio = float(gray_mask.mean())
|
| 124 |
+
if gray_ratio > GRAY_MAX_RATIO:
|
| 125 |
+
return False, f"global gray ratio too high: {path} ratio={gray_ratio:.4f}"
|
| 126 |
+
|
| 127 |
+
buffer_mask = np.all(arr == 128, axis=2)
|
| 128 |
+
row_ratios = buffer_mask.mean(axis=1)
|
| 129 |
+
column_ratios = buffer_mask.mean(axis=0)
|
| 130 |
+
if float(row_ratios.max()) > GRAY_SCANLINE_RATIO:
|
| 131 |
+
row = int(row_ratios.argmax())
|
| 132 |
+
return False, (
|
| 133 |
+
f"gray render-buffer row: {path} row={row} "
|
| 134 |
+
f"ratio={float(row_ratios[row]):.4f}"
|
| 135 |
+
)
|
| 136 |
+
if float(column_ratios.max()) > GRAY_SCANLINE_RATIO:
|
| 137 |
+
column = int(column_ratios.argmax())
|
| 138 |
+
return False, (
|
| 139 |
+
f"gray render-buffer column: {path} column={column} "
|
| 140 |
+
f"ratio={float(column_ratios[column]):.4f}"
|
| 141 |
+
)
|
| 142 |
+
|
| 143 |
+
height, width = gray_mask.shape
|
| 144 |
+
tile_h = max(1, height // 8)
|
| 145 |
+
tile_w = max(1, width // 8)
|
| 146 |
+
for y0 in range(0, height, tile_h):
|
| 147 |
+
for x0 in range(0, width, tile_w):
|
| 148 |
+
tile = gray_mask[y0:min(y0 + tile_h, height), x0:min(x0 + tile_w, width)]
|
| 149 |
+
tile_ratio = float(tile.mean()) if tile.size else 0.0
|
| 150 |
+
tile_luma = luma[y0:min(y0 + tile_h, height), x0:min(x0 + tile_w, width)]
|
| 151 |
+
tile_rgb = arr[y0:min(y0 + tile_h, height), x0:min(x0 + tile_w, width), :]
|
| 152 |
+
tile_std = float(tile_luma.std()) if tile_luma.size else 0.0
|
| 153 |
+
tile_range = int(tile_rgb.max()) - int(tile_rgb.min()) if tile_rgb.size else 0
|
| 154 |
+
if tile_ratio > GRAY_TILE_RATIO and tile_std < MIN_LUMA_STD and tile_range < MIN_RGB_RANGE:
|
| 155 |
+
return False, (
|
| 156 |
+
f"large low-texture gray tile: {path} "
|
| 157 |
+
f"tile_ratio={tile_ratio:.4f} range={tile_range} luma_std={tile_std:.3f}"
|
| 158 |
+
)
|
| 159 |
+
|
| 160 |
+
return True, ""
|
| 161 |
+
|
| 162 |
+
|
| 163 |
+
def validate(dataset_root: Path, csv_path: Path):
|
| 164 |
+
rows, reason = rows_and_required(csv_path)
|
| 165 |
+
if rows is None:
|
| 166 |
+
return False, reason
|
| 167 |
+
|
| 168 |
+
image_root = dataset_root / "images" / csv_path.stem
|
| 169 |
+
for index, row in enumerate(rows):
|
| 170 |
+
if not row.get("capture_frame") or not row.get("captured_yaw_rad") or not row.get("captured_yaw_deg"):
|
| 171 |
+
return False, f"row {index} missing capture metadata"
|
| 172 |
+
for view in VIEWS:
|
| 173 |
+
image_name = row.get(f"{view}_image", "")
|
| 174 |
+
if not image_name:
|
| 175 |
+
return False, f"row {index} missing {view}_image"
|
| 176 |
+
image_path = image_root / f"images_{view}" / image_name
|
| 177 |
+
if not image_path.is_file():
|
| 178 |
+
return False, f"missing image: {image_path}"
|
| 179 |
+
ok, detail = validate_image(image_path)
|
| 180 |
+
if not ok:
|
| 181 |
+
return False, detail
|
| 182 |
+
return True, "ok"
|
| 183 |
+
|
| 184 |
+
|
| 185 |
+
def quick_complete(dataset_root: Path, csv_path: Path):
|
| 186 |
+
rows, reason = rows_and_required(csv_path)
|
| 187 |
+
if rows is None:
|
| 188 |
+
return False, reason
|
| 189 |
+
|
| 190 |
+
image_root = dataset_root / "images" / csv_path.stem
|
| 191 |
+
for index, row in enumerate(rows):
|
| 192 |
+
if not row.get("capture_frame") or not row.get("captured_yaw_rad") or not row.get("captured_yaw_deg"):
|
| 193 |
+
return False, f"row {index} missing capture metadata"
|
| 194 |
+
for view in VIEWS:
|
| 195 |
+
image_name = row.get(f"{view}_image", "")
|
| 196 |
+
if not image_name:
|
| 197 |
+
return False, f"row {index} missing {view}_image"
|
| 198 |
+
image_path = image_root / f"images_{view}" / image_name
|
| 199 |
+
if not image_path.is_file():
|
| 200 |
+
return False, f"missing image: {image_path}"
|
| 201 |
+
return True, "ok"
|
| 202 |
+
|
| 203 |
+
|
| 204 |
+
def clean(dataset_root: Path, csv_path: Path):
|
| 205 |
+
image_root = dataset_root / "images" / csv_path.stem
|
| 206 |
+
if image_root.exists():
|
| 207 |
+
shutil.rmtree(image_root)
|
| 208 |
+
|
| 209 |
+
|
| 210 |
+
def main():
|
| 211 |
+
if len(sys.argv) != 4:
|
| 212 |
+
raise SystemExit("usage: validator.py validate|clean DATASET_ROOT CSV")
|
| 213 |
+
command = sys.argv[1]
|
| 214 |
+
dataset_root = Path(sys.argv[2])
|
| 215 |
+
csv_path = Path(sys.argv[3])
|
| 216 |
+
if command == "validate":
|
| 217 |
+
ok, message = validate(dataset_root, csv_path)
|
| 218 |
+
print(message)
|
| 219 |
+
raise SystemExit(0 if ok else 1)
|
| 220 |
+
if command == "quick":
|
| 221 |
+
ok, message = quick_complete(dataset_root, csv_path)
|
| 222 |
+
print(message)
|
| 223 |
+
raise SystemExit(0 if ok else 1)
|
| 224 |
+
if command == "clean":
|
| 225 |
+
clean(dataset_root, csv_path)
|
| 226 |
+
raise SystemExit(0)
|
| 227 |
+
raise SystemExit(f"unknown command: {command}")
|
| 228 |
+
|
| 229 |
+
|
| 230 |
+
if __name__ == "__main__":
|
| 231 |
+
main()
|
| 232 |
+
PY
|
| 233 |
+
|
| 234 |
+
trajectory_complete() {
|
| 235 |
+
local dataset_root="$1"
|
| 236 |
+
local csv_path="$2"
|
| 237 |
+
if [[ "${DATASET_REVALIDATE_EXISTING:-0}" != "0" ]]; then
|
| 238 |
+
python3 "${VALIDATOR_PY}" validate "${dataset_root}" "${csv_path}" >/dev/null 2>&1
|
| 239 |
+
else
|
| 240 |
+
python3 "${VALIDATOR_PY}" quick "${dataset_root}" "${csv_path}" >/dev/null 2>&1
|
| 241 |
+
fi
|
| 242 |
+
}
|
| 243 |
+
|
| 244 |
+
validate_or_explain() {
|
| 245 |
+
local dataset_root="$1"
|
| 246 |
+
local csv_path="$2"
|
| 247 |
+
python3 "${VALIDATOR_PY}" validate "${dataset_root}" "${csv_path}"
|
| 248 |
+
}
|
| 249 |
+
|
| 250 |
+
clean_outputs() {
|
| 251 |
+
local dataset_root="$1"
|
| 252 |
+
local csv_path="$2"
|
| 253 |
+
python3 "${VALIDATOR_PY}" clean "${dataset_root}" "${csv_path}"
|
| 254 |
+
}
|
| 255 |
+
|
| 256 |
+
for root in "${ROOTS[@]}"; do
|
| 257 |
+
DATASET_ROOT_ABS="$(cd "${root}" && pwd)"
|
| 258 |
+
TRAJECTORY_DIR="${DATASET_ROOT_ABS}/trajectory"
|
| 259 |
+
|
| 260 |
+
if [[ ! -d "${TRAJECTORY_DIR}" ]]; then
|
| 261 |
+
echo "[datasets_construct] trajectory directory not found: ${TRAJECTORY_DIR}" >&2
|
| 262 |
+
exit 1
|
| 263 |
+
fi
|
| 264 |
+
|
| 265 |
+
mapfile -t ALL_TRAJECTORIES < <(find "${TRAJECTORY_DIR}" -maxdepth 1 -type f -name '*.csv' | sort)
|
| 266 |
+
if [[ -n "${DATASET_CAPTURE_TRAJECTORY:-}" ]]; then
|
| 267 |
+
REQUESTED_TRAJECTORY="${DATASET_CAPTURE_TRAJECTORY}"
|
| 268 |
+
if [[ "${REQUESTED_TRAJECTORY}" != /* ]]; then
|
| 269 |
+
REQUESTED_TRAJECTORY="${TRAJECTORY_DIR}/${REQUESTED_TRAJECTORY}"
|
| 270 |
+
fi
|
| 271 |
+
if [[ ! -f "${REQUESTED_TRAJECTORY}" ]]; then
|
| 272 |
+
echo "[datasets_construct] requested trajectory not found: ${REQUESTED_TRAJECTORY}" >&2
|
| 273 |
+
exit 1
|
| 274 |
+
fi
|
| 275 |
+
ALL_TRAJECTORIES=("$(cd "$(dirname "${REQUESTED_TRAJECTORY}")" && pwd)/$(basename "${REQUESTED_TRAJECTORY}")")
|
| 276 |
+
fi
|
| 277 |
+
if [[ "${#ALL_TRAJECTORIES[@]}" -eq 0 ]]; then
|
| 278 |
+
echo "[datasets_construct] no trajectory CSV files found in ${TRAJECTORY_DIR}" >&2
|
| 279 |
+
exit 1
|
| 280 |
+
fi
|
| 281 |
+
|
| 282 |
+
echo "[datasets_construct] dataset -> ${DATASET_ROOT_ABS}"
|
| 283 |
+
echo "[datasets_construct] total trajectories -> ${#ALL_TRAJECTORIES[@]}"
|
| 284 |
+
echo "[datasets_construct] scanning existing captures..."
|
| 285 |
+
|
| 286 |
+
TRAJECTORIES=()
|
| 287 |
+
scanned=0
|
| 288 |
+
for traj in "${ALL_TRAJECTORIES[@]}"; do
|
| 289 |
+
scanned=$((scanned + 1))
|
| 290 |
+
if (( scanned % 100 == 0 )); then
|
| 291 |
+
echo "[datasets_construct] scanned ${scanned}/${#ALL_TRAJECTORIES[@]}"
|
| 292 |
+
fi
|
| 293 |
+
if trajectory_complete "${DATASET_ROOT_ABS}" "${traj}"; then
|
| 294 |
+
echo "[datasets_construct] skip verified $(basename "${traj}")"
|
| 295 |
+
else
|
| 296 |
+
TRAJECTORIES+=("${traj}")
|
| 297 |
+
if [[ -n "${CAPTURE_LIMIT}" && "${#TRAJECTORIES[@]}" -ge "${CAPTURE_LIMIT}" ]]; then
|
| 298 |
+
echo "[datasets_construct] reached DATASET_CAPTURE_LIMIT=${CAPTURE_LIMIT}; stopping scan early"
|
| 299 |
+
break
|
| 300 |
+
fi
|
| 301 |
+
fi
|
| 302 |
+
done
|
| 303 |
+
|
| 304 |
+
echo "[datasets_construct] remaining trajectories -> ${#TRAJECTORIES[@]}"
|
| 305 |
+
echo "[datasets_construct] max attempts -> ${MAX_ATTEMPTS}"
|
| 306 |
+
|
| 307 |
+
if [[ "${#TRAJECTORIES[@]}" -eq 0 ]]; then
|
| 308 |
+
echo "[datasets_construct] complete: all trajectories are already verified"
|
| 309 |
+
continue
|
| 310 |
+
fi
|
| 311 |
+
|
| 312 |
+
skipped_timeouts=0
|
| 313 |
+
for i in "${!TRAJECTORIES[@]}"; do
|
| 314 |
+
traj="${TRAJECTORIES[$i]}"
|
| 315 |
+
CURRENT_TRAJ="${traj}"
|
| 316 |
+
idx=$((i + 1))
|
| 317 |
+
echo "[datasets_construct] ${idx}/${#TRAJECTORIES[@]} running $(basename "${traj}")"
|
| 318 |
+
|
| 319 |
+
ORIGINAL_CSV="$(mktemp /tmp/simple_drone_csv.XXXXXX)"
|
| 320 |
+
cp "${traj}" "${ORIGINAL_CSV}"
|
| 321 |
+
|
| 322 |
+
attempt=1
|
| 323 |
+
timed_out=0
|
| 324 |
+
while [[ "${attempt}" -le "${MAX_ATTEMPTS}" ]]; do
|
| 325 |
+
echo "[datasets_construct] attempt ${attempt}/${MAX_ATTEMPTS} $(basename "${traj}")"
|
| 326 |
+
cp "${ORIGINAL_CSV}" "${traj}"
|
| 327 |
+
clean_outputs "${DATASET_ROOT_ABS}" "${traj}"
|
| 328 |
+
|
| 329 |
+
if DATASET_ROOT="${DATASET_ROOT_ABS}" SIMPLE_DRONE_QUIT_ON_FINISH=1 \
|
| 330 |
+
SIMPLE_DRONE_RENDER_BACKEND="${SIMPLE_DRONE_RENDER_BACKEND:-system}" \
|
| 331 |
+
SIMPLE_DRONE_SINGLE_CAMERA_SWEEP="${SIMPLE_DRONE_SINGLE_CAMERA_SWEEP:-0}" \
|
| 332 |
+
"${PROJECT_DIR}/run.sh" "${MODE_ARGS[@]}" "${traj}"; then
|
| 333 |
+
if validate_or_explain "${DATASET_ROOT_ABS}" "${traj}"; then
|
| 334 |
+
echo "[datasets_construct] verified $(basename "${traj}")"
|
| 335 |
+
rm -f "${ORIGINAL_CSV}"
|
| 336 |
+
ORIGINAL_CSV=""
|
| 337 |
+
CURRENT_TRAJ=""
|
| 338 |
+
break
|
| 339 |
+
fi
|
| 340 |
+
else
|
| 341 |
+
run_status=$?
|
| 342 |
+
if [[ "${run_status}" -eq 124 ]]; then
|
| 343 |
+
timed_out=1
|
| 344 |
+
echo "[datasets_construct] timeout after ${SIMPLE_DRONE_RUN_TIMEOUT:-900}s; skipping $(basename "${traj}")" >&2
|
| 345 |
+
break
|
| 346 |
+
fi
|
| 347 |
+
echo "[datasets_construct] run.sh failed for $(basename "${traj}") status=${run_status}" >&2
|
| 348 |
+
fi
|
| 349 |
+
|
| 350 |
+
attempt=$((attempt + 1))
|
| 351 |
+
if [[ "${attempt}" -le "${MAX_ATTEMPTS}" ]]; then
|
| 352 |
+
echo "[datasets_construct] retrying $(basename "${traj}")"
|
| 353 |
+
sleep 1
|
| 354 |
+
fi
|
| 355 |
+
done
|
| 356 |
+
|
| 357 |
+
if [[ -n "${ORIGINAL_CSV}" ]]; then
|
| 358 |
+
cp "${ORIGINAL_CSV}" "${traj}"
|
| 359 |
+
rm -f "${ORIGINAL_CSV}"
|
| 360 |
+
ORIGINAL_CSV=""
|
| 361 |
+
CURRENT_TRAJ=""
|
| 362 |
+
if [[ "${timed_out}" -ne 0 ]]; then
|
| 363 |
+
clean_outputs "${DATASET_ROOT_ABS}" "${traj}"
|
| 364 |
+
skipped_timeouts=$((skipped_timeouts + 1))
|
| 365 |
+
continue
|
| 366 |
+
fi
|
| 367 |
+
echo "[datasets_construct] failed after ${MAX_ATTEMPTS} attempts: ${traj}" >&2
|
| 368 |
+
exit 1
|
| 369 |
+
fi
|
| 370 |
+
done
|
| 371 |
+
if [[ "${skipped_timeouts}" -gt 0 ]]; then
|
| 372 |
+
echo "[datasets_construct] skipped timed-out trajectories -> ${skipped_timeouts}" >&2
|
| 373 |
+
exit 1
|
| 374 |
+
fi
|
| 375 |
+
done
|
| 376 |
+
|
| 377 |
+
echo "[datasets_construct] complete"
|
simulation/examples/smoke.csv
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
step,x,y,z,yaw_rad,yaw_deg
|
| 2 |
+
0,-7,0.6,1.8,0,0
|
simulation/gazebo_env.sh
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
#
|
| 3 |
+
# Source this before launching Gazebo manually:
|
| 4 |
+
# source ./gazebo_env.sh
|
| 5 |
+
# gazebo --verbose world/home_room_v1.world
|
| 6 |
+
# gzserver --verbose world/home_room_v1.world
|
| 7 |
+
#
|
| 8 |
+
# The dataset scripts do this automatically. This file is only for manual GUI
|
| 9 |
+
# / gzserver debugging from a shell that may have Conda paths active.
|
| 10 |
+
|
| 11 |
+
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
|
| 12 |
+
echo "source this file instead of executing it:"
|
| 13 |
+
echo " source ./gazebo_env.sh"
|
| 14 |
+
exit 1
|
| 15 |
+
fi
|
| 16 |
+
|
| 17 |
+
PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
| 18 |
+
PLUGIN_BUILD="${PROJECT_DIR}/plugins/build"
|
| 19 |
+
|
| 20 |
+
set +u
|
| 21 |
+
# shellcheck disable=SC1091
|
| 22 |
+
source /usr/share/gazebo/setup.sh
|
| 23 |
+
set -u
|
| 24 |
+
|
| 25 |
+
export PATH="$(printf '%s' "${PATH}" | awk -v RS=: 'tolower($0) !~ /anaconda/ {printf "%s%s", sep, $0; sep=":"}')"
|
| 26 |
+
export LD_LIBRARY_PATH="$(printf '%s' "${LD_LIBRARY_PATH:-}" | awk -v RS=: 'tolower($0) !~ /anaconda/ {printf "%s%s", sep, $0; sep=":"}')"
|
| 27 |
+
|
| 28 |
+
unset CONDA_PREFIX CONDA_DEFAULT_ENV CONDA_SHLVL CONDA_EXE _CONDA_EXE _CONDA_ROOT
|
| 29 |
+
unset CONDA_PYTHON_EXE CONDA_PROMPT_MODIFIER
|
| 30 |
+
unset CMAKE_PREFIX_PATH Protobuf_DIR protobuf_DIR
|
| 31 |
+
|
| 32 |
+
export GAZEBO_PLUGIN_PATH="${PLUGIN_BUILD}:${GAZEBO_PLUGIN_PATH:-}"
|
| 33 |
+
export GAZEBO_MODEL_PATH="${PROJECT_DIR}/models:${GAZEBO_MODEL_PATH:-}"
|
| 34 |
+
export GAZEBO_RESOURCE_PATH="${PROJECT_DIR}:${GAZEBO_RESOURCE_PATH:-}"
|
| 35 |
+
export SIMPLE_DRONE_IMAGE_DIR="${SIMPLE_DRONE_IMAGE_DIR:-${PROJECT_DIR}/drone_images}"
|
| 36 |
+
export QT_X11_NO_MITSHM=1
|
| 37 |
+
|
| 38 |
+
echo "[gazebo_env] PROJECT_DIR=${PROJECT_DIR}"
|
| 39 |
+
echo "[gazebo_env] GAZEBO_PLUGIN_PATH=${GAZEBO_PLUGIN_PATH}"
|
| 40 |
+
echo "[gazebo_env] GAZEBO_MODEL_PATH=${GAZEBO_MODEL_PATH}"
|
simulation/media/materials/scripts/home.material
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Custom materials for the home_room world.
|
| 2 |
+
// Loaded via GAZEBO_RESOURCE_PATH (see run.sh, which adds the project dir so
|
| 3 |
+
// Gazebo registers <proj>/media/materials/{scripts,textures}).
|
| 4 |
+
//
|
| 5 |
+
// Design goal: keep Gazebo's bundled textures (no extra files) but push the
|
| 6 |
+
// look toward photorealism by adding (a) real specular highlights + shininess,
|
| 7 |
+
// and (b) finer, anisotropically-filtered texture tiling. OGRE1 fixed-function
|
| 8 |
+
// only (no PBR / normal maps) -- the realism comes from texture detail plus a
|
| 9 |
+
// believable specular response to the ceiling lamps.
|
| 10 |
+
|
| 11 |
+
// ----------------------------------------------------------------------------
|
| 12 |
+
// Muted oak floor: reuse Gazebo's hardwood texture but modulate it with a cool
|
| 13 |
+
// grey so the bright orange reads as a desaturated, ordinary wood floor. Adds a
|
| 14 |
+
// soft satin sheen (low spec, wide highlight) so the lamps reflect off it.
|
| 15 |
+
material Home/MutedWoodFloor
|
| 16 |
+
{
|
| 17 |
+
technique
|
| 18 |
+
{
|
| 19 |
+
pass
|
| 20 |
+
{
|
| 21 |
+
ambient 0.46 0.46 0.46 1.0
|
| 22 |
+
diffuse 0.66 0.66 0.66 1.0
|
| 23 |
+
specular 0.10 0.10 0.09 18.0
|
| 24 |
+
|
| 25 |
+
texture_unit
|
| 26 |
+
{
|
| 27 |
+
texture hardwood_floor.jpg
|
| 28 |
+
// blend 62% wood texture + 38% muted taupe-grey: keeps the wood grain
|
| 29 |
+
// but desaturates the bright orange toward an ordinary, greyed floor
|
| 30 |
+
colour_op_ex blend_manual src_texture src_manual 0.62 1.0 1.0 1.0 0.46 0.43 0.40
|
| 31 |
+
filtering anisotropic
|
| 32 |
+
max_anisotropy 8
|
| 33 |
+
scale 0.34 0.34
|
| 34 |
+
}
|
| 35 |
+
}
|
| 36 |
+
}
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
// ----------------------------------------------------------------------------
|
| 40 |
+
// Warm matte interior paint. Real matte paint has no visible texture at room
|
| 41 |
+
// scale, and tiling paintedWall.jpg over a 15 m wall produced glowing bands
|
| 42 |
+
// under the warm lamps -- so this is a clean flat warm off-white, fully matte,
|
| 43 |
+
// and lets the lighting do all the shading work.
|
| 44 |
+
material Home/WallPaint
|
| 45 |
+
{
|
| 46 |
+
technique
|
| 47 |
+
{
|
| 48 |
+
pass
|
| 49 |
+
{
|
| 50 |
+
ambient 0.60 0.59 0.56 1.0
|
| 51 |
+
diffuse 0.74 0.72 0.68 1.0
|
| 52 |
+
specular 0.02 0.02 0.02 4.0
|
| 53 |
+
}
|
| 54 |
+
}
|
| 55 |
+
}
|
| 56 |
+
|
| 57 |
+
// ----------------------------------------------------------------------------
|
| 58 |
+
// Exposed-brick accent wall. bricks.png tiled finer than the default, with a
|
| 59 |
+
// little spec so mortar/edges catch the kitchen + living lamps.
|
| 60 |
+
material Home/Brick
|
| 61 |
+
{
|
| 62 |
+
technique
|
| 63 |
+
{
|
| 64 |
+
pass
|
| 65 |
+
{
|
| 66 |
+
ambient 0.48 0.42 0.38 1.0
|
| 67 |
+
diffuse 0.78 0.66 0.58 1.0
|
| 68 |
+
specular 0.06 0.05 0.04 10.0
|
| 69 |
+
|
| 70 |
+
texture_unit
|
| 71 |
+
{
|
| 72 |
+
texture bricks.png
|
| 73 |
+
filtering anisotropic
|
| 74 |
+
max_anisotropy 8
|
| 75 |
+
scale 0.18 0.18
|
| 76 |
+
}
|
| 77 |
+
}
|
| 78 |
+
}
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
// ----------------------------------------------------------------------------
|
| 82 |
+
// Polished wood for furniture (tables, cabinets, bed frame, doors). Keep the
|
| 83 |
+
// texture near full brightness (diffuse ~white) so the grain reads, and add a
|
| 84 |
+
// tight glossy highlight so varnished surfaces pop under the lamps.
|
| 85 |
+
material Home/WoodPolished
|
| 86 |
+
{
|
| 87 |
+
technique
|
| 88 |
+
{
|
| 89 |
+
pass
|
| 90 |
+
{
|
| 91 |
+
ambient 0.42 0.34 0.24 1.0
|
| 92 |
+
diffuse 0.82 0.74 0.62 1.0
|
| 93 |
+
specular 0.34 0.30 0.24 48.0
|
| 94 |
+
|
| 95 |
+
texture_unit
|
| 96 |
+
{
|
| 97 |
+
texture wood.jpg
|
| 98 |
+
filtering anisotropic
|
| 99 |
+
max_anisotropy 8
|
| 100 |
+
scale 0.7 0.7
|
| 101 |
+
}
|
| 102 |
+
}
|
| 103 |
+
}
|
| 104 |
+
}
|
| 105 |
+
|
| 106 |
+
// ----------------------------------------------------------------------------
|
| 107 |
+
// Ceiling plaster/tile -- subtle texture, fully matte, slightly warm so it
|
| 108 |
+
// doesn't read as a flat grey lid.
|
| 109 |
+
material Home/Ceiling
|
| 110 |
+
{
|
| 111 |
+
technique
|
| 112 |
+
{
|
| 113 |
+
pass
|
| 114 |
+
{
|
| 115 |
+
ambient 0.60 0.59 0.57 1.0
|
| 116 |
+
diffuse 0.86 0.85 0.82 1.0
|
| 117 |
+
specular 0.02 0.02 0.02 4.0
|
| 118 |
+
|
| 119 |
+
texture_unit
|
| 120 |
+
{
|
| 121 |
+
texture ceiling_tiled.jpg
|
| 122 |
+
filtering trilinear
|
| 123 |
+
scale 0.5 0.5
|
| 124 |
+
}
|
| 125 |
+
}
|
| 126 |
+
}
|
| 127 |
+
}
|
simulation/media/materials/textures/bricks.png
ADDED
|
Git LFS Details
|
simulation/media/materials/textures/ceiling_tiled.jpg
ADDED
|
Git LFS Details
|
simulation/media/materials/textures/hardwood_floor.jpg
ADDED
|
Git LFS Details
|
simulation/media/materials/textures/wood.jpg
ADDED
|
Git LFS Details
|
simulation/models/ground_plane/model-1_2.sdf
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<gazebo version="1.2">
|
| 3 |
+
<model name="ground_plane">
|
| 4 |
+
<static>true</static>
|
| 5 |
+
<link name="link">
|
| 6 |
+
<collision name="collision">
|
| 7 |
+
<geometry>
|
| 8 |
+
<plane>
|
| 9 |
+
<normal>0 0 1</normal>
|
| 10 |
+
<size>100 100</size>
|
| 11 |
+
</plane>
|
| 12 |
+
</geometry>
|
| 13 |
+
<surface>
|
| 14 |
+
<friction>
|
| 15 |
+
<ode>
|
| 16 |
+
<mu>100</mu>
|
| 17 |
+
<mu2>50</mu2>
|
| 18 |
+
</ode>
|
| 19 |
+
</friction>
|
| 20 |
+
</surface>
|
| 21 |
+
</collision>
|
| 22 |
+
<visual name="visual">
|
| 23 |
+
<cast_shadows>false</cast_shadows>
|
| 24 |
+
<geometry>
|
| 25 |
+
<plane>
|
| 26 |
+
<normal>0 0 1</normal>
|
| 27 |
+
<size>100 100</size>
|
| 28 |
+
</plane>
|
| 29 |
+
</geometry>
|
| 30 |
+
<material>
|
| 31 |
+
<script>
|
| 32 |
+
<uri>file://media/materials/scripts/gazebo.material</uri>
|
| 33 |
+
<name>Gazebo/Grey</name>
|
| 34 |
+
</script>
|
| 35 |
+
</material>
|
| 36 |
+
</visual>
|
| 37 |
+
</link>
|
| 38 |
+
</model>
|
| 39 |
+
</gazebo>
|
simulation/models/ground_plane/model-1_3.sdf
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<sdf version="1.3">
|
| 3 |
+
<model name="ground_plane">
|
| 4 |
+
<static>true</static>
|
| 5 |
+
<link name="link">
|
| 6 |
+
<collision name="collision">
|
| 7 |
+
<geometry>
|
| 8 |
+
<plane>
|
| 9 |
+
<normal>0 0 1</normal>
|
| 10 |
+
<size>100 100</size>
|
| 11 |
+
</plane>
|
| 12 |
+
</geometry>
|
| 13 |
+
<surface>
|
| 14 |
+
<friction>
|
| 15 |
+
<ode>
|
| 16 |
+
<mu>100</mu>
|
| 17 |
+
<mu2>50</mu2>
|
| 18 |
+
</ode>
|
| 19 |
+
</friction>
|
| 20 |
+
</surface>
|
| 21 |
+
</collision>
|
| 22 |
+
<visual name="visual">
|
| 23 |
+
<cast_shadows>false</cast_shadows>
|
| 24 |
+
<geometry>
|
| 25 |
+
<plane>
|
| 26 |
+
<normal>0 0 1</normal>
|
| 27 |
+
<size>100 100</size>
|
| 28 |
+
</plane>
|
| 29 |
+
</geometry>
|
| 30 |
+
<material>
|
| 31 |
+
<script>
|
| 32 |
+
<uri>file://media/materials/scripts/gazebo.material</uri>
|
| 33 |
+
<name>Gazebo/Grey</name>
|
| 34 |
+
</script>
|
| 35 |
+
</material>
|
| 36 |
+
</visual>
|
| 37 |
+
</link>
|
| 38 |
+
</model>
|
| 39 |
+
</sdf>
|
simulation/models/ground_plane/model-1_4.sdf
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<sdf version="1.4">
|
| 3 |
+
<model name="ground_plane">
|
| 4 |
+
<static>true</static>
|
| 5 |
+
<link name="link">
|
| 6 |
+
<collision name="collision">
|
| 7 |
+
<geometry>
|
| 8 |
+
<plane>
|
| 9 |
+
<normal>0 0 1</normal>
|
| 10 |
+
<size>100 100</size>
|
| 11 |
+
</plane>
|
| 12 |
+
</geometry>
|
| 13 |
+
<surface>
|
| 14 |
+
<friction>
|
| 15 |
+
<ode>
|
| 16 |
+
<mu>100</mu>
|
| 17 |
+
<mu2>50</mu2>
|
| 18 |
+
</ode>
|
| 19 |
+
</friction>
|
| 20 |
+
</surface>
|
| 21 |
+
</collision>
|
| 22 |
+
<visual name="visual">
|
| 23 |
+
<cast_shadows>false</cast_shadows>
|
| 24 |
+
<geometry>
|
| 25 |
+
<plane>
|
| 26 |
+
<normal>0 0 1</normal>
|
| 27 |
+
<size>100 100</size>
|
| 28 |
+
</plane>
|
| 29 |
+
</geometry>
|
| 30 |
+
<material>
|
| 31 |
+
<script>
|
| 32 |
+
<uri>file://media/materials/scripts/gazebo.material</uri>
|
| 33 |
+
<name>Gazebo/Grey</name>
|
| 34 |
+
</script>
|
| 35 |
+
</material>
|
| 36 |
+
</visual>
|
| 37 |
+
</link>
|
| 38 |
+
</model>
|
| 39 |
+
</sdf>
|
simulation/models/ground_plane/model.config
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
|
| 3 |
+
<model>
|
| 4 |
+
<name>Ground Plane</name>
|
| 5 |
+
<version>1.0</version>
|
| 6 |
+
<sdf version="1.2">model-1_2.sdf</sdf>
|
| 7 |
+
<sdf version="1.3">model-1_3.sdf</sdf>
|
| 8 |
+
<sdf version="1.4">model-1_4.sdf</sdf>
|
| 9 |
+
<sdf version="1.5">model.sdf</sdf>
|
| 10 |
+
|
| 11 |
+
<author>
|
| 12 |
+
<name>Nate Koenig</name>
|
| 13 |
+
<email>nate@osrfoundation.org</email>
|
| 14 |
+
</author>
|
| 15 |
+
|
| 16 |
+
<description>
|
| 17 |
+
A simple ground plane.
|
| 18 |
+
</description>
|
| 19 |
+
</model>
|
simulation/models/ground_plane/model.sdf
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0" ?>
|
| 2 |
+
<sdf version="1.5">
|
| 3 |
+
<model name="ground_plane">
|
| 4 |
+
<static>true</static>
|
| 5 |
+
<link name="link">
|
| 6 |
+
<collision name="collision">
|
| 7 |
+
<geometry>
|
| 8 |
+
<plane>
|
| 9 |
+
<normal>0 0 1</normal>
|
| 10 |
+
<size>100 100</size>
|
| 11 |
+
</plane>
|
| 12 |
+
</geometry>
|
| 13 |
+
<surface>
|
| 14 |
+
<friction>
|
| 15 |
+
<ode>
|
| 16 |
+
<mu>100</mu>
|
| 17 |
+
<mu2>50</mu2>
|
| 18 |
+
</ode>
|
| 19 |
+
</friction>
|
| 20 |
+
</surface>
|
| 21 |
+
</collision>
|
| 22 |
+
<visual name="visual">
|
| 23 |
+
<cast_shadows>false</cast_shadows>
|
| 24 |
+
<geometry>
|
| 25 |
+
<plane>
|
| 26 |
+
<normal>0 0 1</normal>
|
| 27 |
+
<size>100 100</size>
|
| 28 |
+
</plane>
|
| 29 |
+
</geometry>
|
| 30 |
+
<material>
|
| 31 |
+
<script>
|
| 32 |
+
<uri>file://media/materials/scripts/gazebo.material</uri>
|
| 33 |
+
<name>Gazebo/Grey</name>
|
| 34 |
+
</script>
|
| 35 |
+
</material>
|
| 36 |
+
</visual>
|
| 37 |
+
</link>
|
| 38 |
+
</model>
|
| 39 |
+
</sdf>
|
simulation/models/simple_drone/model.config
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<model>
|
| 3 |
+
<name>simple_drone</name>
|
| 4 |
+
<version>1.0</version>
|
| 5 |
+
<sdf version="1.6">model.sdf</sdf>
|
| 6 |
+
<author>
|
| 7 |
+
<name>zbf</name>
|
| 8 |
+
</author>
|
| 9 |
+
<description>Simple plugin-controlled drone</description>
|
| 10 |
+
</model>
|
simulation/models/simple_drone/model.sdf
ADDED
|
@@ -0,0 +1,196 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<sdf version="1.6">
|
| 3 |
+
<model name="simple_drone">
|
| 4 |
+
<static>false</static>
|
| 5 |
+
<pose>0 0 1.2 0 0 0</pose>
|
| 6 |
+
|
| 7 |
+
<link name="base_link">
|
| 8 |
+
<gravity>false</gravity>
|
| 9 |
+
|
| 10 |
+
<visual name="body">
|
| 11 |
+
<geometry>
|
| 12 |
+
<box>
|
| 13 |
+
<size>0.35 0.25 0.12</size>
|
| 14 |
+
</box>
|
| 15 |
+
</geometry>
|
| 16 |
+
<material>
|
| 17 |
+
<ambient>0.1 0.1 0.12 1</ambient>
|
| 18 |
+
<diffuse>0.1 0.1 0.12 1</diffuse>
|
| 19 |
+
</material>
|
| 20 |
+
</visual>
|
| 21 |
+
|
| 22 |
+
<visual name="front_arm">
|
| 23 |
+
<pose>0.25 0 0 0 0 0</pose>
|
| 24 |
+
<geometry>
|
| 25 |
+
<box>
|
| 26 |
+
<size>0.5 0.04 0.04</size>
|
| 27 |
+
</box>
|
| 28 |
+
</geometry>
|
| 29 |
+
<material>
|
| 30 |
+
<ambient>0.05 0.05 0.05 1</ambient>
|
| 31 |
+
</material>
|
| 32 |
+
</visual>
|
| 33 |
+
|
| 34 |
+
<visual name="side_arm">
|
| 35 |
+
<pose>0 0.25 0 0 0 0</pose>
|
| 36 |
+
<geometry>
|
| 37 |
+
<box>
|
| 38 |
+
<size>0.04 0.5 0.04</size>
|
| 39 |
+
</box>
|
| 40 |
+
</geometry>
|
| 41 |
+
<material>
|
| 42 |
+
<ambient>0.05 0.05 0.05 1</ambient>
|
| 43 |
+
</material>
|
| 44 |
+
</visual>
|
| 45 |
+
|
| 46 |
+
<visual name="rotor_1">
|
| 47 |
+
<pose>0.28 0.28 0.03 0 0 0</pose>
|
| 48 |
+
<geometry>
|
| 49 |
+
<cylinder>
|
| 50 |
+
<radius>0.12</radius>
|
| 51 |
+
<length>0.02</length>
|
| 52 |
+
</cylinder>
|
| 53 |
+
</geometry>
|
| 54 |
+
<material>
|
| 55 |
+
<ambient>0.1 0.45 0.85 1</ambient>
|
| 56 |
+
</material>
|
| 57 |
+
</visual>
|
| 58 |
+
|
| 59 |
+
<visual name="rotor_2">
|
| 60 |
+
<pose>0.28 -0.28 0.03 0 0 0</pose>
|
| 61 |
+
<geometry>
|
| 62 |
+
<cylinder>
|
| 63 |
+
<radius>0.12</radius>
|
| 64 |
+
<length>0.02</length>
|
| 65 |
+
</cylinder>
|
| 66 |
+
</geometry>
|
| 67 |
+
<material>
|
| 68 |
+
<ambient>0.1 0.45 0.85 1</ambient>
|
| 69 |
+
</material>
|
| 70 |
+
</visual>
|
| 71 |
+
|
| 72 |
+
<visual name="rotor_3">
|
| 73 |
+
<pose>-0.28 0.28 0.03 0 0 0</pose>
|
| 74 |
+
<geometry>
|
| 75 |
+
<cylinder>
|
| 76 |
+
<radius>0.12</radius>
|
| 77 |
+
<length>0.02</length>
|
| 78 |
+
</cylinder>
|
| 79 |
+
</geometry>
|
| 80 |
+
<material>
|
| 81 |
+
<ambient>0.1 0.45 0.85 1</ambient>
|
| 82 |
+
</material>
|
| 83 |
+
</visual>
|
| 84 |
+
|
| 85 |
+
<visual name="rotor_4">
|
| 86 |
+
<pose>-0.28 -0.28 0.03 0 0 0</pose>
|
| 87 |
+
<geometry>
|
| 88 |
+
<cylinder>
|
| 89 |
+
<radius>0.12</radius>
|
| 90 |
+
<length>0.02</length>
|
| 91 |
+
</cylinder>
|
| 92 |
+
</geometry>
|
| 93 |
+
<material>
|
| 94 |
+
<ambient>0.1 0.45 0.85 1</ambient>
|
| 95 |
+
</material>
|
| 96 |
+
</visual>
|
| 97 |
+
|
| 98 |
+
<collision name="collision">
|
| 99 |
+
<geometry>
|
| 100 |
+
<box>
|
| 101 |
+
<size>0.4 0.4 0.15</size>
|
| 102 |
+
</box>
|
| 103 |
+
</geometry>
|
| 104 |
+
</collision>
|
| 105 |
+
|
| 106 |
+
<!-- ===== RGB cameras: front / down / left / right ===== -->
|
| 107 |
+
<!-- A Gazebo camera looks along its local +X axis. -->
|
| 108 |
+
|
| 109 |
+
<!-- Front: looks forward (+X) -->
|
| 110 |
+
<sensor name="cam_front" type="camera">
|
| 111 |
+
<pose>0.62 0 0 0 0 0</pose>
|
| 112 |
+
<always_on>1</always_on>
|
| 113 |
+
<update_rate>15</update_rate>
|
| 114 |
+
<visualize>true</visualize>
|
| 115 |
+
<camera>
|
| 116 |
+
<horizontal_fov>1.3</horizontal_fov>
|
| 117 |
+
<image>
|
| 118 |
+
<width>640</width>
|
| 119 |
+
<height>480</height>
|
| 120 |
+
<format>R8G8B8</format>
|
| 121 |
+
</image>
|
| 122 |
+
<clip>
|
| 123 |
+
<near>0.1</near>
|
| 124 |
+
<far>50</far>
|
| 125 |
+
</clip>
|
| 126 |
+
</camera>
|
| 127 |
+
</sensor>
|
| 128 |
+
|
| 129 |
+
<!-- Down: looks at the floor (-Z), via +90deg pitch -->
|
| 130 |
+
<sensor name="cam_down" type="camera">
|
| 131 |
+
<pose>0 0 -0.35 0 1.5708 0</pose>
|
| 132 |
+
<always_on>1</always_on>
|
| 133 |
+
<update_rate>15</update_rate>
|
| 134 |
+
<visualize>true</visualize>
|
| 135 |
+
<camera>
|
| 136 |
+
<horizontal_fov>1.3</horizontal_fov>
|
| 137 |
+
<image>
|
| 138 |
+
<width>640</width>
|
| 139 |
+
<height>480</height>
|
| 140 |
+
<format>R8G8B8</format>
|
| 141 |
+
</image>
|
| 142 |
+
<clip>
|
| 143 |
+
<near>0.1</near>
|
| 144 |
+
<far>50</far>
|
| 145 |
+
</clip>
|
| 146 |
+
</camera>
|
| 147 |
+
</sensor>
|
| 148 |
+
|
| 149 |
+
<!-- Left: looks to the left (+Y), via +90deg yaw -->
|
| 150 |
+
<sensor name="cam_left" type="camera">
|
| 151 |
+
<pose>0 0.62 0 0 0 1.5708</pose>
|
| 152 |
+
<always_on>1</always_on>
|
| 153 |
+
<update_rate>15</update_rate>
|
| 154 |
+
<visualize>true</visualize>
|
| 155 |
+
<camera>
|
| 156 |
+
<horizontal_fov>1.3</horizontal_fov>
|
| 157 |
+
<image>
|
| 158 |
+
<width>640</width>
|
| 159 |
+
<height>480</height>
|
| 160 |
+
<format>R8G8B8</format>
|
| 161 |
+
</image>
|
| 162 |
+
<clip>
|
| 163 |
+
<near>0.1</near>
|
| 164 |
+
<far>50</far>
|
| 165 |
+
</clip>
|
| 166 |
+
</camera>
|
| 167 |
+
</sensor>
|
| 168 |
+
|
| 169 |
+
<!-- Right: looks to the right (-Y), via -90deg yaw -->
|
| 170 |
+
<sensor name="cam_right" type="camera">
|
| 171 |
+
<pose>0 -0.62 0 0 0 -1.5708</pose>
|
| 172 |
+
<always_on>1</always_on>
|
| 173 |
+
<update_rate>15</update_rate>
|
| 174 |
+
<visualize>true</visualize>
|
| 175 |
+
<camera>
|
| 176 |
+
<horizontal_fov>1.3</horizontal_fov>
|
| 177 |
+
<image>
|
| 178 |
+
<width>640</width>
|
| 179 |
+
<height>480</height>
|
| 180 |
+
<format>R8G8B8</format>
|
| 181 |
+
</image>
|
| 182 |
+
<clip>
|
| 183 |
+
<near>0.1</near>
|
| 184 |
+
<far>50</far>
|
| 185 |
+
</clip>
|
| 186 |
+
</camera>
|
| 187 |
+
</sensor>
|
| 188 |
+
</link>
|
| 189 |
+
|
| 190 |
+
<plugin name="simple_drone_plugin" filename="libSimpleDronePlugin.so">
|
| 191 |
+
<speed>0.6</speed>
|
| 192 |
+
<image_dir>./drone_images</image_dir>
|
| 193 |
+
<capture_period>1.0</capture_period>
|
| 194 |
+
</plugin>
|
| 195 |
+
</model>
|
| 196 |
+
</sdf>
|
simulation/models/sun/model-1_2.sdf
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<gazebo version='1.2'>
|
| 2 |
+
<!-- Light Source -->
|
| 3 |
+
<light type="directional" name="sun">
|
| 4 |
+
<cast_shadows>true</cast_shadows>
|
| 5 |
+
|
| 6 |
+
<pose>0 0 10 0 0 0</pose>
|
| 7 |
+
<diffuse>0.8 0.8 0.8 1</diffuse>
|
| 8 |
+
<specular>0.1 0.1 0.1 1</specular>
|
| 9 |
+
|
| 10 |
+
<attenuation>
|
| 11 |
+
<range>1000</range>
|
| 12 |
+
<constant>0.9</constant>
|
| 13 |
+
<linear>0.01</linear>
|
| 14 |
+
<quadratic>0.001</quadratic>
|
| 15 |
+
</attenuation>
|
| 16 |
+
|
| 17 |
+
<direction>-0.5 0.5 -1.0</direction>
|
| 18 |
+
</light>
|
| 19 |
+
</gazebo>
|
simulation/models/sun/model-1_3.sdf
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<sdf version='1.3'>
|
| 2 |
+
<!-- Light Source -->
|
| 3 |
+
<light type="directional" name="sun">
|
| 4 |
+
<cast_shadows>true</cast_shadows>
|
| 5 |
+
|
| 6 |
+
<pose>0 0 10 0 0 0</pose>
|
| 7 |
+
<diffuse>0.8 0.8 0.8 1</diffuse>
|
| 8 |
+
<specular>0.1 0.1 0.1 1</specular>
|
| 9 |
+
|
| 10 |
+
<attenuation>
|
| 11 |
+
<range>1000</range>
|
| 12 |
+
<constant>0.9</constant>
|
| 13 |
+
<linear>0.01</linear>
|
| 14 |
+
<quadratic>0.001</quadratic>
|
| 15 |
+
</attenuation>
|
| 16 |
+
|
| 17 |
+
<direction>-0.5 0.5 -1.0</direction>
|
| 18 |
+
</light>
|
| 19 |
+
</sdf>
|
simulation/models/sun/model-1_4.sdf
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version='1.0'?>
|
| 2 |
+
<sdf version='1.4'>
|
| 3 |
+
<!-- Light Source -->
|
| 4 |
+
<light type="directional" name="sun">
|
| 5 |
+
<cast_shadows>true</cast_shadows>
|
| 6 |
+
|
| 7 |
+
<pose>0 0 10 0 0 0</pose>
|
| 8 |
+
<diffuse>0.8 0.8 0.8 1</diffuse>
|
| 9 |
+
<specular>0.2 0.2 0.2 1</specular>
|
| 10 |
+
|
| 11 |
+
<attenuation>
|
| 12 |
+
<range>1000</range>
|
| 13 |
+
<constant>0.9</constant>
|
| 14 |
+
<linear>0.01</linear>
|
| 15 |
+
<quadratic>0.001</quadratic>
|
| 16 |
+
</attenuation>
|
| 17 |
+
|
| 18 |
+
<direction>-0.5 0.1 -0.9</direction>
|
| 19 |
+
</light>
|
| 20 |
+
</sdf>
|
simulation/models/sun/model.config
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
|
| 3 |
+
<model>
|
| 4 |
+
<name>Sun</name>
|
| 5 |
+
<version>1.0</version>
|
| 6 |
+
<sdf version="1.2">model-1_2.sdf</sdf>
|
| 7 |
+
<sdf version="1.3">model-1_3.sdf</sdf>
|
| 8 |
+
<sdf version="1.4">model-1_4.sdf</sdf>
|
| 9 |
+
<sdf version="1.5">model.sdf</sdf>
|
| 10 |
+
|
| 11 |
+
<author>
|
| 12 |
+
<name>Nate Koenig</name>
|
| 13 |
+
<email>nate@osrfoundation.org</email>
|
| 14 |
+
</author>
|
| 15 |
+
|
| 16 |
+
<description>
|
| 17 |
+
A directional light for the sun.
|
| 18 |
+
</description>
|
| 19 |
+
</model>
|
simulation/models/sun/model.sdf
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0" ?>
|
| 2 |
+
<sdf version="1.5">
|
| 3 |
+
<!-- Light Source -->
|
| 4 |
+
<light type="directional" name="sun">
|
| 5 |
+
<cast_shadows>true</cast_shadows>
|
| 6 |
+
<pose>0 0 10 0 0 0</pose>
|
| 7 |
+
<diffuse>0.8 0.8 0.8 1</diffuse>
|
| 8 |
+
<specular>0.2 0.2 0.2 1</specular>
|
| 9 |
+
<attenuation>
|
| 10 |
+
<range>1000</range>
|
| 11 |
+
<constant>0.9</constant>
|
| 12 |
+
<linear>0.01</linear>
|
| 13 |
+
<quadratic>0.001</quadratic>
|
| 14 |
+
</attenuation>
|
| 15 |
+
<direction>-0.5 0.1 -0.9</direction>
|
| 16 |
+
</light>
|
| 17 |
+
</sdf>
|
simulation/plugins/CMakeLists.txt
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
cmake_minimum_required(VERSION 3.0)
|
| 2 |
+
project(plugins)
|
| 3 |
+
|
| 4 |
+
find_package(gazebo REQUIRED)
|
| 5 |
+
|
| 6 |
+
# Work around broken CMake exports pulled in transitively via Gazebo -> DART.
|
| 7 |
+
# DART was packaged with empty include prefixes, so several of its imported
|
| 8 |
+
# targets (Boost::system/filesystem/regex, ...) carry a bogus "/include" path
|
| 9 |
+
# in INTERFACE_INCLUDE_DIRECTORIES. CMake validates these while walking the
|
| 10 |
+
# link closure and aborts the generate step with:
|
| 11 |
+
# Imported target "dart" includes non-existent path "/include".
|
| 12 |
+
# Recurse through the whole GAZEBO_LIBRARIES link closure and drop any include
|
| 13 |
+
# directory that does not exist on disk.
|
| 14 |
+
function(_strip_bad_includes _target)
|
| 15 |
+
if(NOT TARGET ${_target})
|
| 16 |
+
return()
|
| 17 |
+
endif()
|
| 18 |
+
get_property(_seen GLOBAL PROPERTY "_sbi_seen_${_target}")
|
| 19 |
+
if(_seen)
|
| 20 |
+
return()
|
| 21 |
+
endif()
|
| 22 |
+
set_property(GLOBAL PROPERTY "_sbi_seen_${_target}" 1)
|
| 23 |
+
|
| 24 |
+
get_target_property(_inc ${_target} INTERFACE_INCLUDE_DIRECTORIES)
|
| 25 |
+
if(_inc)
|
| 26 |
+
set(_ok "")
|
| 27 |
+
foreach(_p IN LISTS _inc)
|
| 28 |
+
if(EXISTS "${_p}")
|
| 29 |
+
list(APPEND _ok "${_p}")
|
| 30 |
+
endif()
|
| 31 |
+
endforeach()
|
| 32 |
+
set_target_properties(${_target} PROPERTIES
|
| 33 |
+
INTERFACE_INCLUDE_DIRECTORIES "${_ok}")
|
| 34 |
+
endif()
|
| 35 |
+
|
| 36 |
+
get_target_property(_deps ${_target} INTERFACE_LINK_LIBRARIES)
|
| 37 |
+
if(_deps)
|
| 38 |
+
foreach(_d IN LISTS _deps)
|
| 39 |
+
if(TARGET ${_d})
|
| 40 |
+
_strip_bad_includes(${_d})
|
| 41 |
+
endif()
|
| 42 |
+
endforeach()
|
| 43 |
+
endif()
|
| 44 |
+
endfunction()
|
| 45 |
+
|
| 46 |
+
foreach(_root IN LISTS GAZEBO_LIBRARIES)
|
| 47 |
+
if(TARGET ${_root})
|
| 48 |
+
_strip_bad_includes(${_root})
|
| 49 |
+
endif()
|
| 50 |
+
endforeach()
|
| 51 |
+
|
| 52 |
+
# The same empty-prefix bug leaves a stray "/include" in GAZEBO_INCLUDE_DIRS;
|
| 53 |
+
# drop non-existent entries so the compiler isn't handed bogus -I flags.
|
| 54 |
+
set(_gz_inc_ok "")
|
| 55 |
+
foreach(_p IN LISTS GAZEBO_INCLUDE_DIRS)
|
| 56 |
+
if(EXISTS "${_p}")
|
| 57 |
+
list(APPEND _gz_inc_ok "${_p}")
|
| 58 |
+
endif()
|
| 59 |
+
endforeach()
|
| 60 |
+
set(GAZEBO_INCLUDE_DIRS "${_gz_inc_ok}")
|
| 61 |
+
|
| 62 |
+
# Gazebo headers require C++14, and bring in their own compile flags.
|
| 63 |
+
set(CMAKE_CXX_STANDARD 14)
|
| 64 |
+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
| 65 |
+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GAZEBO_CXX_FLAGS}")
|
| 66 |
+
|
| 67 |
+
include_directories(${GAZEBO_INCLUDE_DIRS})
|
| 68 |
+
link_directories(${GAZEBO_LIBRARY_DIRS})
|
| 69 |
+
|
| 70 |
+
add_library(SimpleDronePlugin SHARED SimpleDronePlugin.cc)
|
| 71 |
+
# GAZEBO_LIBRARIES already pulls in the sensors + rendering + transport libs
|
| 72 |
+
# needed for reading camera frames.
|
| 73 |
+
target_link_libraries(SimpleDronePlugin ${GAZEBO_LIBRARIES})
|
simulation/plugins/SimpleDronePlugin.cc
ADDED
|
@@ -0,0 +1,1846 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#include <gazebo/gazebo.hh>
|
| 2 |
+
#include <gazebo/physics/physics.hh>
|
| 3 |
+
#include <gazebo/common/common.hh>
|
| 4 |
+
#include <gazebo/common/Image.hh>
|
| 5 |
+
#include <gazebo/sensors/sensors.hh>
|
| 6 |
+
#include <gazebo/sensors/CameraSensor.hh>
|
| 7 |
+
#include <gazebo/rendering/Camera.hh>
|
| 8 |
+
#include <ignition/math/Vector3.hh>
|
| 9 |
+
#include <ignition/math/Pose3.hh>
|
| 10 |
+
|
| 11 |
+
#include <boost/filesystem.hpp>
|
| 12 |
+
|
| 13 |
+
#include <vector>
|
| 14 |
+
#include <string>
|
| 15 |
+
#include <cstdlib>
|
| 16 |
+
#include <cmath>
|
| 17 |
+
#include <fstream>
|
| 18 |
+
#include <functional>
|
| 19 |
+
#include <sstream>
|
| 20 |
+
#include <ctime>
|
| 21 |
+
#include <algorithm>
|
| 22 |
+
#include <iomanip>
|
| 23 |
+
#include <mutex>
|
| 24 |
+
#include <cctype>
|
| 25 |
+
|
| 26 |
+
namespace gazebo
|
| 27 |
+
{
|
| 28 |
+
class SimpleDronePlugin : public ModelPlugin
|
| 29 |
+
{
|
| 30 |
+
struct CachedFrame
|
| 31 |
+
{
|
| 32 |
+
std::vector<unsigned char> data;
|
| 33 |
+
unsigned int width = 0;
|
| 34 |
+
unsigned int height = 0;
|
| 35 |
+
unsigned int depth = 0;
|
| 36 |
+
std::string format;
|
| 37 |
+
common::Time time;
|
| 38 |
+
};
|
| 39 |
+
|
| 40 |
+
public:
|
| 41 |
+
void Load(physics::ModelPtr model, sdf::ElementPtr sdf) override
|
| 42 |
+
{
|
| 43 |
+
this->model = model;
|
| 44 |
+
this->world = model->GetWorld();
|
| 45 |
+
|
| 46 |
+
this->speed = 0.6;
|
| 47 |
+
if (sdf->HasElement("speed"))
|
| 48 |
+
this->speed = sdf->Get<double>("speed");
|
| 49 |
+
|
| 50 |
+
// Where to save the captured RGB frames. The run script sets this env var
|
| 51 |
+
// so the model can be reused without hardcoded project paths.
|
| 52 |
+
const char *envImageDir = std::getenv("SIMPLE_DRONE_IMAGE_DIR");
|
| 53 |
+
if (envImageDir && envImageDir[0] != '\0')
|
| 54 |
+
{
|
| 55 |
+
this->imageDir = envImageDir;
|
| 56 |
+
}
|
| 57 |
+
else if (sdf->HasElement("image_dir"))
|
| 58 |
+
{
|
| 59 |
+
this->imageDir = sdf->Get<std::string>("image_dir");
|
| 60 |
+
}
|
| 61 |
+
else
|
| 62 |
+
{
|
| 63 |
+
this->imageDir = "drone_images";
|
| 64 |
+
}
|
| 65 |
+
|
| 66 |
+
// (Legacy <capture_period> is ignored: frames are now captured once per
|
| 67 |
+
// waypoint, on arrival, rather than on a fixed time interval.)
|
| 68 |
+
this->capturePeriod = 1.0;
|
| 69 |
+
if (sdf->HasElement("capture_period"))
|
| 70 |
+
this->capturePeriod = sdf->Get<double>("capture_period");
|
| 71 |
+
|
| 72 |
+
this->datasetMode = false;
|
| 73 |
+
this->quitOnFinish = false;
|
| 74 |
+
this->rejectGrayImages = true;
|
| 75 |
+
this->grayDelta = this->EnvInt("SIMPLE_DRONE_GRAY_DELTA", 3);
|
| 76 |
+
this->grayMin = this->EnvInt("SIMPLE_DRONE_GRAY_MIN", 120);
|
| 77 |
+
this->grayMax = this->EnvInt("SIMPLE_DRONE_GRAY_MAX", 136);
|
| 78 |
+
this->grayMaxRatio = std::min(
|
| 79 |
+
0.99, std::max(0.0, this->EnvDouble("SIMPLE_DRONE_GRAY_MAX_RATIO", 0.12)));
|
| 80 |
+
this->grayTileRatio = std::min(
|
| 81 |
+
0.99, std::max(0.0, this->EnvDouble("SIMPLE_DRONE_GRAY_TILE_RATIO", 0.90)));
|
| 82 |
+
this->grayScanlineRatio = std::min(
|
| 83 |
+
0.99, std::max(0.0, this->EnvDouble("SIMPLE_DRONE_GRAY_SCANLINE_RATIO", 0.95)));
|
| 84 |
+
this->minLumaStd = this->EnvDouble("SIMPLE_DRONE_MIN_LUMA_STD", 4.0);
|
| 85 |
+
this->minRgbRange = this->EnvInt("SIMPLE_DRONE_MIN_RGB_RANGE", 12);
|
| 86 |
+
this->viewDownTilt = this->EnvDouble("SIMPLE_DRONE_VIEW_DOWN_TILT", 0.55);
|
| 87 |
+
this->minValidImageRatio =
|
| 88 |
+
this->EnvDouble("SIMPLE_DRONE_MIN_VALID_IMAGE_RATIO", 0.001);
|
| 89 |
+
const char *envRejectGrayImages = std::getenv("SIMPLE_DRONE_REJECT_GRAY_IMAGES");
|
| 90 |
+
if (envRejectGrayImages && std::string(envRejectGrayImages) == "0")
|
| 91 |
+
this->rejectGrayImages = false;
|
| 92 |
+
|
| 93 |
+
const char *envQuitOnFinish = std::getenv("SIMPLE_DRONE_QUIT_ON_FINISH");
|
| 94 |
+
if (envQuitOnFinish && envQuitOnFinish[0] != '\0' &&
|
| 95 |
+
std::string(envQuitOnFinish) != "0")
|
| 96 |
+
this->quitOnFinish = true;
|
| 97 |
+
const char *envDoneFile = std::getenv("SIMPLE_DRONE_DONE_FILE");
|
| 98 |
+
if (envDoneFile && envDoneFile[0] != '\0')
|
| 99 |
+
this->doneFile = envDoneFile;
|
| 100 |
+
|
| 101 |
+
const char *envDatasetRoot = std::getenv("SIMPLE_DRONE_DATASET_ROOT");
|
| 102 |
+
if (envDatasetRoot && envDatasetRoot[0] != '\0')
|
| 103 |
+
{
|
| 104 |
+
this->datasetRoot = envDatasetRoot;
|
| 105 |
+
this->datasetMode = true;
|
| 106 |
+
}
|
| 107 |
+
const char *envDatasetTrajectoryFile =
|
| 108 |
+
std::getenv("SIMPLE_DRONE_DATASET_TRAJECTORY_FILE");
|
| 109 |
+
if (envDatasetTrajectoryFile && envDatasetTrajectoryFile[0] != '\0')
|
| 110 |
+
this->datasetTrajectoryFile = envDatasetTrajectoryFile;
|
| 111 |
+
|
| 112 |
+
// The four viewpoints we want to read. The names must match the
|
| 113 |
+
// <sensor> names declared in the model SDF.
|
| 114 |
+
this->cameraNames = {"cam_front", "cam_down", "cam_left", "cam_right"};
|
| 115 |
+
// Output sub-folder for each viewpoint (decoupled from the sensor name,
|
| 116 |
+
// so e.g. cam_front is saved under <image_dir>/front/).
|
| 117 |
+
this->folderNames = this->datasetMode
|
| 118 |
+
? std::vector<std::string>{"images_front", "images_down", "images_left", "images_right"}
|
| 119 |
+
: std::vector<std::string>{"front", "down", "left", "right"};
|
| 120 |
+
this->cameras.resize(this->cameraNames.size());
|
| 121 |
+
this->imageConnections.resize(this->cameraNames.size());
|
| 122 |
+
this->latestFrames.resize(this->cameraNames.size());
|
| 123 |
+
|
| 124 |
+
if (this->datasetMode)
|
| 125 |
+
{
|
| 126 |
+
boost::filesystem::create_directories(this->imageDir);
|
| 127 |
+
gzmsg << "[SimpleDronePlugin] saving dataset RGB frames under: "
|
| 128 |
+
<< this->imageDir
|
| 129 |
+
<< "/<trajectory>/{images_front,images_down,images_left,images_right}/"
|
| 130 |
+
<< std::endl;
|
| 131 |
+
}
|
| 132 |
+
else
|
| 133 |
+
{
|
| 134 |
+
// Each viewpoint gets its own sub-folder, e.g. <image_dir>/front/.
|
| 135 |
+
for (const std::string &name : this->folderNames)
|
| 136 |
+
boost::filesystem::create_directories(this->imageDir + "/" + name);
|
| 137 |
+
gzmsg << "[SimpleDronePlugin] saving RGB frames under: "
|
| 138 |
+
<< this->imageDir << "/{" ;
|
| 139 |
+
for (size_t i = 0; i < this->folderNames.size(); ++i)
|
| 140 |
+
gzmsg << this->folderNames[i]
|
| 141 |
+
<< (i + 1 < this->folderNames.size() ? "," : "}/\n");
|
| 142 |
+
}
|
| 143 |
+
|
| 144 |
+
if (!this->datasetMode)
|
| 145 |
+
{
|
| 146 |
+
// Trajectory log: one row per saved frame set (one per waypoint). The
|
| 147 |
+
// `frame` column matches both the image filename and the waypoint index,
|
| 148 |
+
// e.g. frame 5 <-> front/000005.png <-> waypoints[5].
|
| 149 |
+
const std::string trajPath = this->imageDir + "/trajectory.csv";
|
| 150 |
+
this->trajFile.open(trajPath, std::ios::out | std::ios::trunc);
|
| 151 |
+
this->trajFile << "frame,sim_time,x,y,z,"
|
| 152 |
+
"roll_rad,pitch_rad,yaw_rad,roll_deg,pitch_deg,yaw_deg,"
|
| 153 |
+
"qw,qx,qy,qz\n";
|
| 154 |
+
gzmsg << "[SimpleDronePlugin] saving trajectory to: " << trajPath << std::endl;
|
| 155 |
+
}
|
| 156 |
+
|
| 157 |
+
if (this->rejectGrayImages)
|
| 158 |
+
{
|
| 159 |
+
gzmsg << "[SimpleDronePlugin] gray-frame rejection enabled: "
|
| 160 |
+
<< "gray_delta=" << this->grayDelta
|
| 161 |
+
<< ", gray_range=[" << this->grayMin << ',' << this->grayMax << ']'
|
| 162 |
+
<< ", max_gray_ratio=" << this->grayMaxRatio
|
| 163 |
+
<< ", max_gray_tile_ratio=" << this->grayTileRatio
|
| 164 |
+
<< ", max_gray_scanline_ratio=" << this->grayScanlineRatio
|
| 165 |
+
<< ", min_luma_std=" << this->minLumaStd
|
| 166 |
+
<< ", min_rgb_range=" << this->minRgbRange
|
| 167 |
+
<< std::endl;
|
| 168 |
+
}
|
| 169 |
+
|
| 170 |
+
this->camerasReady = false;
|
| 171 |
+
this->frameCounter = 0;
|
| 172 |
+
this->commandMode = false;
|
| 173 |
+
this->waitingForCommand = false;
|
| 174 |
+
this->commandYaw = 0.0;
|
| 175 |
+
|
| 176 |
+
const char *envCommandFile = std::getenv("SIMPLE_DRONE_COMMAND_FILE");
|
| 177 |
+
if (envCommandFile && envCommandFile[0] != '\0')
|
| 178 |
+
{
|
| 179 |
+
this->commandFile = envCommandFile;
|
| 180 |
+
this->commandMode = true;
|
| 181 |
+
}
|
| 182 |
+
else if (sdf->HasElement("command_file"))
|
| 183 |
+
{
|
| 184 |
+
this->commandFile = sdf->Get<std::string>("command_file");
|
| 185 |
+
this->commandMode = !this->commandFile.empty();
|
| 186 |
+
}
|
| 187 |
+
|
| 188 |
+
this->lastCommandMTime = 0;
|
| 189 |
+
if (this->commandMode)
|
| 190 |
+
{
|
| 191 |
+
if (boost::filesystem::exists(this->commandFile))
|
| 192 |
+
{
|
| 193 |
+
this->lastCommandMTime = boost::filesystem::last_write_time(this->commandFile);
|
| 194 |
+
std::ifstream existing(this->commandFile);
|
| 195 |
+
std::ostringstream buf;
|
| 196 |
+
buf << existing.rdbuf();
|
| 197 |
+
this->lastCommandText = buf.str();
|
| 198 |
+
}
|
| 199 |
+
gzmsg << "[SimpleDronePlugin] command mode enabled; waiting for: "
|
| 200 |
+
<< this->commandFile << std::endl;
|
| 201 |
+
}
|
| 202 |
+
|
| 203 |
+
// Capture happens once per waypoint. Begin in the "settling" state on
|
| 204 |
+
// waypoints[0] (the takeoff/start point): the drone is pinned to the exact
|
| 205 |
+
// waypoint and we wait for the cameras to render a fresh frame from that
|
| 206 |
+
// pose before saving, so the first image+row are the start point and every
|
| 207 |
+
// saved image corresponds to its logged coordinate (not one render earlier).
|
| 208 |
+
this->settling = true;
|
| 209 |
+
this->settleBaselineSet = false;
|
| 210 |
+
this->captureFailureWarned = false;
|
| 211 |
+
this->settleTimeoutWarned = false;
|
| 212 |
+
this->captureYaw = 0.0;
|
| 213 |
+
this->grayRejectWarnCounter = 0;
|
| 214 |
+
this->sweepInProgress = false;
|
| 215 |
+
this->sweepPoseSet = false;
|
| 216 |
+
this->sweepViewIndex = 0;
|
| 217 |
+
this->sweepYawAttempt = 0;
|
| 218 |
+
this->sweepTimeoutWarned = false;
|
| 219 |
+
this->physicalSequenceInProgress = false;
|
| 220 |
+
this->physicalViewIndex = 0;
|
| 221 |
+
this->physicalWarned = false;
|
| 222 |
+
this->physicalViewArmed = false;
|
| 223 |
+
this->physicalBaselineTime = common::Time::Zero;
|
| 224 |
+
this->physicalRejectCount = 0;
|
| 225 |
+
this->physicalFallbackToSweep = false;
|
| 226 |
+
|
| 227 |
+
this->returningToStart = false;
|
| 228 |
+
this->currentDatasetTrajectory = 0;
|
| 229 |
+
|
| 230 |
+
if (this->datasetMode)
|
| 231 |
+
{
|
| 232 |
+
this->trajectoryDir = this->datasetRoot + "/trajectory";
|
| 233 |
+
this->LoadDatasetTrajectories();
|
| 234 |
+
}
|
| 235 |
+
|
| 236 |
+
// Tour of the whole 15x10 apartment. Safe envelope: x in [-6.5,6.5],
|
| 237 |
+
// y in [-4,4], z in [1.2,1.8] (clear of walls, furniture and ceiling).
|
| 238 |
+
// Order: center -> dining -> living -> TV/kitchen front -> bedroom -> back.
|
| 239 |
+
if (this->datasetMode)
|
| 240 |
+
{
|
| 241 |
+
if (!this->BeginDatasetTrajectory(0))
|
| 242 |
+
{
|
| 243 |
+
gzerr << "[SimpleDronePlugin] no dataset trajectories loaded from "
|
| 244 |
+
<< this->trajectoryDir << std::endl;
|
| 245 |
+
}
|
| 246 |
+
}
|
| 247 |
+
else
|
| 248 |
+
{
|
| 249 |
+
this->waypoints.push_back(ignition::math::Vector3d(-7.0, 0.6, 1.8)); // takeoff: clear strip on left wall, yaw=0 (+x), overview of whole apartment
|
| 250 |
+
}
|
| 251 |
+
if (!this->commandMode && !this->datasetMode)
|
| 252 |
+
{
|
| 253 |
+
this->waypoints.push_back(ignition::math::Vector3d(-4.5, -3.0, 1.6)); // dining area
|
| 254 |
+
this->waypoints.push_back(ignition::math::Vector3d(-5.8, 0.0, 1.4)); // living-room corner
|
| 255 |
+
this->waypoints.push_back(ignition::math::Vector3d(-4.4, 3.3, 1.7)); // sofa / TV wall
|
| 256 |
+
this->waypoints.push_back(ignition::math::Vector3d( 0.0, 3.5, 1.5)); // sweep along front wall
|
| 257 |
+
this->waypoints.push_back(ignition::math::Vector3d( 4.0, 3.3, 1.4)); // kitchen
|
| 258 |
+
this->waypoints.push_back(ignition::math::Vector3d( 5.8, 0.0, 1.6)); // toward bedroom
|
| 259 |
+
this->waypoints.push_back(ignition::math::Vector3d( 4.8, -3.0, 1.7)); // bed / wardrobe
|
| 260 |
+
this->waypoints.push_back(ignition::math::Vector3d( 0.0, -3.5, 1.5)); // back wall windows
|
| 261 |
+
this->waypoints.push_back(ignition::math::Vector3d( 0.0, 0.0, 1.3)); // back to center
|
| 262 |
+
}
|
| 263 |
+
|
| 264 |
+
this->targetIndex = 0;
|
| 265 |
+
this->tourComplete = false;
|
| 266 |
+
this->lastTime = this->world->SimTime();
|
| 267 |
+
|
| 268 |
+
this->updateConnection = event::Events::ConnectWorldUpdateBegin(
|
| 269 |
+
std::bind(&SimpleDronePlugin::OnUpdate, this));
|
| 270 |
+
}
|
| 271 |
+
|
| 272 |
+
private:
|
| 273 |
+
// Look up the four camera sensors by name. Sensors are created after the
|
| 274 |
+
// model is loaded, so this is retried each update until all are found.
|
| 275 |
+
bool InitCameras()
|
| 276 |
+
{
|
| 277 |
+
sensors::SensorManager *mgr = sensors::SensorManager::Instance();
|
| 278 |
+
if (!mgr || !mgr->SensorsInitialized())
|
| 279 |
+
return false;
|
| 280 |
+
|
| 281 |
+
bool allFound = true;
|
| 282 |
+
for (size_t i = 0; i < this->cameraNames.size(); ++i)
|
| 283 |
+
{
|
| 284 |
+
if (this->cameras[i])
|
| 285 |
+
continue;
|
| 286 |
+
|
| 287 |
+
sensors::SensorPtr s = mgr->GetSensor(this->cameraNames[i]);
|
| 288 |
+
sensors::CameraSensorPtr cam =
|
| 289 |
+
std::dynamic_pointer_cast<sensors::CameraSensor>(s);
|
| 290 |
+
|
| 291 |
+
if (cam)
|
| 292 |
+
{
|
| 293 |
+
cam->SetActive(true);
|
| 294 |
+
// Make sure the rendering camera keeps a CPU-side copy of the frame
|
| 295 |
+
// so we can read the RGB bytes / save them.
|
| 296 |
+
if (cam->Camera())
|
| 297 |
+
{
|
| 298 |
+
cam->Camera()->SetCaptureData(true);
|
| 299 |
+
this->imageConnections[i] = cam->Camera()->ConnectNewImageFrame(
|
| 300 |
+
[this, i](const unsigned char *image,
|
| 301 |
+
unsigned int width,
|
| 302 |
+
unsigned int height,
|
| 303 |
+
unsigned int depth,
|
| 304 |
+
const std::string &format)
|
| 305 |
+
{
|
| 306 |
+
if (!image || width == 0 || height == 0 || depth == 0)
|
| 307 |
+
return;
|
| 308 |
+
CachedFrame frame;
|
| 309 |
+
frame.width = width;
|
| 310 |
+
frame.height = height;
|
| 311 |
+
frame.depth = depth;
|
| 312 |
+
frame.format = format;
|
| 313 |
+
frame.time = this->world ? this->world->SimTime() : common::Time::Zero;
|
| 314 |
+
const size_t bytes =
|
| 315 |
+
static_cast<size_t>(width) * static_cast<size_t>(height) * depth;
|
| 316 |
+
frame.data.assign(image, image + bytes);
|
| 317 |
+
|
| 318 |
+
std::lock_guard<std::mutex> lock(this->frameMutex);
|
| 319 |
+
if (i < this->latestFrames.size())
|
| 320 |
+
this->latestFrames[i] = std::move(frame);
|
| 321 |
+
});
|
| 322 |
+
}
|
| 323 |
+
cam->Update(true);
|
| 324 |
+
this->cameras[i] = cam;
|
| 325 |
+
}
|
| 326 |
+
else
|
| 327 |
+
{
|
| 328 |
+
allFound = false;
|
| 329 |
+
}
|
| 330 |
+
}
|
| 331 |
+
return allFound;
|
| 332 |
+
}
|
| 333 |
+
|
| 334 |
+
ignition::math::Vector3d RotateYaw(
|
| 335 |
+
const ignition::math::Vector3d &v,
|
| 336 |
+
const double yaw) const
|
| 337 |
+
{
|
| 338 |
+
const double c = std::cos(yaw);
|
| 339 |
+
const double s = std::sin(yaw);
|
| 340 |
+
return ignition::math::Vector3d(
|
| 341 |
+
c * v.X() - s * v.Y(),
|
| 342 |
+
s * v.X() + c * v.Y(),
|
| 343 |
+
v.Z());
|
| 344 |
+
}
|
| 345 |
+
|
| 346 |
+
ignition::math::Pose3d ViewPose(
|
| 347 |
+
const ignition::math::Pose3d &base,
|
| 348 |
+
const size_t viewIndex) const
|
| 349 |
+
{
|
| 350 |
+
const ignition::math::Vector3d &p = base.Pos();
|
| 351 |
+
const double yaw = base.Rot().Yaw();
|
| 352 |
+
ignition::math::Vector3d offset;
|
| 353 |
+
double roll = this->viewDownTilt;
|
| 354 |
+
double pitch = 0.0;
|
| 355 |
+
double viewYaw = yaw;
|
| 356 |
+
|
| 357 |
+
if (viewIndex == 0) // front
|
| 358 |
+
{
|
| 359 |
+
offset = this->RotateYaw(ignition::math::Vector3d(0.62, 0.0, 0.0), yaw);
|
| 360 |
+
viewYaw = yaw;
|
| 361 |
+
}
|
| 362 |
+
else if (viewIndex == 1) // down
|
| 363 |
+
{
|
| 364 |
+
offset = ignition::math::Vector3d(0.0, 0.0, -0.35);
|
| 365 |
+
pitch = ignition::math::Angle::HalfPi.Radian();
|
| 366 |
+
viewYaw = yaw;
|
| 367 |
+
}
|
| 368 |
+
else if (viewIndex == 2) // left
|
| 369 |
+
{
|
| 370 |
+
offset = this->RotateYaw(ignition::math::Vector3d(0.0, 0.62, 0.0), yaw);
|
| 371 |
+
viewYaw = yaw + ignition::math::Angle::HalfPi.Radian();
|
| 372 |
+
}
|
| 373 |
+
else // right
|
| 374 |
+
{
|
| 375 |
+
offset = this->RotateYaw(ignition::math::Vector3d(0.0, -0.62, 0.0), yaw);
|
| 376 |
+
viewYaw = yaw - ignition::math::Angle::HalfPi.Radian();
|
| 377 |
+
}
|
| 378 |
+
|
| 379 |
+
return ignition::math::Pose3d(
|
| 380 |
+
p.X() + offset.X(),
|
| 381 |
+
p.Y() + offset.Y(),
|
| 382 |
+
p.Z() + offset.Z(),
|
| 383 |
+
roll,
|
| 384 |
+
pitch,
|
| 385 |
+
viewYaw);
|
| 386 |
+
}
|
| 387 |
+
|
| 388 |
+
ignition::math::Pose3d SweepModelPose(
|
| 389 |
+
const ignition::math::Pose3d &base,
|
| 390 |
+
const size_t viewIndex,
|
| 391 |
+
const double yawOffset = 0.0) const
|
| 392 |
+
{
|
| 393 |
+
const ignition::math::Vector3d &p = base.Pos();
|
| 394 |
+
const double yaw = base.Rot().Yaw();
|
| 395 |
+
double roll = 0.0;
|
| 396 |
+
double pitch = 0.0;
|
| 397 |
+
double viewYaw = yaw;
|
| 398 |
+
|
| 399 |
+
// cam_right looks along the model's right side. Rotate the model in place
|
| 400 |
+
// so that one known-good physical camera provides all required views.
|
| 401 |
+
if (viewIndex == 0) // front
|
| 402 |
+
viewYaw = yaw + ignition::math::Angle::HalfPi.Radian();
|
| 403 |
+
else if (viewIndex == 1) // down
|
| 404 |
+
roll = ignition::math::Angle::HalfPi.Radian();
|
| 405 |
+
else if (viewIndex == 2) // left
|
| 406 |
+
viewYaw = yaw + M_PI;
|
| 407 |
+
else // right
|
| 408 |
+
viewYaw = yaw;
|
| 409 |
+
viewYaw += yawOffset;
|
| 410 |
+
|
| 411 |
+
return ignition::math::Pose3d(
|
| 412 |
+
p.X(), p.Y(), p.Z(),
|
| 413 |
+
roll, pitch, viewYaw);
|
| 414 |
+
}
|
| 415 |
+
|
| 416 |
+
bool RenderViewFrames(
|
| 417 |
+
const ignition::math::Pose3d &basePose,
|
| 418 |
+
std::vector<CachedFrame> &frames)
|
| 419 |
+
{
|
| 420 |
+
if (this->cameras.empty())
|
| 421 |
+
return false;
|
| 422 |
+
|
| 423 |
+
// Use cam_right as the capture source. On the target machine this is the
|
| 424 |
+
// only physical camera that consistently produces scene pixels; rotating
|
| 425 |
+
// the model in place is stable, while moving the Ogre camera directly can
|
| 426 |
+
// segfault in gzserver.
|
| 427 |
+
const size_t sourceIndex = std::min<size_t>(3u, this->cameras.size() - 1u);
|
| 428 |
+
sensors::CameraSensorPtr sensor = this->cameras[sourceIndex];
|
| 429 |
+
if (!sensor || !sensor->Camera())
|
| 430 |
+
return false;
|
| 431 |
+
|
| 432 |
+
rendering::CameraPtr renderCam = sensor->Camera();
|
| 433 |
+
renderCam->SetCaptureData(true);
|
| 434 |
+
sensor->SetActive(true);
|
| 435 |
+
frames.assign(this->cameraNames.size(), CachedFrame());
|
| 436 |
+
|
| 437 |
+
for (size_t i = 0; i < this->cameraNames.size(); ++i)
|
| 438 |
+
{
|
| 439 |
+
const ignition::math::Pose3d pose = this->SweepModelPose(basePose, i);
|
| 440 |
+
this->model->SetWorldPose(pose);
|
| 441 |
+
this->model->SetLinearVel(ignition::math::Vector3d::Zero);
|
| 442 |
+
sensor->Update(true);
|
| 443 |
+
|
| 444 |
+
const unsigned char *data = renderCam->ImageData();
|
| 445 |
+
const unsigned int width = renderCam->ImageWidth();
|
| 446 |
+
const unsigned int height = renderCam->ImageHeight();
|
| 447 |
+
const unsigned int depth = renderCam->ImageDepth();
|
| 448 |
+
if (!data || width == 0 || height == 0 || depth < 3)
|
| 449 |
+
{
|
| 450 |
+
if (!this->captureFailureWarned)
|
| 451 |
+
{
|
| 452 |
+
gzerr << "[SimpleDronePlugin] movable render camera not ready for "
|
| 453 |
+
<< this->cameraNames[i]
|
| 454 |
+
<< "; width=" << width
|
| 455 |
+
<< ", height=" << height
|
| 456 |
+
<< ", depth=" << depth << std::endl;
|
| 457 |
+
this->captureFailureWarned = true;
|
| 458 |
+
}
|
| 459 |
+
return false;
|
| 460 |
+
}
|
| 461 |
+
|
| 462 |
+
CachedFrame frame;
|
| 463 |
+
frame.width = width;
|
| 464 |
+
frame.height = height;
|
| 465 |
+
frame.depth = depth;
|
| 466 |
+
frame.format = renderCam->ImageFormat();
|
| 467 |
+
frame.time = this->world ? this->world->SimTime() : common::Time::Zero;
|
| 468 |
+
const size_t bytes =
|
| 469 |
+
static_cast<size_t>(width) * static_cast<size_t>(height) * depth;
|
| 470 |
+
frame.data.assign(data, data + bytes);
|
| 471 |
+
frames[i] = std::move(frame);
|
| 472 |
+
}
|
| 473 |
+
|
| 474 |
+
this->model->SetWorldPose(basePose);
|
| 475 |
+
this->model->SetLinearVel(ignition::math::Vector3d::Zero);
|
| 476 |
+
|
| 477 |
+
return true;
|
| 478 |
+
}
|
| 479 |
+
|
| 480 |
+
void ResetSingleCameraSweep()
|
| 481 |
+
{
|
| 482 |
+
if (this->sweepInProgress)
|
| 483 |
+
{
|
| 484 |
+
this->model->SetWorldPose(this->sweepBasePose);
|
| 485 |
+
this->model->SetLinearVel(ignition::math::Vector3d::Zero);
|
| 486 |
+
}
|
| 487 |
+
this->sweepInProgress = false;
|
| 488 |
+
this->sweepPoseSet = false;
|
| 489 |
+
this->sweepViewIndex = 0;
|
| 490 |
+
this->sweepYawAttempt = 0;
|
| 491 |
+
this->sweepFrames.clear();
|
| 492 |
+
this->sweepTimeoutWarned = false;
|
| 493 |
+
}
|
| 494 |
+
|
| 495 |
+
bool CropGrayBackground(CachedFrame &frame) const
|
| 496 |
+
{
|
| 497 |
+
if (frame.data.empty() || frame.width == 0 || frame.height == 0 ||
|
| 498 |
+
frame.depth != 3)
|
| 499 |
+
return false;
|
| 500 |
+
|
| 501 |
+
unsigned int minX = frame.width;
|
| 502 |
+
unsigned int minY = frame.height;
|
| 503 |
+
unsigned int maxX = 0;
|
| 504 |
+
unsigned int maxY = 0;
|
| 505 |
+
size_t validPixels = 0;
|
| 506 |
+
|
| 507 |
+
for (unsigned int y = 0; y < frame.height; ++y)
|
| 508 |
+
{
|
| 509 |
+
for (unsigned int x = 0; x < frame.width; ++x)
|
| 510 |
+
{
|
| 511 |
+
const size_t offset =
|
| 512 |
+
(static_cast<size_t>(y) * frame.width + x) * frame.depth;
|
| 513 |
+
const bool isGazeboGray =
|
| 514 |
+
frame.data[offset] == 128 &&
|
| 515 |
+
frame.data[offset + 1] == 128 &&
|
| 516 |
+
frame.data[offset + 2] == 128;
|
| 517 |
+
if (!isGazeboGray)
|
| 518 |
+
{
|
| 519 |
+
minX = std::min(minX, x);
|
| 520 |
+
minY = std::min(minY, y);
|
| 521 |
+
maxX = std::max(maxX, x);
|
| 522 |
+
maxY = std::max(maxY, y);
|
| 523 |
+
++validPixels;
|
| 524 |
+
}
|
| 525 |
+
}
|
| 526 |
+
}
|
| 527 |
+
|
| 528 |
+
const size_t totalPixels =
|
| 529 |
+
static_cast<size_t>(frame.width) * static_cast<size_t>(frame.height);
|
| 530 |
+
const double validRatio =
|
| 531 |
+
static_cast<double>(validPixels) / std::max<size_t>(totalPixels, 1u);
|
| 532 |
+
if (validRatio < this->minValidImageRatio || minX > maxX || minY > maxY)
|
| 533 |
+
return false;
|
| 534 |
+
|
| 535 |
+
const unsigned int margin = 4;
|
| 536 |
+
minX = minX > margin ? minX - margin : 0;
|
| 537 |
+
minY = minY > margin ? minY - margin : 0;
|
| 538 |
+
maxX = std::min(frame.width - 1, maxX + margin);
|
| 539 |
+
maxY = std::min(frame.height - 1, maxY + margin);
|
| 540 |
+
|
| 541 |
+
const unsigned int cropW = maxX - minX + 1;
|
| 542 |
+
const unsigned int cropH = maxY - minY + 1;
|
| 543 |
+
if (cropW < 4 || cropH < 4)
|
| 544 |
+
return false;
|
| 545 |
+
|
| 546 |
+
std::vector<unsigned char> resized(
|
| 547 |
+
static_cast<size_t>(frame.width) * frame.height * 3u);
|
| 548 |
+
for (unsigned int y = 0; y < frame.height; ++y)
|
| 549 |
+
{
|
| 550 |
+
const unsigned int srcY =
|
| 551 |
+
minY + std::min(cropH - 1,
|
| 552 |
+
static_cast<unsigned int>(
|
| 553 |
+
(static_cast<unsigned long long>(y) * cropH) /
|
| 554 |
+
frame.height));
|
| 555 |
+
for (unsigned int x = 0; x < frame.width; ++x)
|
| 556 |
+
{
|
| 557 |
+
const unsigned int srcX =
|
| 558 |
+
minX + std::min(cropW - 1,
|
| 559 |
+
static_cast<unsigned int>(
|
| 560 |
+
(static_cast<unsigned long long>(x) * cropW) /
|
| 561 |
+
frame.width));
|
| 562 |
+
const size_t src =
|
| 563 |
+
(static_cast<size_t>(srcY) * frame.width + srcX) * 3u;
|
| 564 |
+
const size_t dst =
|
| 565 |
+
(static_cast<size_t>(y) * frame.width + x) * 3u;
|
| 566 |
+
resized[dst] = frame.data[src];
|
| 567 |
+
resized[dst + 1] = frame.data[src + 1];
|
| 568 |
+
resized[dst + 2] = frame.data[src + 2];
|
| 569 |
+
}
|
| 570 |
+
}
|
| 571 |
+
|
| 572 |
+
unsigned long long sumR = 0;
|
| 573 |
+
unsigned long long sumG = 0;
|
| 574 |
+
unsigned long long sumB = 0;
|
| 575 |
+
size_t fillSourcePixels = 0;
|
| 576 |
+
for (size_t i = 0; i + 2 < resized.size(); i += 3)
|
| 577 |
+
{
|
| 578 |
+
const bool isGazeboGray =
|
| 579 |
+
resized[i] == 128 && resized[i + 1] == 128 && resized[i + 2] == 128;
|
| 580 |
+
if (!isGazeboGray)
|
| 581 |
+
{
|
| 582 |
+
sumR += resized[i];
|
| 583 |
+
sumG += resized[i + 1];
|
| 584 |
+
sumB += resized[i + 2];
|
| 585 |
+
++fillSourcePixels;
|
| 586 |
+
}
|
| 587 |
+
}
|
| 588 |
+
if (fillSourcePixels == 0)
|
| 589 |
+
return false;
|
| 590 |
+
const unsigned char fillR =
|
| 591 |
+
static_cast<unsigned char>(sumR / fillSourcePixels);
|
| 592 |
+
const unsigned char fillG =
|
| 593 |
+
static_cast<unsigned char>(sumG / fillSourcePixels);
|
| 594 |
+
const unsigned char fillB =
|
| 595 |
+
static_cast<unsigned char>(sumB / fillSourcePixels);
|
| 596 |
+
for (size_t i = 0; i + 2 < resized.size(); i += 3)
|
| 597 |
+
{
|
| 598 |
+
const bool isGazeboGray =
|
| 599 |
+
resized[i] == 128 && resized[i + 1] == 128 && resized[i + 2] == 128;
|
| 600 |
+
if (isGazeboGray)
|
| 601 |
+
{
|
| 602 |
+
resized[i] = fillR;
|
| 603 |
+
resized[i + 1] = fillG;
|
| 604 |
+
resized[i + 2] = fillB;
|
| 605 |
+
}
|
| 606 |
+
}
|
| 607 |
+
|
| 608 |
+
frame.data.swap(resized);
|
| 609 |
+
return true;
|
| 610 |
+
}
|
| 611 |
+
|
| 612 |
+
bool NormalizeFrameToRgb(
|
| 613 |
+
const CachedFrame &src,
|
| 614 |
+
CachedFrame &dst) const
|
| 615 |
+
{
|
| 616 |
+
if (src.data.empty() || src.width == 0 || src.height == 0 || src.depth < 3)
|
| 617 |
+
return false;
|
| 618 |
+
|
| 619 |
+
std::string format = src.format;
|
| 620 |
+
std::transform(format.begin(), format.end(), format.begin(),
|
| 621 |
+
[](unsigned char c) { return static_cast<char>(std::tolower(c)); });
|
| 622 |
+
const bool bgr =
|
| 623 |
+
format.find("b8g8r8") != std::string::npos ||
|
| 624 |
+
format.find("bgr") != std::string::npos;
|
| 625 |
+
|
| 626 |
+
const size_t pixelCount =
|
| 627 |
+
static_cast<size_t>(src.width) * static_cast<size_t>(src.height);
|
| 628 |
+
dst.data.resize(pixelCount * 3u);
|
| 629 |
+
dst.width = src.width;
|
| 630 |
+
dst.height = src.height;
|
| 631 |
+
dst.depth = 3;
|
| 632 |
+
dst.format = "R8G8B8";
|
| 633 |
+
dst.time = src.time;
|
| 634 |
+
|
| 635 |
+
for (size_t i = 0; i < pixelCount; ++i)
|
| 636 |
+
{
|
| 637 |
+
const size_t in = i * src.depth;
|
| 638 |
+
const size_t out = i * 3u;
|
| 639 |
+
if (bgr)
|
| 640 |
+
{
|
| 641 |
+
dst.data[out] = src.data[in + 2];
|
| 642 |
+
dst.data[out + 1] = src.data[in + 1];
|
| 643 |
+
dst.data[out + 2] = src.data[in];
|
| 644 |
+
}
|
| 645 |
+
else
|
| 646 |
+
{
|
| 647 |
+
dst.data[out] = src.data[in];
|
| 648 |
+
dst.data[out + 1] = src.data[in + 1];
|
| 649 |
+
dst.data[out + 2] = src.data[in + 2];
|
| 650 |
+
}
|
| 651 |
+
}
|
| 652 |
+
|
| 653 |
+
return true;
|
| 654 |
+
}
|
| 655 |
+
|
| 656 |
+
bool AdvanceSingleCameraSweep(std::vector<CachedFrame> &frames)
|
| 657 |
+
{
|
| 658 |
+
if (this->cameras.empty())
|
| 659 |
+
return false;
|
| 660 |
+
|
| 661 |
+
const size_t sourceIndex = std::min<size_t>(3u, this->cameras.size() - 1u);
|
| 662 |
+
sensors::CameraSensorPtr sensor = this->cameras[sourceIndex];
|
| 663 |
+
if (!sensor || !sensor->Camera())
|
| 664 |
+
return false;
|
| 665 |
+
|
| 666 |
+
if (!this->sweepInProgress)
|
| 667 |
+
{
|
| 668 |
+
this->sweepBasePose = this->model->WorldPose();
|
| 669 |
+
this->sweepFrames.assign(this->cameraNames.size(), CachedFrame());
|
| 670 |
+
this->sweepViewIndex = 0;
|
| 671 |
+
this->sweepPoseSet = false;
|
| 672 |
+
this->sweepInProgress = true;
|
| 673 |
+
this->sweepStartTime = this->world ? this->world->SimTime() : common::Time::Zero;
|
| 674 |
+
this->sweepTimeoutWarned = false;
|
| 675 |
+
}
|
| 676 |
+
|
| 677 |
+
if (this->sweepViewIndex >= this->cameraNames.size())
|
| 678 |
+
{
|
| 679 |
+
frames = this->sweepFrames;
|
| 680 |
+
this->ResetSingleCameraSweep();
|
| 681 |
+
return true;
|
| 682 |
+
}
|
| 683 |
+
|
| 684 |
+
sensor->SetActive(true);
|
| 685 |
+
sensor->Camera()->SetCaptureData(true);
|
| 686 |
+
|
| 687 |
+
const double yawOffset =
|
| 688 |
+
static_cast<double>(this->sweepYawAttempt) *
|
| 689 |
+
ignition::math::Angle::HalfPi.Radian() * 0.5;
|
| 690 |
+
const ignition::math::Pose3d pose =
|
| 691 |
+
this->SweepModelPose(this->sweepBasePose, this->sweepViewIndex, yawOffset);
|
| 692 |
+
this->model->SetWorldPose(pose);
|
| 693 |
+
this->model->SetLinearVel(ignition::math::Vector3d::Zero);
|
| 694 |
+
|
| 695 |
+
if (!this->sweepPoseSet)
|
| 696 |
+
{
|
| 697 |
+
{
|
| 698 |
+
std::lock_guard<std::mutex> lock(this->frameMutex);
|
| 699 |
+
this->sweepBaselineFrameTime =
|
| 700 |
+
sourceIndex < this->latestFrames.size()
|
| 701 |
+
? this->latestFrames[sourceIndex].time
|
| 702 |
+
: common::Time::Zero;
|
| 703 |
+
}
|
| 704 |
+
sensor->Update(true);
|
| 705 |
+
this->sweepPoseSet = true;
|
| 706 |
+
return false;
|
| 707 |
+
}
|
| 708 |
+
|
| 709 |
+
sensor->Update(true);
|
| 710 |
+
|
| 711 |
+
CachedFrame sourceFrame;
|
| 712 |
+
{
|
| 713 |
+
std::lock_guard<std::mutex> lock(this->frameMutex);
|
| 714 |
+
if (sourceIndex < this->latestFrames.size())
|
| 715 |
+
sourceFrame = this->latestFrames[sourceIndex];
|
| 716 |
+
}
|
| 717 |
+
|
| 718 |
+
if (sourceFrame.data.empty() ||
|
| 719 |
+
sourceFrame.time <= this->sweepBaselineFrameTime)
|
| 720 |
+
{
|
| 721 |
+
const common::Time now = this->world ? this->world->SimTime() : common::Time::Zero;
|
| 722 |
+
const double wait = (now - this->sweepStartTime).Double();
|
| 723 |
+
if (wait > this->settleTimeout && !this->sweepTimeoutWarned)
|
| 724 |
+
{
|
| 725 |
+
gzerr << "[SimpleDronePlugin] camera sweep timeout at target index "
|
| 726 |
+
<< this->targetIndex << "; view=" << this->cameraNames[this->sweepViewIndex]
|
| 727 |
+
<< ". Waiting for a fresh frame." << std::endl;
|
| 728 |
+
this->sweepTimeoutWarned = true;
|
| 729 |
+
}
|
| 730 |
+
return false;
|
| 731 |
+
}
|
| 732 |
+
|
| 733 |
+
CachedFrame rgbFrame;
|
| 734 |
+
if (!this->NormalizeFrameToRgb(sourceFrame, rgbFrame))
|
| 735 |
+
return false;
|
| 736 |
+
if (!this->CropGrayBackground(rgbFrame))
|
| 737 |
+
{
|
| 738 |
+
++this->sweepYawAttempt;
|
| 739 |
+
this->sweepPoseSet = false;
|
| 740 |
+
if (this->sweepYawAttempt <= 8)
|
| 741 |
+
return false;
|
| 742 |
+
|
| 743 |
+
gzerr << "[SimpleDronePlugin] unable to find non-gray content at target index "
|
| 744 |
+
<< this->targetIndex << "; view="
|
| 745 |
+
<< this->cameraNames[this->sweepViewIndex] << std::endl;
|
| 746 |
+
this->sweepYawAttempt = 0;
|
| 747 |
+
return false;
|
| 748 |
+
}
|
| 749 |
+
|
| 750 |
+
this->sweepFrames[this->sweepViewIndex] = std::move(rgbFrame);
|
| 751 |
+
++this->sweepViewIndex;
|
| 752 |
+
this->sweepYawAttempt = 0;
|
| 753 |
+
this->sweepPoseSet = false;
|
| 754 |
+
|
| 755 |
+
if (this->sweepViewIndex < this->cameraNames.size())
|
| 756 |
+
return false;
|
| 757 |
+
|
| 758 |
+
frames = this->sweepFrames;
|
| 759 |
+
this->ResetSingleCameraSweep();
|
| 760 |
+
return true;
|
| 761 |
+
}
|
| 762 |
+
|
| 763 |
+
bool ReadPhysicalCameraFrames(std::vector<CachedFrame> &frames)
|
| 764 |
+
{
|
| 765 |
+
std::lock_guard<std::mutex> lock(this->frameMutex);
|
| 766 |
+
frames = this->latestFrames;
|
| 767 |
+
return frames.size() == this->cameraNames.size();
|
| 768 |
+
}
|
| 769 |
+
|
| 770 |
+
void ResetPhysicalCameraSequence()
|
| 771 |
+
{
|
| 772 |
+
this->physicalSequenceInProgress = false;
|
| 773 |
+
this->physicalViewIndex = 0;
|
| 774 |
+
this->physicalWarned = false;
|
| 775 |
+
this->physicalViewArmed = false;
|
| 776 |
+
this->physicalBaselineTime = common::Time::Zero;
|
| 777 |
+
this->physicalFrames.clear();
|
| 778 |
+
}
|
| 779 |
+
|
| 780 |
+
bool AdvancePhysicalCameraSequence(std::vector<CachedFrame> &frames)
|
| 781 |
+
{
|
| 782 |
+
if (!this->physicalSequenceInProgress)
|
| 783 |
+
{
|
| 784 |
+
this->physicalSequenceInProgress = true;
|
| 785 |
+
this->physicalViewIndex = 0;
|
| 786 |
+
this->physicalWarned = false;
|
| 787 |
+
this->physicalViewArmed = false;
|
| 788 |
+
this->physicalBaselineTime = common::Time::Zero;
|
| 789 |
+
this->physicalFrames.assign(this->cameraNames.size(), CachedFrame());
|
| 790 |
+
}
|
| 791 |
+
|
| 792 |
+
if (this->physicalViewIndex >= this->cameraNames.size())
|
| 793 |
+
{
|
| 794 |
+
frames = this->physicalFrames;
|
| 795 |
+
this->ResetPhysicalCameraSequence();
|
| 796 |
+
return true;
|
| 797 |
+
}
|
| 798 |
+
|
| 799 |
+
for (size_t i = 0; i < this->cameras.size(); ++i)
|
| 800 |
+
{
|
| 801 |
+
if (!this->cameras[i])
|
| 802 |
+
continue;
|
| 803 |
+
this->cameras[i]->SetActive(i == this->physicalViewIndex);
|
| 804 |
+
if (this->cameras[i]->Camera())
|
| 805 |
+
this->cameras[i]->Camera()->SetCaptureData(i == this->physicalViewIndex);
|
| 806 |
+
if (i == this->physicalViewIndex)
|
| 807 |
+
this->cameras[i]->Update(true);
|
| 808 |
+
}
|
| 809 |
+
|
| 810 |
+
if (!this->physicalViewArmed)
|
| 811 |
+
{
|
| 812 |
+
std::lock_guard<std::mutex> lock(this->frameMutex);
|
| 813 |
+
if (this->physicalViewIndex < this->latestFrames.size())
|
| 814 |
+
this->physicalBaselineTime = this->latestFrames[this->physicalViewIndex].time;
|
| 815 |
+
else
|
| 816 |
+
this->physicalBaselineTime = common::Time::Zero;
|
| 817 |
+
this->physicalViewArmed = true;
|
| 818 |
+
return false;
|
| 819 |
+
}
|
| 820 |
+
|
| 821 |
+
CachedFrame candidate;
|
| 822 |
+
{
|
| 823 |
+
std::lock_guard<std::mutex> lock(this->frameMutex);
|
| 824 |
+
if (this->physicalViewIndex >= this->latestFrames.size())
|
| 825 |
+
return false;
|
| 826 |
+
candidate = this->latestFrames[this->physicalViewIndex];
|
| 827 |
+
}
|
| 828 |
+
|
| 829 |
+
if (candidate.time <= this->physicalBaselineTime)
|
| 830 |
+
return false;
|
| 831 |
+
|
| 832 |
+
if (candidate.data.empty() || candidate.width == 0 ||
|
| 833 |
+
candidate.height == 0 || candidate.depth < 3)
|
| 834 |
+
return false;
|
| 835 |
+
|
| 836 |
+
std::string reason;
|
| 837 |
+
if (!this->FrameLooksUsable(
|
| 838 |
+
candidate.data.data(),
|
| 839 |
+
candidate.width,
|
| 840 |
+
candidate.height,
|
| 841 |
+
candidate.depth,
|
| 842 |
+
reason))
|
| 843 |
+
{
|
| 844 |
+
if (!this->physicalWarned)
|
| 845 |
+
{
|
| 846 |
+
gzerr << "[SimpleDronePlugin] waiting for usable physical camera frame at target index "
|
| 847 |
+
<< this->targetIndex << "; camera="
|
| 848 |
+
<< this->cameraNames[this->physicalViewIndex]
|
| 849 |
+
<< "; " << reason << std::endl;
|
| 850 |
+
this->physicalWarned = true;
|
| 851 |
+
}
|
| 852 |
+
this->physicalBaselineTime = candidate.time;
|
| 853 |
+
++this->physicalRejectCount;
|
| 854 |
+
if (this->physicalRejectCount >= 60)
|
| 855 |
+
{
|
| 856 |
+
gzerr << "[SimpleDronePlugin] physical cameras stayed unusable at target index "
|
| 857 |
+
<< this->targetIndex
|
| 858 |
+
<< "; switching the remainder of this trajectory to single-camera sweep."
|
| 859 |
+
<< std::endl;
|
| 860 |
+
this->physicalFallbackToSweep = true;
|
| 861 |
+
this->ResetPhysicalCameraSequence();
|
| 862 |
+
}
|
| 863 |
+
return false;
|
| 864 |
+
}
|
| 865 |
+
|
| 866 |
+
this->physicalFrames[this->physicalViewIndex] = std::move(candidate);
|
| 867 |
+
++this->physicalViewIndex;
|
| 868 |
+
this->physicalWarned = false;
|
| 869 |
+
this->physicalViewArmed = false;
|
| 870 |
+
this->physicalBaselineTime = common::Time::Zero;
|
| 871 |
+
return false;
|
| 872 |
+
}
|
| 873 |
+
|
| 874 |
+
// Read the latest RGB frame from each camera and write it to disk as PNG.
|
| 875 |
+
// Returns true only when a complete frame set is written, so images and
|
| 876 |
+
// trajectory rows stay in one-to-one correspondence (sharing one frame index).
|
| 877 |
+
bool CaptureFrames()
|
| 878 |
+
{
|
| 879 |
+
// Capture only once EVERY camera has a rendered frame this tick. During the
|
| 880 |
+
// first few updates the render pipeline is still warming up and ImageData()
|
| 881 |
+
// is null; capturing then would advance the frame counter and log a
|
| 882 |
+
// trajectory row with no PNG on disk, breaking the image<->trajectory
|
| 883 |
+
// pairing. Bail out so this frame index is retried until all views render.
|
| 884 |
+
std::vector<CachedFrame> frames;
|
| 885 |
+
const char *singleCameraSweep = std::getenv("SIMPLE_DRONE_SINGLE_CAMERA_SWEEP");
|
| 886 |
+
const bool useSingleCameraSweep =
|
| 887 |
+
this->physicalFallbackToSweep ||
|
| 888 |
+
(singleCameraSweep && std::string(singleCameraSweep) != "0");
|
| 889 |
+
if (useSingleCameraSweep)
|
| 890 |
+
{
|
| 891 |
+
if (!this->AdvanceSingleCameraSweep(frames))
|
| 892 |
+
return false;
|
| 893 |
+
}
|
| 894 |
+
else
|
| 895 |
+
{
|
| 896 |
+
if (!this->AdvancePhysicalCameraSequence(frames))
|
| 897 |
+
return false;
|
| 898 |
+
}
|
| 899 |
+
|
| 900 |
+
for (size_t i = 0; i < this->cameras.size(); ++i)
|
| 901 |
+
{
|
| 902 |
+
if (i >= frames.size() || frames[i].data.empty() ||
|
| 903 |
+
frames[i].width == 0 || frames[i].height == 0 || frames[i].depth < 3)
|
| 904 |
+
{
|
| 905 |
+
if (!this->captureFailureWarned)
|
| 906 |
+
{
|
| 907 |
+
gzerr << "[SimpleDronePlugin] camera frame not ready at target index "
|
| 908 |
+
<< this->targetIndex << "; camera=" << this->cameraNames[i]
|
| 909 |
+
<< ", movable_frame=" << (i < frames.size() && !frames[i].data.empty())
|
| 910 |
+
<< std::endl;
|
| 911 |
+
this->captureFailureWarned = true;
|
| 912 |
+
}
|
| 913 |
+
return false;
|
| 914 |
+
}
|
| 915 |
+
}
|
| 916 |
+
|
| 917 |
+
std::string frameName;
|
| 918 |
+
if (this->datasetMode && this->currentDatasetTrajectory < this->datasetTrajectories.size())
|
| 919 |
+
{
|
| 920 |
+
const DatasetTrajectory &traj = this->datasetTrajectories[this->currentDatasetTrajectory];
|
| 921 |
+
const DatasetPoint &pt = traj.points[this->targetIndex];
|
| 922 |
+
std::ostringstream name;
|
| 923 |
+
name << traj.name << "_step_" << std::setw(6) << std::setfill('0') << pt.step << ".png";
|
| 924 |
+
frameName = name.str();
|
| 925 |
+
}
|
| 926 |
+
|
| 927 |
+
if (this->rejectGrayImages)
|
| 928 |
+
{
|
| 929 |
+
for (size_t i = 0; i < this->cameras.size(); ++i)
|
| 930 |
+
{
|
| 931 |
+
const CachedFrame &frame = frames[i];
|
| 932 |
+
const unsigned char *data = frame.data.data();
|
| 933 |
+
std::string reason;
|
| 934 |
+
if (!this->FrameLooksUsable(
|
| 935 |
+
data,
|
| 936 |
+
frame.width,
|
| 937 |
+
frame.height,
|
| 938 |
+
frame.depth,
|
| 939 |
+
reason))
|
| 940 |
+
{
|
| 941 |
+
if (this->grayRejectWarnCounter % 100 == 0)
|
| 942 |
+
{
|
| 943 |
+
gzerr << "[SimpleDronePlugin] rejected gray/unusable frame at target index "
|
| 944 |
+
<< this->targetIndex << "; camera=" << this->cameraNames[i]
|
| 945 |
+
<< "; " << reason << ". Waiting for a new frame." << std::endl;
|
| 946 |
+
}
|
| 947 |
+
++this->grayRejectWarnCounter;
|
| 948 |
+
if (useSingleCameraSweep)
|
| 949 |
+
this->ResetSingleCameraSweep();
|
| 950 |
+
else
|
| 951 |
+
this->ResetPhysicalCameraSequence();
|
| 952 |
+
return false;
|
| 953 |
+
}
|
| 954 |
+
}
|
| 955 |
+
}
|
| 956 |
+
|
| 957 |
+
// All four views are ready -- save them under the shared frame index.
|
| 958 |
+
for (size_t i = 0; i < this->cameras.size(); ++i)
|
| 959 |
+
{
|
| 960 |
+
const CachedFrame &frame = frames[i];
|
| 961 |
+
// `cam->ImageData()` is a tightly packed R8G8B8 buffer of size w * h * 3.
|
| 962 |
+
// (Use it here directly if you want to feed it into an algorithm.)
|
| 963 |
+
|
| 964 |
+
// ----- save the RGB image as PNG into this camera's sub-folder -----
|
| 965 |
+
char name[300];
|
| 966 |
+
if (this->datasetMode)
|
| 967 |
+
{
|
| 968 |
+
const DatasetTrajectory &traj =
|
| 969 |
+
this->datasetTrajectories[this->currentDatasetTrajectory];
|
| 970 |
+
std::snprintf(name, sizeof(name), "%s/%s/%s/%s",
|
| 971 |
+
this->imageDir.c_str(),
|
| 972 |
+
traj.name.c_str(),
|
| 973 |
+
this->folderNames[i].c_str(),
|
| 974 |
+
frameName.c_str());
|
| 975 |
+
}
|
| 976 |
+
else
|
| 977 |
+
{
|
| 978 |
+
std::snprintf(name, sizeof(name), "%s/%s/%06u.png",
|
| 979 |
+
this->imageDir.c_str(),
|
| 980 |
+
this->folderNames[i].c_str(),
|
| 981 |
+
this->frameCounter);
|
| 982 |
+
}
|
| 983 |
+
const unsigned char *data = frame.data.data();
|
| 984 |
+
if (!data || frame.data.empty())
|
| 985 |
+
{
|
| 986 |
+
gzerr << "[SimpleDronePlugin] camera image data disappeared before save; camera="
|
| 987 |
+
<< this->cameraNames[i] << std::endl;
|
| 988 |
+
return false;
|
| 989 |
+
}
|
| 990 |
+
const size_t pixelCount =
|
| 991 |
+
static_cast<size_t>(frame.width) * static_cast<size_t>(frame.height) * 3u;
|
| 992 |
+
unsigned int minValue = 255;
|
| 993 |
+
unsigned int maxValue = 0;
|
| 994 |
+
unsigned long long sumValue = 0;
|
| 995 |
+
for (size_t pixel = 0; pixel < pixelCount; ++pixel)
|
| 996 |
+
{
|
| 997 |
+
const unsigned int value = static_cast<unsigned int>(data[pixel]);
|
| 998 |
+
minValue = std::min(minValue, value);
|
| 999 |
+
maxValue = std::max(maxValue, value);
|
| 1000 |
+
sumValue += value;
|
| 1001 |
+
}
|
| 1002 |
+
if (std::getenv("SIMPLE_DRONE_DEBUG_CAMERA"))
|
| 1003 |
+
{
|
| 1004 |
+
gzmsg << "[SimpleDronePlugin] camera buffer "
|
| 1005 |
+
<< this->cameraNames[i]
|
| 1006 |
+
<< " frame=" << this->frameCounter
|
| 1007 |
+
<< " size=" << frame.width << "x" << frame.height
|
| 1008 |
+
<< " min=" << minValue
|
| 1009 |
+
<< " max=" << maxValue
|
| 1010 |
+
<< " mean=" << (static_cast<double>(sumValue) / std::max<size_t>(pixelCount, 1u))
|
| 1011 |
+
<< " first_rgb="
|
| 1012 |
+
<< static_cast<unsigned int>(data[0]) << ','
|
| 1013 |
+
<< static_cast<unsigned int>(data[1]) << ','
|
| 1014 |
+
<< static_cast<unsigned int>(data[2])
|
| 1015 |
+
<< std::endl;
|
| 1016 |
+
}
|
| 1017 |
+
common::Image image;
|
| 1018 |
+
image.SetFromData(
|
| 1019 |
+
data,
|
| 1020 |
+
frame.width,
|
| 1021 |
+
frame.height,
|
| 1022 |
+
common::Image::RGB_INT8);
|
| 1023 |
+
image.SavePNG(std::string(name));
|
| 1024 |
+
}
|
| 1025 |
+
|
| 1026 |
+
// ----- log this trajectory point (3D position + orientation) -----
|
| 1027 |
+
ignition::math::Pose3d pose = this->model->WorldPose();
|
| 1028 |
+
const ignition::math::Vector3d &p = pose.Pos();
|
| 1029 |
+
const ignition::math::Quaterniond &q = pose.Rot();
|
| 1030 |
+
double roll = q.Roll();
|
| 1031 |
+
double pitch = q.Pitch();
|
| 1032 |
+
double yaw = q.Yaw();
|
| 1033 |
+
const double r2d = 180.0 / M_PI;
|
| 1034 |
+
double t = this->world->SimTime().Double();
|
| 1035 |
+
if (this->datasetMode && this->currentDatasetTrajectory < this->datasetTrajectories.size())
|
| 1036 |
+
{
|
| 1037 |
+
DatasetPoint &pt =
|
| 1038 |
+
this->datasetTrajectories[this->currentDatasetTrajectory].points[this->targetIndex];
|
| 1039 |
+
pt.capturedX = p.X();
|
| 1040 |
+
pt.capturedY = p.Y();
|
| 1041 |
+
pt.capturedZ = p.Z();
|
| 1042 |
+
pt.captureFrame = this->frameCounter;
|
| 1043 |
+
pt.capturedYawRad = yaw;
|
| 1044 |
+
pt.capturedYawDeg = yaw * r2d;
|
| 1045 |
+
pt.imageName = frameName;
|
| 1046 |
+
pt.captured = true;
|
| 1047 |
+
}
|
| 1048 |
+
else if (this->trajFile.is_open())
|
| 1049 |
+
{
|
| 1050 |
+
this->trajFile << this->frameCounter << ','
|
| 1051 |
+
<< t << ','
|
| 1052 |
+
<< p.X() << ',' << p.Y() << ',' << p.Z() << ','
|
| 1053 |
+
<< roll << ',' << pitch << ',' << yaw << ','
|
| 1054 |
+
<< (roll * r2d) << ',' << (pitch * r2d) << ',' << (yaw * r2d) << ','
|
| 1055 |
+
<< q.W() << ',' << q.X() << ',' << q.Y() << ',' << q.Z() << '\n';
|
| 1056 |
+
this->trajFile.flush(); // persist even if the sim is Ctrl+C'd
|
| 1057 |
+
}
|
| 1058 |
+
|
| 1059 |
+
gzmsg << "[SimpleDronePlugin] saved frame set #"
|
| 1060 |
+
<< this->frameCounter << " (front/down/left/right)" << std::endl;
|
| 1061 |
+
this->grayRejectWarnCounter = 0;
|
| 1062 |
+
this->physicalRejectCount = 0;
|
| 1063 |
+
++this->frameCounter;
|
| 1064 |
+
return true;
|
| 1065 |
+
}
|
| 1066 |
+
|
| 1067 |
+
void OnUpdate()
|
| 1068 |
+
{
|
| 1069 |
+
common::Time now = this->world->SimTime();
|
| 1070 |
+
|
| 1071 |
+
// Tour finished: hold the drone at the final waypoint and record nothing.
|
| 1072 |
+
if (this->tourComplete)
|
| 1073 |
+
{
|
| 1074 |
+
this->model->SetWorldPose(this->holdPose);
|
| 1075 |
+
this->model->SetLinearVel(ignition::math::Vector3d::Zero);
|
| 1076 |
+
return;
|
| 1077 |
+
}
|
| 1078 |
+
|
| 1079 |
+
// Lazily bind the cameras once the sensor manager has created them.
|
| 1080 |
+
if (!this->camerasReady)
|
| 1081 |
+
this->camerasReady = this->InitCameras();
|
| 1082 |
+
if (!this->camerasReady)
|
| 1083 |
+
return; // nothing happens (no motion, no capture) until cameras exist
|
| 1084 |
+
|
| 1085 |
+
if (this->waypoints.empty())
|
| 1086 |
+
return;
|
| 1087 |
+
|
| 1088 |
+
// ===== settle-then-capture on each waypoint =====
|
| 1089 |
+
// While settling, the drone is pinned to the EXACT waypoint and we wait for
|
| 1090 |
+
// every camera to render a brand-new frame from that pinned pose before
|
| 1091 |
+
// saving. Gazebo renders the cameras *after* this callback, so without the
|
| 1092 |
+
// wait the saved PNG would be the frame rendered one step earlier (during
|
| 1093 |
+
// the approach, a few cm short). The wait makes each image truly correspond
|
| 1094 |
+
// to its logged coordinate. The start point (waypoints[0]) begins settling.
|
| 1095 |
+
if (this->settling)
|
| 1096 |
+
{
|
| 1097 |
+
const ignition::math::Vector3d &wp = this->waypoints[this->targetIndex];
|
| 1098 |
+
const ignition::math::Pose3d snapped(
|
| 1099 |
+
wp.X(), wp.Y(), wp.Z(), 0.0, 0.0,
|
| 1100 |
+
this->datasetMode ? 0.0 : this->captureYaw);
|
| 1101 |
+
this->model->SetWorldPose(snapped); // re-assert every tick: hold dead still
|
| 1102 |
+
this->model->SetLinearVel(ignition::math::Vector3d::Zero);
|
| 1103 |
+
|
| 1104 |
+
// First tick parked here: latch each camera's current render time as the
|
| 1105 |
+
// baseline, then yield so the cameras can render from the pinned pose.
|
| 1106 |
+
if (!this->settleBaselineSet)
|
| 1107 |
+
{
|
| 1108 |
+
this->baseRenderTime.resize(this->cameras.size());
|
| 1109 |
+
for (size_t i = 0; i < this->cameras.size(); ++i)
|
| 1110 |
+
{
|
| 1111 |
+
if (this->cameras[i])
|
| 1112 |
+
{
|
| 1113 |
+
this->cameras[i]->SetActive(true);
|
| 1114 |
+
this->cameras[i]->Update(true);
|
| 1115 |
+
}
|
| 1116 |
+
this->baseRenderTime[i] = this->cameras[i]
|
| 1117 |
+
? this->cameras[i]->LastMeasurementTime() : common::Time::Zero;
|
| 1118 |
+
}
|
| 1119 |
+
this->settleStartTime = now;
|
| 1120 |
+
this->settleBaselineSet = true;
|
| 1121 |
+
this->captureFailureWarned = false;
|
| 1122 |
+
return;
|
| 1123 |
+
}
|
| 1124 |
+
|
| 1125 |
+
// Hold until EVERY camera has produced a new frame strictly after the
|
| 1126 |
+
// snap (i.e. rendered from the pinned pose), then capture.
|
| 1127 |
+
bool allCamerasRerendered = true;
|
| 1128 |
+
for (size_t i = 0; i < this->cameras.size(); ++i)
|
| 1129 |
+
{
|
| 1130 |
+
if (this->cameras[i])
|
| 1131 |
+
{
|
| 1132 |
+
this->cameras[i]->SetActive(true);
|
| 1133 |
+
this->cameras[i]->Update(true);
|
| 1134 |
+
}
|
| 1135 |
+
if (!this->cameras[i] ||
|
| 1136 |
+
this->cameras[i]->LastMeasurementTime() <= this->baseRenderTime[i])
|
| 1137 |
+
{
|
| 1138 |
+
allCamerasRerendered = false;
|
| 1139 |
+
break;
|
| 1140 |
+
}
|
| 1141 |
+
}
|
| 1142 |
+
if (!allCamerasRerendered)
|
| 1143 |
+
{
|
| 1144 |
+
const double settleWait = (now - this->settleStartTime).Double();
|
| 1145 |
+
if (settleWait < this->settleTimeout)
|
| 1146 |
+
return; // not all cameras have re-rendered yet -- keep waiting
|
| 1147 |
+
|
| 1148 |
+
if (!this->settleTimeoutWarned)
|
| 1149 |
+
{
|
| 1150 |
+
gzerr << "[SimpleDronePlugin] camera settle timeout after "
|
| 1151 |
+
<< settleWait << "s at target index " << this->targetIndex
|
| 1152 |
+
<< "; capturing latest available frames." << std::endl;
|
| 1153 |
+
this->settleTimeoutWarned = true;
|
| 1154 |
+
}
|
| 1155 |
+
}
|
| 1156 |
+
|
| 1157 |
+
if (!this->CaptureFrames()) // also guards against null image buffers
|
| 1158 |
+
return;
|
| 1159 |
+
|
| 1160 |
+
this->settling = false;
|
| 1161 |
+
this->settleBaselineSet = false;
|
| 1162 |
+
this->captureFailureWarned = false;
|
| 1163 |
+
this->settleTimeoutWarned = false;
|
| 1164 |
+
this->ResetPhysicalCameraSequence();
|
| 1165 |
+
|
| 1166 |
+
if (this->datasetMode)
|
| 1167 |
+
{
|
| 1168 |
+
this->settling = false;
|
| 1169 |
+
this->settleBaselineSet = false;
|
| 1170 |
+
this->captureFailureWarned = false;
|
| 1171 |
+
this->settleTimeoutWarned = false;
|
| 1172 |
+
this->AdvanceDatasetAfterCapture(snapped);
|
| 1173 |
+
return;
|
| 1174 |
+
}
|
| 1175 |
+
|
| 1176 |
+
if (this->commandMode)
|
| 1177 |
+
{
|
| 1178 |
+
this->holdPose = snapped;
|
| 1179 |
+
this->waitingForCommand = true;
|
| 1180 |
+
this->lastTime = now;
|
| 1181 |
+
return;
|
| 1182 |
+
}
|
| 1183 |
+
|
| 1184 |
+
// That was the last waypoint -> the single-pass tour is done.
|
| 1185 |
+
if (this->targetIndex + 1 >= this->waypoints.size())
|
| 1186 |
+
{
|
| 1187 |
+
this->FinishTour(snapped);
|
| 1188 |
+
return;
|
| 1189 |
+
}
|
| 1190 |
+
++this->targetIndex; // head for the next waypoint
|
| 1191 |
+
this->lastTime = now; // keep the first travel dt to one step
|
| 1192 |
+
return;
|
| 1193 |
+
}
|
| 1194 |
+
|
| 1195 |
+
if (this->commandMode && this->waitingForCommand)
|
| 1196 |
+
{
|
| 1197 |
+
this->model->SetWorldPose(this->holdPose);
|
| 1198 |
+
this->model->SetLinearVel(ignition::math::Vector3d::Zero);
|
| 1199 |
+
if (!this->TryLoadCommand())
|
| 1200 |
+
return;
|
| 1201 |
+
|
| 1202 |
+
this->waypoints.resize(1);
|
| 1203 |
+
this->waypoints.push_back(this->commandTarget);
|
| 1204 |
+
this->targetIndex = 1;
|
| 1205 |
+
this->waitingForCommand = false;
|
| 1206 |
+
this->lastTime = now;
|
| 1207 |
+
return;
|
| 1208 |
+
}
|
| 1209 |
+
|
| 1210 |
+
// ===== fly toward waypoints[targetIndex] =====
|
| 1211 |
+
double dt = (now - this->lastTime).Double();
|
| 1212 |
+
this->lastTime = now;
|
| 1213 |
+
if (dt <= 0.0)
|
| 1214 |
+
return;
|
| 1215 |
+
|
| 1216 |
+
ignition::math::Vector3d pos = this->model->WorldPose().Pos();
|
| 1217 |
+
ignition::math::Vector3d diff = this->waypoints[this->targetIndex] - pos;
|
| 1218 |
+
|
| 1219 |
+
if (diff.Length() < 0.08)
|
| 1220 |
+
{
|
| 1221 |
+
if (this->datasetMode && this->returningToStart)
|
| 1222 |
+
{
|
| 1223 |
+
size_t nextTrajectory = this->currentDatasetTrajectory + 1;
|
| 1224 |
+
if (!this->BeginDatasetTrajectoryAtStart(nextTrajectory))
|
| 1225 |
+
{
|
| 1226 |
+
this->FinishTour(this->model->WorldPose());
|
| 1227 |
+
return;
|
| 1228 |
+
}
|
| 1229 |
+
return;
|
| 1230 |
+
}
|
| 1231 |
+
|
| 1232 |
+
// Arrived: latch the travel heading and start settling on the waypoint.
|
| 1233 |
+
if (this->datasetMode && this->currentDatasetTrajectory < this->datasetTrajectories.size())
|
| 1234 |
+
this->captureYaw = 0.0;
|
| 1235 |
+
else
|
| 1236 |
+
this->captureYaw = this->commandMode ? this->commandYaw
|
| 1237 |
+
: this->model->WorldPose().Rot().Yaw();
|
| 1238 |
+
this->settling = true;
|
| 1239 |
+
this->settleBaselineSet = false;
|
| 1240 |
+
this->captureFailureWarned = false;
|
| 1241 |
+
this->settleTimeoutWarned = false;
|
| 1242 |
+
return;
|
| 1243 |
+
}
|
| 1244 |
+
|
| 1245 |
+
ignition::math::Vector3d dir = diff.Normalized();
|
| 1246 |
+
double yaw = this->datasetMode ? 0.0 : std::atan2(dir.Y(), dir.X());
|
| 1247 |
+
double travel = this->speed * dt;
|
| 1248 |
+
ignition::math::Vector3d newPos;
|
| 1249 |
+
if (travel >= diff.Length())
|
| 1250 |
+
{
|
| 1251 |
+
newPos = this->waypoints[this->targetIndex];
|
| 1252 |
+
}
|
| 1253 |
+
else
|
| 1254 |
+
{
|
| 1255 |
+
newPos = pos + dir * travel;
|
| 1256 |
+
}
|
| 1257 |
+
this->model->SetWorldPose(
|
| 1258 |
+
ignition::math::Pose3d(newPos.X(), newPos.Y(), newPos.Z(), 0.0, 0.0, yaw));
|
| 1259 |
+
this->model->SetLinearVel(travel >= diff.Length()
|
| 1260 |
+
? ignition::math::Vector3d::Zero
|
| 1261 |
+
: dir * this->speed);
|
| 1262 |
+
}
|
| 1263 |
+
|
| 1264 |
+
struct DatasetPoint
|
| 1265 |
+
{
|
| 1266 |
+
int step = 0;
|
| 1267 |
+
double x = 0.0;
|
| 1268 |
+
double y = 0.0;
|
| 1269 |
+
double z = 0.0;
|
| 1270 |
+
double yawRad = 0.0;
|
| 1271 |
+
double yawDeg = 0.0;
|
| 1272 |
+
double capturedX = 0.0;
|
| 1273 |
+
double capturedY = 0.0;
|
| 1274 |
+
double capturedZ = 0.0;
|
| 1275 |
+
unsigned int captureFrame = 0;
|
| 1276 |
+
double capturedYawRad = 0.0;
|
| 1277 |
+
double capturedYawDeg = 0.0;
|
| 1278 |
+
std::string imageName;
|
| 1279 |
+
bool captured = false;
|
| 1280 |
+
};
|
| 1281 |
+
|
| 1282 |
+
int EnvInt(const char *name, int fallback)
|
| 1283 |
+
{
|
| 1284 |
+
const char *value = std::getenv(name);
|
| 1285 |
+
if (!value || value[0] == '\0')
|
| 1286 |
+
return fallback;
|
| 1287 |
+
try
|
| 1288 |
+
{
|
| 1289 |
+
return std::stoi(value);
|
| 1290 |
+
}
|
| 1291 |
+
catch (...)
|
| 1292 |
+
{
|
| 1293 |
+
return fallback;
|
| 1294 |
+
}
|
| 1295 |
+
}
|
| 1296 |
+
|
| 1297 |
+
double EnvDouble(const char *name, double fallback)
|
| 1298 |
+
{
|
| 1299 |
+
const char *value = std::getenv(name);
|
| 1300 |
+
if (!value || value[0] == '\0')
|
| 1301 |
+
return fallback;
|
| 1302 |
+
try
|
| 1303 |
+
{
|
| 1304 |
+
return std::stod(value);
|
| 1305 |
+
}
|
| 1306 |
+
catch (...)
|
| 1307 |
+
{
|
| 1308 |
+
return fallback;
|
| 1309 |
+
}
|
| 1310 |
+
}
|
| 1311 |
+
|
| 1312 |
+
bool FrameLooksUsable(
|
| 1313 |
+
const unsigned char *data,
|
| 1314 |
+
unsigned int width,
|
| 1315 |
+
unsigned int height,
|
| 1316 |
+
unsigned int depth,
|
| 1317 |
+
std::string &reason)
|
| 1318 |
+
{
|
| 1319 |
+
if (!data || width == 0 || height == 0 || depth < 3)
|
| 1320 |
+
{
|
| 1321 |
+
reason = "empty image buffer";
|
| 1322 |
+
return false;
|
| 1323 |
+
}
|
| 1324 |
+
|
| 1325 |
+
const size_t pixelCount =
|
| 1326 |
+
static_cast<size_t>(width) * static_cast<size_t>(height);
|
| 1327 |
+
unsigned int globalMin = 255;
|
| 1328 |
+
unsigned int globalMax = 0;
|
| 1329 |
+
size_t grayPixels = 0;
|
| 1330 |
+
double lumaSum = 0.0;
|
| 1331 |
+
double lumaSqSum = 0.0;
|
| 1332 |
+
|
| 1333 |
+
const unsigned int tilesX = 8;
|
| 1334 |
+
const unsigned int tilesY = 8;
|
| 1335 |
+
std::vector<size_t> tilePixels(tilesX * tilesY, 0);
|
| 1336 |
+
std::vector<size_t> tileGrayPixels(tilesX * tilesY, 0);
|
| 1337 |
+
std::vector<unsigned int> tileMin(tilesX * tilesY, 255);
|
| 1338 |
+
std::vector<unsigned int> tileMax(tilesX * tilesY, 0);
|
| 1339 |
+
std::vector<double> tileLumaSum(tilesX * tilesY, 0.0);
|
| 1340 |
+
std::vector<double> tileLumaSqSum(tilesX * tilesY, 0.0);
|
| 1341 |
+
std::vector<size_t> rowBufferPixels(height, 0);
|
| 1342 |
+
std::vector<size_t> columnBufferPixels(width, 0);
|
| 1343 |
+
|
| 1344 |
+
for (unsigned int y = 0; y < height; ++y)
|
| 1345 |
+
{
|
| 1346 |
+
for (unsigned int x = 0; x < width; ++x)
|
| 1347 |
+
{
|
| 1348 |
+
const size_t offset =
|
| 1349 |
+
(static_cast<size_t>(y) * static_cast<size_t>(width) + x) * depth;
|
| 1350 |
+
const unsigned int r = static_cast<unsigned int>(data[offset]);
|
| 1351 |
+
const unsigned int g = static_cast<unsigned int>(data[offset + 1]);
|
| 1352 |
+
const unsigned int b = static_cast<unsigned int>(data[offset + 2]);
|
| 1353 |
+
const unsigned int cmin = std::min(r, std::min(g, b));
|
| 1354 |
+
const unsigned int cmax = std::max(r, std::max(g, b));
|
| 1355 |
+
const double luma = (static_cast<double>(r) + g + b) / 3.0;
|
| 1356 |
+
const unsigned int tileX = std::min((x * tilesX) / width, tilesX - 1);
|
| 1357 |
+
const unsigned int tileY = std::min((y * tilesY) / height, tilesY - 1);
|
| 1358 |
+
const size_t tileIndex = static_cast<size_t>(tileY) * tilesX + tileX;
|
| 1359 |
+
|
| 1360 |
+
globalMin = std::min(globalMin, cmin);
|
| 1361 |
+
globalMax = std::max(globalMax, cmax);
|
| 1362 |
+
lumaSum += luma;
|
| 1363 |
+
lumaSqSum += luma * luma;
|
| 1364 |
+
++tilePixels[tileIndex];
|
| 1365 |
+
tileMin[tileIndex] = std::min(tileMin[tileIndex], cmin);
|
| 1366 |
+
tileMax[tileIndex] = std::max(tileMax[tileIndex], cmax);
|
| 1367 |
+
tileLumaSum[tileIndex] += luma;
|
| 1368 |
+
tileLumaSqSum[tileIndex] += luma * luma;
|
| 1369 |
+
|
| 1370 |
+
const bool isGray =
|
| 1371 |
+
(cmax - cmin <= static_cast<unsigned int>(this->grayDelta)) &&
|
| 1372 |
+
(luma >= this->grayMin) &&
|
| 1373 |
+
(luma <= this->grayMax);
|
| 1374 |
+
if (isGray)
|
| 1375 |
+
{
|
| 1376 |
+
++grayPixels;
|
| 1377 |
+
++tileGrayPixels[tileIndex];
|
| 1378 |
+
}
|
| 1379 |
+
if (r == 128u && g == 128u && b == 128u)
|
| 1380 |
+
{
|
| 1381 |
+
++rowBufferPixels[y];
|
| 1382 |
+
++columnBufferPixels[x];
|
| 1383 |
+
}
|
| 1384 |
+
}
|
| 1385 |
+
}
|
| 1386 |
+
|
| 1387 |
+
const unsigned int rgbRange = globalMax - globalMin;
|
| 1388 |
+
const double mean = lumaSum / std::max<size_t>(pixelCount, 1u);
|
| 1389 |
+
const double variance =
|
| 1390 |
+
std::max(0.0, lumaSqSum / std::max<size_t>(pixelCount, 1u) - mean * mean);
|
| 1391 |
+
const double lumaStd = std::sqrt(variance);
|
| 1392 |
+
const double grayRatio =
|
| 1393 |
+
static_cast<double>(grayPixels) / std::max<size_t>(pixelCount, 1u);
|
| 1394 |
+
|
| 1395 |
+
if (rgbRange < static_cast<unsigned int>(this->minRgbRange))
|
| 1396 |
+
{
|
| 1397 |
+
std::ostringstream out;
|
| 1398 |
+
out << "near-uniform image rgb_range=" << rgbRange
|
| 1399 |
+
<< " luma_std=" << lumaStd;
|
| 1400 |
+
reason = out.str();
|
| 1401 |
+
return false;
|
| 1402 |
+
}
|
| 1403 |
+
|
| 1404 |
+
if (grayRatio > this->grayMaxRatio)
|
| 1405 |
+
{
|
| 1406 |
+
std::ostringstream out;
|
| 1407 |
+
out << "global gray ratio too high ratio=" << grayRatio;
|
| 1408 |
+
reason = out.str();
|
| 1409 |
+
return false;
|
| 1410 |
+
}
|
| 1411 |
+
|
| 1412 |
+
for (unsigned int y = 0; y < height; ++y)
|
| 1413 |
+
{
|
| 1414 |
+
const double ratio = static_cast<double>(rowBufferPixels[y]) / width;
|
| 1415 |
+
if (ratio > this->grayScanlineRatio)
|
| 1416 |
+
{
|
| 1417 |
+
std::ostringstream out;
|
| 1418 |
+
out << "gray render-buffer row ratio too high row=" << y
|
| 1419 |
+
<< " ratio=" << ratio;
|
| 1420 |
+
reason = out.str();
|
| 1421 |
+
return false;
|
| 1422 |
+
}
|
| 1423 |
+
}
|
| 1424 |
+
for (unsigned int x = 0; x < width; ++x)
|
| 1425 |
+
{
|
| 1426 |
+
const double ratio = static_cast<double>(columnBufferPixels[x]) / height;
|
| 1427 |
+
if (ratio > this->grayScanlineRatio)
|
| 1428 |
+
{
|
| 1429 |
+
std::ostringstream out;
|
| 1430 |
+
out << "gray render-buffer column ratio too high column=" << x
|
| 1431 |
+
<< " ratio=" << ratio;
|
| 1432 |
+
reason = out.str();
|
| 1433 |
+
return false;
|
| 1434 |
+
}
|
| 1435 |
+
}
|
| 1436 |
+
|
| 1437 |
+
for (size_t i = 0; i < tilePixels.size(); ++i)
|
| 1438 |
+
{
|
| 1439 |
+
if (tilePixels[i] == 0)
|
| 1440 |
+
continue;
|
| 1441 |
+
const double tileRatio =
|
| 1442 |
+
static_cast<double>(tileGrayPixels[i]) / static_cast<double>(tilePixels[i]);
|
| 1443 |
+
const double tileMean =
|
| 1444 |
+
tileLumaSum[i] / static_cast<double>(tilePixels[i]);
|
| 1445 |
+
const double tileVariance =
|
| 1446 |
+
std::max(0.0,
|
| 1447 |
+
tileLumaSqSum[i] / static_cast<double>(tilePixels[i]) -
|
| 1448 |
+
tileMean * tileMean);
|
| 1449 |
+
const double tileStd = std::sqrt(tileVariance);
|
| 1450 |
+
const unsigned int tileRange = tileMax[i] - tileMin[i];
|
| 1451 |
+
if (tileRatio > this->grayTileRatio &&
|
| 1452 |
+
tileStd < this->minLumaStd &&
|
| 1453 |
+
tileRange < static_cast<unsigned int>(this->minRgbRange))
|
| 1454 |
+
{
|
| 1455 |
+
std::ostringstream out;
|
| 1456 |
+
out << "gray tile ratio too high tile=" << i
|
| 1457 |
+
<< " ratio=" << tileRatio
|
| 1458 |
+
<< " tile_range=" << tileRange
|
| 1459 |
+
<< " tile_luma_std=" << tileStd;
|
| 1460 |
+
reason = out.str();
|
| 1461 |
+
return false;
|
| 1462 |
+
}
|
| 1463 |
+
}
|
| 1464 |
+
|
| 1465 |
+
return true;
|
| 1466 |
+
}
|
| 1467 |
+
|
| 1468 |
+
struct DatasetTrajectory
|
| 1469 |
+
{
|
| 1470 |
+
std::string name;
|
| 1471 |
+
std::string path;
|
| 1472 |
+
std::vector<DatasetPoint> points;
|
| 1473 |
+
};
|
| 1474 |
+
|
| 1475 |
+
std::vector<std::string> SplitCsvLine(const std::string &line)
|
| 1476 |
+
{
|
| 1477 |
+
std::vector<std::string> cols;
|
| 1478 |
+
std::string col;
|
| 1479 |
+
std::istringstream ss(line);
|
| 1480 |
+
while (std::getline(ss, col, ','))
|
| 1481 |
+
cols.push_back(col);
|
| 1482 |
+
return cols;
|
| 1483 |
+
}
|
| 1484 |
+
|
| 1485 |
+
void LoadDatasetTrajectories()
|
| 1486 |
+
{
|
| 1487 |
+
this->datasetTrajectories.clear();
|
| 1488 |
+
|
| 1489 |
+
std::vector<std::string> csvFiles;
|
| 1490 |
+
if (!this->datasetTrajectoryFile.empty())
|
| 1491 |
+
{
|
| 1492 |
+
if (boost::filesystem::exists(this->datasetTrajectoryFile))
|
| 1493 |
+
csvFiles.push_back(this->datasetTrajectoryFile);
|
| 1494 |
+
}
|
| 1495 |
+
else
|
| 1496 |
+
{
|
| 1497 |
+
if (!boost::filesystem::exists(this->trajectoryDir))
|
| 1498 |
+
return;
|
| 1499 |
+
|
| 1500 |
+
boost::filesystem::directory_iterator end;
|
| 1501 |
+
for (boost::filesystem::directory_iterator it(this->trajectoryDir); it != end; ++it)
|
| 1502 |
+
{
|
| 1503 |
+
if (boost::filesystem::is_regular_file(it->path()) && it->path().extension() == ".csv")
|
| 1504 |
+
csvFiles.push_back(it->path().string());
|
| 1505 |
+
}
|
| 1506 |
+
std::sort(csvFiles.begin(), csvFiles.end());
|
| 1507 |
+
}
|
| 1508 |
+
|
| 1509 |
+
for (const std::string &path : csvFiles)
|
| 1510 |
+
{
|
| 1511 |
+
std::ifstream in(path);
|
| 1512 |
+
std::string line;
|
| 1513 |
+
if (!std::getline(in, line))
|
| 1514 |
+
continue;
|
| 1515 |
+
|
| 1516 |
+
DatasetTrajectory traj;
|
| 1517 |
+
boost::filesystem::path p(path);
|
| 1518 |
+
traj.name = p.stem().string();
|
| 1519 |
+
traj.path = path;
|
| 1520 |
+
|
| 1521 |
+
while (std::getline(in, line))
|
| 1522 |
+
{
|
| 1523 |
+
if (line.empty())
|
| 1524 |
+
continue;
|
| 1525 |
+
std::vector<std::string> cols = this->SplitCsvLine(line);
|
| 1526 |
+
if (cols.size() < 5)
|
| 1527 |
+
continue;
|
| 1528 |
+
|
| 1529 |
+
DatasetPoint pt;
|
| 1530 |
+
try
|
| 1531 |
+
{
|
| 1532 |
+
pt.step = std::stoi(cols[0]);
|
| 1533 |
+
pt.x = std::stod(cols[1]);
|
| 1534 |
+
pt.y = std::stod(cols[2]);
|
| 1535 |
+
pt.z = std::stod(cols[3]);
|
| 1536 |
+
pt.yawRad = std::stod(cols[4]);
|
| 1537 |
+
pt.yawDeg = cols.size() > 5 ? std::stod(cols[5]) : pt.yawRad * 180.0 / M_PI;
|
| 1538 |
+
}
|
| 1539 |
+
catch (...)
|
| 1540 |
+
{
|
| 1541 |
+
continue;
|
| 1542 |
+
}
|
| 1543 |
+
traj.points.push_back(pt);
|
| 1544 |
+
}
|
| 1545 |
+
|
| 1546 |
+
if (!traj.points.empty())
|
| 1547 |
+
this->datasetTrajectories.push_back(traj);
|
| 1548 |
+
}
|
| 1549 |
+
|
| 1550 |
+
gzmsg << "[SimpleDronePlugin] loaded " << this->datasetTrajectories.size()
|
| 1551 |
+
<< " dataset trajector"
|
| 1552 |
+
<< (this->datasetTrajectories.size() == 1 ? "y" : "ies")
|
| 1553 |
+
<< " from "
|
| 1554 |
+
<< (this->datasetTrajectoryFile.empty()
|
| 1555 |
+
? this->trajectoryDir
|
| 1556 |
+
: this->datasetTrajectoryFile)
|
| 1557 |
+
<< std::endl;
|
| 1558 |
+
}
|
| 1559 |
+
|
| 1560 |
+
bool BeginDatasetTrajectory(size_t index)
|
| 1561 |
+
{
|
| 1562 |
+
if (index >= this->datasetTrajectories.size())
|
| 1563 |
+
return false;
|
| 1564 |
+
|
| 1565 |
+
this->currentDatasetTrajectory = index;
|
| 1566 |
+
this->waypoints.clear();
|
| 1567 |
+
const DatasetTrajectory &traj = this->datasetTrajectories[index];
|
| 1568 |
+
for (const DatasetPoint &pt : traj.points)
|
| 1569 |
+
this->waypoints.push_back(ignition::math::Vector3d(pt.x, pt.y, pt.z));
|
| 1570 |
+
|
| 1571 |
+
this->targetIndex = 0;
|
| 1572 |
+
this->returningToStart = false;
|
| 1573 |
+
this->captureYaw = 0.0;
|
| 1574 |
+
this->settling = true;
|
| 1575 |
+
this->settleBaselineSet = false;
|
| 1576 |
+
this->captureFailureWarned = false;
|
| 1577 |
+
this->settleTimeoutWarned = false;
|
| 1578 |
+
this->physicalRejectCount = 0;
|
| 1579 |
+
this->physicalFallbackToSweep = false;
|
| 1580 |
+
this->lastTime = this->world->SimTime();
|
| 1581 |
+
gzmsg << "[SimpleDronePlugin] dataset trajectory "
|
| 1582 |
+
<< (index + 1) << "/" << this->datasetTrajectories.size()
|
| 1583 |
+
<< ": " << traj.name << " (" << traj.points.size()
|
| 1584 |
+
<< " points)" << std::endl;
|
| 1585 |
+
|
| 1586 |
+
for (const std::string &folder : this->folderNames)
|
| 1587 |
+
boost::filesystem::create_directories(this->imageDir + "/" + traj.name + "/" + folder);
|
| 1588 |
+
|
| 1589 |
+
return true;
|
| 1590 |
+
}
|
| 1591 |
+
|
| 1592 |
+
bool BeginDatasetTrajectoryAtStart(size_t index)
|
| 1593 |
+
{
|
| 1594 |
+
if (index >= this->datasetTrajectories.size())
|
| 1595 |
+
return false;
|
| 1596 |
+
|
| 1597 |
+
const DatasetPoint &start = this->datasetTrajectories[index].points.front();
|
| 1598 |
+
this->model->SetWorldPose(
|
| 1599 |
+
ignition::math::Pose3d(start.x, start.y, start.z, 0.0, 0.0, 0.0));
|
| 1600 |
+
this->model->SetLinearVel(ignition::math::Vector3d::Zero);
|
| 1601 |
+
return this->BeginDatasetTrajectory(index);
|
| 1602 |
+
}
|
| 1603 |
+
|
| 1604 |
+
void AdvanceDatasetAfterCapture(const ignition::math::Pose3d &snapped)
|
| 1605 |
+
{
|
| 1606 |
+
if (this->currentDatasetTrajectory >= this->datasetTrajectories.size())
|
| 1607 |
+
return;
|
| 1608 |
+
|
| 1609 |
+
DatasetTrajectory &traj = this->datasetTrajectories[this->currentDatasetTrajectory];
|
| 1610 |
+
this->RewriteDatasetTrajectoryCsv(traj);
|
| 1611 |
+
|
| 1612 |
+
if (this->targetIndex + 1 < traj.points.size())
|
| 1613 |
+
{
|
| 1614 |
+
++this->targetIndex;
|
| 1615 |
+
this->captureYaw = 0.0;
|
| 1616 |
+
this->settling = true;
|
| 1617 |
+
this->settleBaselineSet = false;
|
| 1618 |
+
this->captureFailureWarned = false;
|
| 1619 |
+
this->settleTimeoutWarned = false;
|
| 1620 |
+
this->physicalRejectCount = 0;
|
| 1621 |
+
this->lastTime = this->world->SimTime();
|
| 1622 |
+
return;
|
| 1623 |
+
}
|
| 1624 |
+
|
| 1625 |
+
this->FinishTour(snapped);
|
| 1626 |
+
}
|
| 1627 |
+
|
| 1628 |
+
void RewriteDatasetTrajectoryCsv(const DatasetTrajectory &traj)
|
| 1629 |
+
{
|
| 1630 |
+
std::ofstream out(traj.path, std::ios::out | std::ios::trunc);
|
| 1631 |
+
out << "step,x,y,z,yaw_rad,yaw_deg,"
|
| 1632 |
+
"capture_frame,captured_yaw_rad,captured_yaw_deg,"
|
| 1633 |
+
"front_image,down_image,left_image,right_image\n";
|
| 1634 |
+
for (const DatasetPoint &pt : traj.points)
|
| 1635 |
+
{
|
| 1636 |
+
out << pt.step << ','
|
| 1637 |
+
<< (pt.captured ? pt.capturedX : pt.x) << ','
|
| 1638 |
+
<< (pt.captured ? pt.capturedY : pt.y) << ','
|
| 1639 |
+
<< (pt.captured ? pt.capturedZ : pt.z) << ','
|
| 1640 |
+
<< pt.yawRad << ','
|
| 1641 |
+
<< pt.yawDeg << ',';
|
| 1642 |
+
if (pt.captured)
|
| 1643 |
+
{
|
| 1644 |
+
out << pt.captureFrame << ','
|
| 1645 |
+
<< pt.capturedYawRad << ','
|
| 1646 |
+
<< pt.capturedYawDeg << ','
|
| 1647 |
+
<< pt.imageName << ','
|
| 1648 |
+
<< pt.imageName << ','
|
| 1649 |
+
<< pt.imageName << ','
|
| 1650 |
+
<< pt.imageName << '\n';
|
| 1651 |
+
}
|
| 1652 |
+
else
|
| 1653 |
+
{
|
| 1654 |
+
out << ",,,,,,\n";
|
| 1655 |
+
}
|
| 1656 |
+
}
|
| 1657 |
+
out.flush();
|
| 1658 |
+
gzmsg << "[SimpleDronePlugin] updated dataset trajectory CSV: "
|
| 1659 |
+
<< traj.path << std::endl;
|
| 1660 |
+
}
|
| 1661 |
+
|
| 1662 |
+
bool TryLoadCommand()
|
| 1663 |
+
{
|
| 1664 |
+
if (this->commandFile.empty() || !boost::filesystem::exists(this->commandFile))
|
| 1665 |
+
return false;
|
| 1666 |
+
|
| 1667 |
+
std::time_t mtime = boost::filesystem::last_write_time(this->commandFile);
|
| 1668 |
+
std::ifstream in(this->commandFile);
|
| 1669 |
+
std::ostringstream buf;
|
| 1670 |
+
buf << in.rdbuf();
|
| 1671 |
+
std::string commandText = buf.str();
|
| 1672 |
+
|
| 1673 |
+
if (mtime <= this->lastCommandMTime && commandText == this->lastCommandText)
|
| 1674 |
+
return false;
|
| 1675 |
+
|
| 1676 |
+
std::string line;
|
| 1677 |
+
std::istringstream lines(commandText);
|
| 1678 |
+
while (std::getline(lines, line))
|
| 1679 |
+
{
|
| 1680 |
+
if (line.empty() || line.find("x") != std::string::npos)
|
| 1681 |
+
continue;
|
| 1682 |
+
|
| 1683 |
+
for (char &c : line)
|
| 1684 |
+
{
|
| 1685 |
+
if (c == ',')
|
| 1686 |
+
c = ' ';
|
| 1687 |
+
}
|
| 1688 |
+
|
| 1689 |
+
std::istringstream ss(line);
|
| 1690 |
+
double x = 0.0, y = 0.0, z = 0.0, yaw = 0.0;
|
| 1691 |
+
if (!(ss >> x >> y >> z >> yaw))
|
| 1692 |
+
continue;
|
| 1693 |
+
|
| 1694 |
+
this->commandTarget = ignition::math::Vector3d(
|
| 1695 |
+
std::max(-7.0, std::min(6.5, x)),
|
| 1696 |
+
std::max(-4.0, std::min(4.0, y)),
|
| 1697 |
+
std::max(1.2, std::min(1.8, z)));
|
| 1698 |
+
this->commandYaw = yaw;
|
| 1699 |
+
this->lastCommandMTime = mtime;
|
| 1700 |
+
this->lastCommandText = commandText;
|
| 1701 |
+
gzmsg << "[SimpleDronePlugin] command target: "
|
| 1702 |
+
<< this->commandTarget.X() << ", "
|
| 1703 |
+
<< this->commandTarget.Y() << ", "
|
| 1704 |
+
<< this->commandTarget.Z() << ", yaw="
|
| 1705 |
+
<< this->commandYaw << std::endl;
|
| 1706 |
+
return true;
|
| 1707 |
+
}
|
| 1708 |
+
|
| 1709 |
+
this->lastCommandMTime = mtime;
|
| 1710 |
+
this->lastCommandText = commandText;
|
| 1711 |
+
gzerr << "[SimpleDronePlugin] command file changed but no valid x,y,z,yaw found: "
|
| 1712 |
+
<< this->commandFile << std::endl;
|
| 1713 |
+
return false;
|
| 1714 |
+
}
|
| 1715 |
+
|
| 1716 |
+
// Called once the final waypoint has been captured. The frame for the last
|
| 1717 |
+
// waypoint is already saved by the capture-on-arrival branch, so this only
|
| 1718 |
+
// closes the trajectory file and latches the tour as complete (no further
|
| 1719 |
+
// motion or recording).
|
| 1720 |
+
void FinishTour(const ignition::math::Pose3d &finalPose)
|
| 1721 |
+
{
|
| 1722 |
+
if (this->trajFile.is_open())
|
| 1723 |
+
this->trajFile.close();
|
| 1724 |
+
|
| 1725 |
+
this->holdPose = finalPose;
|
| 1726 |
+
this->model->SetLinearVel(ignition::math::Vector3d::Zero);
|
| 1727 |
+
this->tourComplete = true;
|
| 1728 |
+
|
| 1729 |
+
gzmsg << "[SimpleDronePlugin] trajectory complete: visited "
|
| 1730 |
+
<< this->waypoints.size() << " waypoints, saved "
|
| 1731 |
+
<< this->frameCounter << " frame sets. Recording stopped."
|
| 1732 |
+
<< std::endl;
|
| 1733 |
+
|
| 1734 |
+
if (this->quitOnFinish)
|
| 1735 |
+
{
|
| 1736 |
+
if (!this->doneFile.empty())
|
| 1737 |
+
{
|
| 1738 |
+
std::ofstream done(this->doneFile, std::ios::out | std::ios::trunc);
|
| 1739 |
+
done << "done\n";
|
| 1740 |
+
done.flush();
|
| 1741 |
+
gzmsg << "[SimpleDronePlugin] wrote done file: "
|
| 1742 |
+
<< this->doneFile << std::endl;
|
| 1743 |
+
}
|
| 1744 |
+
gzmsg << "[SimpleDronePlugin] SIMPLE_DRONE_QUIT_ON_FINISH set; shutdown requested."
|
| 1745 |
+
<< std::endl;
|
| 1746 |
+
gazebo::shutdown();
|
| 1747 |
+
}
|
| 1748 |
+
}
|
| 1749 |
+
|
| 1750 |
+
private:
|
| 1751 |
+
physics::ModelPtr model;
|
| 1752 |
+
physics::WorldPtr world;
|
| 1753 |
+
event::ConnectionPtr updateConnection;
|
| 1754 |
+
|
| 1755 |
+
// Cameras (front / down / left / right).
|
| 1756 |
+
std::vector<std::string> cameraNames; // sensor names, must match the SDF
|
| 1757 |
+
std::vector<std::string> folderNames; // output sub-folder per camera
|
| 1758 |
+
std::vector<sensors::CameraSensorPtr> cameras;
|
| 1759 |
+
std::vector<event::ConnectionPtr> imageConnections;
|
| 1760 |
+
bool camerasReady;
|
| 1761 |
+
std::string imageDir;
|
| 1762 |
+
double capturePeriod; // legacy, unused (capture is per-waypoint now)
|
| 1763 |
+
common::Time lastCaptureTime; // legacy, unused
|
| 1764 |
+
unsigned int frameCounter;
|
| 1765 |
+
std::ofstream trajFile;
|
| 1766 |
+
|
| 1767 |
+
std::vector<ignition::math::Vector3d> waypoints;
|
| 1768 |
+
unsigned int targetIndex;
|
| 1769 |
+
// Settle-then-capture state: while parked on a waypoint we wait for the
|
| 1770 |
+
// cameras to re-render from the pinned pose before saving, so each image
|
| 1771 |
+
// matches its logged coordinate exactly.
|
| 1772 |
+
bool settling; // true while parked on a waypoint awaiting capture
|
| 1773 |
+
bool settleBaselineSet; // have we latched the pre-settle render times?
|
| 1774 |
+
bool captureFailureWarned; // avoid spamming camera readiness diagnostics
|
| 1775 |
+
bool settleTimeoutWarned; // avoid spamming settle timeout diagnostics
|
| 1776 |
+
double captureYaw; // heading to hold while settling (travel heading)
|
| 1777 |
+
std::vector<common::Time> baseRenderTime; // per-camera render time at snap moment
|
| 1778 |
+
common::Time settleStartTime;
|
| 1779 |
+
const double settleTimeout = 10.0;
|
| 1780 |
+
double speed;
|
| 1781 |
+
common::Time lastTime;
|
| 1782 |
+
|
| 1783 |
+
// One-shot tour state: once the last waypoint is reached the drone hovers
|
| 1784 |
+
// at `holdPose` and stops capturing.
|
| 1785 |
+
bool tourComplete;
|
| 1786 |
+
ignition::math::Pose3d holdPose;
|
| 1787 |
+
|
| 1788 |
+
// Dataset trajectory mode. Trajectories are read from
|
| 1789 |
+
// <datasetRoot>/trajectory/*.csv. Captures are saved into
|
| 1790 |
+
// <datasetRoot>/images/<trajectory_name>/images_{front,down,left,right}/.
|
| 1791 |
+
bool datasetMode;
|
| 1792 |
+
bool quitOnFinish;
|
| 1793 |
+
std::string doneFile;
|
| 1794 |
+
bool returningToStart;
|
| 1795 |
+
std::string datasetRoot;
|
| 1796 |
+
std::string trajectoryDir;
|
| 1797 |
+
std::string datasetTrajectoryFile;
|
| 1798 |
+
std::vector<DatasetTrajectory> datasetTrajectories;
|
| 1799 |
+
size_t currentDatasetTrajectory;
|
| 1800 |
+
|
| 1801 |
+
// File-based Python control mode. After each captured frame set, the drone
|
| 1802 |
+
// holds position until Python writes x,y,z,yaw to commandFile.
|
| 1803 |
+
bool commandMode;
|
| 1804 |
+
bool waitingForCommand;
|
| 1805 |
+
std::string commandFile;
|
| 1806 |
+
std::string lastCommandText;
|
| 1807 |
+
std::time_t lastCommandMTime;
|
| 1808 |
+
ignition::math::Vector3d commandTarget;
|
| 1809 |
+
double commandYaw;
|
| 1810 |
+
|
| 1811 |
+
bool rejectGrayImages;
|
| 1812 |
+
int grayDelta;
|
| 1813 |
+
int grayMin;
|
| 1814 |
+
int grayMax;
|
| 1815 |
+
double grayMaxRatio;
|
| 1816 |
+
double grayTileRatio;
|
| 1817 |
+
double grayScanlineRatio;
|
| 1818 |
+
double minLumaStd;
|
| 1819 |
+
int minRgbRange;
|
| 1820 |
+
double viewDownTilt;
|
| 1821 |
+
double minValidImageRatio;
|
| 1822 |
+
unsigned int grayRejectWarnCounter;
|
| 1823 |
+
|
| 1824 |
+
std::mutex frameMutex;
|
| 1825 |
+
std::vector<CachedFrame> latestFrames;
|
| 1826 |
+
bool physicalSequenceInProgress;
|
| 1827 |
+
size_t physicalViewIndex;
|
| 1828 |
+
bool physicalWarned;
|
| 1829 |
+
bool physicalViewArmed;
|
| 1830 |
+
common::Time physicalBaselineTime;
|
| 1831 |
+
unsigned int physicalRejectCount;
|
| 1832 |
+
bool physicalFallbackToSweep;
|
| 1833 |
+
std::vector<CachedFrame> physicalFrames;
|
| 1834 |
+
bool sweepInProgress;
|
| 1835 |
+
bool sweepPoseSet;
|
| 1836 |
+
size_t sweepViewIndex;
|
| 1837 |
+
unsigned int sweepYawAttempt;
|
| 1838 |
+
bool sweepTimeoutWarned;
|
| 1839 |
+
common::Time sweepStartTime;
|
| 1840 |
+
common::Time sweepBaselineFrameTime;
|
| 1841 |
+
ignition::math::Pose3d sweepBasePose;
|
| 1842 |
+
std::vector<CachedFrame> sweepFrames;
|
| 1843 |
+
};
|
| 1844 |
+
|
| 1845 |
+
GZ_REGISTER_MODEL_PLUGIN(SimpleDronePlugin)
|
| 1846 |
+
}
|
simulation/run.sh
ADDED
|
@@ -0,0 +1,391 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
#
|
| 3 |
+
# Launch a world simulation in single-trajectory playback mode. The
|
| 4 |
+
# SimpleDronePlugin reads one trajectory CSV, stops at every point, captures
|
| 5 |
+
# front/down/left/right images under that trajectory's subdirectory, writes
|
| 6 |
+
# captured yaw back to the CSV, then stops.
|
| 7 |
+
#
|
| 8 |
+
# Usage:
|
| 9 |
+
# ./run.sh trajectory_0001_Reach-Avoid.csv
|
| 10 |
+
# ./run.sh gui trajectory_0001_Reach-Avoid.csv
|
| 11 |
+
# ./run.sh v2 trajectory_0001.csv
|
| 12 |
+
# DATASET_ROOT=datasets/world_v2 ./run.sh trajectory_0001.csv
|
| 13 |
+
# ./run.sh datasets/world_v1/trajectory/trajectory_0001_Reach-Avoid.csv
|
| 14 |
+
# ./run.sh # defaults to the first CSV in trajectory/
|
| 15 |
+
#
|
| 16 |
+
set -euo pipefail
|
| 17 |
+
|
| 18 |
+
echo "[run.sh] initializing..."
|
| 19 |
+
|
| 20 |
+
# Project layout, resolved from this script location.
|
| 21 |
+
PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
| 22 |
+
WORLD_DIR="${PROJECT_DIR}/world"
|
| 23 |
+
PLUGIN_BUILD="${PROJECT_DIR}/plugins/build"
|
| 24 |
+
DATASET_ROOT_WAS_SET=0
|
| 25 |
+
if [[ -n "${DATASET_ROOT:-}" ]]; then
|
| 26 |
+
DATASET_ROOT_WAS_SET=1
|
| 27 |
+
fi
|
| 28 |
+
|
| 29 |
+
# --- load Gazebo's default paths (sun, ground_plane, system plugins, ...) ---
|
| 30 |
+
# (setup.sh references unset vars, so relax nounset while sourcing it)
|
| 31 |
+
set +u
|
| 32 |
+
# shellcheck disable=SC1091
|
| 33 |
+
source /usr/share/gazebo/setup.sh
|
| 34 |
+
set -u
|
| 35 |
+
|
| 36 |
+
# --- strip Anaconda from PATH / LD_LIBRARY_PATH (its protobuf clashes with Gazebo) ---
|
| 37 |
+
CLEAN_PATH=$(printf '%s' "${PATH}" | awk -v RS=: 'tolower($0) !~ /anaconda/ {printf "%s%s", sep, $0; sep=":"}')
|
| 38 |
+
CLEAN_LD=$(printf '%s' "${LD_LIBRARY_PATH:-}" | awk -v RS=: 'tolower($0) !~ /anaconda/ {printf "%s%s", sep, $0; sep=":"}')
|
| 39 |
+
|
| 40 |
+
export PATH="${CLEAN_PATH}"
|
| 41 |
+
export LD_LIBRARY_PATH="${CLEAN_LD}"
|
| 42 |
+
unset CONDA_PREFIX CONDA_DEFAULT_ENV CONDA_SHLVL CONDA_EXE _CONDA_EXE _CONDA_ROOT CONDA_PYTHON_EXE CONDA_PROMPT_MODIFIER
|
| 43 |
+
unset CMAKE_PREFIX_PATH Protobuf_DIR protobuf_DIR
|
| 44 |
+
# More stable rendering over remote X/RDP sessions. Camera sensors still need
|
| 45 |
+
# Gazebo's rendering backend even when running gzserver without the GUI.
|
| 46 |
+
export QT_X11_NO_MITSHM=1
|
| 47 |
+
if [[ "${SIMPLE_DRONE_RENDER_BACKEND:-system}" == "nvidia" ]]; then
|
| 48 |
+
export LIBGL_ALWAYS_SOFTWARE=0
|
| 49 |
+
export __NV_PRIME_RENDER_OFFLOAD=1
|
| 50 |
+
export __GLX_VENDOR_LIBRARY_NAME=nvidia
|
| 51 |
+
elif [[ "${SIMPLE_DRONE_RENDER_BACKEND:-system}" == "software" ||
|
| 52 |
+
"${SIMPLE_DRONE_RENDER_BACKEND:-system}" == "xvfb" ]]; then
|
| 53 |
+
export LIBGL_ALWAYS_SOFTWARE=1
|
| 54 |
+
unset __NV_PRIME_RENDER_OFFLOAD
|
| 55 |
+
export __GLX_VENDOR_LIBRARY_NAME=mesa
|
| 56 |
+
export MESA_LOADER_DRIVER_OVERRIDE="${MESA_LOADER_DRIVER_OVERRIDE:-swrast}"
|
| 57 |
+
else
|
| 58 |
+
export LIBGL_ALWAYS_SOFTWARE=0
|
| 59 |
+
unset __NV_PRIME_RENDER_OFFLOAD __GLX_VENDOR_LIBRARY_NAME MESA_LOADER_DRIVER_OVERRIDE
|
| 60 |
+
fi
|
| 61 |
+
# prepend our project paths to whatever setup.sh configured
|
| 62 |
+
export GAZEBO_PLUGIN_PATH="${PLUGIN_BUILD}:${GAZEBO_PLUGIN_PATH:-}"
|
| 63 |
+
export GAZEBO_MODEL_PATH="${PROJECT_DIR}/models:${GAZEBO_MODEL_PATH:-}"
|
| 64 |
+
# so Gazebo registers <proj>/media/materials/{scripts,textures} and loads our
|
| 65 |
+
# custom materials (e.g. Home/MutedWoodFloor used by the floor)
|
| 66 |
+
export GAZEBO_RESOURCE_PATH="${PROJECT_DIR}:${GAZEBO_RESOURCE_PATH:-}"
|
| 67 |
+
|
| 68 |
+
# Avoid colliding with a stale or separately running Gazebo master on 11345.
|
| 69 |
+
# Dataset capture defaults to an isolated master even if the shell exports
|
| 70 |
+
# GAZEBO_MASTER_URI. Set SIMPLE_DRONE_KEEP_MASTER_URI=1 to opt into reuse.
|
| 71 |
+
if [[ -n "${SIMPLE_DRONE_MASTER_PORT:-}" ]]; then
|
| 72 |
+
export GAZEBO_MASTER_URI="http://127.0.0.1:${SIMPLE_DRONE_MASTER_PORT}"
|
| 73 |
+
elif [[ -z "${GAZEBO_MASTER_URI:-}" || "${SIMPLE_DRONE_KEEP_MASTER_URI:-0}" == "0" ]]; then
|
| 74 |
+
GAZEBO_MASTER_PORT=""
|
| 75 |
+
GAZEBO_MASTER_PORT="$(
|
| 76 |
+
python3 - <<'PY' 2>/dev/null || true
|
| 77 |
+
import socket
|
| 78 |
+
|
| 79 |
+
for port in range(11345, 11446):
|
| 80 |
+
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
|
| 81 |
+
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
| 82 |
+
try:
|
| 83 |
+
sock.bind(("127.0.0.1", port))
|
| 84 |
+
except OSError:
|
| 85 |
+
continue
|
| 86 |
+
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
|
| 87 |
+
try:
|
| 88 |
+
sock.settimeout(0.1)
|
| 89 |
+
sock.connect(("localhost", port))
|
| 90 |
+
except OSError:
|
| 91 |
+
print(port)
|
| 92 |
+
break
|
| 93 |
+
else:
|
| 94 |
+
raise SystemExit("no free Gazebo master port in 11345..11445")
|
| 95 |
+
PY
|
| 96 |
+
)"
|
| 97 |
+
if [[ -z "${GAZEBO_MASTER_PORT}" ]]; then
|
| 98 |
+
GAZEBO_MASTER_PORT="${SIMPLE_DRONE_DEFAULT_MASTER_PORT:-11345}"
|
| 99 |
+
echo "[run.sh] warning: could not probe a free Gazebo master port; using ${GAZEBO_MASTER_PORT}" >&2
|
| 100 |
+
fi
|
| 101 |
+
export GAZEBO_MASTER_URI="http://127.0.0.1:${GAZEBO_MASTER_PORT}"
|
| 102 |
+
fi
|
| 103 |
+
|
| 104 |
+
# --- build the plugin if it is missing or out of date ---
|
| 105 |
+
PLUGIN_SO="${PLUGIN_BUILD}/libSimpleDronePlugin.so"
|
| 106 |
+
PLUGIN_SRC="${PROJECT_DIR}/plugins/SimpleDronePlugin.cc"
|
| 107 |
+
if [[ ! -f "${PLUGIN_SO}" || "${PLUGIN_SRC}" -nt "${PLUGIN_SO}" ]]; then
|
| 108 |
+
echo "[run.sh] building plugin..."
|
| 109 |
+
mkdir -p "${PLUGIN_BUILD}"
|
| 110 |
+
( cd "${PLUGIN_BUILD}" && cmake .. -DCMAKE_BUILD_TYPE=Release && make )
|
| 111 |
+
fi
|
| 112 |
+
|
| 113 |
+
# --- pick GUI vs headless ---
|
| 114 |
+
BIN="gzserver"
|
| 115 |
+
if [[ "${1:-}" == "gui" ]]; then
|
| 116 |
+
BIN="gazebo"
|
| 117 |
+
shift
|
| 118 |
+
fi
|
| 119 |
+
|
| 120 |
+
WORLD_ARG="${WORLD_FILE:-${WORLD_VERSION:-}}"
|
| 121 |
+
if [[ -n "${1:-}" ]]; then
|
| 122 |
+
if [[ "${1}" =~ ^v[0-9]+$ || "${1}" =~ ^[0-9]+$ || "${1}" == *.world ]]; then
|
| 123 |
+
WORLD_ARG="${1}"
|
| 124 |
+
shift
|
| 125 |
+
fi
|
| 126 |
+
fi
|
| 127 |
+
|
| 128 |
+
if [[ "${DATASET_ROOT_WAS_SET}" -eq 0 ]]; then
|
| 129 |
+
if [[ "${WORLD_ARG}" =~ ^v?([0-9]+)$ ]]; then
|
| 130 |
+
DATASET_ROOT="${PROJECT_DIR}/datasets/world_v${BASH_REMATCH[1]}"
|
| 131 |
+
else
|
| 132 |
+
DATASET_ROOT="${PROJECT_DIR}/datasets/world_v1"
|
| 133 |
+
fi
|
| 134 |
+
else
|
| 135 |
+
DATASET_ROOT_PARENT="$(dirname "${DATASET_ROOT}")"
|
| 136 |
+
DATASET_ROOT_BASE="$(basename "${DATASET_ROOT}")"
|
| 137 |
+
DATASET_ROOT="$(cd "${DATASET_ROOT_PARENT}" && pwd)/${DATASET_ROOT_BASE}"
|
| 138 |
+
fi
|
| 139 |
+
|
| 140 |
+
if [[ -z "${WORLD_ARG}" && "$(basename "${DATASET_ROOT}")" =~ ^world_v([0-9]+)$ ]]; then
|
| 141 |
+
WORLD_ARG="v${BASH_REMATCH[1]}"
|
| 142 |
+
fi
|
| 143 |
+
WORLD_ARG="${WORLD_ARG:-v1}"
|
| 144 |
+
|
| 145 |
+
if [[ "${WORLD_ARG}" =~ ^v([0-9]+)$ ]]; then
|
| 146 |
+
WORLD="${WORLD_DIR}/home_room_v${BASH_REMATCH[1]}.world"
|
| 147 |
+
elif [[ "${WORLD_ARG}" =~ ^[0-9]+$ ]]; then
|
| 148 |
+
WORLD="${WORLD_DIR}/home_room_v${WORLD_ARG}.world"
|
| 149 |
+
else
|
| 150 |
+
WORLD="${WORLD_ARG}"
|
| 151 |
+
fi
|
| 152 |
+
|
| 153 |
+
if [[ "${WORLD}" != /* ]]; then
|
| 154 |
+
WORLD="$(cd "$(dirname "${WORLD}")" && pwd)/$(basename "${WORLD}")"
|
| 155 |
+
fi
|
| 156 |
+
|
| 157 |
+
if [[ ! -f "${WORLD}" ]]; then
|
| 158 |
+
echo "[run.sh] world file not found: ${WORLD}" >&2
|
| 159 |
+
exit 1
|
| 160 |
+
fi
|
| 161 |
+
|
| 162 |
+
mkdir -p \
|
| 163 |
+
"${DATASET_ROOT}/images" \
|
| 164 |
+
"${DATASET_ROOT}/trajectory"
|
| 165 |
+
|
| 166 |
+
TRAJECTORY_ARG="${1:-}"
|
| 167 |
+
if [[ -z "${TRAJECTORY_ARG}" ]]; then
|
| 168 |
+
mapfile -t TRAJECTORY_CANDIDATES < <(
|
| 169 |
+
find "${DATASET_ROOT}/trajectory" -maxdepth 1 -type f -name '*.csv' | sort
|
| 170 |
+
)
|
| 171 |
+
TRAJECTORY_FILE="${TRAJECTORY_CANDIDATES[0]:-}"
|
| 172 |
+
elif [[ -f "${TRAJECTORY_ARG}" ]]; then
|
| 173 |
+
TRAJECTORY_FILE="$(cd "$(dirname "${TRAJECTORY_ARG}")" && pwd)/$(basename "${TRAJECTORY_ARG}")"
|
| 174 |
+
elif [[ -f "${DATASET_ROOT}/trajectory/${TRAJECTORY_ARG}" ]]; then
|
| 175 |
+
TRAJECTORY_FILE="${DATASET_ROOT}/trajectory/${TRAJECTORY_ARG}"
|
| 176 |
+
else
|
| 177 |
+
echo "[run.sh] trajectory CSV not found: ${TRAJECTORY_ARG}" >&2
|
| 178 |
+
exit 1
|
| 179 |
+
fi
|
| 180 |
+
|
| 181 |
+
if [[ -z "${TRAJECTORY_FILE}" || ! -f "${TRAJECTORY_FILE}" ]]; then
|
| 182 |
+
echo "[run.sh] no trajectory CSV found in ${DATASET_ROOT}/trajectory" >&2
|
| 183 |
+
exit 1
|
| 184 |
+
fi
|
| 185 |
+
|
| 186 |
+
# The model.sdf may contain an absolute <image_dir>; the plugin lets this env
|
| 187 |
+
# var override it so paths stay project-relative.
|
| 188 |
+
export SIMPLE_DRONE_IMAGE_DIR="${DATASET_ROOT}/images"
|
| 189 |
+
export SIMPLE_DRONE_DATASET_ROOT="${DATASET_ROOT}"
|
| 190 |
+
export SIMPLE_DRONE_DATASET_TRAJECTORY_FILE="${TRAJECTORY_FILE}"
|
| 191 |
+
|
| 192 |
+
DONE_FILE=""
|
| 193 |
+
if [[ "${SIMPLE_DRONE_QUIT_ON_FINISH:-0}" != "0" ]]; then
|
| 194 |
+
DONE_DIR="${DATASET_ROOT}/.run_done"
|
| 195 |
+
mkdir -p "${DONE_DIR}"
|
| 196 |
+
DONE_FILE="${DONE_DIR}/$(basename "${TRAJECTORY_FILE}" .csv).done"
|
| 197 |
+
rm -f "${DONE_FILE}"
|
| 198 |
+
export SIMPLE_DRONE_DONE_FILE="${DONE_FILE}"
|
| 199 |
+
fi
|
| 200 |
+
|
| 201 |
+
# --- start or reuse an X server for camera rendering ---
|
| 202 |
+
HEADLESS_XORG=""
|
| 203 |
+
XORG_CONF_DIR=""
|
| 204 |
+
if [[ "${BIN}" == "gzserver" ]]; then
|
| 205 |
+
if [[ "${SIMPLE_DRONE_RENDER_BACKEND:-system}" != "xvfb" &&
|
| 206 |
+
"${SIMPLE_DRONE_RENDER_BACKEND:-system}" != "nvidia" ]] &&
|
| 207 |
+
[[ -n "${DISPLAY:-}" ]] &&
|
| 208 |
+
xdpyinfo -display "${DISPLAY}" &>/dev/null; then
|
| 209 |
+
echo "[run.sh] using existing DISPLAY=${DISPLAY}"
|
| 210 |
+
else
|
| 211 |
+
if [[ -n "${DISPLAY:-}" ]]; then
|
| 212 |
+
echo "[run.sh] DISPLAY=${DISPLAY} is not usable; starting a private render display"
|
| 213 |
+
fi
|
| 214 |
+
unset DISPLAY
|
| 215 |
+
|
| 216 |
+
XORG_CONF_DIR=$(mktemp -d /tmp/headless_xorg.XXXXXX)
|
| 217 |
+
RENDER_LOG_DIR="${DATASET_ROOT}/.run_logs"
|
| 218 |
+
mkdir -p "${RENDER_LOG_DIR}"
|
| 219 |
+
XORG_LOG="${RENDER_LOG_DIR}/xorg.log"
|
| 220 |
+
XVFB_LOG="${RENDER_LOG_DIR}/xvfb.log"
|
| 221 |
+
|
| 222 |
+
# Find an available display number.
|
| 223 |
+
HEADLESS_DISPLAY="${SIMPLE_DRONE_DISPLAY_NUMBER:-8}"
|
| 224 |
+
while [[ -e "/tmp/.X${HEADLESS_DISPLAY}-lock" ]]; do
|
| 225 |
+
HEADLESS_DISPLAY=$((HEADLESS_DISPLAY + 1))
|
| 226 |
+
done
|
| 227 |
+
|
| 228 |
+
NVIDIA_BUS_ID="${SIMPLE_DRONE_NVIDIA_BUS_ID:-}"
|
| 229 |
+
if [[ -z "${NVIDIA_BUS_ID}" ]] && command -v lspci >/dev/null 2>&1; then
|
| 230 |
+
NVIDIA_PCI_ADDR="$(lspci -D | awk '/NVIDIA/ && /VGA|3D|Display/ {print $1; exit}' || true)"
|
| 231 |
+
if [[ "${NVIDIA_PCI_ADDR}" =~ ^[0-9a-fA-F]+:([0-9a-fA-F]+):([0-9a-fA-F]+)\.([0-9]+)$ ]]; then
|
| 232 |
+
NVIDIA_BUS_ID="PCI:$((16#${BASH_REMATCH[1]})):$((16#${BASH_REMATCH[2]})):${BASH_REMATCH[3]}"
|
| 233 |
+
fi
|
| 234 |
+
fi
|
| 235 |
+
|
| 236 |
+
STARTED_RENDER_SERVER=0
|
| 237 |
+
if [[ "${SIMPLE_DRONE_RENDER_BACKEND:-system}" != "xvfb" ]] &&
|
| 238 |
+
[[ -n "${NVIDIA_BUS_ID}" ]] &&
|
| 239 |
+
nvidia-smi >/dev/null 2>&1; then
|
| 240 |
+
cat > "${XORG_CONF_DIR}/xorg.conf" <<XORG
|
| 241 |
+
Section "ServerLayout"
|
| 242 |
+
Identifier "HeadlessLayout"
|
| 243 |
+
Screen 0 "Screen0" 0 0
|
| 244 |
+
EndSection
|
| 245 |
+
|
| 246 |
+
Section "Device"
|
| 247 |
+
Identifier "nvidia"
|
| 248 |
+
Driver "nvidia"
|
| 249 |
+
BusID "${NVIDIA_BUS_ID}"
|
| 250 |
+
EndSection
|
| 251 |
+
|
| 252 |
+
Section "Screen"
|
| 253 |
+
Identifier "Screen0"
|
| 254 |
+
Device "nvidia"
|
| 255 |
+
DefaultDepth 24
|
| 256 |
+
SubSection "Display"
|
| 257 |
+
Depth 24
|
| 258 |
+
Modes "1024x768"
|
| 259 |
+
EndSubSection
|
| 260 |
+
EndSection
|
| 261 |
+
|
| 262 |
+
Section "ServerFlags"
|
| 263 |
+
Option "DontVTSwitch" "True"
|
| 264 |
+
Option "AllowMouseOpenFail" "True"
|
| 265 |
+
EndSection
|
| 266 |
+
XORG
|
| 267 |
+
|
| 268 |
+
echo "[run.sh] starting headless Xorg on :${HEADLESS_DISPLAY} (${NVIDIA_BUS_ID})"
|
| 269 |
+
(
|
| 270 |
+
cd "${XORG_CONF_DIR}"
|
| 271 |
+
Xorg -noreset +extension GLX +extension RANDR +extension RENDER \
|
| 272 |
+
-config xorg.conf ":${HEADLESS_DISPLAY}"
|
| 273 |
+
) >"${XORG_LOG}" 2>&1 &
|
| 274 |
+
HEADLESS_XORG=$!
|
| 275 |
+
|
| 276 |
+
for _ in $(seq 1 30); do
|
| 277 |
+
if xdpyinfo -display ":${HEADLESS_DISPLAY}" &>/dev/null; then
|
| 278 |
+
STARTED_RENDER_SERVER=1
|
| 279 |
+
break
|
| 280 |
+
fi
|
| 281 |
+
if ! kill -0 "${HEADLESS_XORG}" 2>/dev/null; then
|
| 282 |
+
break
|
| 283 |
+
fi
|
| 284 |
+
sleep 0.5
|
| 285 |
+
done
|
| 286 |
+
|
| 287 |
+
if [[ "${STARTED_RENDER_SERVER}" -eq 0 ]]; then
|
| 288 |
+
echo "[run.sh] headless Xorg failed; log -> ${XORG_LOG}"
|
| 289 |
+
kill "${HEADLESS_XORG}" 2>/dev/null || true
|
| 290 |
+
wait "${HEADLESS_XORG}" 2>/dev/null || true
|
| 291 |
+
HEADLESS_XORG=""
|
| 292 |
+
fi
|
| 293 |
+
fi
|
| 294 |
+
|
| 295 |
+
if [[ "${STARTED_RENDER_SERVER}" -eq 0 ]]; then
|
| 296 |
+
if ! command -v Xvfb >/dev/null 2>&1; then
|
| 297 |
+
echo "[run.sh] neither usable DISPLAY nor Xvfb is available" >&2
|
| 298 |
+
exit 1
|
| 299 |
+
fi
|
| 300 |
+
|
| 301 |
+
while [[ -e "/tmp/.X${HEADLESS_DISPLAY}-lock" ]]; do
|
| 302 |
+
HEADLESS_DISPLAY=$((HEADLESS_DISPLAY + 1))
|
| 303 |
+
done
|
| 304 |
+
|
| 305 |
+
echo "[run.sh] starting Xvfb on :${HEADLESS_DISPLAY}"
|
| 306 |
+
Xvfb ":${HEADLESS_DISPLAY}" -screen 0 1024x768x24 >"${XVFB_LOG}" 2>&1 &
|
| 307 |
+
HEADLESS_XORG=$!
|
| 308 |
+
|
| 309 |
+
for _ in $(seq 1 30); do
|
| 310 |
+
if xdpyinfo -display ":${HEADLESS_DISPLAY}" &>/dev/null; then
|
| 311 |
+
STARTED_RENDER_SERVER=1
|
| 312 |
+
break
|
| 313 |
+
fi
|
| 314 |
+
if ! kill -0 "${HEADLESS_XORG}" 2>/dev/null; then
|
| 315 |
+
break
|
| 316 |
+
fi
|
| 317 |
+
sleep 0.5
|
| 318 |
+
done
|
| 319 |
+
|
| 320 |
+
if [[ "${STARTED_RENDER_SERVER}" -eq 0 ]]; then
|
| 321 |
+
echo "[run.sh] failed to start Xvfb; log -> ${XVFB_LOG}" >&2
|
| 322 |
+
tail -n 40 "${XVFB_LOG}" >&2 || true
|
| 323 |
+
ls -ld /tmp /tmp/.X11-unix >&2 || true
|
| 324 |
+
rm -rf "${XORG_CONF_DIR}"
|
| 325 |
+
exit 1
|
| 326 |
+
fi
|
| 327 |
+
|
| 328 |
+
export LIBGL_ALWAYS_SOFTWARE=1
|
| 329 |
+
unset __NV_PRIME_RENDER_OFFLOAD
|
| 330 |
+
export __GLX_VENDOR_LIBRARY_NAME=mesa
|
| 331 |
+
export MESA_LOADER_DRIVER_OVERRIDE="${MESA_LOADER_DRIVER_OVERRIDE:-swrast}"
|
| 332 |
+
fi
|
| 333 |
+
|
| 334 |
+
export DISPLAY=":${HEADLESS_DISPLAY}"
|
| 335 |
+
fi
|
| 336 |
+
fi
|
| 337 |
+
|
| 338 |
+
echo "[run.sh] launching ${BIN} on ${WORLD}"
|
| 339 |
+
echo "[run.sh] gazebo master -> ${GAZEBO_MASTER_URI}"
|
| 340 |
+
echo "[run.sh] dataset -> ${DATASET_ROOT}"
|
| 341 |
+
echo "[run.sh] trajectory -> ${TRAJECTORY_FILE}"
|
| 342 |
+
echo "[run.sh] images -> ${DATASET_ROOT}/images/<trajectory_name>/images_{front,down,left,right}"
|
| 343 |
+
echo "[run.sh] trajectories -> ${DATASET_ROOT}/trajectory"
|
| 344 |
+
|
| 345 |
+
cleanup() {
|
| 346 |
+
if [[ -n "${GAZEBO_PID:-}" ]] && kill -0 "${GAZEBO_PID}" 2>/dev/null; then
|
| 347 |
+
kill -- "-${GAZEBO_PID}" 2>/dev/null || kill "${GAZEBO_PID}" 2>/dev/null || true
|
| 348 |
+
wait "${GAZEBO_PID}" 2>/dev/null || true
|
| 349 |
+
fi
|
| 350 |
+
if [[ -n "${HEADLESS_XORG:-}" ]] && kill -0 "${HEADLESS_XORG}" 2>/dev/null; then
|
| 351 |
+
kill -- "-${HEADLESS_XORG}" 2>/dev/null || kill "${HEADLESS_XORG}" 2>/dev/null || true
|
| 352 |
+
wait "${HEADLESS_XORG}" 2>/dev/null || true
|
| 353 |
+
fi
|
| 354 |
+
if [[ -n "${XORG_CONF_DIR:-}" ]] && [[ -d "${XORG_CONF_DIR}" ]]; then
|
| 355 |
+
rm -rf "${XORG_CONF_DIR}"
|
| 356 |
+
fi
|
| 357 |
+
}
|
| 358 |
+
trap cleanup EXIT INT TERM
|
| 359 |
+
|
| 360 |
+
if [[ -z "${DONE_FILE}" ]]; then
|
| 361 |
+
"${BIN}" --verbose "${WORLD}"
|
| 362 |
+
cleanup
|
| 363 |
+
trap - EXIT INT TERM
|
| 364 |
+
exit 0
|
| 365 |
+
fi
|
| 366 |
+
|
| 367 |
+
setsid "${BIN}" --verbose "${WORLD}" &
|
| 368 |
+
GAZEBO_PID=$!
|
| 369 |
+
RUN_START_TIME="$(date +%s)"
|
| 370 |
+
RUN_TIMEOUT="${SIMPLE_DRONE_RUN_TIMEOUT:-900}"
|
| 371 |
+
|
| 372 |
+
while kill -0 "${GAZEBO_PID}" 2>/dev/null; do
|
| 373 |
+
if [[ -f "${DONE_FILE}" ]]; then
|
| 374 |
+
echo "[run.sh] trajectory complete -> ${DONE_FILE}"
|
| 375 |
+
cleanup
|
| 376 |
+
trap - EXIT INT TERM
|
| 377 |
+
exit 0
|
| 378 |
+
fi
|
| 379 |
+
if [[ "${RUN_TIMEOUT}" -gt 0 ]]; then
|
| 380 |
+
NOW="$(date +%s)"
|
| 381 |
+
if (( NOW - RUN_START_TIME > RUN_TIMEOUT )); then
|
| 382 |
+
echo "[run.sh] timeout after ${RUN_TIMEOUT}s waiting for trajectory completion" >&2
|
| 383 |
+
cleanup
|
| 384 |
+
trap - EXIT INT TERM
|
| 385 |
+
exit 124
|
| 386 |
+
fi
|
| 387 |
+
fi
|
| 388 |
+
sleep 0.5
|
| 389 |
+
done
|
| 390 |
+
|
| 391 |
+
wait "${GAZEBO_PID}"
|
simulation/smoke.sh
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
# Outputs and the mutable CSV stay in datasets/smoke_world_vN.
|
| 3 |
+
set -euo pipefail
|
| 4 |
+
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
| 5 |
+
VERSION="${1:-v1}"
|
| 6 |
+
if [[ ! "${VERSION}" =~ ^v[1-4]$ ]]; then
|
| 7 |
+
echo "Usage: $0 [v1|v2|v3|v4]" >&2
|
| 8 |
+
exit 2
|
| 9 |
+
fi
|
| 10 |
+
mkdir -p "${ROOT}/datasets/smoke_world_${VERSION}/trajectory"
|
| 11 |
+
cp "${ROOT}/examples/smoke.csv" "${ROOT}/datasets/smoke_world_${VERSION}/trajectory/smoke.csv"
|
| 12 |
+
export WORLD_VERSION="${VERSION}"
|
| 13 |
+
export DATASET_CAPTURE_LIMIT=1
|
| 14 |
+
export DATASET_REVALIDATE_EXISTING=1
|
| 15 |
+
export DATASET_CAPTURE_MAX_ATTEMPTS=1
|
| 16 |
+
export SIMPLE_DRONE_RUN_TIMEOUT="${SIMPLE_DRONE_RUN_TIMEOUT:-120}"
|
| 17 |
+
"${ROOT}/datasets_construct.sh" "${ROOT}/datasets/smoke_world_${VERSION}"
|
| 18 |
+
# The original capture script can skip timeouts; require actual outputs here.
|
| 19 |
+
python3 - "${ROOT}/datasets/smoke_world_${VERSION}" <<'PY'
|
| 20 |
+
import csv
|
| 21 |
+
import sys
|
| 22 |
+
from pathlib import Path
|
| 23 |
+
from PIL import Image
|
| 24 |
+
root = Path(sys.argv[1])
|
| 25 |
+
rows = list(csv.DictReader((root / 'trajectory/smoke.csv').open()))
|
| 26 |
+
assert len(rows) == 1 and rows[0].get('capture_frame'), 'Capture did not finish'
|
| 27 |
+
for view in ('front', 'down', 'left', 'right'):
|
| 28 |
+
path = root / 'images/smoke' / ('images_' + view) / rows[0][view + '_image']
|
| 29 |
+
with Image.open(path) as image:
|
| 30 |
+
assert image.size == (640, 480), (path, image.size)
|
| 31 |
+
image.verify()
|
| 32 |
+
print('PASS: four 640x480 images and capture metadata')
|
| 33 |
+
PY
|
simulation/validation/build.log
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[gazebo_env] PROJECT_DIR=/data_sda/zbf/home/release/simulation_environment
|
| 2 |
+
[gazebo_env] GAZEBO_PLUGIN_PATH=/data_sda/zbf/home/release/simulation_environment/plugins/build:/usr/lib/x86_64-linux-gnu/gazebo-11/plugins:
|
| 3 |
+
[gazebo_env] GAZEBO_MODEL_PATH=/data_sda/zbf/home/release/simulation_environment/models:/usr/share/gazebo-11/models:
|
| 4 |
+
-- The C compiler identification is GNU 9.4.0
|
| 5 |
+
-- The CXX compiler identification is GNU 9.4.0
|
| 6 |
+
-- Check for working C compiler: /usr/bin/cc
|
| 7 |
+
-- Check for working C compiler: /usr/bin/cc -- works
|
| 8 |
+
-- Detecting C compiler ABI info
|
| 9 |
+
-- Detecting C compiler ABI info - done
|
| 10 |
+
-- Detecting C compile features
|
| 11 |
+
-- Detecting C compile features - done
|
| 12 |
+
-- Check for working CXX compiler: /usr/bin/c++
|
| 13 |
+
-- Check for working CXX compiler: /usr/bin/c++ -- works
|
| 14 |
+
-- Detecting CXX compiler ABI info
|
| 15 |
+
-- Detecting CXX compiler ABI info - done
|
| 16 |
+
-- Detecting CXX compile features
|
| 17 |
+
-- Detecting CXX compile features - done
|
| 18 |
+
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
|
| 19 |
+
-- Checking for module 'bullet>=2.82'
|
| 20 |
+
-- Found bullet, version 2.88
|
| 21 |
+
-- Found ccd: /usr/include (found suitable version "2.0", minimum required is "2.0")
|
| 22 |
+
-- Found fcl: /usr/include (found suitable version "0.5.0", minimum required is "0.3.2")
|
| 23 |
+
-- Found assimp: /usr/include (found version "5.0.0")
|
| 24 |
+
-- Found DART: /usr/include (Required is at least version "6.6") found components: dart
|
| 25 |
+
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.40.0") found components: thread system filesystem program_options regex iostreams date_time
|
| 26 |
+
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread (found version "3.6.1")
|
| 27 |
+
-- Looking for ignition-math6 -- found version 6.15.1
|
| 28 |
+
-- Searching for dependencies of ignition-math6
|
| 29 |
+
-- Looking for OGRE...
|
| 30 |
+
-- OGRE_PREFIX_WATCH changed.
|
| 31 |
+
-- Checking for module 'OGRE'
|
| 32 |
+
-- Found OGRE, version 1.9.0
|
| 33 |
+
-- Found Ogre Ghadamon (1.9.0)
|
| 34 |
+
-- Found OGRE: optimized;/usr/lib/x86_64-linux-gnu/libOgreMain.so;debug;/usr/lib/x86_64-linux-gnu/libOgreMain.so
|
| 35 |
+
-- Looking for OGRE_Paging...
|
| 36 |
+
-- Found OGRE_Paging: optimized;/usr/lib/x86_64-linux-gnu/libOgrePaging.so;debug;/usr/lib/x86_64-linux-gnu/libOgrePaging.so
|
| 37 |
+
-- Looking for OGRE_Terrain...
|
| 38 |
+
-- Found OGRE_Terrain: optimized;/usr/lib/x86_64-linux-gnu/libOgreTerrain.so;debug;/usr/lib/x86_64-linux-gnu/libOgreTerrain.so
|
| 39 |
+
-- Looking for OGRE_Property...
|
| 40 |
+
-- Found OGRE_Property: optimized;/usr/lib/x86_64-linux-gnu/libOgreProperty.so;debug;/usr/lib/x86_64-linux-gnu/libOgreProperty.so
|
| 41 |
+
-- Looking for OGRE_RTShaderSystem...
|
| 42 |
+
-- Found OGRE_RTShaderSystem: optimized;/usr/lib/x86_64-linux-gnu/libOgreRTShaderSystem.so;debug;/usr/lib/x86_64-linux-gnu/libOgreRTShaderSystem.so
|
| 43 |
+
-- Looking for OGRE_Volume...
|
| 44 |
+
-- Found OGRE_Volume: optimized;/usr/lib/x86_64-linux-gnu/libOgreVolume.so;debug;/usr/lib/x86_64-linux-gnu/libOgreVolume.so
|
| 45 |
+
-- Looking for OGRE_Overlay...
|
| 46 |
+
-- Found OGRE_Overlay: optimized;/usr/lib/x86_64-linux-gnu/libOgreOverlay.so;debug;/usr/lib/x86_64-linux-gnu/libOgreOverlay.so
|
| 47 |
+
-- Looking for ignition-math6 -- found version 6.15.1
|
| 48 |
+
-- Looking for ignition-transport8 -- found version 8.5.0
|
| 49 |
+
-- Searching for dependencies of ignition-transport8
|
| 50 |
+
-- Config-file not installed for ZeroMQ -- checking for pkg-config
|
| 51 |
+
-- Checking for module 'libzmq >= 4'
|
| 52 |
+
-- Found libzmq , version 4.3.2
|
| 53 |
+
-- Found ZeroMQ: TRUE (Required is at least version "4")
|
| 54 |
+
-- Checking for module 'uuid'
|
| 55 |
+
-- Found uuid, version 2.34.0
|
| 56 |
+
-- Found UUID: TRUE
|
| 57 |
+
-- Looking for ignition-msgs5 -- found version 5.11.0
|
| 58 |
+
-- Searching for dependencies of ignition-msgs5
|
| 59 |
+
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread (found suitable version "3.6.1", minimum required is "3")
|
| 60 |
+
-- Looking for ignition-math6 -- found version 6.15.1
|
| 61 |
+
-- Checking for module 'tinyxml2'
|
| 62 |
+
-- Found tinyxml2, version 6.2.0
|
| 63 |
+
-- Looking for ignition-msgs5 -- found version 5.11.0
|
| 64 |
+
-- Looking for ignition-common3 -- found version 3.17.0
|
| 65 |
+
-- Searching for dependencies of ignition-common3
|
| 66 |
+
-- Looking for dlfcn.h - found
|
| 67 |
+
-- Looking for libdl - found
|
| 68 |
+
-- Found DL: TRUE
|
| 69 |
+
-- Searching for <ignition-common3> component [graphics]
|
| 70 |
+
-- Looking for ignition-common3-graphics -- found version 3.17.0
|
| 71 |
+
-- Searching for dependencies of ignition-common3-graphics
|
| 72 |
+
-- Looking for ignition-math6 -- found version 6.15.1
|
| 73 |
+
-- Looking for ignition-fuel_tools4 -- found version 4.9.1
|
| 74 |
+
-- Searching for dependencies of ignition-fuel_tools4
|
| 75 |
+
-- Found CURL: /usr/lib/x86_64-linux-gnu/libcurl.so (found version "7.68.0")
|
| 76 |
+
-- Checking for module 'jsoncpp'
|
| 77 |
+
-- Found jsoncpp, version 1.7.4
|
| 78 |
+
-- Found JSONCPP: TRUE
|
| 79 |
+
-- Checking for module 'yaml-0.1'
|
| 80 |
+
-- Found yaml-0.1, version 0.2.2
|
| 81 |
+
-- Found YAML: TRUE
|
| 82 |
+
-- Checking for module 'libzip'
|
| 83 |
+
-- Found libzip, version 1.5.1
|
| 84 |
+
-- Found ZIP: TRUE
|
| 85 |
+
-- Looking for ignition-common3 -- found version 3.17.0
|
| 86 |
+
-- Looking for ignition-math6 -- found version 6.15.1
|
| 87 |
+
-- Looking for ignition-msgs5 -- found version 5.11.0
|
| 88 |
+
-- Configuring done
|
| 89 |
+
-- Generating done
|
| 90 |
+
-- Build files have been written to: /data_sda/zbf/home/release/simulation_environment/plugins/build
|
| 91 |
+
Scanning dependencies of target SimpleDronePlugin
|
| 92 |
+
[ 50%] Building CXX object CMakeFiles/SimpleDronePlugin.dir/SimpleDronePlugin.cc.o
|
| 93 |
+
[100%] Linking CXX shared library libSimpleDronePlugin.so
|
| 94 |
+
[100%] Built target SimpleDronePlugin
|
simulation/validation/smoke.log
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[datasets_construct] dataset -> /data_sda/zbf/home/release/simulation_environment/datasets/smoke_world_v1
|
| 2 |
+
[datasets_construct] total trajectories -> 1
|
| 3 |
+
[datasets_construct] scanning existing captures...
|
| 4 |
+
[datasets_construct] reached DATASET_CAPTURE_LIMIT=1; stopping scan early
|
| 5 |
+
[datasets_construct] remaining trajectories -> 1
|
| 6 |
+
[datasets_construct] max attempts -> 1
|
| 7 |
+
[datasets_construct] 1/1 running smoke.csv
|
| 8 |
+
[datasets_construct] attempt 1/1 smoke.csv
|
| 9 |
+
[run.sh] initializing...
|
| 10 |
+
[run.sh] starting Xvfb on :8
|
| 11 |
+
[run.sh] launching gzserver on /data_sda/zbf/home/release/simulation_environment/world/home_room_v1.world
|
| 12 |
+
[run.sh] gazebo master -> http://127.0.0.1:11345
|
| 13 |
+
[run.sh] dataset -> /data_sda/zbf/home/release/simulation_environment/datasets/smoke_world_v1
|
| 14 |
+
[run.sh] trajectory -> /data_sda/zbf/home/release/simulation_environment/datasets/smoke_world_v1/trajectory/smoke.csv
|
| 15 |
+
[run.sh] images -> /data_sda/zbf/home/release/simulation_environment/datasets/smoke_world_v1/images/<trajectory_name>/images_{front,down,left,right}
|
| 16 |
+
[run.sh] trajectories -> /data_sda/zbf/home/release/simulation_environment/datasets/smoke_world_v1/trajectory
|
| 17 |
+
Gazebo multi-robot simulator, version 11.15.1
|
| 18 |
+
Copyright (C) 2012 Open Source Robotics Foundation.
|
| 19 |
+
Released under the Apache 2 License.
|
| 20 |
+
http://gazebosim.org
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
# # ####### ####### ### ##### #######
|
| 24 |
+
## # # # # # # # #
|
| 25 |
+
# # # # # # # # #
|
| 26 |
+
# # # # # # # # #####
|
| 27 |
+
# # # # # # # # #
|
| 28 |
+
# ## # # # # # # #
|
| 29 |
+
# # ####### # ### ##### #######
|
| 30 |
+
|
| 31 |
+
This version of Gazebo, now called Gazebo classic, reaches end-of-life
|
| 32 |
+
in January 2025. Users are highly encouraged to migrate to the new Gazebo
|
| 33 |
+
using our migration guides (https://gazebosim.org/docs/latest/gazebo_classic_migration/)
|
| 34 |
+
|
| 35 |
+
|
| 36 |
+
[Msg] Waiting for master.
|
| 37 |
+
[Msg] Connected to gazebo master @ http://127.0.0.1:11345
|
| 38 |
+
[Msg] Publicized address: 10.249.42.188
|
| 39 |
+
[Msg] Loading world file [/data_sda/zbf/home/release/simulation_environment/world/home_room_v1.world]
|
| 40 |
+
[Msg] [SimpleDronePlugin] saving dataset RGB frames under: /data_sda/zbf/home/release/simulation_environment/datasets/smoke_world_v1/images/<trajectory>/{images_front,images_down,images_left,images_right}/
|
| 41 |
+
[Msg] [SimpleDronePlugin] gray-frame rejection enabled: gray_delta=3, gray_range=[120,136], max_gray_ratio=0.12, max_gray_tile_ratio=0.9, max_gray_scanline_ratio=0.95, min_luma_std=4, min_rgb_range=12
|
| 42 |
+
[Msg] [SimpleDronePlugin] loaded 1 dataset trajectory from /data_sda/zbf/home/release/simulation_environment/datasets/smoke_world_v1/trajectory/smoke.csv
|
| 43 |
+
[Msg] [SimpleDronePlugin] dataset trajectory 1/1: smoke (1 points)
|
| 44 |
+
[Err] [SimpleDronePlugin.cc:846] [SimpleDronePlugin] waiting for usable physical camera frame at target index 0; camera=cam_front; global gray ratio too high ratio=0.96641
|
| 45 |
+
[Err] [SimpleDronePlugin.cc:856] [SimpleDronePlugin] physical cameras stayed unusable at target index 0; switching the remainder of this trajectory to single-camera sweep.
|
| 46 |
+
[run.sh] trajectory complete -> /data_sda/zbf/home/release/simulation_environment/datasets/smoke_world_v1/.run_done/smoke.done
|
| 47 |
+
ok
|
| 48 |
+
[datasets_construct] verified smoke.csv
|
| 49 |
+
[datasets_construct] complete
|
| 50 |
+
PASS: four 640x480 images and capture metadata
|
simulation/world/home_room_v1.world
ADDED
|
@@ -0,0 +1,825 @@
|
|
|
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</uri>
|
| 11 |
+
</include>
|
| 12 |
+
|
| 13 |
+
<!-- =====================================================================
|
| 14 |
+
Layout: open-plan apartment, 15 m (x) x 10 m (y), walls 2.6 m tall.
|
| 15 |
+
x in [-7.5, 7.5], y in [-5, 5].
|
| 16 |
+
Left half (x < -1): living room (front) + dining (back)
|
| 17 |
+
Right half (x > 1): kitchen (front) + bedroom (back)
|
| 18 |
+
Surfaces use Gazebo's built-in textured materials (no extra files).
|
| 19 |
+
===================================================================== -->
|
| 20 |
+
|
| 21 |
+
<!-- ===================== Shell: floor / walls / ceiling ================ -->
|
| 22 |
+
<model name="floor">
|
| 23 |
+
<static>true</static>
|
| 24 |
+
<pose>0 0 0.01 0 0 0</pose>
|
| 25 |
+
<link name="link">
|
| 26 |
+
<visual name="visual">
|
| 27 |
+
<geometry><box><size>15 10 0.02</size></box></geometry>
|
| 28 |
+
<material>
|
| 29 |
+
<script>
|
| 30 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 31 |
+
<uri>file://media/materials/textures</uri>
|
| 32 |
+
<name>Home/MutedWoodFloor</name>
|
| 33 |
+
</script>
|
| 34 |
+
</material>
|
| 35 |
+
</visual>
|
| 36 |
+
<collision name="collision">
|
| 37 |
+
<geometry><box><size>15 10 0.02</size></box></geometry>
|
| 38 |
+
</collision>
|
| 39 |
+
</link>
|
| 40 |
+
</model>
|
| 41 |
+
|
| 42 |
+
<!-- Back wall (y = +5) -->
|
| 43 |
+
<model name="wall_back">
|
| 44 |
+
<static>true</static>
|
| 45 |
+
<pose>0 5 1.3 0 0 0</pose>
|
| 46 |
+
<link name="link">
|
| 47 |
+
<visual name="visual">
|
| 48 |
+
<geometry><box><size>15 0.15 2.6</size></box></geometry>
|
| 49 |
+
<material>
|
| 50 |
+
<script>
|
| 51 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 52 |
+
<uri>file://media/materials/textures</uri>
|
| 53 |
+
<name>Home/WallPaint</name>
|
| 54 |
+
</script>
|
| 55 |
+
</material>
|
| 56 |
+
</visual>
|
| 57 |
+
<collision name="collision"><geometry><box><size>15 0.15 2.6</size></box></geometry></collision>
|
| 58 |
+
</link>
|
| 59 |
+
</model>
|
| 60 |
+
|
| 61 |
+
<!-- Front wall (y = -5): brick accent wall (TV / kitchen side) -->
|
| 62 |
+
<model name="wall_front">
|
| 63 |
+
<static>true</static>
|
| 64 |
+
<pose>0 -5 1.3 0 0 0</pose>
|
| 65 |
+
<link name="link">
|
| 66 |
+
<visual name="visual">
|
| 67 |
+
<geometry><box><size>15 0.15 2.6</size></box></geometry>
|
| 68 |
+
<material>
|
| 69 |
+
<script>
|
| 70 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 71 |
+
<uri>file://media/materials/textures</uri>
|
| 72 |
+
<name>Home/Brick</name>
|
| 73 |
+
</script>
|
| 74 |
+
</material>
|
| 75 |
+
</visual>
|
| 76 |
+
<collision name="collision"><geometry><box><size>15 0.15 2.6</size></box></geometry></collision>
|
| 77 |
+
</link>
|
| 78 |
+
</model>
|
| 79 |
+
|
| 80 |
+
<!-- Left wall (x = -7.5) -->
|
| 81 |
+
<model name="wall_left">
|
| 82 |
+
<static>true</static>
|
| 83 |
+
<pose>-7.5 0 1.3 0 0 0</pose>
|
| 84 |
+
<link name="link">
|
| 85 |
+
<visual name="visual">
|
| 86 |
+
<geometry><box><size>0.15 10 2.6</size></box></geometry>
|
| 87 |
+
<material>
|
| 88 |
+
<script>
|
| 89 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 90 |
+
<uri>file://media/materials/textures</uri>
|
| 91 |
+
<name>Home/WallPaint</name>
|
| 92 |
+
</script>
|
| 93 |
+
</material>
|
| 94 |
+
</visual>
|
| 95 |
+
<collision name="collision"><geometry><box><size>0.15 10 2.6</size></box></geometry></collision>
|
| 96 |
+
</link>
|
| 97 |
+
</model>
|
| 98 |
+
|
| 99 |
+
<!-- Right wall (x = +7.5) -->
|
| 100 |
+
<model name="wall_right">
|
| 101 |
+
<static>true</static>
|
| 102 |
+
<pose>7.5 0 1.3 0 0 0</pose>
|
| 103 |
+
<link name="link">
|
| 104 |
+
<visual name="visual">
|
| 105 |
+
<geometry><box><size>0.15 10 2.6</size></box></geometry>
|
| 106 |
+
<material>
|
| 107 |
+
<script>
|
| 108 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 109 |
+
<uri>file://media/materials/textures</uri>
|
| 110 |
+
<name>Home/WallPaint</name>
|
| 111 |
+
</script>
|
| 112 |
+
</material>
|
| 113 |
+
</visual>
|
| 114 |
+
<collision name="collision"><geometry><box><size>0.15 10 2.6</size></box></geometry></collision>
|
| 115 |
+
</link>
|
| 116 |
+
</model>
|
| 117 |
+
|
| 118 |
+
<!-- Ceiling (z = 2.6). Comment this model out if it blocks a top-down GUI view. -->
|
| 119 |
+
<model name="ceiling">
|
| 120 |
+
<static>true</static>
|
| 121 |
+
<pose>0 0 2.625 0 0 0</pose>
|
| 122 |
+
<link name="link">
|
| 123 |
+
<visual name="visual">
|
| 124 |
+
<geometry><box><size>15 10 0.05</size></box></geometry>
|
| 125 |
+
<material>
|
| 126 |
+
<script>
|
| 127 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 128 |
+
<uri>file://media/materials/textures</uri>
|
| 129 |
+
<name>Home/Ceiling</name>
|
| 130 |
+
</script>
|
| 131 |
+
</material>
|
| 132 |
+
</visual>
|
| 133 |
+
</link>
|
| 134 |
+
</model>
|
| 135 |
+
|
| 136 |
+
<!-- ======================== LIVING ROOM (front-left) =================== -->
|
| 137 |
+
|
| 138 |
+
<!-- Rug under the coffee table -->
|
| 139 |
+
<model name="living_rug">
|
| 140 |
+
<static>true</static>
|
| 141 |
+
<pose>-1.4 -1.9 0.02 0 0 0</pose>
|
| 142 |
+
<link name="link">
|
| 143 |
+
<visual name="visual">
|
| 144 |
+
<geometry><box><size>3.4 2.8 0.02</size></box></geometry>
|
| 145 |
+
<material><ambient>0.46 0.43 0.39 1</ambient><diffuse>0.50 0.47 0.43 1</diffuse></material>
|
| 146 |
+
</visual>
|
| 147 |
+
</link>
|
| 148 |
+
</model>
|
| 149 |
+
|
| 150 |
+
<!-- Sofa (facing -y toward the TV), fabric -->
|
| 151 |
+
<model name="sofa">
|
| 152 |
+
<static>true</static>
|
| 153 |
+
<pose>-1.4 -0.7 0.35 0 0 0</pose>
|
| 154 |
+
<link name="link">
|
| 155 |
+
<visual name="base">
|
| 156 |
+
<geometry><box><size>2.1 0.85 0.35</size></box></geometry>
|
| 157 |
+
<material><ambient>0.44 0.42 0.39 1</ambient><diffuse>0.48 0.46 0.42 1</diffuse></material>
|
| 158 |
+
</visual>
|
| 159 |
+
<visual name="back">
|
| 160 |
+
<pose>0 0.4 0.32 0 0 0</pose>
|
| 161 |
+
<geometry><box><size>2.1 0.14 0.6</size></box></geometry>
|
| 162 |
+
<material><ambient>0.40 0.38 0.35 1</ambient><diffuse>0.43 0.41 0.38 1</diffuse></material>
|
| 163 |
+
</visual>
|
| 164 |
+
<visual name="left_arm">
|
| 165 |
+
<pose>-1.0 0 0.18 0 0 0</pose>
|
| 166 |
+
<geometry><box><size>0.16 0.85 0.5</size></box></geometry>
|
| 167 |
+
<material><ambient>0.40 0.38 0.35 1</ambient></material>
|
| 168 |
+
</visual>
|
| 169 |
+
<visual name="right_arm">
|
| 170 |
+
<pose>1.0 0 0.18 0 0 0</pose>
|
| 171 |
+
<geometry><box><size>0.16 0.85 0.5</size></box></geometry>
|
| 172 |
+
<material><ambient>0.40 0.38 0.35 1</ambient></material>
|
| 173 |
+
</visual>
|
| 174 |
+
<visual name="cushion_l">
|
| 175 |
+
<pose>-0.5 -0.05 0.24 0 0 0</pose>
|
| 176 |
+
<geometry><box><size>0.85 0.7 0.16</size></box></geometry>
|
| 177 |
+
<material><ambient>0.49 0.47 0.43 1</ambient><diffuse>0.52 0.50 0.46 1</diffuse></material>
|
| 178 |
+
</visual>
|
| 179 |
+
<visual name="cushion_r">
|
| 180 |
+
<pose>0.5 -0.05 0.24 0 0 0</pose>
|
| 181 |
+
<geometry><box><size>0.85 0.7 0.16</size></box></geometry>
|
| 182 |
+
<material><ambient>0.49 0.47 0.43 1</ambient><diffuse>0.52 0.50 0.46 1</diffuse></material>
|
| 183 |
+
</visual>
|
| 184 |
+
<visual name="pillow_l">
|
| 185 |
+
<pose>-0.7 0.18 0.45 0 0.2 0</pose>
|
| 186 |
+
<geometry><box><size>0.32 0.12 0.32</size></box></geometry>
|
| 187 |
+
<material><ambient>0.55 0.50 0.42 1</ambient><diffuse>0.58 0.53 0.45 1</diffuse></material>
|
| 188 |
+
</visual>
|
| 189 |
+
<visual name="pillow_r">
|
| 190 |
+
<pose>0.7 0.18 0.45 0 -0.2 0</pose>
|
| 191 |
+
<geometry><box><size>0.32 0.12 0.32</size></box></geometry>
|
| 192 |
+
<material><ambient>0.50 0.42 0.40 1</ambient><diffuse>0.53 0.45 0.43 1</diffuse></material>
|
| 193 |
+
</visual>
|
| 194 |
+
<collision name="collision"><geometry><box><size>2.2 0.95 0.85</size></box></geometry></collision>
|
| 195 |
+
</link>
|
| 196 |
+
</model>
|
| 197 |
+
|
| 198 |
+
<!-- Coffee table (wood) -->
|
| 199 |
+
<model name="coffee_table">
|
| 200 |
+
<static>true</static>
|
| 201 |
+
<pose>-1.4 -2.4 0.26 0 0 0</pose>
|
| 202 |
+
<link name="link">
|
| 203 |
+
<visual name="top">
|
| 204 |
+
<geometry><box><size>1.1 0.6 0.08</size></box></geometry>
|
| 205 |
+
<material>
|
| 206 |
+
<script>
|
| 207 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 208 |
+
<uri>file://media/materials/textures</uri>
|
| 209 |
+
<name>Home/WoodPolished</name>
|
| 210 |
+
</script>
|
| 211 |
+
</material>
|
| 212 |
+
</visual>
|
| 213 |
+
<visual name="leg_1"><pose>-0.45 -0.22 -0.16 0 0 0</pose><geometry><box><size>0.07 0.07 0.32</size></box></geometry><material><ambient>0.25 0.14 0.08 1</ambient></material></visual>
|
| 214 |
+
<visual name="leg_2"><pose>0.45 -0.22 -0.16 0 0 0</pose><geometry><box><size>0.07 0.07 0.32</size></box></geometry><material><ambient>0.25 0.14 0.08 1</ambient></material></visual>
|
| 215 |
+
<visual name="leg_3"><pose>-0.45 0.22 -0.16 0 0 0</pose><geometry><box><size>0.07 0.07 0.32</size></box></geometry><material><ambient>0.25 0.14 0.08 1</ambient></material></visual>
|
| 216 |
+
<visual name="leg_4"><pose>0.45 0.22 -0.16 0 0 0</pose><geometry><box><size>0.07 0.07 0.32</size></box></geometry><material><ambient>0.25 0.14 0.08 1</ambient></material></visual>
|
| 217 |
+
<collision name="collision"><geometry><box><size>1.1 0.6 0.4</size></box></geometry></collision>
|
| 218 |
+
</link>
|
| 219 |
+
</model>
|
| 220 |
+
|
| 221 |
+
<!-- TV cabinet against the brick wall (wood) -->
|
| 222 |
+
<model name="tv_cabinet">
|
| 223 |
+
<static>true</static>
|
| 224 |
+
<pose>-1.4 -4.78 0.28 0 0 0</pose>
|
| 225 |
+
<link name="link">
|
| 226 |
+
<visual name="visual">
|
| 227 |
+
<geometry><box><size>2.2 0.4 0.5</size></box></geometry>
|
| 228 |
+
<material>
|
| 229 |
+
<script>
|
| 230 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 231 |
+
<uri>file://media/materials/textures</uri>
|
| 232 |
+
<name>Home/WoodPolished</name>
|
| 233 |
+
</script>
|
| 234 |
+
</material>
|
| 235 |
+
</visual>
|
| 236 |
+
<collision name="collision"><geometry><box><size>2.2 0.4 0.5</size></box></geometry></collision>
|
| 237 |
+
</link>
|
| 238 |
+
</model>
|
| 239 |
+
|
| 240 |
+
<!-- Flat-screen TV -->
|
| 241 |
+
<model name="tv">
|
| 242 |
+
<static>true</static>
|
| 243 |
+
<pose>-1.4 -4.88 1.15 0 0 0</pose>
|
| 244 |
+
<link name="link">
|
| 245 |
+
<visual name="screen">
|
| 246 |
+
<geometry><box><size>1.7 0.06 0.95</size></box></geometry>
|
| 247 |
+
<material><ambient>0.02 0.02 0.025 1</ambient><diffuse>0.02 0.02 0.03 1</diffuse><specular>0.35 0.35 0.40 1</specular></material>
|
| 248 |
+
</visual>
|
| 249 |
+
<visual name="bezel">
|
| 250 |
+
<pose>0 0.01 0 0 0 0</pose>
|
| 251 |
+
<geometry><box><size>1.78 0.04 1.03</size></box></geometry>
|
| 252 |
+
<material><ambient>0.05 0.05 0.06 1</ambient></material>
|
| 253 |
+
</visual>
|
| 254 |
+
</link>
|
| 255 |
+
</model>
|
| 256 |
+
|
| 257 |
+
<!-- Floor lamp (living-room corner) -->
|
| 258 |
+
<model name="floor_lamp">
|
| 259 |
+
<static>true</static>
|
| 260 |
+
<pose>-3.9 -0.9 0.8 0 0 0</pose>
|
| 261 |
+
<link name="link">
|
| 262 |
+
<visual name="pole">
|
| 263 |
+
<geometry><cylinder><radius>0.035</radius><length>1.5</length></cylinder></geometry>
|
| 264 |
+
<material><ambient>0.22 0.22 0.24 1</ambient><diffuse>0.24 0.24 0.26 1</diffuse></material>
|
| 265 |
+
</visual>
|
| 266 |
+
<visual name="shade">
|
| 267 |
+
<pose>0 0 0.82 0 0 0</pose>
|
| 268 |
+
<geometry><cylinder><radius>0.24</radius><length>0.34</length></cylinder></geometry>
|
| 269 |
+
<material><ambient>0.78 0.72 0.60 1</ambient><diffuse>0.82 0.76 0.64 1</diffuse></material>
|
| 270 |
+
</visual>
|
| 271 |
+
</link>
|
| 272 |
+
</model>
|
| 273 |
+
|
| 274 |
+
<!-- Bookshelf against the left wall -->
|
| 275 |
+
<model name="bookshelf">
|
| 276 |
+
<static>true</static>
|
| 277 |
+
<pose>-7.15 2.25 0.9 0 0 0</pose>
|
| 278 |
+
<link name="link">
|
| 279 |
+
<visual name="frame">
|
| 280 |
+
<geometry><box><size>0.4 1.6 1.8</size></box></geometry>
|
| 281 |
+
<material>
|
| 282 |
+
<script>
|
| 283 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 284 |
+
<uri>file://media/materials/textures</uri>
|
| 285 |
+
<name>Home/WoodPolished</name>
|
| 286 |
+
</script>
|
| 287 |
+
</material>
|
| 288 |
+
</visual>
|
| 289 |
+
<visual name="books_1"><pose>0.05 -0.45 0.55 0 0 0</pose><geometry><box><size>0.28 0.6 0.25</size></box></geometry><material><ambient>0.46 0.36 0.30 1</ambient></material></visual>
|
| 290 |
+
<visual name="books_2"><pose>0.05 0.35 0.1 0 0 0</pose><geometry><box><size>0.28 0.7 0.25</size></box></geometry><material><ambient>0.38 0.40 0.40 1</ambient></material></visual>
|
| 291 |
+
<visual name="books_3"><pose>0.05 -0.1 -0.35 0 0 0</pose><geometry><box><size>0.28 0.8 0.25</size></box></geometry><material><ambient>0.42 0.41 0.34 1</ambient></material></visual>
|
| 292 |
+
<collision name="collision"><geometry><box><size>0.4 1.6 1.8</size></box></geometry></collision>
|
| 293 |
+
</link>
|
| 294 |
+
</model>
|
| 295 |
+
|
| 296 |
+
<!-- Potted plant (back-left corner) -->
|
| 297 |
+
<model name="plant">
|
| 298 |
+
<static>true</static>
|
| 299 |
+
<pose>-3.9 4.5 0 0 0 0</pose>
|
| 300 |
+
<link name="link">
|
| 301 |
+
<visual name="pot">
|
| 302 |
+
<pose>0 0 0.2 0 0 0</pose>
|
| 303 |
+
<geometry><cylinder><radius>0.22</radius><length>0.4</length></cylinder></geometry>
|
| 304 |
+
<material><ambient>0.45 0.28 0.18 1</ambient><diffuse>0.50 0.30 0.20 1</diffuse></material>
|
| 305 |
+
</visual>
|
| 306 |
+
<visual name="foliage">
|
| 307 |
+
<pose>0 0 0.85 0 0 0</pose>
|
| 308 |
+
<geometry><sphere><radius>0.42</radius></sphere></geometry>
|
| 309 |
+
<material><ambient>0.26 0.34 0.24 1</ambient><diffuse>0.28 0.37 0.26 1</diffuse></material>
|
| 310 |
+
</visual>
|
| 311 |
+
<visual name="foliage2">
|
| 312 |
+
<pose>0.12 0.05 1.15 0 0 0</pose>
|
| 313 |
+
<geometry><sphere><radius>0.28</radius></sphere></geometry>
|
| 314 |
+
<material><ambient>0.28 0.36 0.26 1</ambient><diffuse>0.30 0.39 0.28 1</diffuse></material>
|
| 315 |
+
</visual>
|
| 316 |
+
</link>
|
| 317 |
+
</model>
|
| 318 |
+
|
| 319 |
+
<!-- ============================ DINING (back-left) ===================== -->
|
| 320 |
+
|
| 321 |
+
<model name="dining_table">
|
| 322 |
+
<static>true</static>
|
| 323 |
+
<pose>-1.5 2.9 0.45 0 0 0</pose>
|
| 324 |
+
<link name="link">
|
| 325 |
+
<visual name="top">
|
| 326 |
+
<geometry><box><size>1.5 0.9 0.08</size></box></geometry>
|
| 327 |
+
<material>
|
| 328 |
+
<script>
|
| 329 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 330 |
+
<uri>file://media/materials/textures</uri>
|
| 331 |
+
<name>Home/WoodPolished</name>
|
| 332 |
+
</script>
|
| 333 |
+
</material>
|
| 334 |
+
</visual>
|
| 335 |
+
<visual name="leg_1"><pose>-0.65 -0.35 -0.22 0 0 0</pose><geometry><box><size>0.08 0.08 0.44</size></box></geometry><material><ambient>0.30 0.18 0.10 1</ambient></material></visual>
|
| 336 |
+
<visual name="leg_2"><pose>0.65 -0.35 -0.22 0 0 0</pose><geometry><box><size>0.08 0.08 0.44</size></box></geometry><material><ambient>0.30 0.18 0.10 1</ambient></material></visual>
|
| 337 |
+
<visual name="leg_3"><pose>-0.65 0.35 -0.22 0 0 0</pose><geometry><box><size>0.08 0.08 0.44</size></box></geometry><material><ambient>0.30 0.18 0.10 1</ambient></material></visual>
|
| 338 |
+
<visual name="leg_4"><pose>0.65 0.35 -0.22 0 0 0</pose><geometry><box><size>0.08 0.08 0.44</size></box></geometry><material><ambient>0.30 0.18 0.10 1</ambient></material></visual>
|
| 339 |
+
<collision name="collision"><geometry><box><size>1.5 0.9 0.55</size></box></geometry></collision>
|
| 340 |
+
</link>
|
| 341 |
+
</model>
|
| 342 |
+
|
| 343 |
+
<model name="chair_1">
|
| 344 |
+
<static>true</static>
|
| 345 |
+
<pose>-2.25 2.9 0.32 0 0 0</pose>
|
| 346 |
+
<link name="link">
|
| 347 |
+
<visual name="seat"><geometry><box><size>0.45 0.45 0.1</size></box></geometry><material><ambient>0.46 0.43 0.38 1</ambient><diffuse>0.49 0.46 0.41 1</diffuse></material></visual>
|
| 348 |
+
<visual name="back"><pose>-0.2 0 0.35 0 0 0</pose><geometry><box><size>0.08 0.45 0.7</size></box></geometry><material><ambient>0.46 0.43 0.38 1</ambient></material></visual>
|
| 349 |
+
</link>
|
| 350 |
+
</model>
|
| 351 |
+
<model name="chair_2">
|
| 352 |
+
<static>true</static>
|
| 353 |
+
<pose>-0.75 2.9 0.32 0 0 0</pose>
|
| 354 |
+
<link name="link">
|
| 355 |
+
<visual name="seat"><geometry><box><size>0.45 0.45 0.1</size></box></geometry><material><ambient>0.46 0.43 0.38 1</ambient><diffuse>0.49 0.46 0.41 1</diffuse></material></visual>
|
| 356 |
+
<visual name="back"><pose>0.2 0 0.35 0 0 0</pose><geometry><box><size>0.08 0.45 0.7</size></box></geometry><material><ambient>0.46 0.43 0.38 1</ambient></material></visual>
|
| 357 |
+
</link>
|
| 358 |
+
</model>
|
| 359 |
+
<model name="chair_3">
|
| 360 |
+
<static>true</static>
|
| 361 |
+
<pose>-1.5 2.15 0.32 0 0 1.5708</pose>
|
| 362 |
+
<link name="link">
|
| 363 |
+
<visual name="seat"><geometry><box><size>0.45 0.45 0.1</size></box></geometry><material><ambient>0.46 0.43 0.38 1</ambient><diffuse>0.49 0.46 0.41 1</diffuse></material></visual>
|
| 364 |
+
<visual name="back"><pose>-0.2 0 0.35 0 0 0</pose><geometry><box><size>0.08 0.45 0.7</size></box></geometry><material><ambient>0.46 0.43 0.38 1</ambient></material></visual>
|
| 365 |
+
</link>
|
| 366 |
+
</model>
|
| 367 |
+
<model name="chair_4">
|
| 368 |
+
<static>true</static>
|
| 369 |
+
<pose>-1.5 3.65 0.32 0 0 -1.5708</pose>
|
| 370 |
+
<link name="link">
|
| 371 |
+
<visual name="seat"><geometry><box><size>0.45 0.45 0.1</size></box></geometry><material><ambient>0.46 0.43 0.38 1</ambient><diffuse>0.49 0.46 0.41 1</diffuse></material></visual>
|
| 372 |
+
<visual name="back"><pose>-0.2 0 0.35 0 0 0</pose><geometry><box><size>0.08 0.45 0.7</size></box></geometry><material><ambient>0.46 0.43 0.38 1</ambient></material></visual>
|
| 373 |
+
</link>
|
| 374 |
+
</model>
|
| 375 |
+
|
| 376 |
+
<!-- ============================ BEDROOM (back-right) =================== -->
|
| 377 |
+
|
| 378 |
+
<model name="bed_rug">
|
| 379 |
+
<static>true</static>
|
| 380 |
+
<pose>4.7 2.0 0.02 0 0 0</pose>
|
| 381 |
+
<link name="link">
|
| 382 |
+
<visual name="visual">
|
| 383 |
+
<geometry><box><size>3.0 2.0 0.02</size></box></geometry>
|
| 384 |
+
<material><ambient>0.42 0.41 0.39 1</ambient><diffuse>0.45 0.44 0.42 1</diffuse></material>
|
| 385 |
+
</visual>
|
| 386 |
+
</link>
|
| 387 |
+
</model>
|
| 388 |
+
|
| 389 |
+
<model name="bed">
|
| 390 |
+
<static>true</static>
|
| 391 |
+
<pose>4.9 3.75 0.28 0 0 0</pose>
|
| 392 |
+
<link name="link">
|
| 393 |
+
<visual name="frame">
|
| 394 |
+
<geometry><box><size>2.0 1.9 0.35</size></box></geometry>
|
| 395 |
+
<material>
|
| 396 |
+
<script>
|
| 397 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 398 |
+
<uri>file://media/materials/textures</uri>
|
| 399 |
+
<name>Home/WoodPolished</name>
|
| 400 |
+
</script>
|
| 401 |
+
</material>
|
| 402 |
+
</visual>
|
| 403 |
+
<visual name="headboard">
|
| 404 |
+
<pose>0 0.95 0.35 0 0 0</pose>
|
| 405 |
+
<geometry><box><size>2.0 0.12 0.7</size></box></geometry>
|
| 406 |
+
<material>
|
| 407 |
+
<script>
|
| 408 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 409 |
+
<uri>file://media/materials/textures</uri>
|
| 410 |
+
<name>Home/WoodPolished</name>
|
| 411 |
+
</script>
|
| 412 |
+
</material>
|
| 413 |
+
</visual>
|
| 414 |
+
<visual name="mattress">
|
| 415 |
+
<pose>0 -0.05 0.26 0 0 0</pose>
|
| 416 |
+
<geometry><box><size>1.85 1.75 0.2</size></box></geometry>
|
| 417 |
+
<material><ambient>0.90 0.90 0.85 1</ambient><diffuse>0.94 0.94 0.88 1</diffuse></material>
|
| 418 |
+
</visual>
|
| 419 |
+
<visual name="duvet">
|
| 420 |
+
<pose>0 -0.45 0.34 0 0 0</pose>
|
| 421 |
+
<geometry><box><size>1.85 0.95 0.16</size></box></geometry>
|
| 422 |
+
<material><ambient>0.52 0.50 0.47 1</ambient><diffuse>0.56 0.54 0.50 1</diffuse></material>
|
| 423 |
+
</visual>
|
| 424 |
+
<visual name="pillow_l">
|
| 425 |
+
<pose>-0.45 0.55 0.42 0 0 0</pose>
|
| 426 |
+
<geometry><box><size>0.6 0.34 0.14</size></box></geometry>
|
| 427 |
+
<material><ambient>0.96 0.96 0.92 1</ambient><diffuse>0.98 0.98 0.94 1</diffuse></material>
|
| 428 |
+
</visual>
|
| 429 |
+
<visual name="pillow_r">
|
| 430 |
+
<pose>0.45 0.55 0.42 0 0 0</pose>
|
| 431 |
+
<geometry><box><size>0.6 0.34 0.14</size></box></geometry>
|
| 432 |
+
<material><ambient>0.96 0.96 0.92 1</ambient><diffuse>0.98 0.98 0.94 1</diffuse></material>
|
| 433 |
+
</visual>
|
| 434 |
+
<collision name="collision"><geometry><box><size>2.0 1.9 0.6</size></box></geometry></collision>
|
| 435 |
+
</link>
|
| 436 |
+
</model>
|
| 437 |
+
|
| 438 |
+
<model name="nightstand_1">
|
| 439 |
+
<static>true</static>
|
| 440 |
+
<pose>3.7 4.4 0.25 0 0 0</pose>
|
| 441 |
+
<link name="link">
|
| 442 |
+
<visual name="body"><geometry><box><size>0.45 0.4 0.5</size></box></geometry>
|
| 443 |
+
<material>
|
| 444 |
+
<script>
|
| 445 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 446 |
+
<uri>file://media/materials/textures</uri>
|
| 447 |
+
<name>Home/WoodPolished</name>
|
| 448 |
+
</script>
|
| 449 |
+
</material>
|
| 450 |
+
</visual>
|
| 451 |
+
<visual name="lamp_pole"><pose>0 0 0.32 0 0 0</pose><geometry><cylinder><radius>0.02</radius><length>0.22</length></cylinder></geometry><material><ambient>0.2 0.2 0.2 1</ambient></material></visual>
|
| 452 |
+
<visual name="lamp_shade"><pose>0 0 0.46 0 0 0</pose><geometry><cylinder><radius>0.13</radius><length>0.14</length></cylinder></geometry><material><ambient>0.80 0.74 0.62 1</ambient><diffuse>0.84 0.78 0.66 1</diffuse></material></visual>
|
| 453 |
+
<collision name="collision"><geometry><box><size>0.45 0.4 0.5</size></box></geometry></collision>
|
| 454 |
+
</link>
|
| 455 |
+
</model>
|
| 456 |
+
<model name="nightstand_2">
|
| 457 |
+
<static>true</static>
|
| 458 |
+
<pose>6.1 4.4 0.25 0 0 0</pose>
|
| 459 |
+
<link name="link">
|
| 460 |
+
<visual name="body"><geometry><box><size>0.45 0.4 0.5</size></box></geometry>
|
| 461 |
+
<material>
|
| 462 |
+
<script>
|
| 463 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 464 |
+
<uri>file://media/materials/textures</uri>
|
| 465 |
+
<name>Home/WoodPolished</name>
|
| 466 |
+
</script>
|
| 467 |
+
</material>
|
| 468 |
+
</visual>
|
| 469 |
+
<visual name="lamp_pole"><pose>0 0 0.32 0 0 0</pose><geometry><cylinder><radius>0.02</radius><length>0.22</length></cylinder></geometry><material><ambient>0.2 0.2 0.2 1</ambient></material></visual>
|
| 470 |
+
<visual name="lamp_shade"><pose>0 0 0.46 0 0 0</pose><geometry><cylinder><radius>0.13</radius><length>0.14</length></cylinder></geometry><material><ambient>0.80 0.74 0.62 1</ambient><diffuse>0.84 0.78 0.66 1</diffuse></material></visual>
|
| 471 |
+
<collision name="collision"><geometry><box><size>0.45 0.4 0.5</size></box></geometry></collision>
|
| 472 |
+
</link>
|
| 473 |
+
</model>
|
| 474 |
+
|
| 475 |
+
<model name="wardrobe">
|
| 476 |
+
<static>true</static>
|
| 477 |
+
<pose>7.1 0.75 1.0 0 0 0</pose>
|
| 478 |
+
<link name="link">
|
| 479 |
+
<visual name="body">
|
| 480 |
+
<geometry><box><size>0.6 1.6 2.0</size></box></geometry>
|
| 481 |
+
<material>
|
| 482 |
+
<script>
|
| 483 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 484 |
+
<uri>file://media/materials/textures</uri>
|
| 485 |
+
<name>Home/WoodPolished</name>
|
| 486 |
+
</script>
|
| 487 |
+
</material>
|
| 488 |
+
</visual>
|
| 489 |
+
<visual name="handle_1"><pose>-0.32 -0.2 0 0 0 0</pose><geometry><box><size>0.03 0.04 0.25</size></box></geometry><material><ambient>0.1 0.1 0.1 1</ambient></material></visual>
|
| 490 |
+
<visual name="handle_2"><pose>-0.32 0.2 0 0 0 0</pose><geometry><box><size>0.03 0.04 0.25</size></box></geometry><material><ambient>0.1 0.1 0.1 1</ambient></material></visual>
|
| 491 |
+
<collision name="collision"><geometry><box><size>0.6 1.6 2.0</size></box></geometry></collision>
|
| 492 |
+
</link>
|
| 493 |
+
</model>
|
| 494 |
+
|
| 495 |
+
<!-- ============================ KITCHEN (front-right) ================= -->
|
| 496 |
+
|
| 497 |
+
<!-- Lower counter run along the brick wall -->
|
| 498 |
+
<model name="kitchen_counter">
|
| 499 |
+
<static>true</static>
|
| 500 |
+
<pose>4.0 -4.65 0.45 0 0 0</pose>
|
| 501 |
+
<link name="link">
|
| 502 |
+
<visual name="body">
|
| 503 |
+
<geometry><box><size>3.6 0.65 0.9</size></box></geometry>
|
| 504 |
+
<material><ambient>0.82 0.80 0.76 1</ambient><diffuse>0.86 0.84 0.80 1</diffuse></material>
|
| 505 |
+
</visual>
|
| 506 |
+
<visual name="worktop">
|
| 507 |
+
<pose>0 0 0.47 0 0 0</pose>
|
| 508 |
+
<geometry><box><size>3.7 0.7 0.05</size></box></geometry>
|
| 509 |
+
<material>
|
| 510 |
+
<script>
|
| 511 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 512 |
+
<uri>file://media/materials/textures</uri>
|
| 513 |
+
<name>Home/WoodPolished</name>
|
| 514 |
+
</script>
|
| 515 |
+
</material>
|
| 516 |
+
</visual>
|
| 517 |
+
<visual name="sink">
|
| 518 |
+
<pose>-0.6 0 0.49 0 0 0</pose>
|
| 519 |
+
<geometry><box><size>0.6 0.45 0.06</size></box></geometry>
|
| 520 |
+
<material><ambient>0.55 0.57 0.60 1</ambient><diffuse>0.6 0.62 0.65 1</diffuse><specular>0.55 0.57 0.62 1</specular></material>
|
| 521 |
+
</visual>
|
| 522 |
+
<collision name="collision"><geometry><box><size>3.6 0.65 0.92</size></box></geometry></collision>
|
| 523 |
+
</link>
|
| 524 |
+
</model>
|
| 525 |
+
|
| 526 |
+
<!-- Upper cabinets -->
|
| 527 |
+
<model name="kitchen_uppers">
|
| 528 |
+
<static>true</static>
|
| 529 |
+
<pose>4.0 -4.78 1.95 0 0 0</pose>
|
| 530 |
+
<link name="link">
|
| 531 |
+
<visual name="body">
|
| 532 |
+
<geometry><box><size>3.2 0.38 0.7</size></box></geometry>
|
| 533 |
+
<material>
|
| 534 |
+
<script>
|
| 535 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 536 |
+
<uri>file://media/materials/textures</uri>
|
| 537 |
+
<name>Home/WoodPolished</name>
|
| 538 |
+
</script>
|
| 539 |
+
</material>
|
| 540 |
+
</visual>
|
| 541 |
+
<collision name="collision"><geometry><box><size>3.2 0.38 0.7</size></box></geometry></collision>
|
| 542 |
+
</link>
|
| 543 |
+
</model>
|
| 544 |
+
|
| 545 |
+
<!-- Fridge in the corner -->
|
| 546 |
+
<model name="fridge">
|
| 547 |
+
<static>true</static>
|
| 548 |
+
<pose>7.0 -4.45 0.95 0 0 0</pose>
|
| 549 |
+
<link name="link">
|
| 550 |
+
<visual name="body">
|
| 551 |
+
<geometry><box><size>0.7 0.7 1.9</size></box></geometry>
|
| 552 |
+
<material><ambient>0.80 0.82 0.85 1</ambient><diffuse>0.86 0.88 0.92 1</diffuse><specular>0.45 0.46 0.50 1</specular></material>
|
| 553 |
+
</visual>
|
| 554 |
+
<visual name="handle"><pose>-0.34 0.28 0.2 0 0 0</pose><geometry><box><size>0.03 0.04 0.6</size></box></geometry><material><ambient>0.3 0.3 0.32 1</ambient></material></visual>
|
| 555 |
+
<visual name="seam"><pose>-0.351 0 0.3 0 0 0</pose><geometry><box><size>0.005 0.7 0.04</size></box></geometry><material><ambient>0.6 0.62 0.65 1</ambient></material></visual>
|
| 556 |
+
<collision name="collision"><geometry><box><size>0.7 0.7 1.9</size></box></geometry></collision>
|
| 557 |
+
</link>
|
| 558 |
+
</model>
|
| 559 |
+
|
| 560 |
+
<!-- Two bar stools at the counter -->
|
| 561 |
+
<model name="stool_1">
|
| 562 |
+
<static>true</static>
|
| 563 |
+
<pose>3.2 -3.8 0.45 0 0 0</pose>
|
| 564 |
+
<link name="link">
|
| 565 |
+
<visual name="seat"><geometry><cylinder><radius>0.18</radius><length>0.08</length></cylinder></geometry><material><ambient>0.2 0.2 0.22 1</ambient></material></visual>
|
| 566 |
+
<visual name="leg"><pose>0 0 -0.22 0 0 0</pose><geometry><cylinder><radius>0.04</radius><length>0.45</length></cylinder></geometry><material><ambient>0.5 0.5 0.52 1</ambient><diffuse>0.6 0.6 0.62 1</diffuse><specular>0.5 0.5 0.55 1</specular></material></visual>
|
| 567 |
+
</link>
|
| 568 |
+
</model>
|
| 569 |
+
<model name="stool_2">
|
| 570 |
+
<static>true</static>
|
| 571 |
+
<pose>4.4 -3.8 0.45 0 0 0</pose>
|
| 572 |
+
<link name="link">
|
| 573 |
+
<visual name="seat"><geometry><cylinder><radius>0.18</radius><length>0.08</length></cylinder></geometry><material><ambient>0.2 0.2 0.22 1</ambient></material></visual>
|
| 574 |
+
<visual name="leg"><pose>0 0 -0.22 0 0 0</pose><geometry><cylinder><radius>0.04</radius><length>0.45</length></cylinder></geometry><material><ambient>0.5 0.5 0.52 1</ambient><diffuse>0.6 0.6 0.62 1</diffuse><specular>0.5 0.5 0.55 1</specular></material></visual>
|
| 575 |
+
</link>
|
| 576 |
+
</model>
|
| 577 |
+
|
| 578 |
+
<!-- ============================ Doors / windows / art ================= -->
|
| 579 |
+
|
| 580 |
+
<!-- Entry door on the right wall -->
|
| 581 |
+
<model name="door">
|
| 582 |
+
<static>true</static>
|
| 583 |
+
<pose>7.42 -2.25 1.0 0 0 0</pose>
|
| 584 |
+
<link name="link">
|
| 585 |
+
<visual name="leaf">
|
| 586 |
+
<geometry><box><size>0.05 1.0 2.0</size></box></geometry>
|
| 587 |
+
<material>
|
| 588 |
+
<script>
|
| 589 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 590 |
+
<uri>file://media/materials/textures</uri>
|
| 591 |
+
<name>Home/WoodPolished</name>
|
| 592 |
+
</script>
|
| 593 |
+
</material>
|
| 594 |
+
</visual>
|
| 595 |
+
<visual name="knob"><pose>-0.04 -0.4 0 0 0 0</pose><geometry><sphere><radius>0.05</radius></sphere></geometry><material><ambient>0.7 0.6 0.2 1</ambient><diffuse>0.8 0.7 0.25 1</diffuse><specular>0.9 0.8 0.4 1</specular></material></visual>
|
| 596 |
+
</link>
|
| 597 |
+
</model>
|
| 598 |
+
|
| 599 |
+
<!-- Windows on the back wall (semi-transparent glass) -->
|
| 600 |
+
<model name="window_1">
|
| 601 |
+
<static>true</static>
|
| 602 |
+
<pose>-1.25 4.92 1.5 0 0 0</pose>
|
| 603 |
+
<link name="link">
|
| 604 |
+
<visual name="glass"><geometry><box><size>1.6 0.05 1.0</size></box></geometry>
|
| 605 |
+
<material><ambient>0.55 0.60 0.62 0.4</ambient><diffuse>0.58 0.63 0.65 0.4</diffuse><specular>0.70 0.75 0.80 0.4</specular></material>
|
| 606 |
+
</visual>
|
| 607 |
+
<visual name="frame_t"><pose>0 0 0.52 0 0 0</pose><geometry><box><size>1.7 0.08 0.08</size></box></geometry><material><ambient>0.9 0.9 0.88 1</ambient></material></visual>
|
| 608 |
+
<visual name="frame_b"><pose>0 0 -0.52 0 0 0</pose><geometry><box><size>1.7 0.08 0.08</size></box></geometry><material><ambient>0.9 0.9 0.88 1</ambient></material></visual>
|
| 609 |
+
<visual name="mullion"><pose>0 0 0 0 0 0</pose><geometry><box><size>0.06 0.06 1.0</size></box></geometry><material><ambient>0.9 0.9 0.88 1</ambient></material></visual>
|
| 610 |
+
</link>
|
| 611 |
+
</model>
|
| 612 |
+
<model name="window_2">
|
| 613 |
+
<static>true</static>
|
| 614 |
+
<pose>1.9 4.92 1.5 0 0 0</pose>
|
| 615 |
+
<link name="link">
|
| 616 |
+
<visual name="glass"><geometry><box><size>1.6 0.05 1.0</size></box></geometry>
|
| 617 |
+
<material><ambient>0.55 0.60 0.62 0.4</ambient><diffuse>0.58 0.63 0.65 0.4</diffuse><specular>0.70 0.75 0.80 0.4</specular></material>
|
| 618 |
+
</visual>
|
| 619 |
+
<visual name="frame_t"><pose>0 0 0.52 0 0 0</pose><geometry><box><size>1.7 0.08 0.08</size></box></geometry><material><ambient>0.9 0.9 0.88 1</ambient></material></visual>
|
| 620 |
+
<visual name="frame_b"><pose>0 0 -0.52 0 0 0</pose><geometry><box><size>1.7 0.08 0.08</size></box></geometry><material><ambient>0.9 0.9 0.88 1</ambient></material></visual>
|
| 621 |
+
<visual name="mullion"><pose>0 0 0 0 0 0</pose><geometry><box><size>0.06 0.06 1.0</size></box></geometry><material><ambient>0.9 0.9 0.88 1</ambient></material></visual>
|
| 622 |
+
</link>
|
| 623 |
+
</model>
|
| 624 |
+
|
| 625 |
+
<!-- Window on the left wall (living-room daylight) -->
|
| 626 |
+
<model name="window_3">
|
| 627 |
+
<static>true</static>
|
| 628 |
+
<pose>-7.42 -2.75 1.5 0 0 0</pose>
|
| 629 |
+
<link name="link">
|
| 630 |
+
<visual name="glass"><geometry><box><size>0.05 1.6 1.0</size></box></geometry>
|
| 631 |
+
<material><ambient>0.55 0.60 0.62 0.4</ambient><diffuse>0.58 0.63 0.65 0.4</diffuse><specular>0.70 0.75 0.80 0.4</specular></material>
|
| 632 |
+
</visual>
|
| 633 |
+
<visual name="frame_t"><pose>0 0 0.52 0 0 0</pose><geometry><box><size>0.08 1.7 0.08</size></box></geometry><material><ambient>0.9 0.9 0.88 1</ambient></material></visual>
|
| 634 |
+
<visual name="frame_b"><pose>0 0 -0.52 0 0 0</pose><geometry><box><size>0.08 1.7 0.08</size></box></geometry><material><ambient>0.9 0.9 0.88 1</ambient></material></visual>
|
| 635 |
+
</link>
|
| 636 |
+
</model>
|
| 637 |
+
|
| 638 |
+
<!-- Wall art flanking the TV (on the brick wall) -->
|
| 639 |
+
<model name="art_1">
|
| 640 |
+
<static>true</static>
|
| 641 |
+
<pose>-1.6 -4.9 1.5 0 0 0</pose>
|
| 642 |
+
<link name="link">
|
| 643 |
+
<visual name="frame"><geometry><box><size>0.9 0.04 0.65</size></box></geometry><material><ambient>0.15 0.12 0.10 1</ambient></material></visual>
|
| 644 |
+
<visual name="canvas"><pose>0 0.005 0 0 0 0</pose><geometry><box><size>0.78 0.04 0.53</size></box></geometry><material><ambient>0.60 0.52 0.42 1</ambient><diffuse>0.63 0.55 0.45 1</diffuse></material></visual>
|
| 645 |
+
</link>
|
| 646 |
+
</model>
|
| 647 |
+
<model name="art_2">
|
| 648 |
+
<static>true</static>
|
| 649 |
+
<pose>-6.5 -4.9 1.5 0 0 0</pose>
|
| 650 |
+
<link name="link">
|
| 651 |
+
<visual name="frame"><geometry><box><size>0.7 0.04 0.9</size></box></geometry><material><ambient>0.15 0.12 0.10 1</ambient></material></visual>
|
| 652 |
+
<visual name="canvas"><pose>0 0.005 0 0 0 0</pose><geometry><box><size>0.58 0.04 0.78</size></box></geometry><material><ambient>0.44 0.46 0.46 1</ambient><diffuse>0.47 0.49 0.49 1</diffuse></material></visual>
|
| 653 |
+
</link>
|
| 654 |
+
</model>
|
| 655 |
+
|
| 656 |
+
<!-- ================== Extra furniture (cosier / more compact) ========= -->
|
| 657 |
+
|
| 658 |
+
<!-- Living-room armchair (faces +x toward the coffee table / room centre) -->
|
| 659 |
+
<model name="armchair">
|
| 660 |
+
<static>true</static>
|
| 661 |
+
<pose>-3.4 -2.3 0.35 0 0 0</pose>
|
| 662 |
+
<link name="link">
|
| 663 |
+
<visual name="base"><geometry><box><size>0.85 0.9 0.35</size></box></geometry>
|
| 664 |
+
<material><ambient>0.44 0.42 0.39 1</ambient><diffuse>0.48 0.46 0.42 1</diffuse><specular>0.03 0.03 0.03 1</specular></material></visual>
|
| 665 |
+
<visual name="back"><pose>-0.36 0 0.32 0 0 0</pose><geometry><box><size>0.14 0.9 0.6</size></box></geometry>
|
| 666 |
+
<material><ambient>0.40 0.38 0.35 1</ambient><diffuse>0.43 0.41 0.38 1</diffuse></material></visual>
|
| 667 |
+
<visual name="arm_l"><pose>0 0.42 0.16 0 0 0</pose><geometry><box><size>0.8 0.14 0.42</size></box></geometry><material><ambient>0.40 0.38 0.35 1</ambient></material></visual>
|
| 668 |
+
<visual name="arm_r"><pose>0 -0.42 0.16 0 0 0</pose><geometry><box><size>0.8 0.14 0.42</size></box></geometry><material><ambient>0.40 0.38 0.35 1</ambient></material></visual>
|
| 669 |
+
<visual name="cushion"><pose>0.05 0 0.24 0 0 0</pose><geometry><box><size>0.66 0.62 0.16</size></box></geometry><material><ambient>0.49 0.47 0.43 1</ambient><diffuse>0.52 0.50 0.46 1</diffuse></material></visual>
|
| 670 |
+
<visual name="pillow"><pose>-0.2 0 0.42 0 0.25 0</pose><geometry><box><size>0.3 0.3 0.12</size></box></geometry><material><ambient>0.56 0.48 0.40 1</ambient><diffuse>0.59 0.51 0.43 1</diffuse></material></visual>
|
| 671 |
+
<collision name="collision"><geometry><box><size>0.85 0.95 0.85</size></box></geometry></collision>
|
| 672 |
+
</link>
|
| 673 |
+
</model>
|
| 674 |
+
|
| 675 |
+
<!-- Side table beside the sofa -->
|
| 676 |
+
<model name="side_table">
|
| 677 |
+
<static>true</static>
|
| 678 |
+
<pose>0 -0.7 0.28 0 0 0</pose>
|
| 679 |
+
<link name="link">
|
| 680 |
+
<visual name="top"><pose>0 0 0.2 0 0 0</pose><geometry><box><size>0.5 0.5 0.06</size></box></geometry>
|
| 681 |
+
<material><script><uri>file://media/materials/scripts/home.material</uri><uri>file://media/materials/textures</uri><name>Home/WoodPolished</name></script></material></visual>
|
| 682 |
+
<visual name="leg_1"><pose>-0.2 -0.2 0 0 0 0</pose><geometry><box><size>0.05 0.05 0.46</size></box></geometry><material><ambient>0.25 0.16 0.09 1</ambient></material></visual>
|
| 683 |
+
<visual name="leg_2"><pose>0.2 -0.2 0 0 0 0</pose><geometry><box><size>0.05 0.05 0.46</size></box></geometry><material><ambient>0.25 0.16 0.09 1</ambient></material></visual>
|
| 684 |
+
<visual name="leg_3"><pose>-0.2 0.2 0 0 0 0</pose><geometry><box><size>0.05 0.05 0.46</size></box></geometry><material><ambient>0.25 0.16 0.09 1</ambient></material></visual>
|
| 685 |
+
<visual name="leg_4"><pose>0.2 0.2 0 0 0 0</pose><geometry><box><size>0.05 0.05 0.46</size></box></geometry><material><ambient>0.25 0.16 0.09 1</ambient></material></visual>
|
| 686 |
+
</link>
|
| 687 |
+
</model>
|
| 688 |
+
|
| 689 |
+
<!-- Second potted plant (living-room front corner) -->
|
| 690 |
+
<model name="plant_living">
|
| 691 |
+
<static>true</static>
|
| 692 |
+
<pose>0.4 -4.3 0 0 0 0</pose>
|
| 693 |
+
<link name="link">
|
| 694 |
+
<visual name="pot"><pose>0 0 0.18 0 0 0</pose><geometry><cylinder><radius>0.2</radius><length>0.36</length></cylinder></geometry><material><ambient>0.40 0.25 0.16 1</ambient><diffuse>0.45 0.28 0.18 1</diffuse></material></visual>
|
| 695 |
+
<visual name="foliage"><pose>0 0 0.75 0 0 0</pose><geometry><sphere><radius>0.38</radius></sphere></geometry><material><ambient>0.24 0.33 0.22 1</ambient><diffuse>0.27 0.36 0.25 1</diffuse></material></visual>
|
| 696 |
+
<visual name="foliage2"><pose>0.1 -0.05 1.0 0 0 0</pose><geometry><sphere><radius>0.26</radius></sphere></geometry><material><ambient>0.26 0.35 0.24 1</ambient><diffuse>0.29 0.38 0.27 1</diffuse></material></visual>
|
| 697 |
+
</link>
|
| 698 |
+
</model>
|
| 699 |
+
|
| 700 |
+
<!-- Dining sideboard / buffet against the back wall -->
|
| 701 |
+
<model name="sideboard">
|
| 702 |
+
<static>true</static>
|
| 703 |
+
<pose>0 4.78 0.45 0 0 0</pose>
|
| 704 |
+
<link name="link">
|
| 705 |
+
<visual name="body"><geometry><box><size>1.6 0.4 0.9</size></box></geometry>
|
| 706 |
+
<material><script><uri>file://media/materials/scripts/home.material</uri><uri>file://media/materials/textures</uri><name>Home/WoodPolished</name></script></material></visual>
|
| 707 |
+
<visual name="handle_1"><pose>-0.4 -0.21 0.05 0 0 0</pose><geometry><box><size>0.18 0.03 0.03</size></box></geometry><material><ambient>0.1 0.1 0.1 1</ambient><specular>0.4 0.4 0.4 1</specular></material></visual>
|
| 708 |
+
<visual name="handle_2"><pose>0.4 -0.21 0.05 0 0 0</pose><geometry><box><size>0.18 0.03 0.03</size></box></geometry><material><ambient>0.1 0.1 0.1 1</ambient><specular>0.4 0.4 0.4 1</specular></material></visual>
|
| 709 |
+
<visual name="vase"><pose>0.45 0 0.55 0 0 0</pose><geometry><cylinder><radius>0.07</radius><length>0.2</length></cylinder></geometry><material><ambient>0.55 0.55 0.58 1</ambient><diffuse>0.6 0.6 0.63 1</diffuse><specular>0.3 0.3 0.32 1</specular></material></visual>
|
| 710 |
+
<collision name="collision"><geometry><box><size>1.6 0.4 0.9</size></box></geometry></collision>
|
| 711 |
+
</link>
|
| 712 |
+
</model>
|
| 713 |
+
|
| 714 |
+
<!-- Bedroom dresser / chest of drawers (faces +x into the room) -->
|
| 715 |
+
<model name="dresser">
|
| 716 |
+
<static>true</static>
|
| 717 |
+
<pose>2.9 3.2 0.45 0 0 0</pose>
|
| 718 |
+
<link name="link">
|
| 719 |
+
<visual name="body"><geometry><box><size>0.5 1.0 0.9</size></box></geometry>
|
| 720 |
+
<material><script><uri>file://media/materials/scripts/home.material</uri><uri>file://media/materials/textures</uri><name>Home/WoodPolished</name></script></material></visual>
|
| 721 |
+
<visual name="handle_1"><pose>0.26 -0.25 0.2 0 0 0</pose><geometry><box><size>0.03 0.16 0.03</size></box></geometry><material><ambient>0.1 0.1 0.1 1</ambient><specular>0.4 0.4 0.4 1</specular></material></visual>
|
| 722 |
+
<visual name="handle_2"><pose>0.26 0.25 0.2 0 0 0</pose><geometry><box><size>0.03 0.16 0.03</size></box></geometry><material><ambient>0.1 0.1 0.1 1</ambient><specular>0.4 0.4 0.4 1</specular></material></visual>
|
| 723 |
+
<visual name="handle_3"><pose>0.26 -0.25 -0.15 0 0 0</pose><geometry><box><size>0.03 0.16 0.03</size></box></geometry><material><ambient>0.1 0.1 0.1 1</ambient><specular>0.4 0.4 0.4 1</specular></material></visual>
|
| 724 |
+
<visual name="handle_4"><pose>0.26 0.25 -0.15 0 0 0</pose><geometry><box><size>0.03 0.16 0.03</size></box></geometry><material><ambient>0.1 0.1 0.1 1</ambient><specular>0.4 0.4 0.4 1</specular></material></visual>
|
| 725 |
+
<collision name="collision"><geometry><box><size>0.5 1.0 0.9</size></box></geometry></collision>
|
| 726 |
+
</link>
|
| 727 |
+
</model>
|
| 728 |
+
|
| 729 |
+
<!-- Bench at the foot of the bed -->
|
| 730 |
+
<model name="bed_bench">
|
| 731 |
+
<static>true</static>
|
| 732 |
+
<pose>4.9 2.6 0.22 0 0 0</pose>
|
| 733 |
+
<link name="link">
|
| 734 |
+
<visual name="top"><pose>0 0 0.12 0 0 0</pose><geometry><box><size>1.4 0.4 0.14</size></box></geometry><material><ambient>0.50 0.46 0.40 1</ambient><diffuse>0.54 0.50 0.44 1</diffuse></material></visual>
|
| 735 |
+
<visual name="leg_1"><pose>-0.62 -0.15 -0.05 0 0 0</pose><geometry><box><size>0.06 0.06 0.34</size></box></geometry><material><ambient>0.25 0.16 0.09 1</ambient></material></visual>
|
| 736 |
+
<visual name="leg_2"><pose>0.62 -0.15 -0.05 0 0 0</pose><geometry><box><size>0.06 0.06 0.34</size></box></geometry><material><ambient>0.25 0.16 0.09 1</ambient></material></visual>
|
| 737 |
+
<visual name="leg_3"><pose>-0.62 0.15 -0.05 0 0 0</pose><geometry><box><size>0.06 0.06 0.34</size></box></geometry><material><ambient>0.25 0.16 0.09 1</ambient></material></visual>
|
| 738 |
+
<visual name="leg_4"><pose>0.62 0.15 -0.05 0 0 0</pose><geometry><box><size>0.06 0.06 0.34</size></box></geometry><material><ambient>0.25 0.16 0.09 1</ambient></material></visual>
|
| 739 |
+
</link>
|
| 740 |
+
</model>
|
| 741 |
+
|
| 742 |
+
<!-- Kitchen island (faces the counter; makes the kitchen feel compact) -->
|
| 743 |
+
<model name="kitchen_island">
|
| 744 |
+
<static>true</static>
|
| 745 |
+
<pose>4.8 -2.4 0.45 0 0 0</pose>
|
| 746 |
+
<link name="link">
|
| 747 |
+
<visual name="body"><geometry><box><size>1.6 0.8 0.9</size></box></geometry>
|
| 748 |
+
<material><ambient>0.80 0.78 0.74 1</ambient><diffuse>0.85 0.83 0.79 1</diffuse><specular>0.05 0.05 0.05 1</specular></material></visual>
|
| 749 |
+
<visual name="worktop"><pose>0 0 0.47 0 0 0</pose><geometry><box><size>1.7 0.9 0.05</size></box></geometry>
|
| 750 |
+
<material><script><uri>file://media/materials/scripts/home.material</uri><uri>file://media/materials/textures</uri><name>Home/WoodPolished</name></script></material></visual>
|
| 751 |
+
<collision name="collision"><geometry><box><size>1.6 0.8 0.92</size></box></geometry></collision>
|
| 752 |
+
</link>
|
| 753 |
+
</model>
|
| 754 |
+
|
| 755 |
+
<!-- Bar stool at the island -->
|
| 756 |
+
<model name="island_stool">
|
| 757 |
+
<static>true</static>
|
| 758 |
+
<pose>4.8 -1.5 0.45 0 0 0</pose>
|
| 759 |
+
<link name="link">
|
| 760 |
+
<visual name="seat"><geometry><cylinder><radius>0.18</radius><length>0.08</length></cylinder></geometry><material><ambient>0.2 0.2 0.22 1</ambient></material></visual>
|
| 761 |
+
<visual name="leg"><pose>0 0 -0.22 0 0 0</pose><geometry><cylinder><radius>0.04</radius><length>0.45</length></cylinder></geometry><material><ambient>0.5 0.5 0.52 1</ambient><diffuse>0.6 0.6 0.62 1</diffuse><specular>0.5 0.5 0.55 1</specular></material></visual>
|
| 762 |
+
</link>
|
| 763 |
+
</model>
|
| 764 |
+
|
| 765 |
+
<!-- ============================ Lighting ============================== -->
|
| 766 |
+
<!-- A closed ceiling blocks the exterior sun, so the interior is lit by warm
|
| 767 |
+
ceiling lamps. A single soft, shadowless directional "skylight" fill is
|
| 768 |
+
added on top: it lifts the harsh dark corners the point lamps leave and
|
| 769 |
+
gives every surface a consistent base shade, so the room reads as evenly
|
| 770 |
+
lit daylight rather than a dim cave. The point lamps then layer warm
|
| 771 |
+
pools of light + specular highlights over that base. -->
|
| 772 |
+
<light name="fill_skylight" type="directional">
|
| 773 |
+
<pose>0 0 2.65 0 0 0</pose>
|
| 774 |
+
<direction>-0.25 0.15 -1.0</direction>
|
| 775 |
+
<diffuse>0.34 0.34 0.36 1</diffuse>
|
| 776 |
+
<specular>0.08 0.08 0.09 1</specular>
|
| 777 |
+
<cast_shadows>false</cast_shadows>
|
| 778 |
+
</light>
|
| 779 |
+
|
| 780 |
+
<light name="ceil_light_living" type="point">
|
| 781 |
+
<pose>-4.4 -1.9 2.45 0 0 0</pose>
|
| 782 |
+
<diffuse>0.62 0.56 0.46 1</diffuse>
|
| 783 |
+
<specular>0.28 0.26 0.22 1</specular>
|
| 784 |
+
<attenuation><range>12</range><constant>0.70</constant><linear>0.05</linear><quadratic>0.012</quadratic></attenuation>
|
| 785 |
+
<cast_shadows>true</cast_shadows>
|
| 786 |
+
</light>
|
| 787 |
+
<light name="ceil_light_dining" type="point">
|
| 788 |
+
<pose>-4.5 2.9 2.45 0 0 0</pose>
|
| 789 |
+
<diffuse>0.60 0.54 0.45 1</diffuse>
|
| 790 |
+
<specular>0.26 0.24 0.20 1</specular>
|
| 791 |
+
<attenuation><range>11</range><constant>0.70</constant><linear>0.05</linear><quadratic>0.012</quadratic></attenuation>
|
| 792 |
+
<cast_shadows>false</cast_shadows>
|
| 793 |
+
</light>
|
| 794 |
+
<light name="ceil_light_bedroom" type="point">
|
| 795 |
+
<pose>4.8 3.2 2.45 0 0 0</pose>
|
| 796 |
+
<diffuse>0.58 0.53 0.45 1</diffuse>
|
| 797 |
+
<specular>0.26 0.24 0.20 1</specular>
|
| 798 |
+
<attenuation><range>12</range><constant>0.70</constant><linear>0.05</linear><quadratic>0.012</quadratic></attenuation>
|
| 799 |
+
<cast_shadows>true</cast_shadows>
|
| 800 |
+
</light>
|
| 801 |
+
<light name="ceil_light_kitchen" type="point">
|
| 802 |
+
<pose>4.0 -3.1 2.45 0 0 0</pose>
|
| 803 |
+
<diffuse>0.62 0.58 0.50 1</diffuse>
|
| 804 |
+
<specular>0.30 0.28 0.24 1</specular>
|
| 805 |
+
<attenuation><range>11</range><constant>0.70</constant><linear>0.05</linear><quadratic>0.012</quadratic></attenuation>
|
| 806 |
+
<cast_shadows>false</cast_shadows>
|
| 807 |
+
</light>
|
| 808 |
+
|
| 809 |
+
<scene>
|
| 810 |
+
<ambient>0.36 0.35 0.33 1</ambient>
|
| 811 |
+
<background>0.70 0.74 0.78 1</background>
|
| 812 |
+
<shadows>true</shadows>
|
| 813 |
+
</scene>
|
| 814 |
+
|
| 815 |
+
<!-- Take off against the left wall, in the empty strip between the floor
|
| 816 |
+
lamp and the bookshelf: nothing obstructs the view, and from here
|
| 817 |
+
(high, yaw=0 facing +x) the drone looks straight down the long axis
|
| 818 |
+
and overlooks the whole apartment before starting its tour. -->
|
| 819 |
+
<include>
|
| 820 |
+
<uri>model://simple_drone</uri>
|
| 821 |
+
<pose>-7.0 0.6 1.8 0 0 0</pose>
|
| 822 |
+
</include>
|
| 823 |
+
|
| 824 |
+
</world>
|
| 825 |
+
</sdf>
|
simulation/world/home_room_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
| 9 |
+
<include>
|
| 10 |
+
<uri>model://ground_plane</uri>
|
| 11 |
+
</include>
|
| 12 |
+
|
| 13 |
+
<!-- =====================================================================
|
| 14 |
+
Layout: open-plan apartment, 15 m (x) x 10 m (y), walls 2.6 m tall.
|
| 15 |
+
x in [-7.5, 7.5], y in [-5, 5].
|
| 16 |
+
Left half (x < -1): living room (front) + dining (back)
|
| 17 |
+
Right half (x > 1): kitchen (front) + bedroom (back)
|
| 18 |
+
Surfaces use Gazebo's built-in textured materials (no extra files).
|
| 19 |
+
===================================================================== -->
|
| 20 |
+
|
| 21 |
+
<!-- ===================== Shell: floor / walls / ceiling ================ -->
|
| 22 |
+
<model name="floor">
|
| 23 |
+
<static>true</static>
|
| 24 |
+
<pose>0 0 0.01 0 0 0</pose>
|
| 25 |
+
<link name="link">
|
| 26 |
+
<visual name="visual">
|
| 27 |
+
<geometry><box><size>15 10 0.02</size></box></geometry>
|
| 28 |
+
<material>
|
| 29 |
+
<script>
|
| 30 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 31 |
+
<uri>file://media/materials/textures</uri>
|
| 32 |
+
<name>Home/MutedWoodFloor</name>
|
| 33 |
+
</script>
|
| 34 |
+
</material>
|
| 35 |
+
</visual>
|
| 36 |
+
<collision name="collision">
|
| 37 |
+
<geometry><box><size>15 10 0.02</size></box></geometry>
|
| 38 |
+
</collision>
|
| 39 |
+
</link>
|
| 40 |
+
</model>
|
| 41 |
+
|
| 42 |
+
<!-- Back wall (y = +5) -->
|
| 43 |
+
<model name="wall_back">
|
| 44 |
+
<static>true</static>
|
| 45 |
+
<pose>0 5 1.3 0 0 0</pose>
|
| 46 |
+
<link name="link">
|
| 47 |
+
<visual name="visual">
|
| 48 |
+
<geometry><box><size>15 0.15 2.6</size></box></geometry>
|
| 49 |
+
<material>
|
| 50 |
+
<script>
|
| 51 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 52 |
+
<uri>file://media/materials/textures</uri>
|
| 53 |
+
<name>Home/WallPaint</name>
|
| 54 |
+
</script>
|
| 55 |
+
</material>
|
| 56 |
+
</visual>
|
| 57 |
+
<collision name="collision"><geometry><box><size>15 0.15 2.6</size></box></geometry></collision>
|
| 58 |
+
</link>
|
| 59 |
+
</model>
|
| 60 |
+
|
| 61 |
+
<!-- Front wall (y = -5): brick accent wall (TV / kitchen side) -->
|
| 62 |
+
<model name="wall_front">
|
| 63 |
+
<static>true</static>
|
| 64 |
+
<pose>0 -5 1.3 0 0 0</pose>
|
| 65 |
+
<link name="link">
|
| 66 |
+
<visual name="visual">
|
| 67 |
+
<geometry><box><size>15 0.15 2.6</size></box></geometry>
|
| 68 |
+
<material>
|
| 69 |
+
<script>
|
| 70 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 71 |
+
<uri>file://media/materials/textures</uri>
|
| 72 |
+
<name>Home/Brick</name>
|
| 73 |
+
</script>
|
| 74 |
+
</material>
|
| 75 |
+
</visual>
|
| 76 |
+
<collision name="collision"><geometry><box><size>15 0.15 2.6</size></box></geometry></collision>
|
| 77 |
+
</link>
|
| 78 |
+
</model>
|
| 79 |
+
|
| 80 |
+
<!-- Left wall (x = -7.5) -->
|
| 81 |
+
<model name="wall_left">
|
| 82 |
+
<static>true</static>
|
| 83 |
+
<pose>-7.5 0 1.3 0 0 0</pose>
|
| 84 |
+
<link name="link">
|
| 85 |
+
<visual name="visual">
|
| 86 |
+
<geometry><box><size>0.15 10 2.6</size></box></geometry>
|
| 87 |
+
<material>
|
| 88 |
+
<script>
|
| 89 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 90 |
+
<uri>file://media/materials/textures</uri>
|
| 91 |
+
<name>Home/WallPaint</name>
|
| 92 |
+
</script>
|
| 93 |
+
</material>
|
| 94 |
+
</visual>
|
| 95 |
+
<collision name="collision"><geometry><box><size>0.15 10 2.6</size></box></geometry></collision>
|
| 96 |
+
</link>
|
| 97 |
+
</model>
|
| 98 |
+
|
| 99 |
+
<!-- Right wall (x = +7.5) -->
|
| 100 |
+
<model name="wall_right">
|
| 101 |
+
<static>true</static>
|
| 102 |
+
<pose>7.5 0 1.3 0 0 0</pose>
|
| 103 |
+
<link name="link">
|
| 104 |
+
<visual name="visual">
|
| 105 |
+
<geometry><box><size>0.15 10 2.6</size></box></geometry>
|
| 106 |
+
<material>
|
| 107 |
+
<script>
|
| 108 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 109 |
+
<uri>file://media/materials/textures</uri>
|
| 110 |
+
<name>Home/WallPaint</name>
|
| 111 |
+
</script>
|
| 112 |
+
</material>
|
| 113 |
+
</visual>
|
| 114 |
+
<collision name="collision"><geometry><box><size>0.15 10 2.6</size></box></geometry></collision>
|
| 115 |
+
</link>
|
| 116 |
+
</model>
|
| 117 |
+
|
| 118 |
+
<!-- Ceiling (z = 2.6). Comment this model out if it blocks a top-down GUI view. -->
|
| 119 |
+
<model name="ceiling">
|
| 120 |
+
<static>true</static>
|
| 121 |
+
<pose>0 0 2.625 0 0 0</pose>
|
| 122 |
+
<link name="link">
|
| 123 |
+
<visual name="visual">
|
| 124 |
+
<geometry><box><size>15 10 0.05</size></box></geometry>
|
| 125 |
+
<material>
|
| 126 |
+
<script>
|
| 127 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 128 |
+
<uri>file://media/materials/textures</uri>
|
| 129 |
+
<name>Home/Ceiling</name>
|
| 130 |
+
</script>
|
| 131 |
+
</material>
|
| 132 |
+
</visual>
|
| 133 |
+
</link>
|
| 134 |
+
</model>
|
| 135 |
+
|
| 136 |
+
<!-- ======================== LIVING ROOM (front-left) =================== -->
|
| 137 |
+
|
| 138 |
+
<!-- Rug under the coffee table -->
|
| 139 |
+
<model name="living_rug">
|
| 140 |
+
<static>true</static>
|
| 141 |
+
<pose>-0.983 1.983 0.02 0 0 0.0000</pose>
|
| 142 |
+
<link name="link">
|
| 143 |
+
<visual name="visual">
|
| 144 |
+
<geometry><box><size>3.4 2.8 0.02</size></box></geometry>
|
| 145 |
+
<material><ambient>0.46 0.43 0.39 1</ambient><diffuse>0.50 0.47 0.43 1</diffuse></material>
|
| 146 |
+
</visual>
|
| 147 |
+
</link>
|
| 148 |
+
</model>
|
| 149 |
+
|
| 150 |
+
<!-- Sofa (facing -y toward the TV), fabric -->
|
| 151 |
+
<model name="sofa">
|
| 152 |
+
<static>true</static>
|
| 153 |
+
<pose>-0.983 3.183 0.35 0 0 0.0000</pose>
|
| 154 |
+
<link name="link">
|
| 155 |
+
<visual name="base">
|
| 156 |
+
<geometry><box><size>2.1 0.85 0.35</size></box></geometry>
|
| 157 |
+
<material><ambient>0.44 0.42 0.39 1</ambient><diffuse>0.48 0.46 0.42 1</diffuse></material>
|
| 158 |
+
</visual>
|
| 159 |
+
<visual name="back">
|
| 160 |
+
<pose>0 0.4 0.32 0 0 0</pose>
|
| 161 |
+
<geometry><box><size>2.1 0.14 0.6</size></box></geometry>
|
| 162 |
+
<material><ambient>0.40 0.38 0.35 1</ambient><diffuse>0.43 0.41 0.38 1</diffuse></material>
|
| 163 |
+
</visual>
|
| 164 |
+
<visual name="left_arm">
|
| 165 |
+
<pose>-1.0 0 0.18 0 0 0</pose>
|
| 166 |
+
<geometry><box><size>0.16 0.85 0.5</size></box></geometry>
|
| 167 |
+
<material><ambient>0.40 0.38 0.35 1</ambient></material>
|
| 168 |
+
</visual>
|
| 169 |
+
<visual name="right_arm">
|
| 170 |
+
<pose>1.0 0 0.18 0 0 0</pose>
|
| 171 |
+
<geometry><box><size>0.16 0.85 0.5</size></box></geometry>
|
| 172 |
+
<material><ambient>0.40 0.38 0.35 1</ambient></material>
|
| 173 |
+
</visual>
|
| 174 |
+
<visual name="cushion_l">
|
| 175 |
+
<pose>-0.5 -0.05 0.24 0 0 0</pose>
|
| 176 |
+
<geometry><box><size>0.85 0.7 0.16</size></box></geometry>
|
| 177 |
+
<material><ambient>0.49 0.47 0.43 1</ambient><diffuse>0.52 0.50 0.46 1</diffuse></material>
|
| 178 |
+
</visual>
|
| 179 |
+
<visual name="cushion_r">
|
| 180 |
+
<pose>0.5 -0.05 0.24 0 0 0</pose>
|
| 181 |
+
<geometry><box><size>0.85 0.7 0.16</size></box></geometry>
|
| 182 |
+
<material><ambient>0.49 0.47 0.43 1</ambient><diffuse>0.52 0.50 0.46 1</diffuse></material>
|
| 183 |
+
</visual>
|
| 184 |
+
<visual name="pillow_l">
|
| 185 |
+
<pose>-0.7 0.18 0.45 0 0.2 0</pose>
|
| 186 |
+
<geometry><box><size>0.32 0.12 0.32</size></box></geometry>
|
| 187 |
+
<material><ambient>0.55 0.50 0.42 1</ambient><diffuse>0.58 0.53 0.45 1</diffuse></material>
|
| 188 |
+
</visual>
|
| 189 |
+
<visual name="pillow_r">
|
| 190 |
+
<pose>0.7 0.18 0.45 0 -0.2 0</pose>
|
| 191 |
+
<geometry><box><size>0.32 0.12 0.32</size></box></geometry>
|
| 192 |
+
<material><ambient>0.50 0.42 0.40 1</ambient><diffuse>0.53 0.45 0.43 1</diffuse></material>
|
| 193 |
+
</visual>
|
| 194 |
+
<collision name="collision"><geometry><box><size>2.2 0.95 0.85</size></box></geometry></collision>
|
| 195 |
+
</link>
|
| 196 |
+
</model>
|
| 197 |
+
|
| 198 |
+
<!-- Coffee table (wood) -->
|
| 199 |
+
<model name="coffee_table">
|
| 200 |
+
<static>true</static>
|
| 201 |
+
<pose>-0.983 1.483 0.26 0 0 0.0000</pose>
|
| 202 |
+
<link name="link">
|
| 203 |
+
<visual name="top">
|
| 204 |
+
<geometry><box><size>1.1 0.6 0.08</size></box></geometry>
|
| 205 |
+
<material>
|
| 206 |
+
<script>
|
| 207 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 208 |
+
<uri>file://media/materials/textures</uri>
|
| 209 |
+
<name>Home/WoodPolished</name>
|
| 210 |
+
</script>
|
| 211 |
+
</material>
|
| 212 |
+
</visual>
|
| 213 |
+
<visual name="leg_1"><pose>-0.45 -0.22 -0.16 0 0 0</pose><geometry><box><size>0.07 0.07 0.32</size></box></geometry><material><ambient>0.25 0.14 0.08 1</ambient></material></visual>
|
| 214 |
+
<visual name="leg_2"><pose>0.45 -0.22 -0.16 0 0 0</pose><geometry><box><size>0.07 0.07 0.32</size></box></geometry><material><ambient>0.25 0.14 0.08 1</ambient></material></visual>
|
| 215 |
+
<visual name="leg_3"><pose>-0.45 0.22 -0.16 0 0 0</pose><geometry><box><size>0.07 0.07 0.32</size></box></geometry><material><ambient>0.25 0.14 0.08 1</ambient></material></visual>
|
| 216 |
+
<visual name="leg_4"><pose>0.45 0.22 -0.16 0 0 0</pose><geometry><box><size>0.07 0.07 0.32</size></box></geometry><material><ambient>0.25 0.14 0.08 1</ambient></material></visual>
|
| 217 |
+
<collision name="collision"><geometry><box><size>1.1 0.6 0.4</size></box></geometry></collision>
|
| 218 |
+
</link>
|
| 219 |
+
</model>
|
| 220 |
+
|
| 221 |
+
<!-- TV cabinet against the brick wall (wood) -->
|
| 222 |
+
<model name="tv_cabinet">
|
| 223 |
+
<static>true</static>
|
| 224 |
+
<pose>-1.4 -4.78 0.28 0 0 0</pose>
|
| 225 |
+
<link name="link">
|
| 226 |
+
<visual name="visual">
|
| 227 |
+
<geometry><box><size>2.2 0.4 0.5</size></box></geometry>
|
| 228 |
+
<material>
|
| 229 |
+
<script>
|
| 230 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 231 |
+
<uri>file://media/materials/textures</uri>
|
| 232 |
+
<name>Home/WoodPolished</name>
|
| 233 |
+
</script>
|
| 234 |
+
</material>
|
| 235 |
+
</visual>
|
| 236 |
+
<collision name="collision"><geometry><box><size>2.2 0.4 0.5</size></box></geometry></collision>
|
| 237 |
+
</link>
|
| 238 |
+
</model>
|
| 239 |
+
|
| 240 |
+
<!-- Flat-screen TV -->
|
| 241 |
+
<model name="tv">
|
| 242 |
+
<static>true</static>
|
| 243 |
+
<pose>-1.4 -4.88 1.15 0 0 0</pose>
|
| 244 |
+
<link name="link">
|
| 245 |
+
<visual name="screen">
|
| 246 |
+
<geometry><box><size>1.7 0.06 0.95</size></box></geometry>
|
| 247 |
+
<material><ambient>0.02 0.02 0.025 1</ambient><diffuse>0.02 0.02 0.03 1</diffuse><specular>0.35 0.35 0.40 1</specular></material>
|
| 248 |
+
</visual>
|
| 249 |
+
<visual name="bezel">
|
| 250 |
+
<pose>0 0.01 0 0 0 0</pose>
|
| 251 |
+
<geometry><box><size>1.78 0.04 1.03</size></box></geometry>
|
| 252 |
+
<material><ambient>0.05 0.05 0.06 1</ambient></material>
|
| 253 |
+
</visual>
|
| 254 |
+
</link>
|
| 255 |
+
</model>
|
| 256 |
+
|
| 257 |
+
<!-- Floor lamp (living-room corner) -->
|
| 258 |
+
<model name="floor_lamp">
|
| 259 |
+
<static>true</static>
|
| 260 |
+
<pose>-3.483 2.983 0.8 0 0 0.0000</pose>
|
| 261 |
+
<link name="link">
|
| 262 |
+
<visual name="pole">
|
| 263 |
+
<geometry><cylinder><radius>0.035</radius><length>1.5</length></cylinder></geometry>
|
| 264 |
+
<material><ambient>0.22 0.22 0.24 1</ambient><diffuse>0.24 0.24 0.26 1</diffuse></material>
|
| 265 |
+
</visual>
|
| 266 |
+
<visual name="shade">
|
| 267 |
+
<pose>0 0 0.82 0 0 0</pose>
|
| 268 |
+
<geometry><cylinder><radius>0.24</radius><length>0.34</length></cylinder></geometry>
|
| 269 |
+
<material><ambient>0.78 0.72 0.60 1</ambient><diffuse>0.82 0.76 0.64 1</diffuse></material>
|
| 270 |
+
</visual>
|
| 271 |
+
</link>
|
| 272 |
+
</model>
|
| 273 |
+
|
| 274 |
+
<!-- Bookshelf against the left wall -->
|
| 275 |
+
<model name="bookshelf">
|
| 276 |
+
<static>true</static>
|
| 277 |
+
<pose>-7.15 2.25 0.9 0 0 0</pose>
|
| 278 |
+
<link name="link">
|
| 279 |
+
<visual name="frame">
|
| 280 |
+
<geometry><box><size>0.4 1.6 1.8</size></box></geometry>
|
| 281 |
+
<material>
|
| 282 |
+
<script>
|
| 283 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 284 |
+
<uri>file://media/materials/textures</uri>
|
| 285 |
+
<name>Home/WoodPolished</name>
|
| 286 |
+
</script>
|
| 287 |
+
</material>
|
| 288 |
+
</visual>
|
| 289 |
+
<visual name="books_1"><pose>0.05 -0.45 0.55 0 0 0</pose><geometry><box><size>0.28 0.6 0.25</size></box></geometry><material><ambient>0.46 0.36 0.30 1</ambient></material></visual>
|
| 290 |
+
<visual name="books_2"><pose>0.05 0.35 0.1 0 0 0</pose><geometry><box><size>0.28 0.7 0.25</size></box></geometry><material><ambient>0.38 0.40 0.40 1</ambient></material></visual>
|
| 291 |
+
<visual name="books_3"><pose>0.05 -0.1 -0.35 0 0 0</pose><geometry><box><size>0.28 0.8 0.25</size></box></geometry><material><ambient>0.42 0.41 0.34 1</ambient></material></visual>
|
| 292 |
+
<collision name="collision"><geometry><box><size>0.4 1.6 1.8</size></box></geometry></collision>
|
| 293 |
+
</link>
|
| 294 |
+
</model>
|
| 295 |
+
|
| 296 |
+
<!-- Potted plant (back-left corner) -->
|
| 297 |
+
<model name="plant">
|
| 298 |
+
<static>true</static>
|
| 299 |
+
<pose>-3.9 4.5 0 0 0 0.0000</pose>
|
| 300 |
+
<link name="link">
|
| 301 |
+
<visual name="pot">
|
| 302 |
+
<pose>0 0 0.2 0 0 0</pose>
|
| 303 |
+
<geometry><cylinder><radius>0.22</radius><length>0.4</length></cylinder></geometry>
|
| 304 |
+
<material><ambient>0.45 0.28 0.18 1</ambient><diffuse>0.50 0.30 0.20 1</diffuse></material>
|
| 305 |
+
</visual>
|
| 306 |
+
<visual name="foliage">
|
| 307 |
+
<pose>0 0 0.85 0 0 0</pose>
|
| 308 |
+
<geometry><sphere><radius>0.42</radius></sphere></geometry>
|
| 309 |
+
<material><ambient>0.26 0.34 0.24 1</ambient><diffuse>0.28 0.37 0.26 1</diffuse></material>
|
| 310 |
+
</visual>
|
| 311 |
+
<visual name="foliage2">
|
| 312 |
+
<pose>0.12 0.05 1.15 0 0 0</pose>
|
| 313 |
+
<geometry><sphere><radius>0.28</radius></sphere></geometry>
|
| 314 |
+
<material><ambient>0.28 0.36 0.26 1</ambient><diffuse>0.30 0.39 0.28 1</diffuse></material>
|
| 315 |
+
</visual>
|
| 316 |
+
</link>
|
| 317 |
+
</model>
|
| 318 |
+
|
| 319 |
+
<!-- ============================ DINING (back-left) ===================== -->
|
| 320 |
+
|
| 321 |
+
<model name="dining_table">
|
| 322 |
+
<static>true</static>
|
| 323 |
+
<pose>-1.5 -1.8 0.45 0 0 0.0000</pose>
|
| 324 |
+
<link name="link">
|
| 325 |
+
<visual name="top">
|
| 326 |
+
<geometry><box><size>1.5 0.9 0.08</size></box></geometry>
|
| 327 |
+
<material>
|
| 328 |
+
<script>
|
| 329 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 330 |
+
<uri>file://media/materials/textures</uri>
|
| 331 |
+
<name>Home/WoodPolished</name>
|
| 332 |
+
</script>
|
| 333 |
+
</material>
|
| 334 |
+
</visual>
|
| 335 |
+
<visual name="leg_1"><pose>-0.65 -0.35 -0.22 0 0 0</pose><geometry><box><size>0.08 0.08 0.44</size></box></geometry><material><ambient>0.30 0.18 0.10 1</ambient></material></visual>
|
| 336 |
+
<visual name="leg_2"><pose>0.65 -0.35 -0.22 0 0 0</pose><geometry><box><size>0.08 0.08 0.44</size></box></geometry><material><ambient>0.30 0.18 0.10 1</ambient></material></visual>
|
| 337 |
+
<visual name="leg_3"><pose>-0.65 0.35 -0.22 0 0 0</pose><geometry><box><size>0.08 0.08 0.44</size></box></geometry><material><ambient>0.30 0.18 0.10 1</ambient></material></visual>
|
| 338 |
+
<visual name="leg_4"><pose>0.65 0.35 -0.22 0 0 0</pose><geometry><box><size>0.08 0.08 0.44</size></box></geometry><material><ambient>0.30 0.18 0.10 1</ambient></material></visual>
|
| 339 |
+
<collision name="collision"><geometry><box><size>1.5 0.9 0.55</size></box></geometry></collision>
|
| 340 |
+
</link>
|
| 341 |
+
</model>
|
| 342 |
+
|
| 343 |
+
<model name="chair_1">
|
| 344 |
+
<static>true</static>
|
| 345 |
+
<pose>-2.25 -1.8 0.32 0 0 0.0000</pose>
|
| 346 |
+
<link name="link">
|
| 347 |
+
<visual name="seat"><geometry><box><size>0.45 0.45 0.1</size></box></geometry><material><ambient>0.46 0.43 0.38 1</ambient><diffuse>0.49 0.46 0.41 1</diffuse></material></visual>
|
| 348 |
+
<visual name="back"><pose>-0.2 0 0.35 0 0 0</pose><geometry><box><size>0.08 0.45 0.7</size></box></geometry><material><ambient>0.46 0.43 0.38 1</ambient></material></visual>
|
| 349 |
+
</link>
|
| 350 |
+
</model>
|
| 351 |
+
<model name="chair_2">
|
| 352 |
+
<static>true</static>
|
| 353 |
+
<pose>-0.75 -1.8 0.32 0 0 0.0000</pose>
|
| 354 |
+
<link name="link">
|
| 355 |
+
<visual name="seat"><geometry><box><size>0.45 0.45 0.1</size></box></geometry><material><ambient>0.46 0.43 0.38 1</ambient><diffuse>0.49 0.46 0.41 1</diffuse></material></visual>
|
| 356 |
+
<visual name="back"><pose>0.2 0 0.35 0 0 0</pose><geometry><box><size>0.08 0.45 0.7</size></box></geometry><material><ambient>0.46 0.43 0.38 1</ambient></material></visual>
|
| 357 |
+
</link>
|
| 358 |
+
</model>
|
| 359 |
+
<model name="chair_3">
|
| 360 |
+
<static>true</static>
|
| 361 |
+
<pose>-1.5 -2.55 0.32 0 0 1.5708</pose>
|
| 362 |
+
<link name="link">
|
| 363 |
+
<visual name="seat"><geometry><box><size>0.45 0.45 0.1</size></box></geometry><material><ambient>0.46 0.43 0.38 1</ambient><diffuse>0.49 0.46 0.41 1</diffuse></material></visual>
|
| 364 |
+
<visual name="back"><pose>-0.2 0 0.35 0 0 0</pose><geometry><box><size>0.08 0.45 0.7</size></box></geometry><material><ambient>0.46 0.43 0.38 1</ambient></material></visual>
|
| 365 |
+
</link>
|
| 366 |
+
</model>
|
| 367 |
+
<model name="chair_4">
|
| 368 |
+
<static>true</static>
|
| 369 |
+
<pose>-1.5 -1.05 0.32 0 0 4.7124</pose>
|
| 370 |
+
<link name="link">
|
| 371 |
+
<visual name="seat"><geometry><box><size>0.45 0.45 0.1</size></box></geometry><material><ambient>0.46 0.43 0.38 1</ambient><diffuse>0.49 0.46 0.41 1</diffuse></material></visual>
|
| 372 |
+
<visual name="back"><pose>-0.2 0 0.35 0 0 0</pose><geometry><box><size>0.08 0.45 0.7</size></box></geometry><material><ambient>0.46 0.43 0.38 1</ambient></material></visual>
|
| 373 |
+
</link>
|
| 374 |
+
</model>
|
| 375 |
+
|
| 376 |
+
<!-- ============================ BEDROOM (back-right) =================== -->
|
| 377 |
+
|
| 378 |
+
<model name="bed_rug">
|
| 379 |
+
<static>true</static>
|
| 380 |
+
<pose>4.7 2 0.02 0 0 0.0000</pose>
|
| 381 |
+
<link name="link">
|
| 382 |
+
<visual name="visual">
|
| 383 |
+
<geometry><box><size>3.0 2.0 0.02</size></box></geometry>
|
| 384 |
+
<material><ambient>0.42 0.41 0.39 1</ambient><diffuse>0.45 0.44 0.42 1</diffuse></material>
|
| 385 |
+
</visual>
|
| 386 |
+
</link>
|
| 387 |
+
</model>
|
| 388 |
+
|
| 389 |
+
<model name="bed">
|
| 390 |
+
<static>true</static>
|
| 391 |
+
<pose>4.9 3.75 0.28 0 0 0.0000</pose>
|
| 392 |
+
<link name="link">
|
| 393 |
+
<visual name="frame">
|
| 394 |
+
<geometry><box><size>2.0 1.9 0.35</size></box></geometry>
|
| 395 |
+
<material>
|
| 396 |
+
<script>
|
| 397 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 398 |
+
<uri>file://media/materials/textures</uri>
|
| 399 |
+
<name>Home/WoodPolished</name>
|
| 400 |
+
</script>
|
| 401 |
+
</material>
|
| 402 |
+
</visual>
|
| 403 |
+
<visual name="headboard">
|
| 404 |
+
<pose>0 0.95 0.35 0 0 0</pose>
|
| 405 |
+
<geometry><box><size>2.0 0.12 0.7</size></box></geometry>
|
| 406 |
+
<material>
|
| 407 |
+
<script>
|
| 408 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 409 |
+
<uri>file://media/materials/textures</uri>
|
| 410 |
+
<name>Home/WoodPolished</name>
|
| 411 |
+
</script>
|
| 412 |
+
</material>
|
| 413 |
+
</visual>
|
| 414 |
+
<visual name="mattress">
|
| 415 |
+
<pose>0 -0.05 0.26 0 0 0</pose>
|
| 416 |
+
<geometry><box><size>1.85 1.75 0.2</size></box></geometry>
|
| 417 |
+
<material><ambient>0.90 0.90 0.85 1</ambient><diffuse>0.94 0.94 0.88 1</diffuse></material>
|
| 418 |
+
</visual>
|
| 419 |
+
<visual name="duvet">
|
| 420 |
+
<pose>0 -0.45 0.34 0 0 0</pose>
|
| 421 |
+
<geometry><box><size>1.85 0.95 0.16</size></box></geometry>
|
| 422 |
+
<material><ambient>0.52 0.50 0.47 1</ambient><diffuse>0.56 0.54 0.50 1</diffuse></material>
|
| 423 |
+
</visual>
|
| 424 |
+
<visual name="pillow_l">
|
| 425 |
+
<pose>-0.45 0.55 0.42 0 0 0</pose>
|
| 426 |
+
<geometry><box><size>0.6 0.34 0.14</size></box></geometry>
|
| 427 |
+
<material><ambient>0.96 0.96 0.92 1</ambient><diffuse>0.98 0.98 0.94 1</diffuse></material>
|
| 428 |
+
</visual>
|
| 429 |
+
<visual name="pillow_r">
|
| 430 |
+
<pose>0.45 0.55 0.42 0 0 0</pose>
|
| 431 |
+
<geometry><box><size>0.6 0.34 0.14</size></box></geometry>
|
| 432 |
+
<material><ambient>0.96 0.96 0.92 1</ambient><diffuse>0.98 0.98 0.94 1</diffuse></material>
|
| 433 |
+
</visual>
|
| 434 |
+
<collision name="collision"><geometry><box><size>2.0 1.9 0.6</size></box></geometry></collision>
|
| 435 |
+
</link>
|
| 436 |
+
</model>
|
| 437 |
+
|
| 438 |
+
<model name="nightstand_1">
|
| 439 |
+
<static>true</static>
|
| 440 |
+
<pose>3.7 4.4 0.25 0 0 0.0000</pose>
|
| 441 |
+
<link name="link">
|
| 442 |
+
<visual name="body"><geometry><box><size>0.45 0.4 0.5</size></box></geometry>
|
| 443 |
+
<material>
|
| 444 |
+
<script>
|
| 445 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 446 |
+
<uri>file://media/materials/textures</uri>
|
| 447 |
+
<name>Home/WoodPolished</name>
|
| 448 |
+
</script>
|
| 449 |
+
</material>
|
| 450 |
+
</visual>
|
| 451 |
+
<visual name="lamp_pole"><pose>0 0 0.32 0 0 0</pose><geometry><cylinder><radius>0.02</radius><length>0.22</length></cylinder></geometry><material><ambient>0.2 0.2 0.2 1</ambient></material></visual>
|
| 452 |
+
<visual name="lamp_shade"><pose>0 0 0.46 0 0 0</pose><geometry><cylinder><radius>0.13</radius><length>0.14</length></cylinder></geometry><material><ambient>0.80 0.74 0.62 1</ambient><diffuse>0.84 0.78 0.66 1</diffuse></material></visual>
|
| 453 |
+
<collision name="collision"><geometry><box><size>0.45 0.4 0.5</size></box></geometry></collision>
|
| 454 |
+
</link>
|
| 455 |
+
</model>
|
| 456 |
+
<model name="nightstand_2">
|
| 457 |
+
<static>true</static>
|
| 458 |
+
<pose>6.1 4.4 0.25 0 0 0.0000</pose>
|
| 459 |
+
<link name="link">
|
| 460 |
+
<visual name="body"><geometry><box><size>0.45 0.4 0.5</size></box></geometry>
|
| 461 |
+
<material>
|
| 462 |
+
<script>
|
| 463 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 464 |
+
<uri>file://media/materials/textures</uri>
|
| 465 |
+
<name>Home/WoodPolished</name>
|
| 466 |
+
</script>
|
| 467 |
+
</material>
|
| 468 |
+
</visual>
|
| 469 |
+
<visual name="lamp_pole"><pose>0 0 0.32 0 0 0</pose><geometry><cylinder><radius>0.02</radius><length>0.22</length></cylinder></geometry><material><ambient>0.2 0.2 0.2 1</ambient></material></visual>
|
| 470 |
+
<visual name="lamp_shade"><pose>0 0 0.46 0 0 0</pose><geometry><cylinder><radius>0.13</radius><length>0.14</length></cylinder></geometry><material><ambient>0.80 0.74 0.62 1</ambient><diffuse>0.84 0.78 0.66 1</diffuse></material></visual>
|
| 471 |
+
<collision name="collision"><geometry><box><size>0.45 0.4 0.5</size></box></geometry></collision>
|
| 472 |
+
</link>
|
| 473 |
+
</model>
|
| 474 |
+
|
| 475 |
+
<model name="wardrobe">
|
| 476 |
+
<static>true</static>
|
| 477 |
+
<pose>7.1 0.75 1.0 0 0 0</pose>
|
| 478 |
+
<link name="link">
|
| 479 |
+
<visual name="body">
|
| 480 |
+
<geometry><box><size>0.6 1.6 2.0</size></box></geometry>
|
| 481 |
+
<material>
|
| 482 |
+
<script>
|
| 483 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 484 |
+
<uri>file://media/materials/textures</uri>
|
| 485 |
+
<name>Home/WoodPolished</name>
|
| 486 |
+
</script>
|
| 487 |
+
</material>
|
| 488 |
+
</visual>
|
| 489 |
+
<visual name="handle_1"><pose>-0.32 -0.2 0 0 0 0</pose><geometry><box><size>0.03 0.04 0.25</size></box></geometry><material><ambient>0.1 0.1 0.1 1</ambient></material></visual>
|
| 490 |
+
<visual name="handle_2"><pose>-0.32 0.2 0 0 0 0</pose><geometry><box><size>0.03 0.04 0.25</size></box></geometry><material><ambient>0.1 0.1 0.1 1</ambient></material></visual>
|
| 491 |
+
<collision name="collision"><geometry><box><size>0.6 1.6 2.0</size></box></geometry></collision>
|
| 492 |
+
</link>
|
| 493 |
+
</model>
|
| 494 |
+
|
| 495 |
+
<!-- ============================ KITCHEN (front-right) ================= -->
|
| 496 |
+
|
| 497 |
+
<!-- Lower counter run along the brick wall -->
|
| 498 |
+
<model name="kitchen_counter">
|
| 499 |
+
<static>true</static>
|
| 500 |
+
<pose>4.0 -4.65 0.45 0 0 0</pose>
|
| 501 |
+
<link name="link">
|
| 502 |
+
<visual name="body">
|
| 503 |
+
<geometry><box><size>3.6 0.65 0.9</size></box></geometry>
|
| 504 |
+
<material><ambient>0.82 0.80 0.76 1</ambient><diffuse>0.86 0.84 0.80 1</diffuse></material>
|
| 505 |
+
</visual>
|
| 506 |
+
<visual name="worktop">
|
| 507 |
+
<pose>0 0 0.47 0 0 0</pose>
|
| 508 |
+
<geometry><box><size>3.7 0.7 0.05</size></box></geometry>
|
| 509 |
+
<material>
|
| 510 |
+
<script>
|
| 511 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 512 |
+
<uri>file://media/materials/textures</uri>
|
| 513 |
+
<name>Home/WoodPolished</name>
|
| 514 |
+
</script>
|
| 515 |
+
</material>
|
| 516 |
+
</visual>
|
| 517 |
+
<visual name="sink">
|
| 518 |
+
<pose>-0.6 0 0.49 0 0 0</pose>
|
| 519 |
+
<geometry><box><size>0.6 0.45 0.06</size></box></geometry>
|
| 520 |
+
<material><ambient>0.55 0.57 0.60 1</ambient><diffuse>0.6 0.62 0.65 1</diffuse><specular>0.55 0.57 0.62 1</specular></material>
|
| 521 |
+
</visual>
|
| 522 |
+
<collision name="collision"><geometry><box><size>3.6 0.65 0.92</size></box></geometry></collision>
|
| 523 |
+
</link>
|
| 524 |
+
</model>
|
| 525 |
+
|
| 526 |
+
<!-- Upper cabinets -->
|
| 527 |
+
<model name="kitchen_uppers">
|
| 528 |
+
<static>true</static>
|
| 529 |
+
<pose>4.0 -4.78 1.95 0 0 0</pose>
|
| 530 |
+
<link name="link">
|
| 531 |
+
<visual name="body">
|
| 532 |
+
<geometry><box><size>3.2 0.38 0.7</size></box></geometry>
|
| 533 |
+
<material>
|
| 534 |
+
<script>
|
| 535 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 536 |
+
<uri>file://media/materials/textures</uri>
|
| 537 |
+
<name>Home/WoodPolished</name>
|
| 538 |
+
</script>
|
| 539 |
+
</material>
|
| 540 |
+
</visual>
|
| 541 |
+
<collision name="collision"><geometry><box><size>3.2 0.38 0.7</size></box></geometry></collision>
|
| 542 |
+
</link>
|
| 543 |
+
</model>
|
| 544 |
+
|
| 545 |
+
<!-- Fridge in the corner -->
|
| 546 |
+
<model name="fridge">
|
| 547 |
+
<static>true</static>
|
| 548 |
+
<pose>7.0 -4.45 0.95 0 0 0</pose>
|
| 549 |
+
<link name="link">
|
| 550 |
+
<visual name="body">
|
| 551 |
+
<geometry><box><size>0.7 0.7 1.9</size></box></geometry>
|
| 552 |
+
<material><ambient>0.80 0.82 0.85 1</ambient><diffuse>0.86 0.88 0.92 1</diffuse><specular>0.45 0.46 0.50 1</specular></material>
|
| 553 |
+
</visual>
|
| 554 |
+
<visual name="handle"><pose>-0.34 0.28 0.2 0 0 0</pose><geometry><box><size>0.03 0.04 0.6</size></box></geometry><material><ambient>0.3 0.3 0.32 1</ambient></material></visual>
|
| 555 |
+
<visual name="seam"><pose>-0.351 0 0.3 0 0 0</pose><geometry><box><size>0.005 0.7 0.04</size></box></geometry><material><ambient>0.6 0.62 0.65 1</ambient></material></visual>
|
| 556 |
+
<collision name="collision"><geometry><box><size>0.7 0.7 1.9</size></box></geometry></collision>
|
| 557 |
+
</link>
|
| 558 |
+
</model>
|
| 559 |
+
|
| 560 |
+
<!-- Two bar stools at the counter -->
|
| 561 |
+
<model name="stool_1">
|
| 562 |
+
<static>true</static>
|
| 563 |
+
<pose>3.2 -3.8 0.45 0 0 0.0000</pose>
|
| 564 |
+
<link name="link">
|
| 565 |
+
<visual name="seat"><geometry><cylinder><radius>0.18</radius><length>0.08</length></cylinder></geometry><material><ambient>0.2 0.2 0.22 1</ambient></material></visual>
|
| 566 |
+
<visual name="leg"><pose>0 0 -0.22 0 0 0</pose><geometry><cylinder><radius>0.04</radius><length>0.45</length></cylinder></geometry><material><ambient>0.5 0.5 0.52 1</ambient><diffuse>0.6 0.6 0.62 1</diffuse><specular>0.5 0.5 0.55 1</specular></material></visual>
|
| 567 |
+
</link>
|
| 568 |
+
</model>
|
| 569 |
+
<model name="stool_2">
|
| 570 |
+
<static>true</static>
|
| 571 |
+
<pose>4.4 -3.8 0.45 0 0 0.0000</pose>
|
| 572 |
+
<link name="link">
|
| 573 |
+
<visual name="seat"><geometry><cylinder><radius>0.18</radius><length>0.08</length></cylinder></geometry><material><ambient>0.2 0.2 0.22 1</ambient></material></visual>
|
| 574 |
+
<visual name="leg"><pose>0 0 -0.22 0 0 0</pose><geometry><cylinder><radius>0.04</radius><length>0.45</length></cylinder></geometry><material><ambient>0.5 0.5 0.52 1</ambient><diffuse>0.6 0.6 0.62 1</diffuse><specular>0.5 0.5 0.55 1</specular></material></visual>
|
| 575 |
+
</link>
|
| 576 |
+
</model>
|
| 577 |
+
|
| 578 |
+
<!-- ============================ Doors / windows / art ================= -->
|
| 579 |
+
|
| 580 |
+
<!-- Entry door on the right wall -->
|
| 581 |
+
<model name="door">
|
| 582 |
+
<static>true</static>
|
| 583 |
+
<pose>7.42 -2.25 1.0 0 0 0</pose>
|
| 584 |
+
<link name="link">
|
| 585 |
+
<visual name="leaf">
|
| 586 |
+
<geometry><box><size>0.05 1.0 2.0</size></box></geometry>
|
| 587 |
+
<material>
|
| 588 |
+
<script>
|
| 589 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 590 |
+
<uri>file://media/materials/textures</uri>
|
| 591 |
+
<name>Home/WoodPolished</name>
|
| 592 |
+
</script>
|
| 593 |
+
</material>
|
| 594 |
+
</visual>
|
| 595 |
+
<visual name="knob"><pose>-0.04 -0.4 0 0 0 0</pose><geometry><sphere><radius>0.05</radius></sphere></geometry><material><ambient>0.7 0.6 0.2 1</ambient><diffuse>0.8 0.7 0.25 1</diffuse><specular>0.9 0.8 0.4 1</specular></material></visual>
|
| 596 |
+
</link>
|
| 597 |
+
</model>
|
| 598 |
+
|
| 599 |
+
<!-- Windows on the back wall (semi-transparent glass) -->
|
| 600 |
+
<model name="window_1">
|
| 601 |
+
<static>true</static>
|
| 602 |
+
<pose>-1.25 4.92 1.5 0 0 0</pose>
|
| 603 |
+
<link name="link">
|
| 604 |
+
<visual name="glass"><geometry><box><size>1.6 0.05 1.0</size></box></geometry>
|
| 605 |
+
<material><ambient>0.55 0.60 0.62 0.4</ambient><diffuse>0.58 0.63 0.65 0.4</diffuse><specular>0.70 0.75 0.80 0.4</specular></material>
|
| 606 |
+
</visual>
|
| 607 |
+
<visual name="frame_t"><pose>0 0 0.52 0 0 0</pose><geometry><box><size>1.7 0.08 0.08</size></box></geometry><material><ambient>0.9 0.9 0.88 1</ambient></material></visual>
|
| 608 |
+
<visual name="frame_b"><pose>0 0 -0.52 0 0 0</pose><geometry><box><size>1.7 0.08 0.08</size></box></geometry><material><ambient>0.9 0.9 0.88 1</ambient></material></visual>
|
| 609 |
+
<visual name="mullion"><pose>0 0 0 0 0 0</pose><geometry><box><size>0.06 0.06 1.0</size></box></geometry><material><ambient>0.9 0.9 0.88 1</ambient></material></visual>
|
| 610 |
+
</link>
|
| 611 |
+
</model>
|
| 612 |
+
<model name="window_2">
|
| 613 |
+
<static>true</static>
|
| 614 |
+
<pose>1.9 4.92 1.5 0 0 0</pose>
|
| 615 |
+
<link name="link">
|
| 616 |
+
<visual name="glass"><geometry><box><size>1.6 0.05 1.0</size></box></geometry>
|
| 617 |
+
<material><ambient>0.55 0.60 0.62 0.4</ambient><diffuse>0.58 0.63 0.65 0.4</diffuse><specular>0.70 0.75 0.80 0.4</specular></material>
|
| 618 |
+
</visual>
|
| 619 |
+
<visual name="frame_t"><pose>0 0 0.52 0 0 0</pose><geometry><box><size>1.7 0.08 0.08</size></box></geometry><material><ambient>0.9 0.9 0.88 1</ambient></material></visual>
|
| 620 |
+
<visual name="frame_b"><pose>0 0 -0.52 0 0 0</pose><geometry><box><size>1.7 0.08 0.08</size></box></geometry><material><ambient>0.9 0.9 0.88 1</ambient></material></visual>
|
| 621 |
+
<visual name="mullion"><pose>0 0 0 0 0 0</pose><geometry><box><size>0.06 0.06 1.0</size></box></geometry><material><ambient>0.9 0.9 0.88 1</ambient></material></visual>
|
| 622 |
+
</link>
|
| 623 |
+
</model>
|
| 624 |
+
|
| 625 |
+
<!-- Window on the left wall (living-room daylight) -->
|
| 626 |
+
<model name="window_3">
|
| 627 |
+
<static>true</static>
|
| 628 |
+
<pose>-7.42 -2.75 1.5 0 0 0</pose>
|
| 629 |
+
<link name="link">
|
| 630 |
+
<visual name="glass"><geometry><box><size>0.05 1.6 1.0</size></box></geometry>
|
| 631 |
+
<material><ambient>0.55 0.60 0.62 0.4</ambient><diffuse>0.58 0.63 0.65 0.4</diffuse><specular>0.70 0.75 0.80 0.4</specular></material>
|
| 632 |
+
</visual>
|
| 633 |
+
<visual name="frame_t"><pose>0 0 0.52 0 0 0</pose><geometry><box><size>0.08 1.7 0.08</size></box></geometry><material><ambient>0.9 0.9 0.88 1</ambient></material></visual>
|
| 634 |
+
<visual name="frame_b"><pose>0 0 -0.52 0 0 0</pose><geometry><box><size>0.08 1.7 0.08</size></box></geometry><material><ambient>0.9 0.9 0.88 1</ambient></material></visual>
|
| 635 |
+
</link>
|
| 636 |
+
</model>
|
| 637 |
+
|
| 638 |
+
<!-- Wall art flanking the TV (on the brick wall) -->
|
| 639 |
+
<model name="art_1">
|
| 640 |
+
<static>true</static>
|
| 641 |
+
<pose>-1.6 -4.9 1.5 0 0 0</pose>
|
| 642 |
+
<link name="link">
|
| 643 |
+
<visual name="frame"><geometry><box><size>0.9 0.04 0.65</size></box></geometry><material><ambient>0.15 0.12 0.10 1</ambient></material></visual>
|
| 644 |
+
<visual name="canvas"><pose>0 0.005 0 0 0 0</pose><geometry><box><size>0.78 0.04 0.53</size></box></geometry><material><ambient>0.60 0.52 0.42 1</ambient><diffuse>0.63 0.55 0.45 1</diffuse></material></visual>
|
| 645 |
+
</link>
|
| 646 |
+
</model>
|
| 647 |
+
<model name="art_2">
|
| 648 |
+
<static>true</static>
|
| 649 |
+
<pose>-6.5 -4.9 1.5 0 0 0</pose>
|
| 650 |
+
<link name="link">
|
| 651 |
+
<visual name="frame"><geometry><box><size>0.7 0.04 0.9</size></box></geometry><material><ambient>0.15 0.12 0.10 1</ambient></material></visual>
|
| 652 |
+
<visual name="canvas"><pose>0 0.005 0 0 0 0</pose><geometry><box><size>0.58 0.04 0.78</size></box></geometry><material><ambient>0.44 0.46 0.46 1</ambient><diffuse>0.47 0.49 0.49 1</diffuse></material></visual>
|
| 653 |
+
</link>
|
| 654 |
+
</model>
|
| 655 |
+
|
| 656 |
+
<!-- ================== Extra furniture (cosier / more compact) ========= -->
|
| 657 |
+
|
| 658 |
+
<!-- Living-room armchair (faces +x toward the coffee table / room centre) -->
|
| 659 |
+
<model name="armchair">
|
| 660 |
+
<static>true</static>
|
| 661 |
+
<pose>-2.983 1.583 0.35 0 0 0.0000</pose>
|
| 662 |
+
<link name="link">
|
| 663 |
+
<visual name="base"><geometry><box><size>0.85 0.9 0.35</size></box></geometry>
|
| 664 |
+
<material><ambient>0.44 0.42 0.39 1</ambient><diffuse>0.48 0.46 0.42 1</diffuse><specular>0.03 0.03 0.03 1</specular></material></visual>
|
| 665 |
+
<visual name="back"><pose>-0.36 0 0.32 0 0 0</pose><geometry><box><size>0.14 0.9 0.6</size></box></geometry>
|
| 666 |
+
<material><ambient>0.40 0.38 0.35 1</ambient><diffuse>0.43 0.41 0.38 1</diffuse></material></visual>
|
| 667 |
+
<visual name="arm_l"><pose>0 0.42 0.16 0 0 0</pose><geometry><box><size>0.8 0.14 0.42</size></box></geometry><material><ambient>0.40 0.38 0.35 1</ambient></material></visual>
|
| 668 |
+
<visual name="arm_r"><pose>0 -0.42 0.16 0 0 0</pose><geometry><box><size>0.8 0.14 0.42</size></box></geometry><material><ambient>0.40 0.38 0.35 1</ambient></material></visual>
|
| 669 |
+
<visual name="cushion"><pose>0.05 0 0.24 0 0 0</pose><geometry><box><size>0.66 0.62 0.16</size></box></geometry><material><ambient>0.49 0.47 0.43 1</ambient><diffuse>0.52 0.50 0.46 1</diffuse></material></visual>
|
| 670 |
+
<visual name="pillow"><pose>-0.2 0 0.42 0 0.25 0</pose><geometry><box><size>0.3 0.3 0.12</size></box></geometry><material><ambient>0.56 0.48 0.40 1</ambient><diffuse>0.59 0.51 0.43 1</diffuse></material></visual>
|
| 671 |
+
<collision name="collision"><geometry><box><size>0.85 0.95 0.85</size></box></geometry></collision>
|
| 672 |
+
</link>
|
| 673 |
+
</model>
|
| 674 |
+
|
| 675 |
+
<!-- Side table beside the sofa -->
|
| 676 |
+
<model name="side_table">
|
| 677 |
+
<static>true</static>
|
| 678 |
+
<pose>0.417 3.183 0.28 0 0 0.0000</pose>
|
| 679 |
+
<link name="link">
|
| 680 |
+
<visual name="top"><pose>0 0 0.2 0 0 0</pose><geometry><box><size>0.5 0.5 0.06</size></box></geometry>
|
| 681 |
+
<material><script><uri>file://media/materials/scripts/home.material</uri><uri>file://media/materials/textures</uri><name>Home/WoodPolished</name></script></material></visual>
|
| 682 |
+
<visual name="leg_1"><pose>-0.2 -0.2 0 0 0 0</pose><geometry><box><size>0.05 0.05 0.46</size></box></geometry><material><ambient>0.25 0.16 0.09 1</ambient></material></visual>
|
| 683 |
+
<visual name="leg_2"><pose>0.2 -0.2 0 0 0 0</pose><geometry><box><size>0.05 0.05 0.46</size></box></geometry><material><ambient>0.25 0.16 0.09 1</ambient></material></visual>
|
| 684 |
+
<visual name="leg_3"><pose>-0.2 0.2 0 0 0 0</pose><geometry><box><size>0.05 0.05 0.46</size></box></geometry><material><ambient>0.25 0.16 0.09 1</ambient></material></visual>
|
| 685 |
+
<visual name="leg_4"><pose>0.2 0.2 0 0 0 0</pose><geometry><box><size>0.05 0.05 0.46</size></box></geometry><material><ambient>0.25 0.16 0.09 1</ambient></material></visual>
|
| 686 |
+
</link>
|
| 687 |
+
</model>
|
| 688 |
+
|
| 689 |
+
<!-- Second potted plant (living-room front corner) -->
|
| 690 |
+
<model name="plant_living">
|
| 691 |
+
<static>true</static>
|
| 692 |
+
<pose>0.4 -4.3 0 0 0 0.0000</pose>
|
| 693 |
+
<link name="link">
|
| 694 |
+
<visual name="pot"><pose>0 0 0.18 0 0 0</pose><geometry><cylinder><radius>0.2</radius><length>0.36</length></cylinder></geometry><material><ambient>0.40 0.25 0.16 1</ambient><diffuse>0.45 0.28 0.18 1</diffuse></material></visual>
|
| 695 |
+
<visual name="foliage"><pose>0 0 0.75 0 0 0</pose><geometry><sphere><radius>0.38</radius></sphere></geometry><material><ambient>0.24 0.33 0.22 1</ambient><diffuse>0.27 0.36 0.25 1</diffuse></material></visual>
|
| 696 |
+
<visual name="foliage2"><pose>0.1 -0.05 1.0 0 0 0</pose><geometry><sphere><radius>0.26</radius></sphere></geometry><material><ambient>0.26 0.35 0.24 1</ambient><diffuse>0.29 0.38 0.27 1</diffuse></material></visual>
|
| 697 |
+
</link>
|
| 698 |
+
</model>
|
| 699 |
+
|
| 700 |
+
<!-- Dining sideboard / buffet against the back wall -->
|
| 701 |
+
<model name="sideboard">
|
| 702 |
+
<static>true</static>
|
| 703 |
+
<pose>0 4.78 0.45 0 0 0</pose>
|
| 704 |
+
<link name="link">
|
| 705 |
+
<visual name="body"><geometry><box><size>1.6 0.4 0.9</size></box></geometry>
|
| 706 |
+
<material><script><uri>file://media/materials/scripts/home.material</uri><uri>file://media/materials/textures</uri><name>Home/WoodPolished</name></script></material></visual>
|
| 707 |
+
<visual name="handle_1"><pose>-0.4 -0.21 0.05 0 0 0</pose><geometry><box><size>0.18 0.03 0.03</size></box></geometry><material><ambient>0.1 0.1 0.1 1</ambient><specular>0.4 0.4 0.4 1</specular></material></visual>
|
| 708 |
+
<visual name="handle_2"><pose>0.4 -0.21 0.05 0 0 0</pose><geometry><box><size>0.18 0.03 0.03</size></box></geometry><material><ambient>0.1 0.1 0.1 1</ambient><specular>0.4 0.4 0.4 1</specular></material></visual>
|
| 709 |
+
<visual name="vase"><pose>0.45 0 0.55 0 0 0</pose><geometry><cylinder><radius>0.07</radius><length>0.2</length></cylinder></geometry><material><ambient>0.55 0.55 0.58 1</ambient><diffuse>0.6 0.6 0.63 1</diffuse><specular>0.3 0.3 0.32 1</specular></material></visual>
|
| 710 |
+
<collision name="collision"><geometry><box><size>1.6 0.4 0.9</size></box></geometry></collision>
|
| 711 |
+
</link>
|
| 712 |
+
</model>
|
| 713 |
+
|
| 714 |
+
<!-- Bedroom dresser / chest of drawers (faces +x into the room) -->
|
| 715 |
+
<model name="dresser">
|
| 716 |
+
<static>true</static>
|
| 717 |
+
<pose>2.9 3.2 0.45 0 0 0.0000</pose>
|
| 718 |
+
<link name="link">
|
| 719 |
+
<visual name="body"><geometry><box><size>0.5 1.0 0.9</size></box></geometry>
|
| 720 |
+
<material><script><uri>file://media/materials/scripts/home.material</uri><uri>file://media/materials/textures</uri><name>Home/WoodPolished</name></script></material></visual>
|
| 721 |
+
<visual name="handle_1"><pose>0.26 -0.25 0.2 0 0 0</pose><geometry><box><size>0.03 0.16 0.03</size></box></geometry><material><ambient>0.1 0.1 0.1 1</ambient><specular>0.4 0.4 0.4 1</specular></material></visual>
|
| 722 |
+
<visual name="handle_2"><pose>0.26 0.25 0.2 0 0 0</pose><geometry><box><size>0.03 0.16 0.03</size></box></geometry><material><ambient>0.1 0.1 0.1 1</ambient><specular>0.4 0.4 0.4 1</specular></material></visual>
|
| 723 |
+
<visual name="handle_3"><pose>0.26 -0.25 -0.15 0 0 0</pose><geometry><box><size>0.03 0.16 0.03</size></box></geometry><material><ambient>0.1 0.1 0.1 1</ambient><specular>0.4 0.4 0.4 1</specular></material></visual>
|
| 724 |
+
<visual name="handle_4"><pose>0.26 0.25 -0.15 0 0 0</pose><geometry><box><size>0.03 0.16 0.03</size></box></geometry><material><ambient>0.1 0.1 0.1 1</ambient><specular>0.4 0.4 0.4 1</specular></material></visual>
|
| 725 |
+
<collision name="collision"><geometry><box><size>0.5 1.0 0.9</size></box></geometry></collision>
|
| 726 |
+
</link>
|
| 727 |
+
</model>
|
| 728 |
+
|
| 729 |
+
<!-- Bench at the foot of the bed -->
|
| 730 |
+
<model name="bed_bench">
|
| 731 |
+
<static>true</static>
|
| 732 |
+
<pose>4.9 2.6 0.22 0 0 0.0000</pose>
|
| 733 |
+
<link name="link">
|
| 734 |
+
<visual name="top"><pose>0 0 0.12 0 0 0</pose><geometry><box><size>1.4 0.4 0.14</size></box></geometry><material><ambient>0.50 0.46 0.40 1</ambient><diffuse>0.54 0.50 0.44 1</diffuse></material></visual>
|
| 735 |
+
<visual name="leg_1"><pose>-0.62 -0.15 -0.05 0 0 0</pose><geometry><box><size>0.06 0.06 0.34</size></box></geometry><material><ambient>0.25 0.16 0.09 1</ambient></material></visual>
|
| 736 |
+
<visual name="leg_2"><pose>0.62 -0.15 -0.05 0 0 0</pose><geometry><box><size>0.06 0.06 0.34</size></box></geometry><material><ambient>0.25 0.16 0.09 1</ambient></material></visual>
|
| 737 |
+
<visual name="leg_3"><pose>-0.62 0.15 -0.05 0 0 0</pose><geometry><box><size>0.06 0.06 0.34</size></box></geometry><material><ambient>0.25 0.16 0.09 1</ambient></material></visual>
|
| 738 |
+
<visual name="leg_4"><pose>0.62 0.15 -0.05 0 0 0</pose><geometry><box><size>0.06 0.06 0.34</size></box></geometry><material><ambient>0.25 0.16 0.09 1</ambient></material></visual>
|
| 739 |
+
</link>
|
| 740 |
+
</model>
|
| 741 |
+
|
| 742 |
+
<!-- Kitchen island (faces the counter; makes the kitchen feel compact) -->
|
| 743 |
+
<model name="kitchen_island">
|
| 744 |
+
<static>true</static>
|
| 745 |
+
<pose>4.8 -2.4 0.45 0 0 0.0000</pose>
|
| 746 |
+
<link name="link">
|
| 747 |
+
<visual name="body"><geometry><box><size>1.6 0.8 0.9</size></box></geometry>
|
| 748 |
+
<material><ambient>0.80 0.78 0.74 1</ambient><diffuse>0.85 0.83 0.79 1</diffuse><specular>0.05 0.05 0.05 1</specular></material></visual>
|
| 749 |
+
<visual name="worktop"><pose>0 0 0.47 0 0 0</pose><geometry><box><size>1.7 0.9 0.05</size></box></geometry>
|
| 750 |
+
<material><script><uri>file://media/materials/scripts/home.material</uri><uri>file://media/materials/textures</uri><name>Home/WoodPolished</name></script></material></visual>
|
| 751 |
+
<collision name="collision"><geometry><box><size>1.6 0.8 0.92</size></box></geometry></collision>
|
| 752 |
+
</link>
|
| 753 |
+
</model>
|
| 754 |
+
|
| 755 |
+
<!-- Bar stool at the island -->
|
| 756 |
+
<model name="island_stool">
|
| 757 |
+
<static>true</static>
|
| 758 |
+
<pose>4.8 -1.5 0.45 0 0 0.0000</pose>
|
| 759 |
+
<link name="link">
|
| 760 |
+
<visual name="seat"><geometry><cylinder><radius>0.18</radius><length>0.08</length></cylinder></geometry><material><ambient>0.2 0.2 0.22 1</ambient></material></visual>
|
| 761 |
+
<visual name="leg"><pose>0 0 -0.22 0 0 0</pose><geometry><cylinder><radius>0.04</radius><length>0.45</length></cylinder></geometry><material><ambient>0.5 0.5 0.52 1</ambient><diffuse>0.6 0.6 0.62 1</diffuse><specular>0.5 0.5 0.55 1</specular></material></visual>
|
| 762 |
+
</link>
|
| 763 |
+
</model>
|
| 764 |
+
|
| 765 |
+
<!-- ============================ Lighting ============================== -->
|
| 766 |
+
<!-- A closed ceiling blocks the exterior sun, so the interior is lit by warm
|
| 767 |
+
ceiling lamps. A single soft, shadowless directional "skylight" fill is
|
| 768 |
+
added on top: it lifts the harsh dark corners the point lamps leave and
|
| 769 |
+
gives every surface a consistent base shade, so the room reads as evenly
|
| 770 |
+
lit daylight rather than a dim cave. The point lamps then layer warm
|
| 771 |
+
pools of light + specular highlights over that base. -->
|
| 772 |
+
<light name="fill_skylight" type="directional">
|
| 773 |
+
<pose>0 0 2.65 0 0 0</pose>
|
| 774 |
+
<direction>-0.25 0.15 -1.0</direction>
|
| 775 |
+
<diffuse>0.34 0.34 0.36 1</diffuse>
|
| 776 |
+
<specular>0.08 0.08 0.09 1</specular>
|
| 777 |
+
<cast_shadows>false</cast_shadows>
|
| 778 |
+
</light>
|
| 779 |
+
|
| 780 |
+
<light name="ceil_light_living" type="point">
|
| 781 |
+
<pose>-4.4 -1.9 2.45 0 0 0</pose>
|
| 782 |
+
<diffuse>0.62 0.56 0.46 1</diffuse>
|
| 783 |
+
<specular>0.28 0.26 0.22 1</specular>
|
| 784 |
+
<attenuation><range>12</range><constant>0.70</constant><linear>0.05</linear><quadratic>0.012</quadratic></attenuation>
|
| 785 |
+
<cast_shadows>true</cast_shadows>
|
| 786 |
+
</light>
|
| 787 |
+
<light name="ceil_light_dining" type="point">
|
| 788 |
+
<pose>-4.5 2.9 2.45 0 0 0</pose>
|
| 789 |
+
<diffuse>0.60 0.54 0.45 1</diffuse>
|
| 790 |
+
<specular>0.26 0.24 0.20 1</specular>
|
| 791 |
+
<attenuation><range>11</range><constant>0.70</constant><linear>0.05</linear><quadratic>0.012</quadratic></attenuation>
|
| 792 |
+
<cast_shadows>false</cast_shadows>
|
| 793 |
+
</light>
|
| 794 |
+
<light name="ceil_light_bedroom" type="point">
|
| 795 |
+
<pose>4.8 3.2 2.45 0 0 0</pose>
|
| 796 |
+
<diffuse>0.58 0.53 0.45 1</diffuse>
|
| 797 |
+
<specular>0.26 0.24 0.20 1</specular>
|
| 798 |
+
<attenuation><range>12</range><constant>0.70</constant><linear>0.05</linear><quadratic>0.012</quadratic></attenuation>
|
| 799 |
+
<cast_shadows>true</cast_shadows>
|
| 800 |
+
</light>
|
| 801 |
+
<light name="ceil_light_kitchen" type="point">
|
| 802 |
+
<pose>4.0 -3.1 2.45 0 0 0</pose>
|
| 803 |
+
<diffuse>0.62 0.58 0.50 1</diffuse>
|
| 804 |
+
<specular>0.30 0.28 0.24 1</specular>
|
| 805 |
+
<attenuation><range>11</range><constant>0.70</constant><linear>0.05</linear><quadratic>0.012</quadratic></attenuation>
|
| 806 |
+
<cast_shadows>false</cast_shadows>
|
| 807 |
+
</light>
|
| 808 |
+
|
| 809 |
+
<scene>
|
| 810 |
+
<ambient>0.36 0.35 0.33 1</ambient>
|
| 811 |
+
<background>0.70 0.74 0.78 1</background>
|
| 812 |
+
<shadows>true</shadows>
|
| 813 |
+
</scene>
|
| 814 |
+
|
| 815 |
+
<!-- Take off against the left wall, in the empty strip between the floor
|
| 816 |
+
lamp and the bookshelf: nothing obstructs the view, and from here
|
| 817 |
+
(high, yaw=0 facing +x) the drone looks straight down the long axis
|
| 818 |
+
and overlooks the whole apartment before starting its tour. -->
|
| 819 |
+
<include>
|
| 820 |
+
<uri>model://simple_drone</uri>
|
| 821 |
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.6">
|
| 3 |
+
<world name="home_room">
|
| 4 |
+
|
| 5 |
+
<include>
|
| 6 |
+
<uri>model://sun</uri>
|
| 7 |
+
</include>
|
| 8 |
+
|
| 9 |
+
<include>
|
| 10 |
+
<uri>model://ground_plane</uri>
|
| 11 |
+
</include>
|
| 12 |
+
|
| 13 |
+
<!-- =====================================================================
|
| 14 |
+
Layout: open-plan apartment, 15 m (x) x 10 m (y), walls 2.6 m tall.
|
| 15 |
+
x in [-7.5, 7.5], y in [-5, 5].
|
| 16 |
+
Left half (x < -1): living room (front) + dining (back)
|
| 17 |
+
Right half (x > 1): kitchen (front) + bedroom (back)
|
| 18 |
+
Surfaces use Gazebo's built-in textured materials (no extra files).
|
| 19 |
+
===================================================================== -->
|
| 20 |
+
|
| 21 |
+
<!-- ===================== Shell: floor / walls / ceiling ================ -->
|
| 22 |
+
<model name="floor">
|
| 23 |
+
<static>true</static>
|
| 24 |
+
<pose>0 0 0.01 0 0 0</pose>
|
| 25 |
+
<link name="link">
|
| 26 |
+
<visual name="visual">
|
| 27 |
+
<geometry><box><size>15 10 0.02</size></box></geometry>
|
| 28 |
+
<material>
|
| 29 |
+
<script>
|
| 30 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 31 |
+
<uri>file://media/materials/textures</uri>
|
| 32 |
+
<name>Home/MutedWoodFloor</name>
|
| 33 |
+
</script>
|
| 34 |
+
</material>
|
| 35 |
+
</visual>
|
| 36 |
+
<collision name="collision">
|
| 37 |
+
<geometry><box><size>15 10 0.02</size></box></geometry>
|
| 38 |
+
</collision>
|
| 39 |
+
</link>
|
| 40 |
+
</model>
|
| 41 |
+
|
| 42 |
+
<!-- Back wall (y = +5) -->
|
| 43 |
+
<model name="wall_back">
|
| 44 |
+
<static>true</static>
|
| 45 |
+
<pose>0 5 1.3 0 0 0</pose>
|
| 46 |
+
<link name="link">
|
| 47 |
+
<visual name="visual">
|
| 48 |
+
<geometry><box><size>15 0.15 2.6</size></box></geometry>
|
| 49 |
+
<material>
|
| 50 |
+
<script>
|
| 51 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 52 |
+
<uri>file://media/materials/textures</uri>
|
| 53 |
+
<name>Home/WallPaint</name>
|
| 54 |
+
</script>
|
| 55 |
+
</material>
|
| 56 |
+
</visual>
|
| 57 |
+
<collision name="collision"><geometry><box><size>15 0.15 2.6</size></box></geometry></collision>
|
| 58 |
+
</link>
|
| 59 |
+
</model>
|
| 60 |
+
|
| 61 |
+
<!-- Front wall (y = -5): brick accent wall (TV / kitchen side) -->
|
| 62 |
+
<model name="wall_front">
|
| 63 |
+
<static>true</static>
|
| 64 |
+
<pose>0 -5 1.3 0 0 0</pose>
|
| 65 |
+
<link name="link">
|
| 66 |
+
<visual name="visual">
|
| 67 |
+
<geometry><box><size>15 0.15 2.6</size></box></geometry>
|
| 68 |
+
<material>
|
| 69 |
+
<script>
|
| 70 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 71 |
+
<uri>file://media/materials/textures</uri>
|
| 72 |
+
<name>Home/Brick</name>
|
| 73 |
+
</script>
|
| 74 |
+
</material>
|
| 75 |
+
</visual>
|
| 76 |
+
<collision name="collision"><geometry><box><size>15 0.15 2.6</size></box></geometry></collision>
|
| 77 |
+
</link>
|
| 78 |
+
</model>
|
| 79 |
+
|
| 80 |
+
<!-- Left wall (x = -7.5) -->
|
| 81 |
+
<model name="wall_left">
|
| 82 |
+
<static>true</static>
|
| 83 |
+
<pose>-7.5 0 1.3 0 0 0</pose>
|
| 84 |
+
<link name="link">
|
| 85 |
+
<visual name="visual">
|
| 86 |
+
<geometry><box><size>0.15 10 2.6</size></box></geometry>
|
| 87 |
+
<material>
|
| 88 |
+
<script>
|
| 89 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 90 |
+
<uri>file://media/materials/textures</uri>
|
| 91 |
+
<name>Home/WallPaint</name>
|
| 92 |
+
</script>
|
| 93 |
+
</material>
|
| 94 |
+
</visual>
|
| 95 |
+
<collision name="collision"><geometry><box><size>0.15 10 2.6</size></box></geometry></collision>
|
| 96 |
+
</link>
|
| 97 |
+
</model>
|
| 98 |
+
|
| 99 |
+
<!-- Right wall (x = +7.5) -->
|
| 100 |
+
<model name="wall_right">
|
| 101 |
+
<static>true</static>
|
| 102 |
+
<pose>7.5 0 1.3 0 0 0</pose>
|
| 103 |
+
<link name="link">
|
| 104 |
+
<visual name="visual">
|
| 105 |
+
<geometry><box><size>0.15 10 2.6</size></box></geometry>
|
| 106 |
+
<material>
|
| 107 |
+
<script>
|
| 108 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 109 |
+
<uri>file://media/materials/textures</uri>
|
| 110 |
+
<name>Home/WallPaint</name>
|
| 111 |
+
</script>
|
| 112 |
+
</material>
|
| 113 |
+
</visual>
|
| 114 |
+
<collision name="collision"><geometry><box><size>0.15 10 2.6</size></box></geometry></collision>
|
| 115 |
+
</link>
|
| 116 |
+
</model>
|
| 117 |
+
|
| 118 |
+
<!-- Ceiling (z = 2.6). Comment this model out if it blocks a top-down GUI view. -->
|
| 119 |
+
<model name="ceiling">
|
| 120 |
+
<static>true</static>
|
| 121 |
+
<pose>0 0 2.625 0 0 0</pose>
|
| 122 |
+
<link name="link">
|
| 123 |
+
<visual name="visual">
|
| 124 |
+
<geometry><box><size>15 10 0.05</size></box></geometry>
|
| 125 |
+
<material>
|
| 126 |
+
<script>
|
| 127 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 128 |
+
<uri>file://media/materials/textures</uri>
|
| 129 |
+
<name>Home/Ceiling</name>
|
| 130 |
+
</script>
|
| 131 |
+
</material>
|
| 132 |
+
</visual>
|
| 133 |
+
</link>
|
| 134 |
+
</model>
|
| 135 |
+
|
| 136 |
+
<!-- ======================== LIVING ROOM (front-left) =================== -->
|
| 137 |
+
|
| 138 |
+
<!-- Rug under the coffee table -->
|
| 139 |
+
<model name="living_rug">
|
| 140 |
+
<static>true</static>
|
| 141 |
+
<pose>-1.4 -1.9 0.02 0 0 0.0000</pose>
|
| 142 |
+
<link name="link">
|
| 143 |
+
<visual name="visual">
|
| 144 |
+
<geometry><box><size>3.4 2.8 0.02</size></box></geometry>
|
| 145 |
+
<material><ambient>0.46 0.43 0.39 1</ambient><diffuse>0.50 0.47 0.43 1</diffuse></material>
|
| 146 |
+
</visual>
|
| 147 |
+
</link>
|
| 148 |
+
</model>
|
| 149 |
+
|
| 150 |
+
<!-- Sofa (facing -y toward the TV), fabric -->
|
| 151 |
+
<model name="sofa">
|
| 152 |
+
<static>true</static>
|
| 153 |
+
<pose>-1.4 -0.7 0.35 0 0 0.0000</pose>
|
| 154 |
+
<link name="link">
|
| 155 |
+
<visual name="base">
|
| 156 |
+
<geometry><box><size>2.1 0.85 0.35</size></box></geometry>
|
| 157 |
+
<material><ambient>0.44 0.42 0.39 1</ambient><diffuse>0.48 0.46 0.42 1</diffuse></material>
|
| 158 |
+
</visual>
|
| 159 |
+
<visual name="back">
|
| 160 |
+
<pose>0 0.4 0.32 0 0 0</pose>
|
| 161 |
+
<geometry><box><size>2.1 0.14 0.6</size></box></geometry>
|
| 162 |
+
<material><ambient>0.40 0.38 0.35 1</ambient><diffuse>0.43 0.41 0.38 1</diffuse></material>
|
| 163 |
+
</visual>
|
| 164 |
+
<visual name="left_arm">
|
| 165 |
+
<pose>-1.0 0 0.18 0 0 0</pose>
|
| 166 |
+
<geometry><box><size>0.16 0.85 0.5</size></box></geometry>
|
| 167 |
+
<material><ambient>0.40 0.38 0.35 1</ambient></material>
|
| 168 |
+
</visual>
|
| 169 |
+
<visual name="right_arm">
|
| 170 |
+
<pose>1.0 0 0.18 0 0 0</pose>
|
| 171 |
+
<geometry><box><size>0.16 0.85 0.5</size></box></geometry>
|
| 172 |
+
<material><ambient>0.40 0.38 0.35 1</ambient></material>
|
| 173 |
+
</visual>
|
| 174 |
+
<visual name="cushion_l">
|
| 175 |
+
<pose>-0.5 -0.05 0.24 0 0 0</pose>
|
| 176 |
+
<geometry><box><size>0.85 0.7 0.16</size></box></geometry>
|
| 177 |
+
<material><ambient>0.49 0.47 0.43 1</ambient><diffuse>0.52 0.50 0.46 1</diffuse></material>
|
| 178 |
+
</visual>
|
| 179 |
+
<visual name="cushion_r">
|
| 180 |
+
<pose>0.5 -0.05 0.24 0 0 0</pose>
|
| 181 |
+
<geometry><box><size>0.85 0.7 0.16</size></box></geometry>
|
| 182 |
+
<material><ambient>0.49 0.47 0.43 1</ambient><diffuse>0.52 0.50 0.46 1</diffuse></material>
|
| 183 |
+
</visual>
|
| 184 |
+
<visual name="pillow_l">
|
| 185 |
+
<pose>-0.7 0.18 0.45 0 0.2 0</pose>
|
| 186 |
+
<geometry><box><size>0.32 0.12 0.32</size></box></geometry>
|
| 187 |
+
<material><ambient>0.55 0.50 0.42 1</ambient><diffuse>0.58 0.53 0.45 1</diffuse></material>
|
| 188 |
+
</visual>
|
| 189 |
+
<visual name="pillow_r">
|
| 190 |
+
<pose>0.7 0.18 0.45 0 -0.2 0</pose>
|
| 191 |
+
<geometry><box><size>0.32 0.12 0.32</size></box></geometry>
|
| 192 |
+
<material><ambient>0.50 0.42 0.40 1</ambient><diffuse>0.53 0.45 0.43 1</diffuse></material>
|
| 193 |
+
</visual>
|
| 194 |
+
<collision name="collision"><geometry><box><size>2.2 0.95 0.85</size></box></geometry></collision>
|
| 195 |
+
</link>
|
| 196 |
+
</model>
|
| 197 |
+
|
| 198 |
+
<!-- Coffee table (wood) -->
|
| 199 |
+
<model name="coffee_table">
|
| 200 |
+
<static>true</static>
|
| 201 |
+
<pose>-1.4 -2.4 0.26 0 0 0.0000</pose>
|
| 202 |
+
<link name="link">
|
| 203 |
+
<visual name="top">
|
| 204 |
+
<geometry><box><size>1.1 0.6 0.08</size></box></geometry>
|
| 205 |
+
<material>
|
| 206 |
+
<script>
|
| 207 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 208 |
+
<uri>file://media/materials/textures</uri>
|
| 209 |
+
<name>Home/WoodPolished</name>
|
| 210 |
+
</script>
|
| 211 |
+
</material>
|
| 212 |
+
</visual>
|
| 213 |
+
<visual name="leg_1"><pose>-0.45 -0.22 -0.16 0 0 0</pose><geometry><box><size>0.07 0.07 0.32</size></box></geometry><material><ambient>0.25 0.14 0.08 1</ambient></material></visual>
|
| 214 |
+
<visual name="leg_2"><pose>0.45 -0.22 -0.16 0 0 0</pose><geometry><box><size>0.07 0.07 0.32</size></box></geometry><material><ambient>0.25 0.14 0.08 1</ambient></material></visual>
|
| 215 |
+
<visual name="leg_3"><pose>-0.45 0.22 -0.16 0 0 0</pose><geometry><box><size>0.07 0.07 0.32</size></box></geometry><material><ambient>0.25 0.14 0.08 1</ambient></material></visual>
|
| 216 |
+
<visual name="leg_4"><pose>0.45 0.22 -0.16 0 0 0</pose><geometry><box><size>0.07 0.07 0.32</size></box></geometry><material><ambient>0.25 0.14 0.08 1</ambient></material></visual>
|
| 217 |
+
<collision name="collision"><geometry><box><size>1.1 0.6 0.4</size></box></geometry></collision>
|
| 218 |
+
</link>
|
| 219 |
+
</model>
|
| 220 |
+
|
| 221 |
+
<!-- TV cabinet against the brick wall (wood) -->
|
| 222 |
+
<model name="tv_cabinet">
|
| 223 |
+
<static>true</static>
|
| 224 |
+
<pose>-1.4 -4.78 0.28 0 0 0</pose>
|
| 225 |
+
<link name="link">
|
| 226 |
+
<visual name="visual">
|
| 227 |
+
<geometry><box><size>2.2 0.4 0.5</size></box></geometry>
|
| 228 |
+
<material>
|
| 229 |
+
<script>
|
| 230 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 231 |
+
<uri>file://media/materials/textures</uri>
|
| 232 |
+
<name>Home/WoodPolished</name>
|
| 233 |
+
</script>
|
| 234 |
+
</material>
|
| 235 |
+
</visual>
|
| 236 |
+
<collision name="collision"><geometry><box><size>2.2 0.4 0.5</size></box></geometry></collision>
|
| 237 |
+
</link>
|
| 238 |
+
</model>
|
| 239 |
+
|
| 240 |
+
<!-- Flat-screen TV -->
|
| 241 |
+
<model name="tv">
|
| 242 |
+
<static>true</static>
|
| 243 |
+
<pose>-1.4 -4.88 1.15 0 0 0</pose>
|
| 244 |
+
<link name="link">
|
| 245 |
+
<visual name="screen">
|
| 246 |
+
<geometry><box><size>1.7 0.06 0.95</size></box></geometry>
|
| 247 |
+
<material><ambient>0.02 0.02 0.025 1</ambient><diffuse>0.02 0.02 0.03 1</diffuse><specular>0.35 0.35 0.40 1</specular></material>
|
| 248 |
+
</visual>
|
| 249 |
+
<visual name="bezel">
|
| 250 |
+
<pose>0 0.01 0 0 0 0</pose>
|
| 251 |
+
<geometry><box><size>1.78 0.04 1.03</size></box></geometry>
|
| 252 |
+
<material><ambient>0.05 0.05 0.06 1</ambient></material>
|
| 253 |
+
</visual>
|
| 254 |
+
</link>
|
| 255 |
+
</model>
|
| 256 |
+
|
| 257 |
+
<!-- Floor lamp (living-room corner) -->
|
| 258 |
+
<model name="floor_lamp">
|
| 259 |
+
<static>true</static>
|
| 260 |
+
<pose>-3.9 -0.9 0.8 0 0 0.0000</pose>
|
| 261 |
+
<link name="link">
|
| 262 |
+
<visual name="pole">
|
| 263 |
+
<geometry><cylinder><radius>0.035</radius><length>1.5</length></cylinder></geometry>
|
| 264 |
+
<material><ambient>0.22 0.22 0.24 1</ambient><diffuse>0.24 0.24 0.26 1</diffuse></material>
|
| 265 |
+
</visual>
|
| 266 |
+
<visual name="shade">
|
| 267 |
+
<pose>0 0 0.82 0 0 0</pose>
|
| 268 |
+
<geometry><cylinder><radius>0.24</radius><length>0.34</length></cylinder></geometry>
|
| 269 |
+
<material><ambient>0.78 0.72 0.60 1</ambient><diffuse>0.82 0.76 0.64 1</diffuse></material>
|
| 270 |
+
</visual>
|
| 271 |
+
</link>
|
| 272 |
+
</model>
|
| 273 |
+
|
| 274 |
+
<!-- Bookshelf against the left wall -->
|
| 275 |
+
<model name="bookshelf">
|
| 276 |
+
<static>true</static>
|
| 277 |
+
<pose>-7.15 2.25 0.9 0 0 0</pose>
|
| 278 |
+
<link name="link">
|
| 279 |
+
<visual name="frame">
|
| 280 |
+
<geometry><box><size>0.4 1.6 1.8</size></box></geometry>
|
| 281 |
+
<material>
|
| 282 |
+
<script>
|
| 283 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 284 |
+
<uri>file://media/materials/textures</uri>
|
| 285 |
+
<name>Home/WoodPolished</name>
|
| 286 |
+
</script>
|
| 287 |
+
</material>
|
| 288 |
+
</visual>
|
| 289 |
+
<visual name="books_1"><pose>0.05 -0.45 0.55 0 0 0</pose><geometry><box><size>0.28 0.6 0.25</size></box></geometry><material><ambient>0.46 0.36 0.30 1</ambient></material></visual>
|
| 290 |
+
<visual name="books_2"><pose>0.05 0.35 0.1 0 0 0</pose><geometry><box><size>0.28 0.7 0.25</size></box></geometry><material><ambient>0.38 0.40 0.40 1</ambient></material></visual>
|
| 291 |
+
<visual name="books_3"><pose>0.05 -0.1 -0.35 0 0 0</pose><geometry><box><size>0.28 0.8 0.25</size></box></geometry><material><ambient>0.42 0.41 0.34 1</ambient></material></visual>
|
| 292 |
+
<collision name="collision"><geometry><box><size>0.4 1.6 1.8</size></box></geometry></collision>
|
| 293 |
+
</link>
|
| 294 |
+
</model>
|
| 295 |
+
|
| 296 |
+
<!-- Potted plant (back-left corner) -->
|
| 297 |
+
<model name="plant">
|
| 298 |
+
<static>true</static>
|
| 299 |
+
<pose>-3.9 4.5 0 0 0 0.0000</pose>
|
| 300 |
+
<link name="link">
|
| 301 |
+
<visual name="pot">
|
| 302 |
+
<pose>0 0 0.2 0 0 0</pose>
|
| 303 |
+
<geometry><cylinder><radius>0.22</radius><length>0.4</length></cylinder></geometry>
|
| 304 |
+
<material><ambient>0.45 0.28 0.18 1</ambient><diffuse>0.50 0.30 0.20 1</diffuse></material>
|
| 305 |
+
</visual>
|
| 306 |
+
<visual name="foliage">
|
| 307 |
+
<pose>0 0 0.85 0 0 0</pose>
|
| 308 |
+
<geometry><sphere><radius>0.42</radius></sphere></geometry>
|
| 309 |
+
<material><ambient>0.26 0.34 0.24 1</ambient><diffuse>0.28 0.37 0.26 1</diffuse></material>
|
| 310 |
+
</visual>
|
| 311 |
+
<visual name="foliage2">
|
| 312 |
+
<pose>0.12 0.05 1.15 0 0 0</pose>
|
| 313 |
+
<geometry><sphere><radius>0.28</radius></sphere></geometry>
|
| 314 |
+
<material><ambient>0.28 0.36 0.26 1</ambient><diffuse>0.30 0.39 0.28 1</diffuse></material>
|
| 315 |
+
</visual>
|
| 316 |
+
</link>
|
| 317 |
+
</model>
|
| 318 |
+
|
| 319 |
+
<!-- ============================ DINING (back-left) ===================== -->
|
| 320 |
+
|
| 321 |
+
<model name="dining_table">
|
| 322 |
+
<static>true</static>
|
| 323 |
+
<pose>-1.5 2.9 0.45 0 0 0.0000</pose>
|
| 324 |
+
<link name="link">
|
| 325 |
+
<visual name="top">
|
| 326 |
+
<geometry><box><size>1.5 0.9 0.08</size></box></geometry>
|
| 327 |
+
<material>
|
| 328 |
+
<script>
|
| 329 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 330 |
+
<uri>file://media/materials/textures</uri>
|
| 331 |
+
<name>Home/WoodPolished</name>
|
| 332 |
+
</script>
|
| 333 |
+
</material>
|
| 334 |
+
</visual>
|
| 335 |
+
<visual name="leg_1"><pose>-0.65 -0.35 -0.22 0 0 0</pose><geometry><box><size>0.08 0.08 0.44</size></box></geometry><material><ambient>0.30 0.18 0.10 1</ambient></material></visual>
|
| 336 |
+
<visual name="leg_2"><pose>0.65 -0.35 -0.22 0 0 0</pose><geometry><box><size>0.08 0.08 0.44</size></box></geometry><material><ambient>0.30 0.18 0.10 1</ambient></material></visual>
|
| 337 |
+
<visual name="leg_3"><pose>-0.65 0.35 -0.22 0 0 0</pose><geometry><box><size>0.08 0.08 0.44</size></box></geometry><material><ambient>0.30 0.18 0.10 1</ambient></material></visual>
|
| 338 |
+
<visual name="leg_4"><pose>0.65 0.35 -0.22 0 0 0</pose><geometry><box><size>0.08 0.08 0.44</size></box></geometry><material><ambient>0.30 0.18 0.10 1</ambient></material></visual>
|
| 339 |
+
<collision name="collision"><geometry><box><size>1.5 0.9 0.55</size></box></geometry></collision>
|
| 340 |
+
</link>
|
| 341 |
+
</model>
|
| 342 |
+
|
| 343 |
+
<model name="chair_1">
|
| 344 |
+
<static>true</static>
|
| 345 |
+
<pose>-2.25 2.9 0.32 0 0 0.0000</pose>
|
| 346 |
+
<link name="link">
|
| 347 |
+
<visual name="seat"><geometry><box><size>0.45 0.45 0.1</size></box></geometry><material><ambient>0.46 0.43 0.38 1</ambient><diffuse>0.49 0.46 0.41 1</diffuse></material></visual>
|
| 348 |
+
<visual name="back"><pose>-0.2 0 0.35 0 0 0</pose><geometry><box><size>0.08 0.45 0.7</size></box></geometry><material><ambient>0.46 0.43 0.38 1</ambient></material></visual>
|
| 349 |
+
</link>
|
| 350 |
+
</model>
|
| 351 |
+
<model name="chair_2">
|
| 352 |
+
<static>true</static>
|
| 353 |
+
<pose>-0.75 2.9 0.32 0 0 0.0000</pose>
|
| 354 |
+
<link name="link">
|
| 355 |
+
<visual name="seat"><geometry><box><size>0.45 0.45 0.1</size></box></geometry><material><ambient>0.46 0.43 0.38 1</ambient><diffuse>0.49 0.46 0.41 1</diffuse></material></visual>
|
| 356 |
+
<visual name="back"><pose>0.2 0 0.35 0 0 0</pose><geometry><box><size>0.08 0.45 0.7</size></box></geometry><material><ambient>0.46 0.43 0.38 1</ambient></material></visual>
|
| 357 |
+
</link>
|
| 358 |
+
</model>
|
| 359 |
+
<model name="chair_3">
|
| 360 |
+
<static>true</static>
|
| 361 |
+
<pose>-1.5 2.15 0.32 0 0 1.5708</pose>
|
| 362 |
+
<link name="link">
|
| 363 |
+
<visual name="seat"><geometry><box><size>0.45 0.45 0.1</size></box></geometry><material><ambient>0.46 0.43 0.38 1</ambient><diffuse>0.49 0.46 0.41 1</diffuse></material></visual>
|
| 364 |
+
<visual name="back"><pose>-0.2 0 0.35 0 0 0</pose><geometry><box><size>0.08 0.45 0.7</size></box></geometry><material><ambient>0.46 0.43 0.38 1</ambient></material></visual>
|
| 365 |
+
</link>
|
| 366 |
+
</model>
|
| 367 |
+
<model name="chair_4">
|
| 368 |
+
<static>true</static>
|
| 369 |
+
<pose>-1.5 3.65 0.32 0 0 -1.5708</pose>
|
| 370 |
+
<link name="link">
|
| 371 |
+
<visual name="seat"><geometry><box><size>0.45 0.45 0.1</size></box></geometry><material><ambient>0.46 0.43 0.38 1</ambient><diffuse>0.49 0.46 0.41 1</diffuse></material></visual>
|
| 372 |
+
<visual name="back"><pose>-0.2 0 0.35 0 0 0</pose><geometry><box><size>0.08 0.45 0.7</size></box></geometry><material><ambient>0.46 0.43 0.38 1</ambient></material></visual>
|
| 373 |
+
</link>
|
| 374 |
+
</model>
|
| 375 |
+
|
| 376 |
+
<!-- ============================ BEDROOM (back-right) =================== -->
|
| 377 |
+
|
| 378 |
+
<model name="bed_rug">
|
| 379 |
+
<static>true</static>
|
| 380 |
+
<pose>4.567 -3.092 0.02 0 0 0.0000</pose>
|
| 381 |
+
<link name="link">
|
| 382 |
+
<visual name="visual">
|
| 383 |
+
<geometry><box><size>3.0 2.0 0.02</size></box></geometry>
|
| 384 |
+
<material><ambient>0.42 0.41 0.39 1</ambient><diffuse>0.45 0.44 0.42 1</diffuse></material>
|
| 385 |
+
</visual>
|
| 386 |
+
</link>
|
| 387 |
+
</model>
|
| 388 |
+
|
| 389 |
+
<model name="bed">
|
| 390 |
+
<static>true</static>
|
| 391 |
+
<pose>4.767 -1.342 0.28 0 0 0.0000</pose>
|
| 392 |
+
<link name="link">
|
| 393 |
+
<visual name="frame">
|
| 394 |
+
<geometry><box><size>2.0 1.9 0.35</size></box></geometry>
|
| 395 |
+
<material>
|
| 396 |
+
<script>
|
| 397 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 398 |
+
<uri>file://media/materials/textures</uri>
|
| 399 |
+
<name>Home/WoodPolished</name>
|
| 400 |
+
</script>
|
| 401 |
+
</material>
|
| 402 |
+
</visual>
|
| 403 |
+
<visual name="headboard">
|
| 404 |
+
<pose>0 0.95 0.35 0 0 0</pose>
|
| 405 |
+
<geometry><box><size>2.0 0.12 0.7</size></box></geometry>
|
| 406 |
+
<material>
|
| 407 |
+
<script>
|
| 408 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 409 |
+
<uri>file://media/materials/textures</uri>
|
| 410 |
+
<name>Home/WoodPolished</name>
|
| 411 |
+
</script>
|
| 412 |
+
</material>
|
| 413 |
+
</visual>
|
| 414 |
+
<visual name="mattress">
|
| 415 |
+
<pose>0 -0.05 0.26 0 0 0</pose>
|
| 416 |
+
<geometry><box><size>1.85 1.75 0.2</size></box></geometry>
|
| 417 |
+
<material><ambient>0.90 0.90 0.85 1</ambient><diffuse>0.94 0.94 0.88 1</diffuse></material>
|
| 418 |
+
</visual>
|
| 419 |
+
<visual name="duvet">
|
| 420 |
+
<pose>0 -0.45 0.34 0 0 0</pose>
|
| 421 |
+
<geometry><box><size>1.85 0.95 0.16</size></box></geometry>
|
| 422 |
+
<material><ambient>0.52 0.50 0.47 1</ambient><diffuse>0.56 0.54 0.50 1</diffuse></material>
|
| 423 |
+
</visual>
|
| 424 |
+
<visual name="pillow_l">
|
| 425 |
+
<pose>-0.45 0.55 0.42 0 0 0</pose>
|
| 426 |
+
<geometry><box><size>0.6 0.34 0.14</size></box></geometry>
|
| 427 |
+
<material><ambient>0.96 0.96 0.92 1</ambient><diffuse>0.98 0.98 0.94 1</diffuse></material>
|
| 428 |
+
</visual>
|
| 429 |
+
<visual name="pillow_r">
|
| 430 |
+
<pose>0.45 0.55 0.42 0 0 0</pose>
|
| 431 |
+
<geometry><box><size>0.6 0.34 0.14</size></box></geometry>
|
| 432 |
+
<material><ambient>0.96 0.96 0.92 1</ambient><diffuse>0.98 0.98 0.94 1</diffuse></material>
|
| 433 |
+
</visual>
|
| 434 |
+
<collision name="collision"><geometry><box><size>2.0 1.9 0.6</size></box></geometry></collision>
|
| 435 |
+
</link>
|
| 436 |
+
</model>
|
| 437 |
+
|
| 438 |
+
<model name="nightstand_1">
|
| 439 |
+
<static>true</static>
|
| 440 |
+
<pose>3.567 -0.692 0.25 0 0 0.0000</pose>
|
| 441 |
+
<link name="link">
|
| 442 |
+
<visual name="body"><geometry><box><size>0.45 0.4 0.5</size></box></geometry>
|
| 443 |
+
<material>
|
| 444 |
+
<script>
|
| 445 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 446 |
+
<uri>file://media/materials/textures</uri>
|
| 447 |
+
<name>Home/WoodPolished</name>
|
| 448 |
+
</script>
|
| 449 |
+
</material>
|
| 450 |
+
</visual>
|
| 451 |
+
<visual name="lamp_pole"><pose>0 0 0.32 0 0 0</pose><geometry><cylinder><radius>0.02</radius><length>0.22</length></cylinder></geometry><material><ambient>0.2 0.2 0.2 1</ambient></material></visual>
|
| 452 |
+
<visual name="lamp_shade"><pose>0 0 0.46 0 0 0</pose><geometry><cylinder><radius>0.13</radius><length>0.14</length></cylinder></geometry><material><ambient>0.80 0.74 0.62 1</ambient><diffuse>0.84 0.78 0.66 1</diffuse></material></visual>
|
| 453 |
+
<collision name="collision"><geometry><box><size>0.45 0.4 0.5</size></box></geometry></collision>
|
| 454 |
+
</link>
|
| 455 |
+
</model>
|
| 456 |
+
<model name="nightstand_2">
|
| 457 |
+
<static>true</static>
|
| 458 |
+
<pose>5.967 -0.692 0.25 0 0 0.0000</pose>
|
| 459 |
+
<link name="link">
|
| 460 |
+
<visual name="body"><geometry><box><size>0.45 0.4 0.5</size></box></geometry>
|
| 461 |
+
<material>
|
| 462 |
+
<script>
|
| 463 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 464 |
+
<uri>file://media/materials/textures</uri>
|
| 465 |
+
<name>Home/WoodPolished</name>
|
| 466 |
+
</script>
|
| 467 |
+
</material>
|
| 468 |
+
</visual>
|
| 469 |
+
<visual name="lamp_pole"><pose>0 0 0.32 0 0 0</pose><geometry><cylinder><radius>0.02</radius><length>0.22</length></cylinder></geometry><material><ambient>0.2 0.2 0.2 1</ambient></material></visual>
|
| 470 |
+
<visual name="lamp_shade"><pose>0 0 0.46 0 0 0</pose><geometry><cylinder><radius>0.13</radius><length>0.14</length></cylinder></geometry><material><ambient>0.80 0.74 0.62 1</ambient><diffuse>0.84 0.78 0.66 1</diffuse></material></visual>
|
| 471 |
+
<collision name="collision"><geometry><box><size>0.45 0.4 0.5</size></box></geometry></collision>
|
| 472 |
+
</link>
|
| 473 |
+
</model>
|
| 474 |
+
|
| 475 |
+
<model name="wardrobe">
|
| 476 |
+
<static>true</static>
|
| 477 |
+
<pose>7.1 0.75 1.0 0 0 0</pose>
|
| 478 |
+
<link name="link">
|
| 479 |
+
<visual name="body">
|
| 480 |
+
<geometry><box><size>0.6 1.6 2.0</size></box></geometry>
|
| 481 |
+
<material>
|
| 482 |
+
<script>
|
| 483 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 484 |
+
<uri>file://media/materials/textures</uri>
|
| 485 |
+
<name>Home/WoodPolished</name>
|
| 486 |
+
</script>
|
| 487 |
+
</material>
|
| 488 |
+
</visual>
|
| 489 |
+
<visual name="handle_1"><pose>-0.32 -0.2 0 0 0 0</pose><geometry><box><size>0.03 0.04 0.25</size></box></geometry><material><ambient>0.1 0.1 0.1 1</ambient></material></visual>
|
| 490 |
+
<visual name="handle_2"><pose>-0.32 0.2 0 0 0 0</pose><geometry><box><size>0.03 0.04 0.25</size></box></geometry><material><ambient>0.1 0.1 0.1 1</ambient></material></visual>
|
| 491 |
+
<collision name="collision"><geometry><box><size>0.6 1.6 2.0</size></box></geometry></collision>
|
| 492 |
+
</link>
|
| 493 |
+
</model>
|
| 494 |
+
|
| 495 |
+
<!-- ============================ KITCHEN (front-right) ================= -->
|
| 496 |
+
|
| 497 |
+
<!-- Lower counter run along the brick wall -->
|
| 498 |
+
<model name="kitchen_counter">
|
| 499 |
+
<static>true</static>
|
| 500 |
+
<pose>4.0 -4.65 0.45 0 0 0</pose>
|
| 501 |
+
<link name="link">
|
| 502 |
+
<visual name="body">
|
| 503 |
+
<geometry><box><size>3.6 0.65 0.9</size></box></geometry>
|
| 504 |
+
<material><ambient>0.82 0.80 0.76 1</ambient><diffuse>0.86 0.84 0.80 1</diffuse></material>
|
| 505 |
+
</visual>
|
| 506 |
+
<visual name="worktop">
|
| 507 |
+
<pose>0 0 0.47 0 0 0</pose>
|
| 508 |
+
<geometry><box><size>3.7 0.7 0.05</size></box></geometry>
|
| 509 |
+
<material>
|
| 510 |
+
<script>
|
| 511 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 512 |
+
<uri>file://media/materials/textures</uri>
|
| 513 |
+
<name>Home/WoodPolished</name>
|
| 514 |
+
</script>
|
| 515 |
+
</material>
|
| 516 |
+
</visual>
|
| 517 |
+
<visual name="sink">
|
| 518 |
+
<pose>-0.6 0 0.49 0 0 0</pose>
|
| 519 |
+
<geometry><box><size>0.6 0.45 0.06</size></box></geometry>
|
| 520 |
+
<material><ambient>0.55 0.57 0.60 1</ambient><diffuse>0.6 0.62 0.65 1</diffuse><specular>0.55 0.57 0.62 1</specular></material>
|
| 521 |
+
</visual>
|
| 522 |
+
<collision name="collision"><geometry><box><size>3.6 0.65 0.92</size></box></geometry></collision>
|
| 523 |
+
</link>
|
| 524 |
+
</model>
|
| 525 |
+
|
| 526 |
+
<!-- Upper cabinets -->
|
| 527 |
+
<model name="kitchen_uppers">
|
| 528 |
+
<static>true</static>
|
| 529 |
+
<pose>4.0 -4.78 1.95 0 0 0</pose>
|
| 530 |
+
<link name="link">
|
| 531 |
+
<visual name="body">
|
| 532 |
+
<geometry><box><size>3.2 0.38 0.7</size></box></geometry>
|
| 533 |
+
<material>
|
| 534 |
+
<script>
|
| 535 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 536 |
+
<uri>file://media/materials/textures</uri>
|
| 537 |
+
<name>Home/WoodPolished</name>
|
| 538 |
+
</script>
|
| 539 |
+
</material>
|
| 540 |
+
</visual>
|
| 541 |
+
<collision name="collision"><geometry><box><size>3.2 0.38 0.7</size></box></geometry></collision>
|
| 542 |
+
</link>
|
| 543 |
+
</model>
|
| 544 |
+
|
| 545 |
+
<!-- Fridge in the corner -->
|
| 546 |
+
<model name="fridge">
|
| 547 |
+
<static>true</static>
|
| 548 |
+
<pose>7.0 -4.45 0.95 0 0 0</pose>
|
| 549 |
+
<link name="link">
|
| 550 |
+
<visual name="body">
|
| 551 |
+
<geometry><box><size>0.7 0.7 1.9</size></box></geometry>
|
| 552 |
+
<material><ambient>0.80 0.82 0.85 1</ambient><diffuse>0.86 0.88 0.92 1</diffuse><specular>0.45 0.46 0.50 1</specular></material>
|
| 553 |
+
</visual>
|
| 554 |
+
<visual name="handle"><pose>-0.34 0.28 0.2 0 0 0</pose><geometry><box><size>0.03 0.04 0.6</size></box></geometry><material><ambient>0.3 0.3 0.32 1</ambient></material></visual>
|
| 555 |
+
<visual name="seam"><pose>-0.351 0 0.3 0 0 0</pose><geometry><box><size>0.005 0.7 0.04</size></box></geometry><material><ambient>0.6 0.62 0.65 1</ambient></material></visual>
|
| 556 |
+
<collision name="collision"><geometry><box><size>0.7 0.7 1.9</size></box></geometry></collision>
|
| 557 |
+
</link>
|
| 558 |
+
</model>
|
| 559 |
+
|
| 560 |
+
<!-- Two bar stools at the counter -->
|
| 561 |
+
<model name="stool_1">
|
| 562 |
+
<static>true</static>
|
| 563 |
+
<pose>3.4 2.075 0.45 0 0 0.0000</pose>
|
| 564 |
+
<link name="link">
|
| 565 |
+
<visual name="seat"><geometry><cylinder><radius>0.18</radius><length>0.08</length></cylinder></geometry><material><ambient>0.2 0.2 0.22 1</ambient></material></visual>
|
| 566 |
+
<visual name="leg"><pose>0 0 -0.22 0 0 0</pose><geometry><cylinder><radius>0.04</radius><length>0.45</length></cylinder></geometry><material><ambient>0.5 0.5 0.52 1</ambient><diffuse>0.6 0.6 0.62 1</diffuse><specular>0.5 0.5 0.55 1</specular></material></visual>
|
| 567 |
+
</link>
|
| 568 |
+
</model>
|
| 569 |
+
<model name="stool_2">
|
| 570 |
+
<static>true</static>
|
| 571 |
+
<pose>4.6 2.075 0.45 0 0 0.0000</pose>
|
| 572 |
+
<link name="link">
|
| 573 |
+
<visual name="seat"><geometry><cylinder><radius>0.18</radius><length>0.08</length></cylinder></geometry><material><ambient>0.2 0.2 0.22 1</ambient></material></visual>
|
| 574 |
+
<visual name="leg"><pose>0 0 -0.22 0 0 0</pose><geometry><cylinder><radius>0.04</radius><length>0.45</length></cylinder></geometry><material><ambient>0.5 0.5 0.52 1</ambient><diffuse>0.6 0.6 0.62 1</diffuse><specular>0.5 0.5 0.55 1</specular></material></visual>
|
| 575 |
+
</link>
|
| 576 |
+
</model>
|
| 577 |
+
|
| 578 |
+
<!-- ============================ Doors / windows / art ================= -->
|
| 579 |
+
|
| 580 |
+
<!-- Entry door on the right wall -->
|
| 581 |
+
<model name="door">
|
| 582 |
+
<static>true</static>
|
| 583 |
+
<pose>7.42 -2.25 1.0 0 0 0</pose>
|
| 584 |
+
<link name="link">
|
| 585 |
+
<visual name="leaf">
|
| 586 |
+
<geometry><box><size>0.05 1.0 2.0</size></box></geometry>
|
| 587 |
+
<material>
|
| 588 |
+
<script>
|
| 589 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 590 |
+
<uri>file://media/materials/textures</uri>
|
| 591 |
+
<name>Home/WoodPolished</name>
|
| 592 |
+
</script>
|
| 593 |
+
</material>
|
| 594 |
+
</visual>
|
| 595 |
+
<visual name="knob"><pose>-0.04 -0.4 0 0 0 0</pose><geometry><sphere><radius>0.05</radius></sphere></geometry><material><ambient>0.7 0.6 0.2 1</ambient><diffuse>0.8 0.7 0.25 1</diffuse><specular>0.9 0.8 0.4 1</specular></material></visual>
|
| 596 |
+
</link>
|
| 597 |
+
</model>
|
| 598 |
+
|
| 599 |
+
<!-- Windows on the back wall (semi-transparent glass) -->
|
| 600 |
+
<model name="window_1">
|
| 601 |
+
<static>true</static>
|
| 602 |
+
<pose>-1.25 4.92 1.5 0 0 0</pose>
|
| 603 |
+
<link name="link">
|
| 604 |
+
<visual name="glass"><geometry><box><size>1.6 0.05 1.0</size></box></geometry>
|
| 605 |
+
<material><ambient>0.55 0.60 0.62 0.4</ambient><diffuse>0.58 0.63 0.65 0.4</diffuse><specular>0.70 0.75 0.80 0.4</specular></material>
|
| 606 |
+
</visual>
|
| 607 |
+
<visual name="frame_t"><pose>0 0 0.52 0 0 0</pose><geometry><box><size>1.7 0.08 0.08</size></box></geometry><material><ambient>0.9 0.9 0.88 1</ambient></material></visual>
|
| 608 |
+
<visual name="frame_b"><pose>0 0 -0.52 0 0 0</pose><geometry><box><size>1.7 0.08 0.08</size></box></geometry><material><ambient>0.9 0.9 0.88 1</ambient></material></visual>
|
| 609 |
+
<visual name="mullion"><pose>0 0 0 0 0 0</pose><geometry><box><size>0.06 0.06 1.0</size></box></geometry><material><ambient>0.9 0.9 0.88 1</ambient></material></visual>
|
| 610 |
+
</link>
|
| 611 |
+
</model>
|
| 612 |
+
<model name="window_2">
|
| 613 |
+
<static>true</static>
|
| 614 |
+
<pose>1.9 4.92 1.5 0 0 0</pose>
|
| 615 |
+
<link name="link">
|
| 616 |
+
<visual name="glass"><geometry><box><size>1.6 0.05 1.0</size></box></geometry>
|
| 617 |
+
<material><ambient>0.55 0.60 0.62 0.4</ambient><diffuse>0.58 0.63 0.65 0.4</diffuse><specular>0.70 0.75 0.80 0.4</specular></material>
|
| 618 |
+
</visual>
|
| 619 |
+
<visual name="frame_t"><pose>0 0 0.52 0 0 0</pose><geometry><box><size>1.7 0.08 0.08</size></box></geometry><material><ambient>0.9 0.9 0.88 1</ambient></material></visual>
|
| 620 |
+
<visual name="frame_b"><pose>0 0 -0.52 0 0 0</pose><geometry><box><size>1.7 0.08 0.08</size></box></geometry><material><ambient>0.9 0.9 0.88 1</ambient></material></visual>
|
| 621 |
+
<visual name="mullion"><pose>0 0 0 0 0 0</pose><geometry><box><size>0.06 0.06 1.0</size></box></geometry><material><ambient>0.9 0.9 0.88 1</ambient></material></visual>
|
| 622 |
+
</link>
|
| 623 |
+
</model>
|
| 624 |
+
|
| 625 |
+
<!-- Window on the left wall (living-room daylight) -->
|
| 626 |
+
<model name="window_3">
|
| 627 |
+
<static>true</static>
|
| 628 |
+
<pose>-7.42 -2.75 1.5 0 0 0</pose>
|
| 629 |
+
<link name="link">
|
| 630 |
+
<visual name="glass"><geometry><box><size>0.05 1.6 1.0</size></box></geometry>
|
| 631 |
+
<material><ambient>0.55 0.60 0.62 0.4</ambient><diffuse>0.58 0.63 0.65 0.4</diffuse><specular>0.70 0.75 0.80 0.4</specular></material>
|
| 632 |
+
</visual>
|
| 633 |
+
<visual name="frame_t"><pose>0 0 0.52 0 0 0</pose><geometry><box><size>0.08 1.7 0.08</size></box></geometry><material><ambient>0.9 0.9 0.88 1</ambient></material></visual>
|
| 634 |
+
<visual name="frame_b"><pose>0 0 -0.52 0 0 0</pose><geometry><box><size>0.08 1.7 0.08</size></box></geometry><material><ambient>0.9 0.9 0.88 1</ambient></material></visual>
|
| 635 |
+
</link>
|
| 636 |
+
</model>
|
| 637 |
+
|
| 638 |
+
<!-- Wall art flanking the TV (on the brick wall) -->
|
| 639 |
+
<model name="art_1">
|
| 640 |
+
<static>true</static>
|
| 641 |
+
<pose>-1.6 -4.9 1.5 0 0 0</pose>
|
| 642 |
+
<link name="link">
|
| 643 |
+
<visual name="frame"><geometry><box><size>0.9 0.04 0.65</size></box></geometry><material><ambient>0.15 0.12 0.10 1</ambient></material></visual>
|
| 644 |
+
<visual name="canvas"><pose>0 0.005 0 0 0 0</pose><geometry><box><size>0.78 0.04 0.53</size></box></geometry><material><ambient>0.60 0.52 0.42 1</ambient><diffuse>0.63 0.55 0.45 1</diffuse></material></visual>
|
| 645 |
+
</link>
|
| 646 |
+
</model>
|
| 647 |
+
<model name="art_2">
|
| 648 |
+
<static>true</static>
|
| 649 |
+
<pose>-6.5 -4.9 1.5 0 0 0</pose>
|
| 650 |
+
<link name="link">
|
| 651 |
+
<visual name="frame"><geometry><box><size>0.7 0.04 0.9</size></box></geometry><material><ambient>0.15 0.12 0.10 1</ambient></material></visual>
|
| 652 |
+
<visual name="canvas"><pose>0 0.005 0 0 0 0</pose><geometry><box><size>0.58 0.04 0.78</size></box></geometry><material><ambient>0.44 0.46 0.46 1</ambient><diffuse>0.47 0.49 0.49 1</diffuse></material></visual>
|
| 653 |
+
</link>
|
| 654 |
+
</model>
|
| 655 |
+
|
| 656 |
+
<!-- ================== Extra furniture (cosier / more compact) ========= -->
|
| 657 |
+
|
| 658 |
+
<!-- Living-room armchair (faces +x toward the coffee table / room centre) -->
|
| 659 |
+
<model name="armchair">
|
| 660 |
+
<static>true</static>
|
| 661 |
+
<pose>-3.4 -2.3 0.35 0 0 0.0000</pose>
|
| 662 |
+
<link name="link">
|
| 663 |
+
<visual name="base"><geometry><box><size>0.85 0.9 0.35</size></box></geometry>
|
| 664 |
+
<material><ambient>0.44 0.42 0.39 1</ambient><diffuse>0.48 0.46 0.42 1</diffuse><specular>0.03 0.03 0.03 1</specular></material></visual>
|
| 665 |
+
<visual name="back"><pose>-0.36 0 0.32 0 0 0</pose><geometry><box><size>0.14 0.9 0.6</size></box></geometry>
|
| 666 |
+
<material><ambient>0.40 0.38 0.35 1</ambient><diffuse>0.43 0.41 0.38 1</diffuse></material></visual>
|
| 667 |
+
<visual name="arm_l"><pose>0 0.42 0.16 0 0 0</pose><geometry><box><size>0.8 0.14 0.42</size></box></geometry><material><ambient>0.40 0.38 0.35 1</ambient></material></visual>
|
| 668 |
+
<visual name="arm_r"><pose>0 -0.42 0.16 0 0 0</pose><geometry><box><size>0.8 0.14 0.42</size></box></geometry><material><ambient>0.40 0.38 0.35 1</ambient></material></visual>
|
| 669 |
+
<visual name="cushion"><pose>0.05 0 0.24 0 0 0</pose><geometry><box><size>0.66 0.62 0.16</size></box></geometry><material><ambient>0.49 0.47 0.43 1</ambient><diffuse>0.52 0.50 0.46 1</diffuse></material></visual>
|
| 670 |
+
<visual name="pillow"><pose>-0.2 0 0.42 0 0.25 0</pose><geometry><box><size>0.3 0.3 0.12</size></box></geometry><material><ambient>0.56 0.48 0.40 1</ambient><diffuse>0.59 0.51 0.43 1</diffuse></material></visual>
|
| 671 |
+
<collision name="collision"><geometry><box><size>0.85 0.95 0.85</size></box></geometry></collision>
|
| 672 |
+
</link>
|
| 673 |
+
</model>
|
| 674 |
+
|
| 675 |
+
<!-- Side table beside the sofa -->
|
| 676 |
+
<model name="side_table">
|
| 677 |
+
<static>true</static>
|
| 678 |
+
<pose>0 -0.7 0.28 0 0 0.0000</pose>
|
| 679 |
+
<link name="link">
|
| 680 |
+
<visual name="top"><pose>0 0 0.2 0 0 0</pose><geometry><box><size>0.5 0.5 0.06</size></box></geometry>
|
| 681 |
+
<material><script><uri>file://media/materials/scripts/home.material</uri><uri>file://media/materials/textures</uri><name>Home/WoodPolished</name></script></material></visual>
|
| 682 |
+
<visual name="leg_1"><pose>-0.2 -0.2 0 0 0 0</pose><geometry><box><size>0.05 0.05 0.46</size></box></geometry><material><ambient>0.25 0.16 0.09 1</ambient></material></visual>
|
| 683 |
+
<visual name="leg_2"><pose>0.2 -0.2 0 0 0 0</pose><geometry><box><size>0.05 0.05 0.46</size></box></geometry><material><ambient>0.25 0.16 0.09 1</ambient></material></visual>
|
| 684 |
+
<visual name="leg_3"><pose>-0.2 0.2 0 0 0 0</pose><geometry><box><size>0.05 0.05 0.46</size></box></geometry><material><ambient>0.25 0.16 0.09 1</ambient></material></visual>
|
| 685 |
+
<visual name="leg_4"><pose>0.2 0.2 0 0 0 0</pose><geometry><box><size>0.05 0.05 0.46</size></box></geometry><material><ambient>0.25 0.16 0.09 1</ambient></material></visual>
|
| 686 |
+
</link>
|
| 687 |
+
</model>
|
| 688 |
+
|
| 689 |
+
<!-- Second potted plant (living-room front corner) -->
|
| 690 |
+
<model name="plant_living">
|
| 691 |
+
<static>true</static>
|
| 692 |
+
<pose>0.4 -4.3 0 0 0 0.0000</pose>
|
| 693 |
+
<link name="link">
|
| 694 |
+
<visual name="pot"><pose>0 0 0.18 0 0 0</pose><geometry><cylinder><radius>0.2</radius><length>0.36</length></cylinder></geometry><material><ambient>0.40 0.25 0.16 1</ambient><diffuse>0.45 0.28 0.18 1</diffuse></material></visual>
|
| 695 |
+
<visual name="foliage"><pose>0 0 0.75 0 0 0</pose><geometry><sphere><radius>0.38</radius></sphere></geometry><material><ambient>0.24 0.33 0.22 1</ambient><diffuse>0.27 0.36 0.25 1</diffuse></material></visual>
|
| 696 |
+
<visual name="foliage2"><pose>0.1 -0.05 1.0 0 0 0</pose><geometry><sphere><radius>0.26</radius></sphere></geometry><material><ambient>0.26 0.35 0.24 1</ambient><diffuse>0.29 0.38 0.27 1</diffuse></material></visual>
|
| 697 |
+
</link>
|
| 698 |
+
</model>
|
| 699 |
+
|
| 700 |
+
<!-- Dining sideboard / buffet against the back wall -->
|
| 701 |
+
<model name="sideboard">
|
| 702 |
+
<static>true</static>
|
| 703 |
+
<pose>0 4.78 0.45 0 0 0</pose>
|
| 704 |
+
<link name="link">
|
| 705 |
+
<visual name="body"><geometry><box><size>1.6 0.4 0.9</size></box></geometry>
|
| 706 |
+
<material><script><uri>file://media/materials/scripts/home.material</uri><uri>file://media/materials/textures</uri><name>Home/WoodPolished</name></script></material></visual>
|
| 707 |
+
<visual name="handle_1"><pose>-0.4 -0.21 0.05 0 0 0</pose><geometry><box><size>0.18 0.03 0.03</size></box></geometry><material><ambient>0.1 0.1 0.1 1</ambient><specular>0.4 0.4 0.4 1</specular></material></visual>
|
| 708 |
+
<visual name="handle_2"><pose>0.4 -0.21 0.05 0 0 0</pose><geometry><box><size>0.18 0.03 0.03</size></box></geometry><material><ambient>0.1 0.1 0.1 1</ambient><specular>0.4 0.4 0.4 1</specular></material></visual>
|
| 709 |
+
<visual name="vase"><pose>0.45 0 0.55 0 0 0</pose><geometry><cylinder><radius>0.07</radius><length>0.2</length></cylinder></geometry><material><ambient>0.55 0.55 0.58 1</ambient><diffuse>0.6 0.6 0.63 1</diffuse><specular>0.3 0.3 0.32 1</specular></material></visual>
|
| 710 |
+
<collision name="collision"><geometry><box><size>1.6 0.4 0.9</size></box></geometry></collision>
|
| 711 |
+
</link>
|
| 712 |
+
</model>
|
| 713 |
+
|
| 714 |
+
<!-- Bedroom dresser / chest of drawers (faces +x into the room) -->
|
| 715 |
+
<model name="dresser">
|
| 716 |
+
<static>true</static>
|
| 717 |
+
<pose>2.767 -1.892 0.45 0 0 0.0000</pose>
|
| 718 |
+
<link name="link">
|
| 719 |
+
<visual name="body"><geometry><box><size>0.5 1.0 0.9</size></box></geometry>
|
| 720 |
+
<material><script><uri>file://media/materials/scripts/home.material</uri><uri>file://media/materials/textures</uri><name>Home/WoodPolished</name></script></material></visual>
|
| 721 |
+
<visual name="handle_1"><pose>0.26 -0.25 0.2 0 0 0</pose><geometry><box><size>0.03 0.16 0.03</size></box></geometry><material><ambient>0.1 0.1 0.1 1</ambient><specular>0.4 0.4 0.4 1</specular></material></visual>
|
| 722 |
+
<visual name="handle_2"><pose>0.26 0.25 0.2 0 0 0</pose><geometry><box><size>0.03 0.16 0.03</size></box></geometry><material><ambient>0.1 0.1 0.1 1</ambient><specular>0.4 0.4 0.4 1</specular></material></visual>
|
| 723 |
+
<visual name="handle_3"><pose>0.26 -0.25 -0.15 0 0 0</pose><geometry><box><size>0.03 0.16 0.03</size></box></geometry><material><ambient>0.1 0.1 0.1 1</ambient><specular>0.4 0.4 0.4 1</specular></material></visual>
|
| 724 |
+
<visual name="handle_4"><pose>0.26 0.25 -0.15 0 0 0</pose><geometry><box><size>0.03 0.16 0.03</size></box></geometry><material><ambient>0.1 0.1 0.1 1</ambient><specular>0.4 0.4 0.4 1</specular></material></visual>
|
| 725 |
+
<collision name="collision"><geometry><box><size>0.5 1.0 0.9</size></box></geometry></collision>
|
| 726 |
+
</link>
|
| 727 |
+
</model>
|
| 728 |
+
|
| 729 |
+
<!-- Bench at the foot of the bed -->
|
| 730 |
+
<model name="bed_bench">
|
| 731 |
+
<static>true</static>
|
| 732 |
+
<pose>4.767 -2.492 0.22 0 0 0.0000</pose>
|
| 733 |
+
<link name="link">
|
| 734 |
+
<visual name="top"><pose>0 0 0.12 0 0 0</pose><geometry><box><size>1.4 0.4 0.14</size></box></geometry><material><ambient>0.50 0.46 0.40 1</ambient><diffuse>0.54 0.50 0.44 1</diffuse></material></visual>
|
| 735 |
+
<visual name="leg_1"><pose>-0.62 -0.15 -0.05 0 0 0</pose><geometry><box><size>0.06 0.06 0.34</size></box></geometry><material><ambient>0.25 0.16 0.09 1</ambient></material></visual>
|
| 736 |
+
<visual name="leg_2"><pose>0.62 -0.15 -0.05 0 0 0</pose><geometry><box><size>0.06 0.06 0.34</size></box></geometry><material><ambient>0.25 0.16 0.09 1</ambient></material></visual>
|
| 737 |
+
<visual name="leg_3"><pose>-0.62 0.15 -0.05 0 0 0</pose><geometry><box><size>0.06 0.06 0.34</size></box></geometry><material><ambient>0.25 0.16 0.09 1</ambient></material></visual>
|
| 738 |
+
<visual name="leg_4"><pose>0.62 0.15 -0.05 0 0 0</pose><geometry><box><size>0.06 0.06 0.34</size></box></geometry><material><ambient>0.25 0.16 0.09 1</ambient></material></visual>
|
| 739 |
+
</link>
|
| 740 |
+
</model>
|
| 741 |
+
|
| 742 |
+
<!-- Kitchen island (faces the counter; makes the kitchen feel compact) -->
|
| 743 |
+
<model name="kitchen_island">
|
| 744 |
+
<static>true</static>
|
| 745 |
+
<pose>5 3.475 0.45 0 0 0.0000</pose>
|
| 746 |
+
<link name="link">
|
| 747 |
+
<visual name="body"><geometry><box><size>1.6 0.8 0.9</size></box></geometry>
|
| 748 |
+
<material><ambient>0.80 0.78 0.74 1</ambient><diffuse>0.85 0.83 0.79 1</diffuse><specular>0.05 0.05 0.05 1</specular></material></visual>
|
| 749 |
+
<visual name="worktop"><pose>0 0 0.47 0 0 0</pose><geometry><box><size>1.7 0.9 0.05</size></box></geometry>
|
| 750 |
+
<material><script><uri>file://media/materials/scripts/home.material</uri><uri>file://media/materials/textures</uri><name>Home/WoodPolished</name></script></material></visual>
|
| 751 |
+
<collision name="collision"><geometry><box><size>1.6 0.8 0.92</size></box></geometry></collision>
|
| 752 |
+
</link>
|
| 753 |
+
</model>
|
| 754 |
+
|
| 755 |
+
<!-- Bar stool at the island -->
|
| 756 |
+
<model name="island_stool">
|
| 757 |
+
<static>true</static>
|
| 758 |
+
<pose>5 4.375 0.45 0 0 0.0000</pose>
|
| 759 |
+
<link name="link">
|
| 760 |
+
<visual name="seat"><geometry><cylinder><radius>0.18</radius><length>0.08</length></cylinder></geometry><material><ambient>0.2 0.2 0.22 1</ambient></material></visual>
|
| 761 |
+
<visual name="leg"><pose>0 0 -0.22 0 0 0</pose><geometry><cylinder><radius>0.04</radius><length>0.45</length></cylinder></geometry><material><ambient>0.5 0.5 0.52 1</ambient><diffuse>0.6 0.6 0.62 1</diffuse><specular>0.5 0.5 0.55 1</specular></material></visual>
|
| 762 |
+
</link>
|
| 763 |
+
</model>
|
| 764 |
+
|
| 765 |
+
<!-- ============================ Lighting ============================== -->
|
| 766 |
+
<!-- A closed ceiling blocks the exterior sun, so the interior is lit by warm
|
| 767 |
+
ceiling lamps. A single soft, shadowless directional "skylight" fill is
|
| 768 |
+
added on top: it lifts the harsh dark corners the point lamps leave and
|
| 769 |
+
gives every surface a consistent base shade, so the room reads as evenly
|
| 770 |
+
lit daylight rather than a dim cave. The point lamps then layer warm
|
| 771 |
+
pools of light + specular highlights over that base. -->
|
| 772 |
+
<light name="fill_skylight" type="directional">
|
| 773 |
+
<pose>0 0 2.65 0 0 0</pose>
|
| 774 |
+
<direction>-0.25 0.15 -1.0</direction>
|
| 775 |
+
<diffuse>0.34 0.34 0.36 1</diffuse>
|
| 776 |
+
<specular>0.08 0.08 0.09 1</specular>
|
| 777 |
+
<cast_shadows>false</cast_shadows>
|
| 778 |
+
</light>
|
| 779 |
+
|
| 780 |
+
<light name="ceil_light_living" type="point">
|
| 781 |
+
<pose>-4.4 -1.9 2.45 0 0 0</pose>
|
| 782 |
+
<diffuse>0.62 0.56 0.46 1</diffuse>
|
| 783 |
+
<specular>0.28 0.26 0.22 1</specular>
|
| 784 |
+
<attenuation><range>12</range><constant>0.70</constant><linear>0.05</linear><quadratic>0.012</quadratic></attenuation>
|
| 785 |
+
<cast_shadows>true</cast_shadows>
|
| 786 |
+
</light>
|
| 787 |
+
<light name="ceil_light_dining" type="point">
|
| 788 |
+
<pose>-4.5 2.9 2.45 0 0 0</pose>
|
| 789 |
+
<diffuse>0.60 0.54 0.45 1</diffuse>
|
| 790 |
+
<specular>0.26 0.24 0.20 1</specular>
|
| 791 |
+
<attenuation><range>11</range><constant>0.70</constant><linear>0.05</linear><quadratic>0.012</quadratic></attenuation>
|
| 792 |
+
<cast_shadows>false</cast_shadows>
|
| 793 |
+
</light>
|
| 794 |
+
<light name="ceil_light_bedroom" type="point">
|
| 795 |
+
<pose>4.8 3.2 2.45 0 0 0</pose>
|
| 796 |
+
<diffuse>0.58 0.53 0.45 1</diffuse>
|
| 797 |
+
<specular>0.26 0.24 0.20 1</specular>
|
| 798 |
+
<attenuation><range>12</range><constant>0.70</constant><linear>0.05</linear><quadratic>0.012</quadratic></attenuation>
|
| 799 |
+
<cast_shadows>true</cast_shadows>
|
| 800 |
+
</light>
|
| 801 |
+
<light name="ceil_light_kitchen" type="point">
|
| 802 |
+
<pose>4.0 -3.1 2.45 0 0 0</pose>
|
| 803 |
+
<diffuse>0.62 0.58 0.50 1</diffuse>
|
| 804 |
+
<specular>0.30 0.28 0.24 1</specular>
|
| 805 |
+
<attenuation><range>11</range><constant>0.70</constant><linear>0.05</linear><quadratic>0.012</quadratic></attenuation>
|
| 806 |
+
<cast_shadows>false</cast_shadows>
|
| 807 |
+
</light>
|
| 808 |
+
|
| 809 |
+
<scene>
|
| 810 |
+
<ambient>0.36 0.35 0.33 1</ambient>
|
| 811 |
+
<background>0.70 0.74 0.78 1</background>
|
| 812 |
+
<shadows>true</shadows>
|
| 813 |
+
</scene>
|
| 814 |
+
|
| 815 |
+
<!-- Take off against the left wall, in the empty strip between the floor
|
| 816 |
+
lamp and the bookshelf: nothing obstructs the view, and from here
|
| 817 |
+
(high, yaw=0 facing +x) the drone looks straight down the long axis
|
| 818 |
+
and overlooks the whole apartment before starting its tour. -->
|
| 819 |
+
<include>
|
| 820 |
+
<uri>model://simple_drone</uri>
|
| 821 |
+
<pose>-7.0 0.6 1.8 0 0 0</pose>
|
| 822 |
+
</include>
|
| 823 |
+
|
| 824 |
+
</world>
|
| 825 |
+
</sdf>
|
simulation/world/home_room_v4.world
ADDED
|
@@ -0,0 +1,825 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0" ?>
|
| 2 |
+
<sdf version="1.6">
|
| 3 |
+
<world name="home_room">
|
| 4 |
+
|
| 5 |
+
<include>
|
| 6 |
+
<uri>model://sun</uri>
|
| 7 |
+
</include>
|
| 8 |
+
|
| 9 |
+
<include>
|
| 10 |
+
<uri>model://ground_plane</uri>
|
| 11 |
+
</include>
|
| 12 |
+
|
| 13 |
+
<!-- =====================================================================
|
| 14 |
+
Layout: open-plan apartment, 15 m (x) x 10 m (y), walls 2.6 m tall.
|
| 15 |
+
x in [-7.5, 7.5], y in [-5, 5].
|
| 16 |
+
Left half (x < -1): living room (front) + dining (back)
|
| 17 |
+
Right half (x > 1): kitchen (front) + bedroom (back)
|
| 18 |
+
Surfaces use Gazebo's built-in textured materials (no extra files).
|
| 19 |
+
===================================================================== -->
|
| 20 |
+
|
| 21 |
+
<!-- ===================== Shell: floor / walls / ceiling ================ -->
|
| 22 |
+
<model name="floor">
|
| 23 |
+
<static>true</static>
|
| 24 |
+
<pose>0 0 0.01 0 0 0</pose>
|
| 25 |
+
<link name="link">
|
| 26 |
+
<visual name="visual">
|
| 27 |
+
<geometry><box><size>15 10 0.02</size></box></geometry>
|
| 28 |
+
<material>
|
| 29 |
+
<script>
|
| 30 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 31 |
+
<uri>file://media/materials/textures</uri>
|
| 32 |
+
<name>Home/MutedWoodFloor</name>
|
| 33 |
+
</script>
|
| 34 |
+
</material>
|
| 35 |
+
</visual>
|
| 36 |
+
<collision name="collision">
|
| 37 |
+
<geometry><box><size>15 10 0.02</size></box></geometry>
|
| 38 |
+
</collision>
|
| 39 |
+
</link>
|
| 40 |
+
</model>
|
| 41 |
+
|
| 42 |
+
<!-- Back wall (y = +5) -->
|
| 43 |
+
<model name="wall_back">
|
| 44 |
+
<static>true</static>
|
| 45 |
+
<pose>0 5 1.3 0 0 0</pose>
|
| 46 |
+
<link name="link">
|
| 47 |
+
<visual name="visual">
|
| 48 |
+
<geometry><box><size>15 0.15 2.6</size></box></geometry>
|
| 49 |
+
<material>
|
| 50 |
+
<script>
|
| 51 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 52 |
+
<uri>file://media/materials/textures</uri>
|
| 53 |
+
<name>Home/WallPaint</name>
|
| 54 |
+
</script>
|
| 55 |
+
</material>
|
| 56 |
+
</visual>
|
| 57 |
+
<collision name="collision"><geometry><box><size>15 0.15 2.6</size></box></geometry></collision>
|
| 58 |
+
</link>
|
| 59 |
+
</model>
|
| 60 |
+
|
| 61 |
+
<!-- Front wall (y = -5): brick accent wall (TV / kitchen side) -->
|
| 62 |
+
<model name="wall_front">
|
| 63 |
+
<static>true</static>
|
| 64 |
+
<pose>0 -5 1.3 0 0 0</pose>
|
| 65 |
+
<link name="link">
|
| 66 |
+
<visual name="visual">
|
| 67 |
+
<geometry><box><size>15 0.15 2.6</size></box></geometry>
|
| 68 |
+
<material>
|
| 69 |
+
<script>
|
| 70 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 71 |
+
<uri>file://media/materials/textures</uri>
|
| 72 |
+
<name>Home/Brick</name>
|
| 73 |
+
</script>
|
| 74 |
+
</material>
|
| 75 |
+
</visual>
|
| 76 |
+
<collision name="collision"><geometry><box><size>15 0.15 2.6</size></box></geometry></collision>
|
| 77 |
+
</link>
|
| 78 |
+
</model>
|
| 79 |
+
|
| 80 |
+
<!-- Left wall (x = -7.5) -->
|
| 81 |
+
<model name="wall_left">
|
| 82 |
+
<static>true</static>
|
| 83 |
+
<pose>-7.5 0 1.3 0 0 0</pose>
|
| 84 |
+
<link name="link">
|
| 85 |
+
<visual name="visual">
|
| 86 |
+
<geometry><box><size>0.15 10 2.6</size></box></geometry>
|
| 87 |
+
<material>
|
| 88 |
+
<script>
|
| 89 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 90 |
+
<uri>file://media/materials/textures</uri>
|
| 91 |
+
<name>Home/WallPaint</name>
|
| 92 |
+
</script>
|
| 93 |
+
</material>
|
| 94 |
+
</visual>
|
| 95 |
+
<collision name="collision"><geometry><box><size>0.15 10 2.6</size></box></geometry></collision>
|
| 96 |
+
</link>
|
| 97 |
+
</model>
|
| 98 |
+
|
| 99 |
+
<!-- Right wall (x = +7.5) -->
|
| 100 |
+
<model name="wall_right">
|
| 101 |
+
<static>true</static>
|
| 102 |
+
<pose>7.5 0 1.3 0 0 0</pose>
|
| 103 |
+
<link name="link">
|
| 104 |
+
<visual name="visual">
|
| 105 |
+
<geometry><box><size>0.15 10 2.6</size></box></geometry>
|
| 106 |
+
<material>
|
| 107 |
+
<script>
|
| 108 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 109 |
+
<uri>file://media/materials/textures</uri>
|
| 110 |
+
<name>Home/WallPaint</name>
|
| 111 |
+
</script>
|
| 112 |
+
</material>
|
| 113 |
+
</visual>
|
| 114 |
+
<collision name="collision"><geometry><box><size>0.15 10 2.6</size></box></geometry></collision>
|
| 115 |
+
</link>
|
| 116 |
+
</model>
|
| 117 |
+
|
| 118 |
+
<!-- Ceiling (z = 2.6). Comment this model out if it blocks a top-down GUI view. -->
|
| 119 |
+
<model name="ceiling">
|
| 120 |
+
<static>true</static>
|
| 121 |
+
<pose>0 0 2.625 0 0 0</pose>
|
| 122 |
+
<link name="link">
|
| 123 |
+
<visual name="visual">
|
| 124 |
+
<geometry><box><size>15 10 0.05</size></box></geometry>
|
| 125 |
+
<material>
|
| 126 |
+
<script>
|
| 127 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 128 |
+
<uri>file://media/materials/textures</uri>
|
| 129 |
+
<name>Home/Ceiling</name>
|
| 130 |
+
</script>
|
| 131 |
+
</material>
|
| 132 |
+
</visual>
|
| 133 |
+
</link>
|
| 134 |
+
</model>
|
| 135 |
+
|
| 136 |
+
<!-- ======================== LIVING ROOM (front-left) =================== -->
|
| 137 |
+
|
| 138 |
+
<!-- Rug under the coffee table -->
|
| 139 |
+
<model name="living_rug">
|
| 140 |
+
<static>true</static>
|
| 141 |
+
<pose>-1.4 -1.9 0.02 0 0 0.0000</pose>
|
| 142 |
+
<link name="link">
|
| 143 |
+
<visual name="visual">
|
| 144 |
+
<geometry><box><size>3.4 2.8 0.02</size></box></geometry>
|
| 145 |
+
<material><ambient>0.46 0.43 0.39 1</ambient><diffuse>0.50 0.47 0.43 1</diffuse></material>
|
| 146 |
+
</visual>
|
| 147 |
+
</link>
|
| 148 |
+
</model>
|
| 149 |
+
|
| 150 |
+
<!-- Sofa (facing -y toward the TV), fabric -->
|
| 151 |
+
<model name="sofa">
|
| 152 |
+
<static>true</static>
|
| 153 |
+
<pose>-1.4 -0.7 0.35 0 0 0.0000</pose>
|
| 154 |
+
<link name="link">
|
| 155 |
+
<visual name="base">
|
| 156 |
+
<geometry><box><size>2.1 0.85 0.35</size></box></geometry>
|
| 157 |
+
<material><ambient>0.44 0.42 0.39 1</ambient><diffuse>0.48 0.46 0.42 1</diffuse></material>
|
| 158 |
+
</visual>
|
| 159 |
+
<visual name="back">
|
| 160 |
+
<pose>0 0.4 0.32 0 0 0</pose>
|
| 161 |
+
<geometry><box><size>2.1 0.14 0.6</size></box></geometry>
|
| 162 |
+
<material><ambient>0.40 0.38 0.35 1</ambient><diffuse>0.43 0.41 0.38 1</diffuse></material>
|
| 163 |
+
</visual>
|
| 164 |
+
<visual name="left_arm">
|
| 165 |
+
<pose>-1.0 0 0.18 0 0 0</pose>
|
| 166 |
+
<geometry><box><size>0.16 0.85 0.5</size></box></geometry>
|
| 167 |
+
<material><ambient>0.40 0.38 0.35 1</ambient></material>
|
| 168 |
+
</visual>
|
| 169 |
+
<visual name="right_arm">
|
| 170 |
+
<pose>1.0 0 0.18 0 0 0</pose>
|
| 171 |
+
<geometry><box><size>0.16 0.85 0.5</size></box></geometry>
|
| 172 |
+
<material><ambient>0.40 0.38 0.35 1</ambient></material>
|
| 173 |
+
</visual>
|
| 174 |
+
<visual name="cushion_l">
|
| 175 |
+
<pose>-0.5 -0.05 0.24 0 0 0</pose>
|
| 176 |
+
<geometry><box><size>0.85 0.7 0.16</size></box></geometry>
|
| 177 |
+
<material><ambient>0.49 0.47 0.43 1</ambient><diffuse>0.52 0.50 0.46 1</diffuse></material>
|
| 178 |
+
</visual>
|
| 179 |
+
<visual name="cushion_r">
|
| 180 |
+
<pose>0.5 -0.05 0.24 0 0 0</pose>
|
| 181 |
+
<geometry><box><size>0.85 0.7 0.16</size></box></geometry>
|
| 182 |
+
<material><ambient>0.49 0.47 0.43 1</ambient><diffuse>0.52 0.50 0.46 1</diffuse></material>
|
| 183 |
+
</visual>
|
| 184 |
+
<visual name="pillow_l">
|
| 185 |
+
<pose>-0.7 0.18 0.45 0 0.2 0</pose>
|
| 186 |
+
<geometry><box><size>0.32 0.12 0.32</size></box></geometry>
|
| 187 |
+
<material><ambient>0.55 0.50 0.42 1</ambient><diffuse>0.58 0.53 0.45 1</diffuse></material>
|
| 188 |
+
</visual>
|
| 189 |
+
<visual name="pillow_r">
|
| 190 |
+
<pose>0.7 0.18 0.45 0 -0.2 0</pose>
|
| 191 |
+
<geometry><box><size>0.32 0.12 0.32</size></box></geometry>
|
| 192 |
+
<material><ambient>0.50 0.42 0.40 1</ambient><diffuse>0.53 0.45 0.43 1</diffuse></material>
|
| 193 |
+
</visual>
|
| 194 |
+
<collision name="collision"><geometry><box><size>2.2 0.95 0.85</size></box></geometry></collision>
|
| 195 |
+
</link>
|
| 196 |
+
</model>
|
| 197 |
+
|
| 198 |
+
<!-- Coffee table (wood) -->
|
| 199 |
+
<model name="coffee_table">
|
| 200 |
+
<static>true</static>
|
| 201 |
+
<pose>-1.4 -2.4 0.26 0 0 0.0000</pose>
|
| 202 |
+
<link name="link">
|
| 203 |
+
<visual name="top">
|
| 204 |
+
<geometry><box><size>1.1 0.6 0.08</size></box></geometry>
|
| 205 |
+
<material>
|
| 206 |
+
<script>
|
| 207 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 208 |
+
<uri>file://media/materials/textures</uri>
|
| 209 |
+
<name>Home/WoodPolished</name>
|
| 210 |
+
</script>
|
| 211 |
+
</material>
|
| 212 |
+
</visual>
|
| 213 |
+
<visual name="leg_1"><pose>-0.45 -0.22 -0.16 0 0 0</pose><geometry><box><size>0.07 0.07 0.32</size></box></geometry><material><ambient>0.25 0.14 0.08 1</ambient></material></visual>
|
| 214 |
+
<visual name="leg_2"><pose>0.45 -0.22 -0.16 0 0 0</pose><geometry><box><size>0.07 0.07 0.32</size></box></geometry><material><ambient>0.25 0.14 0.08 1</ambient></material></visual>
|
| 215 |
+
<visual name="leg_3"><pose>-0.45 0.22 -0.16 0 0 0</pose><geometry><box><size>0.07 0.07 0.32</size></box></geometry><material><ambient>0.25 0.14 0.08 1</ambient></material></visual>
|
| 216 |
+
<visual name="leg_4"><pose>0.45 0.22 -0.16 0 0 0</pose><geometry><box><size>0.07 0.07 0.32</size></box></geometry><material><ambient>0.25 0.14 0.08 1</ambient></material></visual>
|
| 217 |
+
<collision name="collision"><geometry><box><size>1.1 0.6 0.4</size></box></geometry></collision>
|
| 218 |
+
</link>
|
| 219 |
+
</model>
|
| 220 |
+
|
| 221 |
+
<!-- TV cabinet against the brick wall (wood) -->
|
| 222 |
+
<model name="tv_cabinet">
|
| 223 |
+
<static>true</static>
|
| 224 |
+
<pose>-1.4 -4.78 0.28 0 0 0</pose>
|
| 225 |
+
<link name="link">
|
| 226 |
+
<visual name="visual">
|
| 227 |
+
<geometry><box><size>2.2 0.4 0.5</size></box></geometry>
|
| 228 |
+
<material>
|
| 229 |
+
<script>
|
| 230 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 231 |
+
<uri>file://media/materials/textures</uri>
|
| 232 |
+
<name>Home/WoodPolished</name>
|
| 233 |
+
</script>
|
| 234 |
+
</material>
|
| 235 |
+
</visual>
|
| 236 |
+
<collision name="collision"><geometry><box><size>2.2 0.4 0.5</size></box></geometry></collision>
|
| 237 |
+
</link>
|
| 238 |
+
</model>
|
| 239 |
+
|
| 240 |
+
<!-- Flat-screen TV -->
|
| 241 |
+
<model name="tv">
|
| 242 |
+
<static>true</static>
|
| 243 |
+
<pose>-1.4 -4.88 1.15 0 0 0</pose>
|
| 244 |
+
<link name="link">
|
| 245 |
+
<visual name="screen">
|
| 246 |
+
<geometry><box><size>1.7 0.06 0.95</size></box></geometry>
|
| 247 |
+
<material><ambient>0.02 0.02 0.025 1</ambient><diffuse>0.02 0.02 0.03 1</diffuse><specular>0.35 0.35 0.40 1</specular></material>
|
| 248 |
+
</visual>
|
| 249 |
+
<visual name="bezel">
|
| 250 |
+
<pose>0 0.01 0 0 0 0</pose>
|
| 251 |
+
<geometry><box><size>1.78 0.04 1.03</size></box></geometry>
|
| 252 |
+
<material><ambient>0.05 0.05 0.06 1</ambient></material>
|
| 253 |
+
</visual>
|
| 254 |
+
</link>
|
| 255 |
+
</model>
|
| 256 |
+
|
| 257 |
+
<!-- Floor lamp (living-room corner) -->
|
| 258 |
+
<model name="floor_lamp">
|
| 259 |
+
<static>true</static>
|
| 260 |
+
<pose>-3.9 -0.9 0.8 0 0 0.0000</pose>
|
| 261 |
+
<link name="link">
|
| 262 |
+
<visual name="pole">
|
| 263 |
+
<geometry><cylinder><radius>0.035</radius><length>1.5</length></cylinder></geometry>
|
| 264 |
+
<material><ambient>0.22 0.22 0.24 1</ambient><diffuse>0.24 0.24 0.26 1</diffuse></material>
|
| 265 |
+
</visual>
|
| 266 |
+
<visual name="shade">
|
| 267 |
+
<pose>0 0 0.82 0 0 0</pose>
|
| 268 |
+
<geometry><cylinder><radius>0.24</radius><length>0.34</length></cylinder></geometry>
|
| 269 |
+
<material><ambient>0.78 0.72 0.60 1</ambient><diffuse>0.82 0.76 0.64 1</diffuse></material>
|
| 270 |
+
</visual>
|
| 271 |
+
</link>
|
| 272 |
+
</model>
|
| 273 |
+
|
| 274 |
+
<!-- Bookshelf against the left wall -->
|
| 275 |
+
<model name="bookshelf">
|
| 276 |
+
<static>true</static>
|
| 277 |
+
<pose>-7.15 2.25 0.9 0 0 0</pose>
|
| 278 |
+
<link name="link">
|
| 279 |
+
<visual name="frame">
|
| 280 |
+
<geometry><box><size>0.4 1.6 1.8</size></box></geometry>
|
| 281 |
+
<material>
|
| 282 |
+
<script>
|
| 283 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 284 |
+
<uri>file://media/materials/textures</uri>
|
| 285 |
+
<name>Home/WoodPolished</name>
|
| 286 |
+
</script>
|
| 287 |
+
</material>
|
| 288 |
+
</visual>
|
| 289 |
+
<visual name="books_1"><pose>0.05 -0.45 0.55 0 0 0</pose><geometry><box><size>0.28 0.6 0.25</size></box></geometry><material><ambient>0.46 0.36 0.30 1</ambient></material></visual>
|
| 290 |
+
<visual name="books_2"><pose>0.05 0.35 0.1 0 0 0</pose><geometry><box><size>0.28 0.7 0.25</size></box></geometry><material><ambient>0.38 0.40 0.40 1</ambient></material></visual>
|
| 291 |
+
<visual name="books_3"><pose>0.05 -0.1 -0.35 0 0 0</pose><geometry><box><size>0.28 0.8 0.25</size></box></geometry><material><ambient>0.42 0.41 0.34 1</ambient></material></visual>
|
| 292 |
+
<collision name="collision"><geometry><box><size>0.4 1.6 1.8</size></box></geometry></collision>
|
| 293 |
+
</link>
|
| 294 |
+
</model>
|
| 295 |
+
|
| 296 |
+
<!-- Potted plant (back-left corner) -->
|
| 297 |
+
<model name="plant">
|
| 298 |
+
<static>true</static>
|
| 299 |
+
<pose>-3.9 4.5 0 0 0 0.0000</pose>
|
| 300 |
+
<link name="link">
|
| 301 |
+
<visual name="pot">
|
| 302 |
+
<pose>0 0 0.2 0 0 0</pose>
|
| 303 |
+
<geometry><cylinder><radius>0.22</radius><length>0.4</length></cylinder></geometry>
|
| 304 |
+
<material><ambient>0.45 0.28 0.18 1</ambient><diffuse>0.50 0.30 0.20 1</diffuse></material>
|
| 305 |
+
</visual>
|
| 306 |
+
<visual name="foliage">
|
| 307 |
+
<pose>0 0 0.85 0 0 0</pose>
|
| 308 |
+
<geometry><sphere><radius>0.42</radius></sphere></geometry>
|
| 309 |
+
<material><ambient>0.26 0.34 0.24 1</ambient><diffuse>0.28 0.37 0.26 1</diffuse></material>
|
| 310 |
+
</visual>
|
| 311 |
+
<visual name="foliage2">
|
| 312 |
+
<pose>0.12 0.05 1.15 0 0 0</pose>
|
| 313 |
+
<geometry><sphere><radius>0.28</radius></sphere></geometry>
|
| 314 |
+
<material><ambient>0.28 0.36 0.26 1</ambient><diffuse>0.30 0.39 0.28 1</diffuse></material>
|
| 315 |
+
</visual>
|
| 316 |
+
</link>
|
| 317 |
+
</model>
|
| 318 |
+
|
| 319 |
+
<!-- ============================ DINING (back-left) ===================== -->
|
| 320 |
+
|
| 321 |
+
<model name="dining_table">
|
| 322 |
+
<static>true</static>
|
| 323 |
+
<pose>4.5 3 0.45 0 0 0.0000</pose>
|
| 324 |
+
<link name="link">
|
| 325 |
+
<visual name="top">
|
| 326 |
+
<geometry><box><size>1.5 0.9 0.08</size></box></geometry>
|
| 327 |
+
<material>
|
| 328 |
+
<script>
|
| 329 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 330 |
+
<uri>file://media/materials/textures</uri>
|
| 331 |
+
<name>Home/WoodPolished</name>
|
| 332 |
+
</script>
|
| 333 |
+
</material>
|
| 334 |
+
</visual>
|
| 335 |
+
<visual name="leg_1"><pose>-0.65 -0.35 -0.22 0 0 0</pose><geometry><box><size>0.08 0.08 0.44</size></box></geometry><material><ambient>0.30 0.18 0.10 1</ambient></material></visual>
|
| 336 |
+
<visual name="leg_2"><pose>0.65 -0.35 -0.22 0 0 0</pose><geometry><box><size>0.08 0.08 0.44</size></box></geometry><material><ambient>0.30 0.18 0.10 1</ambient></material></visual>
|
| 337 |
+
<visual name="leg_3"><pose>-0.65 0.35 -0.22 0 0 0</pose><geometry><box><size>0.08 0.08 0.44</size></box></geometry><material><ambient>0.30 0.18 0.10 1</ambient></material></visual>
|
| 338 |
+
<visual name="leg_4"><pose>0.65 0.35 -0.22 0 0 0</pose><geometry><box><size>0.08 0.08 0.44</size></box></geometry><material><ambient>0.30 0.18 0.10 1</ambient></material></visual>
|
| 339 |
+
<collision name="collision"><geometry><box><size>1.5 0.9 0.55</size></box></geometry></collision>
|
| 340 |
+
</link>
|
| 341 |
+
</model>
|
| 342 |
+
|
| 343 |
+
<model name="chair_1">
|
| 344 |
+
<static>true</static>
|
| 345 |
+
<pose>3.75 3 0.32 0 0 0.0000</pose>
|
| 346 |
+
<link name="link">
|
| 347 |
+
<visual name="seat"><geometry><box><size>0.45 0.45 0.1</size></box></geometry><material><ambient>0.46 0.43 0.38 1</ambient><diffuse>0.49 0.46 0.41 1</diffuse></material></visual>
|
| 348 |
+
<visual name="back"><pose>-0.2 0 0.35 0 0 0</pose><geometry><box><size>0.08 0.45 0.7</size></box></geometry><material><ambient>0.46 0.43 0.38 1</ambient></material></visual>
|
| 349 |
+
</link>
|
| 350 |
+
</model>
|
| 351 |
+
<model name="chair_2">
|
| 352 |
+
<static>true</static>
|
| 353 |
+
<pose>5.25 3 0.32 0 0 0.0000</pose>
|
| 354 |
+
<link name="link">
|
| 355 |
+
<visual name="seat"><geometry><box><size>0.45 0.45 0.1</size></box></geometry><material><ambient>0.46 0.43 0.38 1</ambient><diffuse>0.49 0.46 0.41 1</diffuse></material></visual>
|
| 356 |
+
<visual name="back"><pose>0.2 0 0.35 0 0 0</pose><geometry><box><size>0.08 0.45 0.7</size></box></geometry><material><ambient>0.46 0.43 0.38 1</ambient></material></visual>
|
| 357 |
+
</link>
|
| 358 |
+
</model>
|
| 359 |
+
<model name="chair_3">
|
| 360 |
+
<static>true</static>
|
| 361 |
+
<pose>4.5 2.25 0.32 0 0 1.5708</pose>
|
| 362 |
+
<link name="link">
|
| 363 |
+
<visual name="seat"><geometry><box><size>0.45 0.45 0.1</size></box></geometry><material><ambient>0.46 0.43 0.38 1</ambient><diffuse>0.49 0.46 0.41 1</diffuse></material></visual>
|
| 364 |
+
<visual name="back"><pose>-0.2 0 0.35 0 0 0</pose><geometry><box><size>0.08 0.45 0.7</size></box></geometry><material><ambient>0.46 0.43 0.38 1</ambient></material></visual>
|
| 365 |
+
</link>
|
| 366 |
+
</model>
|
| 367 |
+
<model name="chair_4">
|
| 368 |
+
<static>true</static>
|
| 369 |
+
<pose>4.5 3.75 0.32 0 0 4.7124</pose>
|
| 370 |
+
<link name="link">
|
| 371 |
+
<visual name="seat"><geometry><box><size>0.45 0.45 0.1</size></box></geometry><material><ambient>0.46 0.43 0.38 1</ambient><diffuse>0.49 0.46 0.41 1</diffuse></material></visual>
|
| 372 |
+
<visual name="back"><pose>-0.2 0 0.35 0 0 0</pose><geometry><box><size>0.08 0.45 0.7</size></box></geometry><material><ambient>0.46 0.43 0.38 1</ambient></material></visual>
|
| 373 |
+
</link>
|
| 374 |
+
</model>
|
| 375 |
+
|
| 376 |
+
<!-- ============================ BEDROOM (back-right) =================== -->
|
| 377 |
+
|
| 378 |
+
<model name="bed_rug">
|
| 379 |
+
<static>true</static>
|
| 380 |
+
<pose>-1.133 1.408 0.02 0 0 0.0000</pose>
|
| 381 |
+
<link name="link">
|
| 382 |
+
<visual name="visual">
|
| 383 |
+
<geometry><box><size>3.0 2.0 0.02</size></box></geometry>
|
| 384 |
+
<material><ambient>0.42 0.41 0.39 1</ambient><diffuse>0.45 0.44 0.42 1</diffuse></material>
|
| 385 |
+
</visual>
|
| 386 |
+
</link>
|
| 387 |
+
</model>
|
| 388 |
+
|
| 389 |
+
<model name="bed">
|
| 390 |
+
<static>true</static>
|
| 391 |
+
<pose>-0.933 3.158 0.28 0 0 0.0000</pose>
|
| 392 |
+
<link name="link">
|
| 393 |
+
<visual name="frame">
|
| 394 |
+
<geometry><box><size>2.0 1.9 0.35</size></box></geometry>
|
| 395 |
+
<material>
|
| 396 |
+
<script>
|
| 397 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 398 |
+
<uri>file://media/materials/textures</uri>
|
| 399 |
+
<name>Home/WoodPolished</name>
|
| 400 |
+
</script>
|
| 401 |
+
</material>
|
| 402 |
+
</visual>
|
| 403 |
+
<visual name="headboard">
|
| 404 |
+
<pose>0 0.95 0.35 0 0 0</pose>
|
| 405 |
+
<geometry><box><size>2.0 0.12 0.7</size></box></geometry>
|
| 406 |
+
<material>
|
| 407 |
+
<script>
|
| 408 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 409 |
+
<uri>file://media/materials/textures</uri>
|
| 410 |
+
<name>Home/WoodPolished</name>
|
| 411 |
+
</script>
|
| 412 |
+
</material>
|
| 413 |
+
</visual>
|
| 414 |
+
<visual name="mattress">
|
| 415 |
+
<pose>0 -0.05 0.26 0 0 0</pose>
|
| 416 |
+
<geometry><box><size>1.85 1.75 0.2</size></box></geometry>
|
| 417 |
+
<material><ambient>0.90 0.90 0.85 1</ambient><diffuse>0.94 0.94 0.88 1</diffuse></material>
|
| 418 |
+
</visual>
|
| 419 |
+
<visual name="duvet">
|
| 420 |
+
<pose>0 -0.45 0.34 0 0 0</pose>
|
| 421 |
+
<geometry><box><size>1.85 0.95 0.16</size></box></geometry>
|
| 422 |
+
<material><ambient>0.52 0.50 0.47 1</ambient><diffuse>0.56 0.54 0.50 1</diffuse></material>
|
| 423 |
+
</visual>
|
| 424 |
+
<visual name="pillow_l">
|
| 425 |
+
<pose>-0.45 0.55 0.42 0 0 0</pose>
|
| 426 |
+
<geometry><box><size>0.6 0.34 0.14</size></box></geometry>
|
| 427 |
+
<material><ambient>0.96 0.96 0.92 1</ambient><diffuse>0.98 0.98 0.94 1</diffuse></material>
|
| 428 |
+
</visual>
|
| 429 |
+
<visual name="pillow_r">
|
| 430 |
+
<pose>0.45 0.55 0.42 0 0 0</pose>
|
| 431 |
+
<geometry><box><size>0.6 0.34 0.14</size></box></geometry>
|
| 432 |
+
<material><ambient>0.96 0.96 0.92 1</ambient><diffuse>0.98 0.98 0.94 1</diffuse></material>
|
| 433 |
+
</visual>
|
| 434 |
+
<collision name="collision"><geometry><box><size>2.0 1.9 0.6</size></box></geometry></collision>
|
| 435 |
+
</link>
|
| 436 |
+
</model>
|
| 437 |
+
|
| 438 |
+
<model name="nightstand_1">
|
| 439 |
+
<static>true</static>
|
| 440 |
+
<pose>-2.133 3.808 0.25 0 0 0.0000</pose>
|
| 441 |
+
<link name="link">
|
| 442 |
+
<visual name="body"><geometry><box><size>0.45 0.4 0.5</size></box></geometry>
|
| 443 |
+
<material>
|
| 444 |
+
<script>
|
| 445 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 446 |
+
<uri>file://media/materials/textures</uri>
|
| 447 |
+
<name>Home/WoodPolished</name>
|
| 448 |
+
</script>
|
| 449 |
+
</material>
|
| 450 |
+
</visual>
|
| 451 |
+
<visual name="lamp_pole"><pose>0 0 0.32 0 0 0</pose><geometry><cylinder><radius>0.02</radius><length>0.22</length></cylinder></geometry><material><ambient>0.2 0.2 0.2 1</ambient></material></visual>
|
| 452 |
+
<visual name="lamp_shade"><pose>0 0 0.46 0 0 0</pose><geometry><cylinder><radius>0.13</radius><length>0.14</length></cylinder></geometry><material><ambient>0.80 0.74 0.62 1</ambient><diffuse>0.84 0.78 0.66 1</diffuse></material></visual>
|
| 453 |
+
<collision name="collision"><geometry><box><size>0.45 0.4 0.5</size></box></geometry></collision>
|
| 454 |
+
</link>
|
| 455 |
+
</model>
|
| 456 |
+
<model name="nightstand_2">
|
| 457 |
+
<static>true</static>
|
| 458 |
+
<pose>0.267 3.808 0.25 0 0 0.0000</pose>
|
| 459 |
+
<link name="link">
|
| 460 |
+
<visual name="body"><geometry><box><size>0.45 0.4 0.5</size></box></geometry>
|
| 461 |
+
<material>
|
| 462 |
+
<script>
|
| 463 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 464 |
+
<uri>file://media/materials/textures</uri>
|
| 465 |
+
<name>Home/WoodPolished</name>
|
| 466 |
+
</script>
|
| 467 |
+
</material>
|
| 468 |
+
</visual>
|
| 469 |
+
<visual name="lamp_pole"><pose>0 0 0.32 0 0 0</pose><geometry><cylinder><radius>0.02</radius><length>0.22</length></cylinder></geometry><material><ambient>0.2 0.2 0.2 1</ambient></material></visual>
|
| 470 |
+
<visual name="lamp_shade"><pose>0 0 0.46 0 0 0</pose><geometry><cylinder><radius>0.13</radius><length>0.14</length></cylinder></geometry><material><ambient>0.80 0.74 0.62 1</ambient><diffuse>0.84 0.78 0.66 1</diffuse></material></visual>
|
| 471 |
+
<collision name="collision"><geometry><box><size>0.45 0.4 0.5</size></box></geometry></collision>
|
| 472 |
+
</link>
|
| 473 |
+
</model>
|
| 474 |
+
|
| 475 |
+
<model name="wardrobe">
|
| 476 |
+
<static>true</static>
|
| 477 |
+
<pose>7.1 0.75 1.0 0 0 0</pose>
|
| 478 |
+
<link name="link">
|
| 479 |
+
<visual name="body">
|
| 480 |
+
<geometry><box><size>0.6 1.6 2.0</size></box></geometry>
|
| 481 |
+
<material>
|
| 482 |
+
<script>
|
| 483 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 484 |
+
<uri>file://media/materials/textures</uri>
|
| 485 |
+
<name>Home/WoodPolished</name>
|
| 486 |
+
</script>
|
| 487 |
+
</material>
|
| 488 |
+
</visual>
|
| 489 |
+
<visual name="handle_1"><pose>-0.32 -0.2 0 0 0 0</pose><geometry><box><size>0.03 0.04 0.25</size></box></geometry><material><ambient>0.1 0.1 0.1 1</ambient></material></visual>
|
| 490 |
+
<visual name="handle_2"><pose>-0.32 0.2 0 0 0 0</pose><geometry><box><size>0.03 0.04 0.25</size></box></geometry><material><ambient>0.1 0.1 0.1 1</ambient></material></visual>
|
| 491 |
+
<collision name="collision"><geometry><box><size>0.6 1.6 2.0</size></box></geometry></collision>
|
| 492 |
+
</link>
|
| 493 |
+
</model>
|
| 494 |
+
|
| 495 |
+
<!-- ============================ KITCHEN (front-right) ================= -->
|
| 496 |
+
|
| 497 |
+
<!-- Lower counter run along the brick wall -->
|
| 498 |
+
<model name="kitchen_counter">
|
| 499 |
+
<static>true</static>
|
| 500 |
+
<pose>4.0 -4.65 0.45 0 0 0</pose>
|
| 501 |
+
<link name="link">
|
| 502 |
+
<visual name="body">
|
| 503 |
+
<geometry><box><size>3.6 0.65 0.9</size></box></geometry>
|
| 504 |
+
<material><ambient>0.82 0.80 0.76 1</ambient><diffuse>0.86 0.84 0.80 1</diffuse></material>
|
| 505 |
+
</visual>
|
| 506 |
+
<visual name="worktop">
|
| 507 |
+
<pose>0 0 0.47 0 0 0</pose>
|
| 508 |
+
<geometry><box><size>3.7 0.7 0.05</size></box></geometry>
|
| 509 |
+
<material>
|
| 510 |
+
<script>
|
| 511 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 512 |
+
<uri>file://media/materials/textures</uri>
|
| 513 |
+
<name>Home/WoodPolished</name>
|
| 514 |
+
</script>
|
| 515 |
+
</material>
|
| 516 |
+
</visual>
|
| 517 |
+
<visual name="sink">
|
| 518 |
+
<pose>-0.6 0 0.49 0 0 0</pose>
|
| 519 |
+
<geometry><box><size>0.6 0.45 0.06</size></box></geometry>
|
| 520 |
+
<material><ambient>0.55 0.57 0.60 1</ambient><diffuse>0.6 0.62 0.65 1</diffuse><specular>0.55 0.57 0.62 1</specular></material>
|
| 521 |
+
</visual>
|
| 522 |
+
<collision name="collision"><geometry><box><size>3.6 0.65 0.92</size></box></geometry></collision>
|
| 523 |
+
</link>
|
| 524 |
+
</model>
|
| 525 |
+
|
| 526 |
+
<!-- Upper cabinets -->
|
| 527 |
+
<model name="kitchen_uppers">
|
| 528 |
+
<static>true</static>
|
| 529 |
+
<pose>4.0 -4.78 1.95 0 0 0</pose>
|
| 530 |
+
<link name="link">
|
| 531 |
+
<visual name="body">
|
| 532 |
+
<geometry><box><size>3.2 0.38 0.7</size></box></geometry>
|
| 533 |
+
<material>
|
| 534 |
+
<script>
|
| 535 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 536 |
+
<uri>file://media/materials/textures</uri>
|
| 537 |
+
<name>Home/WoodPolished</name>
|
| 538 |
+
</script>
|
| 539 |
+
</material>
|
| 540 |
+
</visual>
|
| 541 |
+
<collision name="collision"><geometry><box><size>3.2 0.38 0.7</size></box></geometry></collision>
|
| 542 |
+
</link>
|
| 543 |
+
</model>
|
| 544 |
+
|
| 545 |
+
<!-- Fridge in the corner -->
|
| 546 |
+
<model name="fridge">
|
| 547 |
+
<static>true</static>
|
| 548 |
+
<pose>7.0 -4.45 0.95 0 0 0</pose>
|
| 549 |
+
<link name="link">
|
| 550 |
+
<visual name="body">
|
| 551 |
+
<geometry><box><size>0.7 0.7 1.9</size></box></geometry>
|
| 552 |
+
<material><ambient>0.80 0.82 0.85 1</ambient><diffuse>0.86 0.88 0.92 1</diffuse><specular>0.45 0.46 0.50 1</specular></material>
|
| 553 |
+
</visual>
|
| 554 |
+
<visual name="handle"><pose>-0.34 0.28 0.2 0 0 0</pose><geometry><box><size>0.03 0.04 0.6</size></box></geometry><material><ambient>0.3 0.3 0.32 1</ambient></material></visual>
|
| 555 |
+
<visual name="seam"><pose>-0.351 0 0.3 0 0 0</pose><geometry><box><size>0.005 0.7 0.04</size></box></geometry><material><ambient>0.6 0.62 0.65 1</ambient></material></visual>
|
| 556 |
+
<collision name="collision"><geometry><box><size>0.7 0.7 1.9</size></box></geometry></collision>
|
| 557 |
+
</link>
|
| 558 |
+
</model>
|
| 559 |
+
|
| 560 |
+
<!-- Two bar stools at the counter -->
|
| 561 |
+
<model name="stool_1">
|
| 562 |
+
<static>true</static>
|
| 563 |
+
<pose>3.2 -3.8 0.45 0 0 0.0000</pose>
|
| 564 |
+
<link name="link">
|
| 565 |
+
<visual name="seat"><geometry><cylinder><radius>0.18</radius><length>0.08</length></cylinder></geometry><material><ambient>0.2 0.2 0.22 1</ambient></material></visual>
|
| 566 |
+
<visual name="leg"><pose>0 0 -0.22 0 0 0</pose><geometry><cylinder><radius>0.04</radius><length>0.45</length></cylinder></geometry><material><ambient>0.5 0.5 0.52 1</ambient><diffuse>0.6 0.6 0.62 1</diffuse><specular>0.5 0.5 0.55 1</specular></material></visual>
|
| 567 |
+
</link>
|
| 568 |
+
</model>
|
| 569 |
+
<model name="stool_2">
|
| 570 |
+
<static>true</static>
|
| 571 |
+
<pose>4.4 -3.8 0.45 0 0 0.0000</pose>
|
| 572 |
+
<link name="link">
|
| 573 |
+
<visual name="seat"><geometry><cylinder><radius>0.18</radius><length>0.08</length></cylinder></geometry><material><ambient>0.2 0.2 0.22 1</ambient></material></visual>
|
| 574 |
+
<visual name="leg"><pose>0 0 -0.22 0 0 0</pose><geometry><cylinder><radius>0.04</radius><length>0.45</length></cylinder></geometry><material><ambient>0.5 0.5 0.52 1</ambient><diffuse>0.6 0.6 0.62 1</diffuse><specular>0.5 0.5 0.55 1</specular></material></visual>
|
| 575 |
+
</link>
|
| 576 |
+
</model>
|
| 577 |
+
|
| 578 |
+
<!-- ============================ Doors / windows / art ================= -->
|
| 579 |
+
|
| 580 |
+
<!-- Entry door on the right wall -->
|
| 581 |
+
<model name="door">
|
| 582 |
+
<static>true</static>
|
| 583 |
+
<pose>7.42 -2.25 1.0 0 0 0</pose>
|
| 584 |
+
<link name="link">
|
| 585 |
+
<visual name="leaf">
|
| 586 |
+
<geometry><box><size>0.05 1.0 2.0</size></box></geometry>
|
| 587 |
+
<material>
|
| 588 |
+
<script>
|
| 589 |
+
<uri>file://media/materials/scripts/home.material</uri>
|
| 590 |
+
<uri>file://media/materials/textures</uri>
|
| 591 |
+
<name>Home/WoodPolished</name>
|
| 592 |
+
</script>
|
| 593 |
+
</material>
|
| 594 |
+
</visual>
|
| 595 |
+
<visual name="knob"><pose>-0.04 -0.4 0 0 0 0</pose><geometry><sphere><radius>0.05</radius></sphere></geometry><material><ambient>0.7 0.6 0.2 1</ambient><diffuse>0.8 0.7 0.25 1</diffuse><specular>0.9 0.8 0.4 1</specular></material></visual>
|
| 596 |
+
</link>
|
| 597 |
+
</model>
|
| 598 |
+
|
| 599 |
+
<!-- Windows on the back wall (semi-transparent glass) -->
|
| 600 |
+
<model name="window_1">
|
| 601 |
+
<static>true</static>
|
| 602 |
+
<pose>-1.25 4.92 1.5 0 0 0</pose>
|
| 603 |
+
<link name="link">
|
| 604 |
+
<visual name="glass"><geometry><box><size>1.6 0.05 1.0</size></box></geometry>
|
| 605 |
+
<material><ambient>0.55 0.60 0.62 0.4</ambient><diffuse>0.58 0.63 0.65 0.4</diffuse><specular>0.70 0.75 0.80 0.4</specular></material>
|
| 606 |
+
</visual>
|
| 607 |
+
<visual name="frame_t"><pose>0 0 0.52 0 0 0</pose><geometry><box><size>1.7 0.08 0.08</size></box></geometry><material><ambient>0.9 0.9 0.88 1</ambient></material></visual>
|
| 608 |
+
<visual name="frame_b"><pose>0 0 -0.52 0 0 0</pose><geometry><box><size>1.7 0.08 0.08</size></box></geometry><material><ambient>0.9 0.9 0.88 1</ambient></material></visual>
|
| 609 |
+
<visual name="mullion"><pose>0 0 0 0 0 0</pose><geometry><box><size>0.06 0.06 1.0</size></box></geometry><material><ambient>0.9 0.9 0.88 1</ambient></material></visual>
|
| 610 |
+
</link>
|
| 611 |
+
</model>
|
| 612 |
+
<model name="window_2">
|
| 613 |
+
<static>true</static>
|
| 614 |
+
<pose>1.9 4.92 1.5 0 0 0</pose>
|
| 615 |
+
<link name="link">
|
| 616 |
+
<visual name="glass"><geometry><box><size>1.6 0.05 1.0</size></box></geometry>
|
| 617 |
+
<material><ambient>0.55 0.60 0.62 0.4</ambient><diffuse>0.58 0.63 0.65 0.4</diffuse><specular>0.70 0.75 0.80 0.4</specular></material>
|
| 618 |
+
</visual>
|
| 619 |
+
<visual name="frame_t"><pose>0 0 0.52 0 0 0</pose><geometry><box><size>1.7 0.08 0.08</size></box></geometry><material><ambient>0.9 0.9 0.88 1</ambient></material></visual>
|
| 620 |
+
<visual name="frame_b"><pose>0 0 -0.52 0 0 0</pose><geometry><box><size>1.7 0.08 0.08</size></box></geometry><material><ambient>0.9 0.9 0.88 1</ambient></material></visual>
|
| 621 |
+
<visual name="mullion"><pose>0 0 0 0 0 0</pose><geometry><box><size>0.06 0.06 1.0</size></box></geometry><material><ambient>0.9 0.9 0.88 1</ambient></material></visual>
|
| 622 |
+
</link>
|
| 623 |
+
</model>
|
| 624 |
+
|
| 625 |
+
<!-- Window on the left wall (living-room daylight) -->
|
| 626 |
+
<model name="window_3">
|
| 627 |
+
<static>true</static>
|
| 628 |
+
<pose>-7.42 -2.75 1.5 0 0 0</pose>
|
| 629 |
+
<link name="link">
|
| 630 |
+
<visual name="glass"><geometry><box><size>0.05 1.6 1.0</size></box></geometry>
|
| 631 |
+
<material><ambient>0.55 0.60 0.62 0.4</ambient><diffuse>0.58 0.63 0.65 0.4</diffuse><specular>0.70 0.75 0.80 0.4</specular></material>
|
| 632 |
+
</visual>
|
| 633 |
+
<visual name="frame_t"><pose>0 0 0.52 0 0 0</pose><geometry><box><size>0.08 1.7 0.08</size></box></geometry><material><ambient>0.9 0.9 0.88 1</ambient></material></visual>
|
| 634 |
+
<visual name="frame_b"><pose>0 0 -0.52 0 0 0</pose><geometry><box><size>0.08 1.7 0.08</size></box></geometry><material><ambient>0.9 0.9 0.88 1</ambient></material></visual>
|
| 635 |
+
</link>
|
| 636 |
+
</model>
|
| 637 |
+
|
| 638 |
+
<!-- Wall art flanking the TV (on the brick wall) -->
|
| 639 |
+
<model name="art_1">
|
| 640 |
+
<static>true</static>
|
| 641 |
+
<pose>-1.6 -4.9 1.5 0 0 0</pose>
|
| 642 |
+
<link name="link">
|
| 643 |
+
<visual name="frame"><geometry><box><size>0.9 0.04 0.65</size></box></geometry><material><ambient>0.15 0.12 0.10 1</ambient></material></visual>
|
| 644 |
+
<visual name="canvas"><pose>0 0.005 0 0 0 0</pose><geometry><box><size>0.78 0.04 0.53</size></box></geometry><material><ambient>0.60 0.52 0.42 1</ambient><diffuse>0.63 0.55 0.45 1</diffuse></material></visual>
|
| 645 |
+
</link>
|
| 646 |
+
</model>
|
| 647 |
+
<model name="art_2">
|
| 648 |
+
<static>true</static>
|
| 649 |
+
<pose>-6.5 -4.9 1.5 0 0 0</pose>
|
| 650 |
+
<link name="link">
|
| 651 |
+
<visual name="frame"><geometry><box><size>0.7 0.04 0.9</size></box></geometry><material><ambient>0.15 0.12 0.10 1</ambient></material></visual>
|
| 652 |
+
<visual name="canvas"><pose>0 0.005 0 0 0 0</pose><geometry><box><size>0.58 0.04 0.78</size></box></geometry><material><ambient>0.44 0.46 0.46 1</ambient><diffuse>0.47 0.49 0.49 1</diffuse></material></visual>
|
| 653 |
+
</link>
|
| 654 |
+
</model>
|
| 655 |
+
|
| 656 |
+
<!-- ================== Extra furniture (cosier / more compact) ========= -->
|
| 657 |
+
|
| 658 |
+
<!-- Living-room armchair (faces +x toward the coffee table / room centre) -->
|
| 659 |
+
<model name="armchair">
|
| 660 |
+
<static>true</static>
|
| 661 |
+
<pose>-3.4 -2.3 0.35 0 0 0.0000</pose>
|
| 662 |
+
<link name="link">
|
| 663 |
+
<visual name="base"><geometry><box><size>0.85 0.9 0.35</size></box></geometry>
|
| 664 |
+
<material><ambient>0.44 0.42 0.39 1</ambient><diffuse>0.48 0.46 0.42 1</diffuse><specular>0.03 0.03 0.03 1</specular></material></visual>
|
| 665 |
+
<visual name="back"><pose>-0.36 0 0.32 0 0 0</pose><geometry><box><size>0.14 0.9 0.6</size></box></geometry>
|
| 666 |
+
<material><ambient>0.40 0.38 0.35 1</ambient><diffuse>0.43 0.41 0.38 1</diffuse></material></visual>
|
| 667 |
+
<visual name="arm_l"><pose>0 0.42 0.16 0 0 0</pose><geometry><box><size>0.8 0.14 0.42</size></box></geometry><material><ambient>0.40 0.38 0.35 1</ambient></material></visual>
|
| 668 |
+
<visual name="arm_r"><pose>0 -0.42 0.16 0 0 0</pose><geometry><box><size>0.8 0.14 0.42</size></box></geometry><material><ambient>0.40 0.38 0.35 1</ambient></material></visual>
|
| 669 |
+
<visual name="cushion"><pose>0.05 0 0.24 0 0 0</pose><geometry><box><size>0.66 0.62 0.16</size></box></geometry><material><ambient>0.49 0.47 0.43 1</ambient><diffuse>0.52 0.50 0.46 1</diffuse></material></visual>
|
| 670 |
+
<visual name="pillow"><pose>-0.2 0 0.42 0 0.25 0</pose><geometry><box><size>0.3 0.3 0.12</size></box></geometry><material><ambient>0.56 0.48 0.40 1</ambient><diffuse>0.59 0.51 0.43 1</diffuse></material></visual>
|
| 671 |
+
<collision name="collision"><geometry><box><size>0.85 0.95 0.85</size></box></geometry></collision>
|
| 672 |
+
</link>
|
| 673 |
+
</model>
|
| 674 |
+
|
| 675 |
+
<!-- Side table beside the sofa -->
|
| 676 |
+
<model name="side_table">
|
| 677 |
+
<static>true</static>
|
| 678 |
+
<pose>0 -0.7 0.28 0 0 0.0000</pose>
|
| 679 |
+
<link name="link">
|
| 680 |
+
<visual name="top"><pose>0 0 0.2 0 0 0</pose><geometry><box><size>0.5 0.5 0.06</size></box></geometry>
|
| 681 |
+
<material><script><uri>file://media/materials/scripts/home.material</uri><uri>file://media/materials/textures</uri><name>Home/WoodPolished</name></script></material></visual>
|
| 682 |
+
<visual name="leg_1"><pose>-0.2 -0.2 0 0 0 0</pose><geometry><box><size>0.05 0.05 0.46</size></box></geometry><material><ambient>0.25 0.16 0.09 1</ambient></material></visual>
|
| 683 |
+
<visual name="leg_2"><pose>0.2 -0.2 0 0 0 0</pose><geometry><box><size>0.05 0.05 0.46</size></box></geometry><material><ambient>0.25 0.16 0.09 1</ambient></material></visual>
|
| 684 |
+
<visual name="leg_3"><pose>-0.2 0.2 0 0 0 0</pose><geometry><box><size>0.05 0.05 0.46</size></box></geometry><material><ambient>0.25 0.16 0.09 1</ambient></material></visual>
|
| 685 |
+
<visual name="leg_4"><pose>0.2 0.2 0 0 0 0</pose><geometry><box><size>0.05 0.05 0.46</size></box></geometry><material><ambient>0.25 0.16 0.09 1</ambient></material></visual>
|
| 686 |
+
</link>
|
| 687 |
+
</model>
|
| 688 |
+
|
| 689 |
+
<!-- Second potted plant (living-room front corner) -->
|
| 690 |
+
<model name="plant_living">
|
| 691 |
+
<static>true</static>
|
| 692 |
+
<pose>0.4 -4.3 0 0 0 0.0000</pose>
|
| 693 |
+
<link name="link">
|
| 694 |
+
<visual name="pot"><pose>0 0 0.18 0 0 0</pose><geometry><cylinder><radius>0.2</radius><length>0.36</length></cylinder></geometry><material><ambient>0.40 0.25 0.16 1</ambient><diffuse>0.45 0.28 0.18 1</diffuse></material></visual>
|
| 695 |
+
<visual name="foliage"><pose>0 0 0.75 0 0 0</pose><geometry><sphere><radius>0.38</radius></sphere></geometry><material><ambient>0.24 0.33 0.22 1</ambient><diffuse>0.27 0.36 0.25 1</diffuse></material></visual>
|
| 696 |
+
<visual name="foliage2"><pose>0.1 -0.05 1.0 0 0 0</pose><geometry><sphere><radius>0.26</radius></sphere></geometry><material><ambient>0.26 0.35 0.24 1</ambient><diffuse>0.29 0.38 0.27 1</diffuse></material></visual>
|
| 697 |
+
</link>
|
| 698 |
+
</model>
|
| 699 |
+
|
| 700 |
+
<!-- Dining sideboard / buffet against the back wall -->
|
| 701 |
+
<model name="sideboard">
|
| 702 |
+
<static>true</static>
|
| 703 |
+
<pose>0 4.78 0.45 0 0 0</pose>
|
| 704 |
+
<link name="link">
|
| 705 |
+
<visual name="body"><geometry><box><size>1.6 0.4 0.9</size></box></geometry>
|
| 706 |
+
<material><script><uri>file://media/materials/scripts/home.material</uri><uri>file://media/materials/textures</uri><name>Home/WoodPolished</name></script></material></visual>
|
| 707 |
+
<visual name="handle_1"><pose>-0.4 -0.21 0.05 0 0 0</pose><geometry><box><size>0.18 0.03 0.03</size></box></geometry><material><ambient>0.1 0.1 0.1 1</ambient><specular>0.4 0.4 0.4 1</specular></material></visual>
|
| 708 |
+
<visual name="handle_2"><pose>0.4 -0.21 0.05 0 0 0</pose><geometry><box><size>0.18 0.03 0.03</size></box></geometry><material><ambient>0.1 0.1 0.1 1</ambient><specular>0.4 0.4 0.4 1</specular></material></visual>
|
| 709 |
+
<visual name="vase"><pose>0.45 0 0.55 0 0 0</pose><geometry><cylinder><radius>0.07</radius><length>0.2</length></cylinder></geometry><material><ambient>0.55 0.55 0.58 1</ambient><diffuse>0.6 0.6 0.63 1</diffuse><specular>0.3 0.3 0.32 1</specular></material></visual>
|
| 710 |
+
<collision name="collision"><geometry><box><size>1.6 0.4 0.9</size></box></geometry></collision>
|
| 711 |
+
</link>
|
| 712 |
+
</model>
|
| 713 |
+
|
| 714 |
+
<!-- Bedroom dresser / chest of drawers (faces +x into the room) -->
|
| 715 |
+
<model name="dresser">
|
| 716 |
+
<static>true</static>
|
| 717 |
+
<pose>-2.933 2.608 0.45 0 0 0.0000</pose>
|
| 718 |
+
<link name="link">
|
| 719 |
+
<visual name="body"><geometry><box><size>0.5 1.0 0.9</size></box></geometry>
|
| 720 |
+
<material><script><uri>file://media/materials/scripts/home.material</uri><uri>file://media/materials/textures</uri><name>Home/WoodPolished</name></script></material></visual>
|
| 721 |
+
<visual name="handle_1"><pose>0.26 -0.25 0.2 0 0 0</pose><geometry><box><size>0.03 0.16 0.03</size></box></geometry><material><ambient>0.1 0.1 0.1 1</ambient><specular>0.4 0.4 0.4 1</specular></material></visual>
|
| 722 |
+
<visual name="handle_2"><pose>0.26 0.25 0.2 0 0 0</pose><geometry><box><size>0.03 0.16 0.03</size></box></geometry><material><ambient>0.1 0.1 0.1 1</ambient><specular>0.4 0.4 0.4 1</specular></material></visual>
|
| 723 |
+
<visual name="handle_3"><pose>0.26 -0.25 -0.15 0 0 0</pose><geometry><box><size>0.03 0.16 0.03</size></box></geometry><material><ambient>0.1 0.1 0.1 1</ambient><specular>0.4 0.4 0.4 1</specular></material></visual>
|
| 724 |
+
<visual name="handle_4"><pose>0.26 0.25 -0.15 0 0 0</pose><geometry><box><size>0.03 0.16 0.03</size></box></geometry><material><ambient>0.1 0.1 0.1 1</ambient><specular>0.4 0.4 0.4 1</specular></material></visual>
|
| 725 |
+
<collision name="collision"><geometry><box><size>0.5 1.0 0.9</size></box></geometry></collision>
|
| 726 |
+
</link>
|
| 727 |
+
</model>
|
| 728 |
+
|
| 729 |
+
<!-- Bench at the foot of the bed -->
|
| 730 |
+
<model name="bed_bench">
|
| 731 |
+
<static>true</static>
|
| 732 |
+
<pose>-0.933 2.008 0.22 0 0 0.0000</pose>
|
| 733 |
+
<link name="link">
|
| 734 |
+
<visual name="top"><pose>0 0 0.12 0 0 0</pose><geometry><box><size>1.4 0.4 0.14</size></box></geometry><material><ambient>0.50 0.46 0.40 1</ambient><diffuse>0.54 0.50 0.44 1</diffuse></material></visual>
|
| 735 |
+
<visual name="leg_1"><pose>-0.62 -0.15 -0.05 0 0 0</pose><geometry><box><size>0.06 0.06 0.34</size></box></geometry><material><ambient>0.25 0.16 0.09 1</ambient></material></visual>
|
| 736 |
+
<visual name="leg_2"><pose>0.62 -0.15 -0.05 0 0 0</pose><geometry><box><size>0.06 0.06 0.34</size></box></geometry><material><ambient>0.25 0.16 0.09 1</ambient></material></visual>
|
| 737 |
+
<visual name="leg_3"><pose>-0.62 0.15 -0.05 0 0 0</pose><geometry><box><size>0.06 0.06 0.34</size></box></geometry><material><ambient>0.25 0.16 0.09 1</ambient></material></visual>
|
| 738 |
+
<visual name="leg_4"><pose>0.62 0.15 -0.05 0 0 0</pose><geometry><box><size>0.06 0.06 0.34</size></box></geometry><material><ambient>0.25 0.16 0.09 1</ambient></material></visual>
|
| 739 |
+
</link>
|
| 740 |
+
</model>
|
| 741 |
+
|
| 742 |
+
<!-- Kitchen island (faces the counter; makes the kitchen feel compact) -->
|
| 743 |
+
<model name="kitchen_island">
|
| 744 |
+
<static>true</static>
|
| 745 |
+
<pose>4.8 -2.4 0.45 0 0 0.0000</pose>
|
| 746 |
+
<link name="link">
|
| 747 |
+
<visual name="body"><geometry><box><size>1.6 0.8 0.9</size></box></geometry>
|
| 748 |
+
<material><ambient>0.80 0.78 0.74 1</ambient><diffuse>0.85 0.83 0.79 1</diffuse><specular>0.05 0.05 0.05 1</specular></material></visual>
|
| 749 |
+
<visual name="worktop"><pose>0 0 0.47 0 0 0</pose><geometry><box><size>1.7 0.9 0.05</size></box></geometry>
|
| 750 |
+
<material><script><uri>file://media/materials/scripts/home.material</uri><uri>file://media/materials/textures</uri><name>Home/WoodPolished</name></script></material></visual>
|
| 751 |
+
<collision name="collision"><geometry><box><size>1.6 0.8 0.92</size></box></geometry></collision>
|
| 752 |
+
</link>
|
| 753 |
+
</model>
|
| 754 |
+
|
| 755 |
+
<!-- Bar stool at the island -->
|
| 756 |
+
<model name="island_stool">
|
| 757 |
+
<static>true</static>
|
| 758 |
+
<pose>4.8 -1.5 0.45 0 0 0.0000</pose>
|
| 759 |
+
<link name="link">
|
| 760 |
+
<visual name="seat"><geometry><cylinder><radius>0.18</radius><length>0.08</length></cylinder></geometry><material><ambient>0.2 0.2 0.22 1</ambient></material></visual>
|
| 761 |
+
<visual name="leg"><pose>0 0 -0.22 0 0 0</pose><geometry><cylinder><radius>0.04</radius><length>0.45</length></cylinder></geometry><material><ambient>0.5 0.5 0.52 1</ambient><diffuse>0.6 0.6 0.62 1</diffuse><specular>0.5 0.5 0.55 1</specular></material></visual>
|
| 762 |
+
</link>
|
| 763 |
+
</model>
|
| 764 |
+
|
| 765 |
+
<!-- ============================ Lighting ============================== -->
|
| 766 |
+
<!-- A closed ceiling blocks the exterior sun, so the interior is lit by warm
|
| 767 |
+
ceiling lamps. A single soft, shadowless directional "skylight" fill is
|
| 768 |
+
added on top: it lifts the harsh dark corners the point lamps leave and
|
| 769 |
+
gives every surface a consistent base shade, so the room reads as evenly
|
| 770 |
+
lit daylight rather than a dim cave. The point lamps then layer warm
|
| 771 |
+
pools of light + specular highlights over that base. -->
|
| 772 |
+
<light name="fill_skylight" type="directional">
|
| 773 |
+
<pose>0 0 2.65 0 0 0</pose>
|
| 774 |
+
<direction>-0.25 0.15 -1.0</direction>
|
| 775 |
+
<diffuse>0.34 0.34 0.36 1</diffuse>
|
| 776 |
+
<specular>0.08 0.08 0.09 1</specular>
|
| 777 |
+
<cast_shadows>false</cast_shadows>
|
| 778 |
+
</light>
|
| 779 |
+
|
| 780 |
+
<light name="ceil_light_living" type="point">
|
| 781 |
+
<pose>-4.4 -1.9 2.45 0 0 0</pose>
|
| 782 |
+
<diffuse>0.62 0.56 0.46 1</diffuse>
|
| 783 |
+
<specular>0.28 0.26 0.22 1</specular>
|
| 784 |
+
<attenuation><range>12</range><constant>0.70</constant><linear>0.05</linear><quadratic>0.012</quadratic></attenuation>
|
| 785 |
+
<cast_shadows>true</cast_shadows>
|
| 786 |
+
</light>
|
| 787 |
+
<light name="ceil_light_dining" type="point">
|
| 788 |
+
<pose>-4.5 2.9 2.45 0 0 0</pose>
|
| 789 |
+
<diffuse>0.60 0.54 0.45 1</diffuse>
|
| 790 |
+
<specular>0.26 0.24 0.20 1</specular>
|
| 791 |
+
<attenuation><range>11</range><constant>0.70</constant><linear>0.05</linear><quadratic>0.012</quadratic></attenuation>
|
| 792 |
+
<cast_shadows>false</cast_shadows>
|
| 793 |
+
</light>
|
| 794 |
+
<light name="ceil_light_bedroom" type="point">
|
| 795 |
+
<pose>4.8 3.2 2.45 0 0 0</pose>
|
| 796 |
+
<diffuse>0.58 0.53 0.45 1</diffuse>
|
| 797 |
+
<specular>0.26 0.24 0.20 1</specular>
|
| 798 |
+
<attenuation><range>12</range><constant>0.70</constant><linear>0.05</linear><quadratic>0.012</quadratic></attenuation>
|
| 799 |
+
<cast_shadows>true</cast_shadows>
|
| 800 |
+
</light>
|
| 801 |
+
<light name="ceil_light_kitchen" type="point">
|
| 802 |
+
<pose>4.0 -3.1 2.45 0 0 0</pose>
|
| 803 |
+
<diffuse>0.62 0.58 0.50 1</diffuse>
|
| 804 |
+
<specular>0.30 0.28 0.24 1</specular>
|
| 805 |
+
<attenuation><range>11</range><constant>0.70</constant><linear>0.05</linear><quadratic>0.012</quadratic></attenuation>
|
| 806 |
+
<cast_shadows>false</cast_shadows>
|
| 807 |
+
</light>
|
| 808 |
+
|
| 809 |
+
<scene>
|
| 810 |
+
<ambient>0.36 0.35 0.33 1</ambient>
|
| 811 |
+
<background>0.70 0.74 0.78 1</background>
|
| 812 |
+
<shadows>true</shadows>
|
| 813 |
+
</scene>
|
| 814 |
+
|
| 815 |
+
<!-- Take off against the left wall, in the empty strip between the floor
|
| 816 |
+
lamp and the bookshelf: nothing obstructs the view, and from here
|
| 817 |
+
(high, yaw=0 facing +x) the drone looks straight down the long axis
|
| 818 |
+
and overlooks the whole apartment before starting its tour. -->
|
| 819 |
+
<include>
|
| 820 |
+
<uri>model://simple_drone</uri>
|
| 821 |
+
<pose>-7.0 0.6 1.8 0 0 0</pose>
|
| 822 |
+
</include>
|
| 823 |
+
|
| 824 |
+
</world>
|
| 825 |
+
</sdf>
|
simulation_environment.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4d7a452feb812d822d4470ea55080cf7e87fbef706fcde040946e6e6215a86f4
|
| 3 |
+
size 2234252
|
simulation_environment.tar.gz.sha256
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:29f2cfdfef2796aeb4e726833cce00aea72c5fcf9c149396b8a821d748d378a9
|
| 3 |
+
size 96
|