Commit Graph

34 Commits

Author SHA1 Message Date
Peter Bochmann fff437c13c
Let a tower choose its camera's auto-exposure target: --target
The Alvium recipe sets no IntensityControllerTarget, so a camera kept its
default of 50 %, which burns out the sky over a dark forest; staeffelsberg's
colour camera runs at 20 (set by hand in the Viewer), rietschen's Manta at
30. export_camera_profile.py --target <percent> now sets it for either
family (IntensityControllerTarget, or ExposureAutoTarget on a Manta). Without
the option nothing changes. For podrosche, whose migration plans 20 %.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 14:08:35 +01:00
Peter Bochmann 44b8a2e84a
Read the Manta's 12 bits: BayerRG12Packed, packed the GigE Vision 1.x way
Rietschen's RGB camera switched to 12 bits offers BayerRG12Packed, not
BayerRG12p, and the program took it for an unknown format: from 2026-10-26
11:33 every picture was saved as "legacy", undebayered raw bytes. The two
are not the same format under two names. Both put two pixels in three
bytes, but the GigE Vision 1.x packing carries the first pixel's high bits
in the first byte, where GenICam's 12p carries its low ones; read as 12p
every other pixel is scrambled.

BayerRG12Packed is now a layout of its own, unpacked and sampled for
brightness its own way and de-Bayered like 12p. Checked against the
hardware on rietschen's NIR camera (Mono12Packed, the same packing): the
12-bit frame unpacked this way differs from an 8-bit frame of the same view
by 2.8 on average, unpacked as 12p by 29. The gige recipe prefers
BayerRG12Packed, so a re-export keeps the 12 bits. Tests 544/544 (mock).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 11:46:32 +01:00
Peter Bochmann df11808d78
Aim the Mantas at 30 %: at 35 the sky was still too bright
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 12:59:50 +02:00
Peter Bochmann 7332c47d6d
Judge the keep rule against the camera's own target, and aim Mantas at 35 %
configureSettle() read the camera's auto-exposure target, tolerance and
limits before the camera was opened, so it got none of them and judged every
frame against its 50 +- 5 % default until the first profile switch - on
every tower. It now runs again once the camera is open. On the Alviums this
brings their own IntensityControllerTolerance and, at night, the at-limit
verdict from their chunk data into play.

The gige recipe aims at 35 % instead of 50: at 50 the sky over the horizon
burnt out at noon on rietschen, where smoke would rise. The old program ran
these cameras at 23-25. Tests 542/542 (mock).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 12:40:44 +02:00
Peter Bochmann c62d8270b3
Let a Manta aim at the frame mean the keep rule waits for
Rietschen's RGB camera came with ExposureAutoAlg = FitRange and a 10 %
tolerance. FitRange fits the histogram wherever the mean lands, and the
camera stopped adjusting 10 % off its target, so the keep rule's 50 +- 5 %
band was never reached: at a 3 s interval every waypoint ran into its 2 s
frame_timeout (2026-10-21). The gige recipe now sets Mean and 5 %, as the
NIR camera already had. By day the exposure floor goes from 200 to 20 us:
at noon the camera sat at 200-600 us with no room to darken a bright view,
and without chunk data the host cannot tell a camera at its limit from one
still settling.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 12:03:08 +02:00
Peter Bochmann fdb3c50b68
Run a Manta at its frame-rate limit, and wait for a DHT11's first reading
A free-running Manta runs at AcquisitionFrameRateAbs, not at its limit:
rietschen's RGB camera came set to 0.955 fps and delivered 5 frames in 5.2 s.
The gige recipe now writes a short fixed exposure and then the rate, clamped
to the camera's maximum (4.7 fps at 60 MB/s), before auto-exposure goes back
on. The export summary shows the rate set, not the limit, which had read
4.71 fps for a camera running at 0.96.

test hardware env asked for a DHT11 reading at once, but the firmware reads
it every 10 s, the first time 2 s after it starts. install-tower --verify
failed on rietschen 1.4 s into its run, 36 s after the same test had passed.
It now waits one read period for the first reading. Tests 542/542 (mock).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 17:54:52 +02:00
Peter Bochmann 8850337250
Support the older GigE cameras (Manta) on rietschen
Rietschen has three Manta G-1236 on one GbE port, whose firmware predates the
names the program uses. A feature missing by its SFNC name is now looked up by
the older one (ExposureTimeAbs, AcquisitionFrameRateAbs, ExposureAutoTarget,
ExposureAutoAdjustTol), so test camera, the telemetry and the keep rule's
reads work. export_camera_profile.py picks a gige recipe for such a camera:
frame trigger off, BayerRG8 or Mono8, 60 MB/s, auto-exposure target 50 %.
At the cameras' old target of 25 every waypoint ran into frame_timeout_ms.

The camera probe now lists every camera. With several, the hardware.ini kit
writes CHOOSE_ONE, install-tower asks which is the colour one, and the profile
export is given that id - the first one the SDK lists was the NIR camera.
install-tower names the unit that holds the motor port instead of assuming
start_gimbal.service.

