Document kamaz MOZA telemetry integration

This commit is contained in:
Codex qore 2026-05-26 21:47:50 +03:00
parent 508337f852
commit 41248b974d
7 changed files with 146 additions and 3 deletions

View file

@ -33,3 +33,13 @@ The user worked with an open Blender KAMAZ 5360 model and asked the agent to pre
- Current tuned values and reconstruction notes are in `projects/garage/kamaz5360-chaos-vehicle.md`.
- Global solved problem entry: `problems/2026-05-26-ue57-chaos-vehicle-blender-wheel-suspension.md`.
- Reusable pipeline skill: `skills/unreal-chaos-vehicle-blender-pipeline.md`.
## Later 2026-05-26 Hardware/Telemetry Integration
- The standalone `C:\git\kamaz5360` project received a copied `MOZAVehicleInput` plugin and minimal MOZA SDK from `C:\git\Kamaz_Cleaner`.
- Default control is MOZA hardware; `F9` toggles between MOZA and keyboard fallback.
- Keyboard driving input is gated off in MOZA mode; MOZA writes are gated off in keyboard mode.
- A lightweight C++ telemetry server was added. Dashboard URL: `http://127.0.0.1:8765/dashboard`; JSON URL: `http://127.0.0.1:8765/api/telemetry`.
- Buzina/CAN joystick docs, tools, firmware source, RawInput config, and a passive Unreal component were copied from `C:\git\joystick`. It is not yet connected to plow control.
- PIE initially crashed because UE 5.7 `HTTPServer` asserts when binding `FHttpPath(TEXT("/"))`; the dashboard route was changed to `/dashboard`.
- Detailed notes are now appended to `projects/garage/kamaz5360-chaos-vehicle.md`; reusable crash note: `problems/2026-05-26-ue57-httpserver-root-route-crash.md`.

View file

@ -0,0 +1,57 @@
# UE 5.7 HTTPServer Crashes PIE When Binding Root Route
Date: 2026-05-26
Project: `garage` / `kamaz5360`
Environment: Unreal Engine 5.7, Windows `qore`
## Symptoms
- The editor opened normally.
- Pressing Play / PIE crashed immediately.
- The crash happened after adding a lightweight C++ HTTP telemetry server.
## Crash Signature
Crash log excerpt:
```text
Assertion failed: HttpPath.IsValidPath()
File: Engine\Source\Runtime\Online\HTTPServer\Private\HttpRouter.cpp
```
The failing route was:
```cpp
Router->BindRoute(FHttpPath(TEXT("/")), EHttpServerRequestVerbs::VERB_GET, Handler);
```
## Root Cause
In UE 5.7, `FHttpPath::IsValidPath()` returns `false` for root `/` because `IsRoot()` is treated as invalid for route binding. `FHttpRouter::BindRoute` uses `check(HttpPath.IsValidPath())`, so PIE asserts instead of returning a recoverable error.
## Verified Solution
Do not bind `/` with `HTTPServer`. Use a non-root route:
```cpp
Router->BindRoute(
FHttpPath(TEXT("/dashboard")),
EHttpServerRequestVerbs::VERB_GET,
FHttpRequestHandler::CreateUObject(this, &UMyServer::HandleDashboard));
Router->BindRoute(
FHttpPath(TEXT("/api/telemetry")),
EHttpServerRequestVerbs::VERB_GET,
FHttpRequestHandler::CreateUObject(this, &UMyServer::HandleTelemetry));
```
For `kamaz5360`, the working URLs are:
- `http://127.0.0.1:8765/dashboard`
- `http://127.0.0.1:8765/api/telemetry`
## Avoid
- Do not assume the root path is safe because most web frameworks allow it.
- Do not leave HTTP route registration untested until the user presses Play.
- If a route must behave like a landing page, bind `/dashboard`, `/index`, or `/ui` and document the URL.

View file

@ -21,3 +21,4 @@ Current entries:
- `2026-05-25-depthai-poe-pipeline-switch-crash.md`
- `2026-05-26-ue57-chaos-vehicle-blender-wheel-suspension.md`
- `2026-05-26-ndi-sources-hidden-by-vpn-interface-priority.md`
- `2026-05-26-ue57-httpserver-root-route-crash.md`

View file

