This commit is contained in:
spencerfolk
2023-03-15 15:38:14 -04:00
commit 4d7fca10e4
62 changed files with 5891 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
{
"bounds": {"extents": [20, 50, 5, 35, -0.5, 10]},
"blocks": [
{"extents": [20, 21, 15, 25, -0.5, 10], "color": [0, 1, 0]},
{"extents": [21, 22, 15.25, 24.75, -0.5, 10], "color": [0, 1, 0]},
{"extents": [22, 23, 15.50, 24.50, -0.5, 10], "color": [0, 1, 0]},
{"extents": [23, 24, 16, 24, -0.5, 10], "color": [0, 1, 0]},
{"extents": [24, 25, 17, 23, -0.5, 10], "color": [0, 1, 0]}
]
}

23
rotorpy/worlds/README.md Normal file
View File

@@ -0,0 +1,23 @@
# World Module
Worlds are used to represent obstacles in the map. Maps are implemented as `.json` files using the following structure:
The world bounds are defined by the "bounds" key:
```
{
"bounds": {"extents": [xmin, xmax, ymin, ymax, zmin, zmax]},
```
Obstacles are defined using cuboids. The cuboids are defined as follows:
```
"blocks": [
{"extents": [xmin, xmax, ymin, ymax, zmin, zmax], "color": [R, G, B]},
...
]
}
```
where the "color" value is a specified by RGB values between 0 and 1. As an example:
```
{"extents": [0, 1, -3, 2, 0, 10], "color": [0, 1, 0]}
```
will create a box with corners (0,-3,0), (0, 2,0), (0,-3,10), (0,2,10), (1,-3,0), (1,2,0), (1,-3,10), (1,2,10). In other words, a box that has LWH dimensions (1m)x(5m)x(10m). The `[0,1,0]` label indicates it will be rendered in green.

View File

View File

@@ -0,0 +1,8 @@
{
"bounds": {"extents": [-7.5, 7.5, -10, 10, -0.5, 3]},
"blocks": [
{"extents": [-1.25, -1, -0.125, 0.125, -0.5, 3.0], "color": [0, 1, 0]},
{"extents": [1, 1.25, -0.125, 0.125, -0.5, 3.0], "color": [1, 0, 0]},
{"extents": [-0.5, 0.5, -1.5, 1.5, -0.5, 3.0], "color": [0, 0, 1]}
]
}

View File

@@ -0,0 +1,7 @@
{
"bounds": {"extents": [-3.5, 3.5, -5, 5, -0.5, 3]},
"blocks": [
{"extents": [-1.25, -1, -0.125, 0.125, -0.5, 3.0], "color": [0, 1, 0]},
{"extents": [1, 1.25, -0.125, 0.125, -0.5, 3.0], "color": [1, 0, 0]}
]
}

View File

@@ -0,0 +1,17 @@
{
"bounds": {"extents": [0, 4.5, 0, 6.5, 0, 3.0]},
"blocks": [
{"extents": [0.0, 0.5, 0.0, 0.5, 0, 3.0], "color": [1, 0, 0]},
{"extents": [0.0, 0.5, 2.0, 2.5, 0, 3.0], "color": [1, 0, 0]},
{"extents": [0.0, 0.5, 4.0, 4.5, 0, 3.0], "color": [1, 0, 0]},
{"extents": [0.0, 0.5, 6.0, 6.5, 0, 3.0], "color": [1, 0, 0]},
{"extents": [2.0, 2.5, 0.0, 0.5, 0, 3.0], "color": [1, 0, 0]},
{"extents": [2.0, 2.5, 2.0, 2.5, 0, 3.0], "color": [1, 0, 0]},
{"extents": [2.0, 2.5, 4.0, 4.5, 0, 3.0], "color": [1, 0, 0]},
{"extents": [2.0, 2.5, 6.0, 6.5, 0, 3.0], "color": [1, 0, 0]},
{"extents": [4.0, 4.5, 0.0, 0.5, 0, 3.0], "color": [1, 0, 0]},
{"extents": [4.0, 4.5, 2.0, 2.5, 0, 3.0], "color": [1, 0, 0]},
{"extents": [4.0, 4.5, 4.0, 4.5, 0, 3.0], "color": [1, 0, 0]},
{"extents": [4.0, 4.5, 6.0, 6.5, 0, 3.0], "color": [1, 0, 0]}
]
}

View File

@@ -0,0 +1,6 @@
{
"bounds": {"extents": [-10, 10, -10, 10, -0.5, 3]},
"blocks": [
{"extents": [-1, -0.75, -0.125, 0.125, -0.5, 3.0], "color": [0, 1, 0]}
]
}