Tested on rietschen's NIR camera with the motor mocked, beside the running old
program: test camera PASS, a snapshot as a 3008x4112 grey JXL, a scan keeping
a picture every 5 s. Tests 542/542 (mock build). The colour camera is not yet
tested; the old program has it open.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 17:13:04 +02:00
Peter Bochmann 3d90af8490
Take a thermal picture beside the colour one at every waypoint
A TarisIR mini (driver = taris) is a second camera source behind a
CompositeCameraSource: the colour camera is asked first, then the thermal one
for its newest frame, and both frames carry the colour frame's timestamp.
Counts are saved 16-bit lossless under TIR/, and the CamEvent gains cal,
missed, tmax, tmed, hotx and hoty (docs/mqtt-api.md). The SDK is declared in
IrbgrabApi.h and loaded with dlopen, so no SDK file is in the repository; a
missing or unreachable camera stays offline (Health cams_offline) while the
scan goes on. scripts/fgc-setcap gives the binary cap_net_raw after a build.

Built and tested in an Ubuntu 22.04 container (mock, MQTT, Vimba+MQTT,
534/534), plus a mock run with RGB/TIR pairs. Not yet run against the camera.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 20:37:25 +02:00
pgdalmeida 7609207e30
Set a short exposure before the frame rate when exporting a camera profile, so the camera allows its full frame rate 2026-10-07 14:52:03 +02:00
pgdalmeida ce6ef3f79a
Keep each tower's config, scan grid and camera profiles in ~/.config/fire_gimbal_control, out of a deploy's reach 2026-10-05 22:02:49 +02:00
pgdalmeida cfd8ba9978
Save raw 12-bit camera frames as 12-bit colour images, keep a waypoint's picture once the image has settled, and hold the scan when saving falls behind 2026-10-05 10:14:53 +02:00
pgdalmeida 4488a2181d
Set in config.ini whether the tower homes and which mode it starts in, instead of the --init and --start flags 2026-09-30 16:42:48 +02:00
pgdalmeida ab9fa3dbb0
Let a tower set its encoder scale, and send no speed after a failed homing 2026-09-28 18:21:37 +02:00
pgdalmeida 049c0c5f0e
Turn the camera's frame trigger off in both profiles, so a legacy tower's camera sends pictures 2026-09-28 17:45:32 +02:00
pgdalmeida dd1764dc99
Show the build's progress during an install, and drop the centre-count note where it does not apply 2026-09-28 17:34:15 +02:00
pgdalmeida 5bfc558435
Keep a log of every install, and stop the kit dying on a LattePanda-branded Leonardo 2026-09-28 17:20:38 +02:00
pgdalmeida 44f8d3b0dd
Say the homing step takes one picture and stays in manual 2026-09-28 16:51:48 +02:00
pgdalmeida 2d2b498ff2
Find a legacy tower's Leonardo and its old launcher, and refuse to install while the old program holds the port 2026-09-28 16:36:41 +02:00
pgdalmeida 4b73199e8e
Leave a newly installed tower in manual: home at boot, capture only after auto is chosen 2026-09-28 16:20:39 +02:00
pgdalmeida da9a9867ed
Add a one-file tower bootstrap and a legacy-tower survey, and use an SDK already installed 2026-09-28 16:14:26 +02:00
pgdalmeida 8d81e03a3f
Support the legacy towers' DHT11 and fan, and fix the installer's reflash and test steps 2026-09-28 14:43:05 +02:00
pgdalmeida 740eb1bd00
Stop the program cleanly on a service stop, and leave the gimbal at rest before configuring its motors 2026-09-25 23:21:26 +02:00
pgdalmeida 5a0515ab13
Test that the camera delivers frames and follows its settings to black and white 2026-09-24 15:47:58 +02:00
pgdalmeida 91cc8af915
Rewrite the running and installing guides for how towers are set up now 2026-09-24 14:59:04 +02:00
pgdalmeida 08c749ca06
Finish migrating tower 111, and check only the pins hardware.ini declares 2026-09-24 09:52:14 +02:00
pgdalmeida 6824a0d580
Migrate tower 111's host, and resume capture after a test instead of leaving it stopped 2026-09-24 09:01:05 +02:00
pgdalmeida 53fa96fb54
Start the program at boot through fgc, so the dashboard still works 2026-09-23 22:39:18 +02:00
pgdalmeida 12b071c668
Add a setup kit for Delta towers, and stop the installer overwriting camera profiles 2026-09-23 21:29:57 +02:00
pgdalmeida 32ea820877
Add an installer that sets up a tower from scratch or repairs one 2026-09-23 21:15:00 +02:00
pgdalmeida 2c7c62ace1
Add the LattePanda IOTA setup kit and headless camera profile export 2026-09-16 18:27:39 +02:00
pgdalmeida 1a572cb074
Changed heading logic; added snapshot feature 2026-09-11 17:42:01 +02:00
pgdalmeida 7db8d2092a
Quitting the TUI now asks whether to shut down or detach 2026-09-02 13:36:50 +02:00
pgdalmeida 4bc5e762e7
Added terminal attachment/detachment 2026-08-07 17:35:32 +02:00
pgdalmeida f1005f3e31
Add unit tests, deployment scripts, and refreshed docs 2026-06-22 13:07:03 +02:00