@ -484,3 +484,13 @@
- Verified: `pump` LAN VNC `5900` returned RFB `003.008`; `wuu` LAN SSH `22` returned OpenSSH banner and VNC `5900` returned RFB `003.008`; `qore@192.168.1.66` SSH login worked; `git ls-remote` worked for `StereoWallND.git` and `Kamaz_Cleaner.git`; `git push --dry-run` to `Kamaz_Cleaner.git` `refs/heads/connectivity-test/qore` succeeded.
- Not verified: `pump` LAN SSH because TCP `22` timed out; `wuu` SSH login because key login failed in batch mode and no password was requested; full VNC login because the user-held password was not entered.
- Next handoff: Fix or re-test `pump` LAN SSH, set up key access or interactive credential testing for `wuu`, and run real VNC login checks with the user present.
## 2026-05-26 - kamaz5360 MOZA, Telemetry, And Buzina Prep
- Machine: `qore`.
- Agent: Codex.
- Summary: Added the first hardware-control integration pass to `C:\git\kamaz5360`: copied `MOZAVehicleInput` and minimal MOZA SDK from `C:\git\Kamaz_Cleaner`, added F9 switching between default MOZA control and keyboard fallback, added a lightweight HTTP telemetry dashboard/API, and copied Buzina/CAN joystick docs/tools/firmware plus a passive RawInput component from `C:\git\joystick`.
- Files changed in project: `kamaz5360.uproject`, `.gitignore`, `Config\DefaultInput.ini`, `Source\kamaz5360\kamaz5360.Build.cs`, `Source\kamaz5360\kamaz5360Pawn.*`, `Source\kamaz5360\KamazTruck\KamazTruckPawn.*`, new `KamazTelemetryWebServerComponent.*`, new `KamazBuzinaJoystickComponent.*`, `Plugins\MOZAVehicleInput`, `MOZA_SDK`, and `External\BuzinaJoystick`.
- Verified: Unreal build succeeds with UE 5.7; PIE crash from binding HTTP root `/` was diagnosed and fixed by moving the dashboard to `/dashboard`.
- Runtime URLs: `http://127.0.0.1:8765/dashboard` and `http://127.0.0.1:8765/api/telemetry`.
- Next handoff: Test with physical MOZA hardware; when the Buzina controller is wired, connect the passive component to plow/brush controls instead of guessing the gameplay mapping.

View file

