now that tests all pass we lower it. starts failing between 0.07 and
0.08, which is solidly below the noise floor on real systems
and other small fixes
Purpose: define, pinpoint and fix basic internal consistency issues.
TECS should be able to handle this case (zero noise or model mismatch)
almost perfectly.
Some of them fail currently, will come up with fixes afterwards.
The model has 2 states (airspeed, height) and 2 inputs (throttle and
pitch). The dynamics correspond exactly to the model assumed in TECS and
the pitch input applies immediately without any inner dynamics.
This model is simulated at 50Hz, and the test harness allows changing
tecs parameters, and airspeed / altitude setpoints. It also records the
maximum airspeed error over each simulation run.
- wrong and off equal to simulator_mavlink implementation
- but wrong is over timescale of 10s rather than 1s by default to
make it harder for innovation check to flag (closer to icing)
- stuck will just keep the last value before injecting the failure
The logger rework grows text slightly, pushing the already
flash-constrained zenoh variant over budget. Drop a handful of
optional features to recover the needed headroom:
- osd_msp_osd (MSP OSD, niche)
- actuator_test (bench diagnostic)
- fw_autotune_attitude_control / mc_autotune_attitude_control
(tuning can be done on a default build)
Replace the old SDLOG_DIRS_MAX=3 + larger-buffer override with the
new rotation-based tuning: SDLOG_MAX_SIZE=40 caps each log file at
40 MB so a handful of recent logs fit, and SDLOG_ROTATE=95 lets logs
fill up to 95% of the 128 MB volume.
Also set COM_ARM_SDCARD=0 (no SD on this board) and
SYS_DM_BACKEND=1 so missions are stored in RAM.
Replace the old SDLOG_DIRS_MAX=3 + larger-buffer override with the
new rotation-based tuning: SDLOG_MAX_SIZE=40 caps each log file at
40 MB so a handful of recent logs fit, and SDLOG_ROTATE=95 lets logs
fill up to 95% of the 128 MB volume.
Drop the BOARD_SMALL_FLASH_LOGGING define from board_config.h; the
logger no longer keys off a per-board compile flag.
The kakuteh7mini ships with a W25N01GV (1Gbit/128MB) SPI NAND flash on
SPI1, but the board init was treating SPI1 as an MMC/SD slot and the
W25N driver was not enabled. Enable the chip and use it for logging:
- spi.cpp: register the device as SPIDEV_FLASH(0) instead of SPIDEV_MMCSD(0)
- init.c: initialize the W25N MTD driver, register /dev/mtd0, mount
littlefs at /fs/flash with autoformat, and print the flash geometry
on boot for verification.
- nuttx defconfig: enable CONFIG_MTD_W25N, CONFIG_FS_LITTLEFS,
SPI1 DMA + DMAMUX1, drop the unused RAMTRON config.
- board_dma_map.h: define DMAMAP_SPI1_RX/TX for the SPI1 DMA channels.
- default.px4board: set CONFIG_BOARD_ROOT_PATH to /fs/flash.
- rc.board_defaults: drop the SDLOG_BACKEND=0 override that was
disabling logging entirely, drop COM_ARM_SDCARD (no SD card), and
tune SDLOG_MAX_SIZE=40 / SDLOG_ROTATE=95 to keep a few recent logs
in the 128 MB flash.
Add an NSH command to format a device with littlefs, analogous to
mkfatfs for FAT filesystems. The command unmounts the mount point,
then remounts with forceformat to format and mount in one step.
Enable the command on boards that use littlefs as primary storage
(airbrainh743 and kakuteh7v2), and document it in the airbrainh743
flight controller page as a recovery procedure for a corrupted
flash filesystem.
Usage: mklittlefs /dev/mtd0 /fs/flash
Make the logger practical on small flash storage (e.g. 128 MB W25N
NAND) while keeping the existing SD-card behaviour sensible.
- Move cleanup from boot to log start so logs can be downloaded via
MAVLink FTP before deletion.
- Delete individual .ulg files (oldest first) instead of whole
directories, prioritising the naming scheme not currently in use
(session dirs vs date dirs).
- Add SDLOG_MAX_SIZE (new, default 1024 MB): maximum size of a single
log file. When reached, the log rotates to a new file. The value is
also reserved as headroom in the cleanup threshold.
- Add SDLOG_ROTATE (new, default 90): maximum disk usage percentage.
Cleanup guarantees (100 - SDLOG_ROTATE)% free at all times, even
during writing of a new log file. 0 disables space-based cleanup,
100 allows filling the disk.
- Repurpose SDLOG_DIRS_MAX as an orthogonal directory-count cap
(default 0 = disabled). Useful for capping log usage by count
independent of disk size, e.g. in SITL.
- Drop the implicit ~300 MB free-space floor that used to fire even
with SDLOG_DIRS_MAX=0; space is now governed entirely by
SDLOG_ROTATE + SDLOG_MAX_SIZE.
- Split pure parsing helpers into util_parse.{h,cpp} and add unit
tests (loggerUtilTest.cpp).
- Simplify get_log_time to rely on clock_gettime (set by the GPS
driver); safer string handling in directory parsing.
- Reset _total_written in LogFileBuffer::reset() so callers reading
get_total_written() between stop and start don't see stale counts.
Sponsored by CubePilot.
These fire when clang-tidy analyzes a header whose including TU is not
in the active compile_commands.json (e.g. board-specific NuttX headers
against the SITL clang build), producing spurious line-anchored review
comments on every new-board PR. Real missing includes are caught by the
build_all_targets matrix, which fails the build loudly. Filter the
class of finding at the producer so it never reaches the poster.
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
Pushes to stable/beta/release/** only move when a release is cut, and
that release was already built by the matching v* tag push moments
earlier. The subsequent branch push reruns the arm64+amd64 matrix
(~8 min) to produce the identical image digest. Registry push is
already gated on refs/tags/, so the second run is pure waste.
Drop those branches from on.push; keep main (regular development
pushes) and the v* tag trigger (the authoritative release trigger).
workflow_dispatch remains available for manual rebuilds.
Fixes#27170
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
compile_ubuntu.yml is a PR-focused Ubuntu container smoke check. On
stable, beta, and release/** branches it duplicates build_all_targets.yml,
which already covers those branches with the full board matrix and the
S3 uploads. Drop stable, beta, and release/** from the push branch list
so it matches the trigger pattern used by compile_macos.yml, checks.yml,
and clang-tidy.yml.
Fixes#27171
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
* docs(sim_sih): link Hawkeye visualizer, add stub page
Replaces jMAVSim display-only mode references in the SIH page with Hawkeye,
which is purpose-built for this role and actively maintained. The 3D
visualization section now covers the hawkeye command, the port alignment
with SIH (UDP 19410), and links out to the full Hawkeye documentation.
Adds a short sim_hawkeye/index.md stub covering what Hawkeye is, install
on macOS and Linux, and basic SIH usage. Everything else (multi-vehicle,
ULog replay, HUD modes, CLI reference) lives at px4.github.io/Hawkeye
and is linked from the stub, so PX4 docs don't carry the maintenance
burden of two parallel sources.
Also updates the port reference table: UDP 19410 is now labeled
"Hawkeye visualizer" instead of "jMAVSim display-only", and adds the
page to SUMMARY.md nested under SIH Simulation.
* docs(update): subedit
---------
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
fuseDirectStateMeasurement() ends with a call to constrainStateVariances(),
which iterates every state and, for any whose variance has grown past its
limit, calls fuseDirectStateMeasurement() again to apply a corrective
fuse. That inner call then runs its own constrainStateVariances(),
repeating the loop.
Call chain:
fuseDirectStateMeasurement ekf_helper.cpp:1030
`- constrainStateVariances ekf_helper.cpp:1085
`- constrainStateVar covariance.cpp:290
`- fuseDirectStateMeasurement covariance.cpp:302
`- constrainStateVariances (recursion)
`- ...
Under normal operation the P(i,i) > max branch is rarely taken and the
recursion stays shallow, however, while doing unrelated overnight testing
we saw a hard-fault with TCB corruption, presumably due to a stack overflow.
The trace pointed to fuseDirectStateMeasurement where Claude detected
the recursive call.
This fix breaks the recursion by gating the constrainStateVariances()
call on a new parameter, defaulting to true for existing callers.
constrainStateVar() passes false when it re-enters the fuse from the
constraint path, capping the worst-case recursion depth at 2.
The px4-gazebo .deb already declares OpenCV and gstreamer core library
deps via dpkg-shlibdeps, but Dockerfile.gazebo uses dpkg -x which
bypasses resolution. Switch to apt install ./px4-gazebo_*.deb so Depends
are resolved automatically.
Add the 5 gstreamer plugin packages (plugins-base/good/bad/ugly/libav)
to CPACK_DEBIAN_PACKAGE_DEPENDS since they're loaded at runtime via
gst_element_factory_make() and cannot be detected by shlibdeps.
Apply the same apt-install pattern to Dockerfile.sih so both images
build consistently.
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
* fix(zenoh) : zenoh_subscirber / zenoh_publisher: print() method checks if key expression exists before printing
* fix(zenoh) : added cleanupSession method, called when setup steps fail and when module is closing
Update safety.md, remote_id.md, and releases/main.md to document the extended COM_ARM_ODID parameter and the new in-flight failsafe behaviour that will be introduced in PX4 v1.18.
Extend COM_ARM_ODID into a unified arming + in-flight failsafe parameter (0 = Disabled, 1 = Warning, 2 = Return, 3 = Land, 4 = Terminate)
Values >= 2 block arming and trigger the configured action if Remote ID
is lost while airborne.
PIDTest never exercised the D path with a non-zero gain, which let the
sign error fixed in #27140 slip through. Add a D-only test that asserts
the output opposes a known feedback ramp.
Fails on main, passes with #27140.