* refactor(navigator): removed geofence breach avoidance library
- was disabled by default as an experimental feature
- is too unpredictable given that it commands reposition points, which could
be arbitrarily close to objects
- does not work well in space constrained scenarios
Signed-off-by: RomanBapst <bapstroman@gmail.com>
* fix(docs): removed reference to GF_PREDICT
Signed-off-by: RomanBapst <bapstroman@gmail.com>
* style(navigator): fix formatting
* docs(safety): add minimal guidelines on how to strictly avoid geofence breaches
* docs(safety): slightly simplify wording
* docs(safety): revert typo
* docs(docs): Tweak
---------
Signed-off-by: RomanBapst <bapstroman@gmail.com>
Co-authored-by: Balduin <balduin@auterion.com>
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
Replace static fops member with platform-defined fops_ref() accessor to avoid
bugprone-dynamic-static-initializers warning.
Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
* fix(fw_mode_manager/navigator): use the correct switch distance
Before https://github.com/PX4/PX4-Autopilot/pull/24056, the fixed-wing
position controller used to publish the acceptance radius (calculated
depending on params and state by DirectionalGuidance::switchDistance) in
the position controller status.
The refactor migrated that to individual lateral/longitudinal topics,
but left the receiving code in the navigator unchanged. As a
consequence, fixed-wing vehicles now rely on NAV_ACC_RAD for the
acceptance radius, rather than the adaptively calculated switchDistance.
As NAV_ACC_RAD is only 10m by default this leads to overshoot,
especially on tight corners.
Fix by reintroducing the publication (now from FixedWingModeManager
through fixed_wing_lateral_guidance_status) and using it in navigator.
* fix(navigator_main): only listen to position controller status if rover
rover_ackermann is the only remaining publisher after #24056
* style(msg): improve field description
- @INVALID NaN
- Describe relation with NAV_ACC_RAD
* style(fw_mode_manager): remove stale include
* docs(navigator): clarify acceptance logic in param description
* feat(fw_perf_model): warn in max bank infeasible due to empty airspeed range
* style(fw_perf_model): refer explicitly to max airspeed param
and only implicitly to max bank, so users will be inclined to adjust the
former.
* docs(fw-tuning): add section on roll compensation and effect on airspeed limits
* docs(fw-tuning): fix LaTeX
- wrap text in \text{} so it does not render as if it were variable
names
- fix incorrect double escaping which made \sqrt{} and \frac{} not
render
- replace \over with \frac - the latter is nicer and handles more edge
cases
* docs(fw-tuning): fix typo
In the above equation (supposed to be rearranged) there is only C_L, no C_D.
* docs(fw-tuning): correct mistake
only stall and min airspeed are load factor (due to bank) compensated in
the performance model, not trim.
DO_REPOSITION with the CHANGE_MODE flag clear (param2=0) is valid per the
MAVLink spec -- "reposition without forcing a mode change" -- but Commander
acked UNSUPPORTED for it while the navigator still applied the setpoint
whenever armed, so an armed vehicle in Hold moved despite the UNSUPPORTED ack.
Commander now acks by mode: CHANGE_MODE set switches to Hold (or stays in
Course) and acks ACCEPTED/TEMPORARILY_REJECTED; param2=0 in Hold acks ACCEPTED;
otherwise DENIED. It never returns UNSUPPORTED.
The navigator now only applies the reposition setpoint when armed and either
CHANGE_MODE was requested or it is already in Hold, so it no longer leaves a
stale setpoint that a later switch into Hold could execute -- realizing the
intent of the 2023 change (bec0d83), which only ever touched the ack.
QGC and MAVSDK always set CHANGE_MODE, so their behavior is unchanged.
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
The path globs matched a large fraction of the tree (e.g.
src/modules/*_control/**, src/modules/sensors/**), so the label was
applied to many PRs that aren't meaningfully safety-critical. Remove the
rule so the label is applied manually during review instead.
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
* fix(navigator): honor NAV_LAND mission item abort altitude (param1)
A NAV_CMD_LAND mission item's param1 (minimum abort altitude above the
landing point) was parsed and dropped with a long-standing TODO, so an
aborted landing always climbed to the global MIS_LND_ABRT_ALT regardless
of the per-item value.
Carry param1 in the otherwise-unused time_inside field on upload, and in
do_abort_landing() use it as the climb-above-landing-point height when
set (> 0), falling back to MIS_LND_ABRT_ALT otherwise. The value also now
round-trips on mission download. Items without a specified abort altitude
(param1 = 0), including missions stored by older firmware, keep using the
parameter default.
Fixes#27290
Signed-off-by: Andrii Anoshyn <anoshyn.andrii@gmail.com>
* fix(navigator): clarify land abort altitude storage
---------
Signed-off-by: Andrii Anoshyn <anoshyn.andrii@gmail.com>
MAV_CMD_CONDITION_DELAY was accepted on upload but mapped to a nav_cmd
(112) that no navigator code recognizes, so the mission feasibility check
rejected it ("unsupported cmd") and its delay was never executed. PX4
already implements an identical seconds-hold via NAV_CMD_DELAY, whose
duration comes from param1 (params[0], aliasing time_inside). Map
CONDITION_DELAY to NAV_CMD_DELAY at parse time so the requested hold is
honored, reusing the existing, tested delay execution and feasibility
logic.
Fixes#27289
Signed-off-by: Andrii Anoshyn <anoshyn.andrii@gmail.com>
* feat(boards): add support for AEDROXH7 flight controller
STM32H743-based FPV / racing flight controller from AEDROX.
Brings up:
- ICM-42688-P IMU on SPI2
- DPS310 baro on internal I2C2
- W25N NAND flash on SPI3 with littlefs at /fs/flash
- MAX7456 analog OSD on SPI1
- 8 motor outputs (TIM1 + TIM8) all bidirectional-DShot capable
- CAN1
- External I2C1 connector for compass / sensors
- 6 UARTs (TEL1, GPS1, RC, TEL2, ESC telemetry, debug console on UART8),
- Two user GPIOs on the M5-M8 connector, VTX power and camera-switch GPIOs,
buzzer on PA7 (active-buzzer transistor low-side switch), battery V/I sensing
via ADC1.
Board ID 1198 shared with ArduPilot's AP_HW_AEDROXH7 entry.
USB enumerates as 0x16D0:0x14FE with VENDORSTR "AEDROX".
Signed-off-by: Julian Oes <julian@oes.ch>
* docs(docs): Minor subedit
---------
Signed-off-by: Julian Oes <julian@oes.ch>
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
* feat(boards): add CBUnmanned H753-Stamp flight controller
* Update board_id to 1302
* docs: update CBUnmanned H753-Stamp board docs
Apply review feedback: correct the I2C bus count (add internal bus),
clarify SPI (IMUs on a dedicated internal bus), note the debug console
alongside the user UARTs, and describe how the board is powered from an
external 5 V supply with separate battery voltage sensing.
Add the pinout image and a PWM Outputs section.
Signed-off-by: Julian Oes <julian@oes.ch>
* refactor(boards): rename CBUnmanned H753-Stamp to H753-SOM
Rename the board directory, build target (cbunmanned_h753-som), USB
product strings, docs page, asset directory and pinout image, and the
bundled bootloader binary from -Stamp to -SOM. The hardware is a
System-on-Module, so SOM is the accurate name.
Signed-off-by: Julian Oes <julian@oes.ch>
---------
Signed-off-by: Julian Oes <julian@oes.ch>
* src/drivers/cdcacm_autostart: Include posix.h for px4_close
Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
* platforms/nuttx/CMakeLists.txt: Fix linking of nuttx libaries for memalign
This fixes memalign not found in linking step for some boards
Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
* Add "flock" to macos.sh setup script
"flock" is not standard on macOS, and a dependency was missing from the
macOS setup path.
Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
* Fix clang-tidy errors in Bitset.hpp and in src/lib/matrix
Fix the "bugprone-dynamic-static-initializers" linter errors.
Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
* systemlib/hardfault_log: Fix clang-diagnostics error
Fix for
"[error] clang-diagnostic-error [error]
use of undeclared identifier XCPTCONTEXT_REGS".
XCPTCONTEXT_REGS is defined in nuttx irq.h, so include that.
Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
* uORB: Fix clang-tidy error "bugprone-dynamic-static-initializers"
Fix the clang-tidy error appearing on uORBManager _Instance variable by
adding a getter for the reference to the _Instance and using that instead.
Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
* CI: Add default ubuntu mirrors as fallback
In case of specified aws mirror doesn't have the package idicated by the
metadata, a the default ubuntu mirror as a backup.
Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
---------
Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
math::expo_deadzone generates ~240bytes of code for 32-bit arm
platform, and it gets currently inlined several times.
Localizing the function in Sticks.cpp saves ~2KB of flash, measured
on px4_fmu-v5_default target.
Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
GCC13 does aggresive optimizations that causes a RWW violation.
Causing the bootloader to crash while updating.
Add compiler arguements to reduce optimizations fixing the issue.