@ -305,6 +305,70 @@ Canvas->DrawItem(MirrorTile);
The regular on-screen vehicle UI was removed from the main viewport by not adding `VehicleUI` to the viewport in `kamaz5360PlayerController.cpp`. Speed/gear should not appear on external or driver cameras; telemetry should be on `KamDash`.
## MOZA, Keyboard Fallback, Telemetry, And Buzina Joystick
As of 2026-05-26, `C:\git\kamaz5360` also includes the first hardware-control integration pass copied from `C:\git\Kamaz_Cleaner` and `C:\git\joystick`.
Repository additions:
- `Plugins\MOZAVehicleInput` copied from `C:\git\Kamaz_Cleaner\Plugins\MOZAVehicleInput`, without generated `Binaries`, `Intermediate`, or `Saved`.
- `MOZA_SDK\1.0.1.8\MSVC2022-64` with the minimal `include`, `lib`, and `bin` payload needed by the plugin.
- `External\BuzinaJoystick` with CAN joystick docs, tools, firmware source, and launcher scripts copied from `C:\git\joystick`; do not commit `.pio`, `__pycache__`, or `.pyc`.
- `Source\kamaz5360\KamazTruck\KamazBuzinaJoystickComponent.*`
- `Source\kamaz5360\KamazTruck\KamazTelemetryWebServerComponent.*`
Project/plugin settings:
- `kamaz5360.uproject` enables `MOZAVehicleInput`.
- `Source\kamaz5360\kamaz5360.Build.cs` depends on `HTTPServer`, `Json`, and `MOZAVehicleInput`.
- `Config\DefaultInput.ini` adds RawInput configuration for the Buzina Teensy HID device `VID 0x16C0`, `PID 0x0488`.
Runtime behavior:
- Default driving input is MOZA hardware.
- Press `F9` to switch between MOZA and keyboard control.
- In MOZA mode, keyboard throttle/brake/steering/handbrake are gated off.
- In keyboard mode, MOZA writes are gated off and Chaos automatic gears are restored.
- `F8` camera cycling remains unchanged.
Transmission details:
- The KAMAZ Chaos transmission keeps the current 9 forward ratios.
- The copied MOZA shifter mapping was adjusted so AB9 raw gears `1..7` map through, raw `8` is neutral, and reverse remains `-1`.
- Do not reduce the Chaos KAMAZ gear count to match the physical shifter gate without explicit user approval.
Telemetry HTTP server:
- After PIE starts, open `http://127.0.0.1:8765/dashboard`.
- JSON is available at `http://127.0.0.1:8765/api/telemetry`.
- JSON includes speed in km/h, signed speed, RPM, current/target gear, grounded state, and input mode.
- UE 5.7 `HTTPServer` asserts if code binds the root route `/` because `FHttpPath::IsRoot()` makes `IsValidPath()` false. Use `/dashboard` or another non-root path.
Buzina/CAN joystick state:
- The Unreal component currently samples RawInput axes/buttons and stores state only.
- It is intentionally not connected to the snowplow yet.
- The source project documents CAN at `250 kbit/s` with extended 29-bit IDs:
- `0x0CFDD603`: joystick X/Y/buttons.
- `0x0CFDD703`: density/width/asymmetry.
- Use `External\BuzinaJoystick\run_buzina_debug_monitor.ps1` for standalone diagnostics before wiring gameplay.
Build command after this integration:
```powershell
& "C:\Program Files\Epic Games\UE_5.7\Engine\Build\BatchFiles\Build.bat" `
kamaz5360Editor Win64 Development `
-Project="C:\git\kamaz5360\kamaz5360.uproject" `
-WaitMutex -NoHotReloadFromIDE
```
Known PIE crash fixed during integration:
- Symptom: project opened, but crashed immediately when pressing Play.
- Crash log: `Assertion failed: HttpPath.IsValidPath()` in `HttpRouter.cpp`.
- Cause: binding `FHttpPath(TEXT("/"))` in `UKamazTelemetryWebServerComponent::BeginPlay`.
- Fix: bind the dashboard to `/dashboard`, keep `/api/telemetry` for JSON.
## NDI Network Discovery Notes
If `KamDash` / `KamMirrLeft` / `KamMirrRight` do not appear in NDI receivers, first inspect the Unreal log:

View file

@ -29,7 +29,7 @@
| Kamaz_Cleaner-qore-wuu-smb | Unreal Engine Kamaz cleaner/snow-removal simulator working tree visible from `wuu` over SMB | `\\qore\C\git\Kamaz_Cleaner` | `ssh://qore@192.168.1.66/srv/git/Kamaz_Cleaner.git` | `main` | root `AGENTS.md` present; many untracked files visible from `wuu` |
| StereoWallND | Unreal Engine nDisplay stereo wall, projection calibration, telemetry dashboard | `/srv/git/StereoWallND.git` on `192.168.1.66` | preferred: `ssh://<qore|wuu|pump>@192.168.1.66:22/srv/git/StereoWallND.git`; legacy direct: `ssh://airM1@192.168.1.66/srv/git/StereoWallND.git` | `main` | inventoried, bare repo; use machine identity via `192.168.1.66:22` for garage computers |
| Kamaz_Cleaner | Unreal Engine Kamaz cleaner/snow-removal simulator work | `/srv/git/Kamaz_Cleaner.git` on `192.168.1.66` | preferred: `ssh://<qore|wuu|pump>@192.168.1.66:22/srv/git/Kamaz_Cleaner.git`; legacy direct: `ssh://airM1@192.168.1.66/srv/git/Kamaz_Cleaner.git` | `main` | inventoried, bare repo; use machine identity via `192.168.1.66:22` for garage computers |
| kamaz5360-qore | standalone Unreal 5.7 KAMAZ 5360 Chaos Vehicle prototype with Blender-derived skeletal mesh, tuned suspension, runtime cameras, and NDI dashboard/mirror outputs | `C:\git\kamaz5360` on `qore` | `ssh://qore@192.168.1.66/srv/git/kamaz5360.git` | `master` | current local rollback point `пустой камаз`: commit `09f492d Add right NDI mirror output`, tag `empty-kamaz`; earlier remote push failed on 2026-05-26 because `192.168.1.66:22` timed out |
| kamaz5360-qore | standalone Unreal 5.7 KAMAZ 5360 Chaos Vehicle prototype with Blender-derived skeletal mesh, tuned suspension, runtime cameras, NDI dashboard/mirror outputs, MOZA input, HTTP telemetry, and Buzina joystick preparation | `C:\git\kamaz5360` on `qore` | `ssh://qore@192.168.1.66/srv/git/kamaz5360.git` | `master` | rollback point `пустой камаз`: commit `09f492d Add right NDI mirror output`, tag `empty-kamaz`; later 2026-05-26 local work adds MOZA/F9/telemetry/Buzina integration and should be pushed after commit |
| garage-simulator | future simulator implementation repository | not selected | not created | not selected | planned |
## Topology
@ -43,7 +43,7 @@ No repository should be merged, reset, or deleted until the overlapping copies a
## Integration Points
- `agent-knowledge-base` stores project state, technical specification, decisions, handoffs, and reusable knowledge.
- `kamaz5360-qore` is the current standalone UE 5.7 KAMAZ Chaos Vehicle reconstruction/prototype. Use `projects/garage/kamaz5360-chaos-vehicle.md` as the handoff recipe before editing or reimporting.
- `kamaz5360-qore` is the current standalone UE 5.7 KAMAZ Chaos Vehicle reconstruction/prototype. Use `projects/garage/kamaz5360-chaos-vehicle.md` as the handoff recipe before editing, reimporting, changing input hardware, or modifying telemetry.
- `Kamaz_Cleaner` contains existing Unreal Engine Kamaz cleaner/snow-removal simulator work, truck assets, snow-clearing work, NDI/Spout/nDisplay plugins, MOZA-related input work, and automation helper scripts.
- `StereoWallND` contains Unreal Engine 5.7 nDisplay stereo wall, projector calibration, curved-screen correction, telemetry backend/frontend, and projection calibration tooling.
- `ProjectionMapping-wuu` contains DirectX12 projector calibration and curved-screen mapping work, including Kinect/USB camera experiments and captured calibration attempts. It is directly relevant to projector warping/calibration, but it is not the main simulator.

