Commit Graph

28 Commits

Author SHA1 Message Date
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 a326a758c4
Make the thermal camera's frame rate hold on the wire
Setting Framerate_Hz while grabbing only thinned out what the SDK handed over;
the camera went on sending 10 fps (and 50 from power-up). Set while the grab
is stopped, once the stream has run, it holds. So the grab is restarted with
the rate set when the first frame is in, and the packet rate of the camera's
port is counted: if it still carries more than 1.5x the rate's frames, the
restart is repeated (up to three times). On tower 111: 5.3 fps, 2 224 packets
a second instead of 22 234, on the second attempt; system load 18 % down from
about 29 %.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 20:21:49 +02:00
Peter Bochmann ff89643a4f
Run the thermal camera's NUC while the gimbal moves
The camera recalibrated against its shutter every 30 s and sent no frame for
about 0.7 s meanwhile: a picture falling into that had no thermal image (0.8 %
on tower 111, the 30 s rhythm shown by the new gap logging). The program now
switches the camera's timer off and runs the NUC itself (NUC_Perform, which
returns when it is done) when a move starts and nuc_interval_s (30) has passed,
or after twice that with no move. The scheduler tells the cameras of every move
(ICameraSource::moving), and a picture waits up to 1 s for a camera between
frames (frameReady) rather than go without it. The camera's own timer goes
back on exit; nuc_interval_s = 0 leaves it alone.

Measured on tower 111 before writing it: NUC_Interval = 0 gave 70 s without a
gap; NUC_Perform ran three NUCs of 657-677 ms; NUC_INPROGRESS never changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 19:02:20 +02:00
Peter Bochmann 474e3cac8a
Fix what the thermal camera's first run on tower 111 showed
- The thermal frame was numbered camera 0 - label RGB, and the colour file of
  the same time overwritten - because Vimba counts no camera before open().
  The composite now takes each source's configured camera count, and two
  enabled cameras may no longer share a label.
- The SDK switches LC_NUMERIC to de_DE when loaded, which made "hotx":0,4336.
  Its calls now run under a guard that restores the locale, and the JSON's
  numbers no longer go through printf.
- The camera's frame counter is always 0: new frames are told by their time,
  so the stream no longer stops after the first one.
- The LUT is empty for the first frame: it is asked again on later ones.
- The SDK is libirbgrab_x86_64-linux.so in the ld cache.
- The null channel traces the CamEvent payload it would have sent.

Tested on tower 111 with the TarisIR mini, the motors mocked: cap_net_raw is
enough, RGB/TIR pairs with one timestamp, the TIR file decodes to the counts
its CamEvent describes, profile switches 0-1-0. 536/536 in the 22.04 container.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 21:01:33 +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 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 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 f2c61e030e
Let a yaw-only tower aim with gimbal move, and stop it publishing a made-up pitch 2026-09-29 19:50:39 +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 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 f4e67666d8
Give the tower three modes, auto, pan and manual, switched by command 2026-09-25 17:50:48 +02:00
pgdalmeida d8d2fee8af
Test the camera with forced dark and bright settings, and recover a camera that stops sending frames 2026-09-24 17:35:37 +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 e8293f736d
Record that tower 111 comes back by itself after a reboot 2026-09-24 15:06:10 +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 53fa96fb54
Start the program at boot through fgc, so the dashboard still works 2026-09-23 22:39:18 +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 86f930a671
Add a one-shot test command and a tool that edits the config files safely 2026-09-23 18:52:44 +02:00
pgdalmeida 4049a85b9b
Check the firmware was built with the pins hardware.ini lists 2026-09-23 18:26:14 +02:00
pgdalmeida fd1df9e93a
Say where the log is in the guides an operator actually reads 2026-09-22 18:18:54 +02:00
pgdalmeida 7ef2abcd4a
Have the setup kit work out the centre a geared-up rig needs 2026-09-21 23:07:44 +02:00
pgdalmeida 816242725a
Add the handshake bring-up runbook (plus the mock/test changes) 2026-09-18 17:36:19 +02:00
pgdalmeida 6f88b00856
Write the drivetrain block at install, since the firmware now demands it 2026-09-18 17:06:34 +02:00
pgdalmeida 2191a9d8cb
Record the resolved yaw homing and the hand-written drivetrain block 2026-09-18 13:19:32 +02:00
pgdalmeida 649d0979cf
Record the verified install results and the /tmp hardware.ini trap 2026-09-16 18:38:11 +02:00
pgdalmeida 9b232c3f60
Add a from-scratch tower installation guide with phased bring-up 2026-09-16 18:27:51 +02:00