Add bg park postitions. Closes #18

This commit is contained in:
osiu97
2026-07-08 22:03:59 +02:00
parent 4924e1b4e3
commit 40ff0ca913
5 changed files with 99 additions and 19 deletions
+16 -4
View File
@@ -46,6 +46,7 @@ This file tells the web UI where your letters/targets are located in **physical
```json
{
"hasAlphabet": true,
"parkPosition": { "x": 0, "y": 80 },
"bounds": {
"xMin": -150,
"xMax": 150,
@@ -60,9 +61,20 @@ This file tells the web UI where your letters/targets are located in **physical
}
```
- **hasAlphabet**: (Optional, boolean) If `true`, this background is used for the "Input Text" feature. The letters in `spots` are used to spell out typed input.
- **parkPosition**: (Optional, object) Defines a background-specific "Park Position" or resting spot where the arm can go when not actively in use. If omitted, defaults to `{ "x": 0, "y": 0 }`.
- **bounds**: Defines the physical bounding box (in mm) that your background image represents. This automatically adjusts the UI's aspect ratio and coordinate mapping!
- **spots**: Array of target objects.
- **id**: Unique identifier for the dropdown list.
- **label**: Human-readable text shown on the UI.
- **x**: The X coordinate in physical mm (`-150` to `+150`).
- **y**: The Y coordinate in physical mm (`-30` to `+145`).
- **id**: Unique identifier for the dropdown list.
- **label**: Human-readable text shown on the UI.
- **x**: The X coordinate in physical mm (`-150` to `+150`).
- **y**: The Y coordinate in physical mm (`-30` to `+145`).
## 5. Excluded Zones (No-Go Zones)
When defining spots or the `parkPosition`, you **must avoid** the central mechanism housing. The SCARA arm will reject commands that enter this region to prevent mechanical collisions.
The exact exclusion box (the "No-Go Zone") is:
- **X Range:** `-30` mm to `+30` mm
- **Y Range:** `-10` mm to `+40` mm
Make sure that your `parkPosition` and all clickable spots lie outside this rectangle.