View file

@ -7,6 +7,7 @@ Build and finish the garage auto-simulator setup by consolidating scattered proj
## Current State
- 2026-05-26 `qore` KAMAZ 5360 Chaos Vehicle prototype: `C:\git\kamaz5360` now contains a working Unreal 5.7 standalone KAMAZ truck setup with cleaned Blender-derived skeletal mesh, automatic PhysicsAsset import, four Chaos wheels, measured wheel radius `53.78 cm`, mass `9500 kg`, ZF 9S1310-like gear ratios, working wheel rotation/steering, and tuned suspension/brake dive. Reconstruction notes are in `projects/garage/kamaz5360-chaos-vehicle.md`; reusable issue record is `problems/2026-05-26-ue57-chaos-vehicle-blender-wheel-suspension.md`.
- 2026-05-26 `qore` KAMAZ 5360 hardware integration pass: `C:\git\kamaz5360` now has the copied `MOZAVehicleInput` plugin and minimal MOZA SDK from `C:\git\Kamaz_Cleaner`, F9 switching between default MOZA control and keyboard fallback, an HTTP telemetry page at `http://127.0.0.1:8765/dashboard`, JSON at `/api/telemetry`, and Buzina/CAN joystick docs/tools/component copied from `C:\git\joystick` for later plow control. A PIE crash from binding UE `HTTPServer` route `/` was fixed by moving the dashboard to `/dashboard`; see `problems/2026-05-26-ue57-httpserver-root-route-crash.md`.
- 2026-05-26 `qore` local KAMAZ repo: `C:\git\kamaz5360` was initialized as git and committed at `449d72e Initial Kamaz Chaos vehicle setup`. Remote is configured as `ssh://qore@192.168.1.66/srv/git/kamaz5360.git`, but push failed from this session because `192.168.1.66:22` timed out. Retry when the local Git server is reachable or create the bare repo if it does not exist.
- 2026-05-24 19:14 MSK LAN-only check from `wuu`: SSH to `pump` `192.168.1.39:22` and `qore` `192.168.1.126:22` times out; VNC `5900` on both machines is open and returns `RFB 003.008`; full VNC login still needs the user-held password. `wuu@192.168.1.66` SSH works, `StereoWallND.git` and `Kamaz_Cleaner.git` read over SSH, and `git push --dry-run` to `Kamaz_Cleaner.git` branch `connectivity-test/wuu` succeeds.
- 2026-05-24 19:14 MSK `wuu` local VNC capability: `192.168.1.192:5900` returns RFB `003.008` from TightVNC application-mode server. A LAN VNC client can view/control the screen with the user-held password, but this Codex session itself has no native VNC viewer/control channel; use screenshots or a local screenshot workflow for visual feedback inside Codex.
@ -105,7 +106,7 @@ The first useful version should probably be a small playable prototype:
## Next Actions
- When `192.168.1.66:22` is reachable from `qore`, create/verify `/srv/git/kamaz5360.git` and push `C:\git\kamaz5360` commit `449d72e`.
- Keep `C:\git\kamaz5360` pushed to `ssh://qore@192.168.1.66/srv/git/kamaz5360.git` after each confirmed working milestone.
- Future KAMAZ vehicle agents should start from `projects/garage/kamaz5360-chaos-vehicle.md` before changing Blender export, UE import, PhysicsAsset, wheel, or suspension settings.
- Copy the prompts from `projects/garage/agent-prompts.md` into local Codex sessions on `qore` and `wuu` for the next elevated setup pass.
- Keep `pump` GitHub SSH access verified and continue pushing knowledge-base updates promptly after meaningful work.