- Rename remaining Hex/HEX/ProfiCNC references to CubePilot, including
page file names (old pages redirect).
- Use the CubePilot spelling consistently.
- Remove the note on the Cube Black page advising against it for
standards and patent reasons.
Assisted-by: Claude:claude-opus-5-5
Each NuttX library and the apps are built by a make invocation that
ninja treats as a single opaque custom command, so they compiled one
file at a time.
Run them through a wrapper that honours a job count given to the
toplevel build (e.g. `make px4_fmu-v5x_default -j1`), which reaches it
through MAKEFLAGS, and otherwise uses the number of CPUs available to
the process. Unlike CMake's logical core count, nproc respects docker
--cpuset-cpus. A load limit keeps the concurrently running NuttX makes
from oversubscribing the host.
Mark the toplevel cmake build recipe as a sub-make with '+'. GNU make
before 4.4 (e.g. Ubuntu 22.04/24.04) passes its jobserver as pipe file
descriptors, which it otherwise closes for that recipe, leaving the
NuttX makes to fall back to serial builds.
Mention how to disable parallel builds in the docker docs.
Assisted-by: Claude Code (claude-opus-5-5)
The DEFINE_PARAMETERS example used member names that make check_format now rejects, and the convention itself was never written down.
Assisted-by: Claude:claude-opus-5-5
Replaying about 150 logs found false positives only on standard VTOLs
after a quad-chute, with the tilt error above 60° for up to 1.75 s
while recovering from fixed-wing flight in multicopter mode.
All VTOL types switch to multicopter without back-transition on a
quad-chute, detected or commanded, and when a front transition is
aborted. The check now pauses for 5 s after such a switch instead of
raising the threshold for all VTOLs, so it protects the rest of the
multicopter flight.
The tilt check compares against the attitude setpoint, which the
omnicopter publishes and tracks at any orientation, including upside
down. Disabling the check is no longer needed for it to fly.
The tilt check limits the error from the attitude setpoint, which the
FD_FAIL_R name no longer describes. FD_FAIL_R becomes FD_TILT_ERROR,
now a float, and FD_FAIL_R_TTRI becomes FD_TILT_ERROR_T.
The old roll and pitch limits and trigger times meant something else,
so they start at the new defaults instead of being taken over. Only a
check disabled for both roll and pitch stays disabled, as -1.
Checking the absolute tilt from level conflicts with the vehicle's own
tilt limits: the threshold can be set below the maximum tilt, and
external modes that tilt further than the autopilot's limits trip the
check, so they can't benefit from its crash detection.
Compare the tilt with the attitude setpoint's tilt instead, falling back
to level without a recent setpoint, e.g. on rovers. Before arming the
setpoint is level, so a vehicle lying on its side still can't arm. The
tailsitter transition exception is no longer needed because the
transition setpoint is in the multicopter frame. The default trigger
time goes from 0.3 s to 1 s so that fixed-wing stick reversals, which
pass through a large error at a limited roll rate, don't trigger it.
Also reset the tilt hysteresis while attitude control is off, so a
pending trigger from before e.g. Acro can't skip the trigger time when
attitude control comes back on.
Checking roll and pitch against separate limits misses a combined
tilt: 45° roll with 45° pitch is a 60° tilt but stays below both
default 60° limits. Euler angles are also unreliable near 90° pitch
and when inverted.
FD_FAIL_R and FD_FAIL_R_TTRI now set the maximum tilt and its trigger
time. FD_FAIL_P and FD_FAIL_P_TTRI are removed without migration
(see the Upgrade Guide). The check is disabled with -1; 0 still
disables it for existing setups. In FailureDetectorStatus, fd_roll
and fd_pitch are replaced by fd_tilt.
When the battery estimate did not reach Home, type 6 took the closest
rally point even when it was farther away than Home. Return compares
destinations only by straight-line distance, so it has no reason to
prefer a rally point that is farther away than Home, and return.md says
type 6 falls back to Home unless a rally point is closer. Returns
started by the distance-aware battery failsafe hit this case.
Compare the rally points with the distance to Home, as type 6 already
does without a battery estimate.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: jonas <jonspero@me.com>
* fix(failsafe): allow GNSS loss to recover during the Hold delay
A GNSS failure that clears during the COM_FAIL_ACT_T Hold still latched
Return or Land, because COM_GNSSLOSS_ACT uses the OnModeChangeOrDisarm
clear condition. The vehicle then abandoned a mission it could have
continued.
If the failure clears while the vehicle is still holding, the action is
dropped and the user-intended mode continues, e.g. the mission resumes.
Once Return or Land has started, it stays latched as before. With
COM_FAIL_ACT_T=0 there is no Hold, so nothing changes.
Assisted-by: Claude:claude-opus-5-5
* fix(failsafe): restart the Hold delay after a failure clears during it
When a failsafe cleared during its Hold delay, the remaining delay kept
counting down. A new failure within that time did not reload it and only
got what was left, so it could Return almost without a Hold.
Reset the delay once no failsafe is pending, so that the next failure
gets the full COM_FAIL_ACT_T again. This applies to every failsafe.
Repeated failures still escalate: the start delay shrinks while a Hold
is active and refills at a quarter of that rate.
Assisted-by: Claude:claude-opus-5-5
* revert(failsafe): keep the remaining Hold delay after a failure clears
This reverts commit 5e9a8e8a14.
Restarting the delay for every new failure changed how a flapping
condition is handled, for every failsafe and not only GNSS. Without the
reset, a failure that comes back keeps the delay left over from the
previous one, so the action still fires on time. With it, only the start
delay escalation limits the flapping, which can take much longer, or
never fire if the condition is active less than a fifth of the time.
Keep the PR scoped to letting GNSS loss recover during the Hold.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Andrea Bernasconi <andrea.bernasconi@auterion.com>
* fix(failsafe): only clear GNSS loss during the Hold delay before Return starts
_current_delay is shared between failsafes. If another failsafe with a
delay is added on the same update as GNSS recovers, it re-arms the delay
and the GNSS Return or Land that was already running got removed.
Also require that the selected action is not beyond Hold yet.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Andrea Bernasconi <andrea.bernasconi@auterion.com>
---------
Signed-off-by: Andrea Bernasconi <andrea.bernasconi@auterion.com>
Co-authored-by: Anil Kircaliali <anil.kircaliali@auterion.com>
* Add new board "accton_godwit gfh7"
* Adjust the spacing.
* docs(boards/accton-godwit): Add support for the accton-godwit_gfh7 flight controller documentations.
* docs(boards): align Accton Godwit GFH7 page with board template
Bring the new GFH7 page in line with the flight controller page
template and the board's own configuration, so readers can wire and
set up the board from it:
- Fix image paths (all images were broken) and resize/compress the
images; split the tall wiring diagram into two.
- Use PX4 port labels and /dev/ttyS* devices in the serial port table
instead of ArduPilot SERIALn numbering, matching default.px4board.
- State 8 PWM outputs (PWM9 only drives NeoPixel LEDs), with DShot,
bidirectional DShot and timer groups.
- Explain how to enable CRSF/ELRS on the ELRS connector, since only
S.BUS is started by default.
- Add the standard notes and missing sections (Power, CAN, OSD, SD
card, debug port), the _default build target and QGC tip.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
* add voltage description.
* modify doc description about UART、pinout.
* modified UART settings
* modified UART device description
* docs(boards/accton-godwit): tidy GFH7 voltage ratings section
Give the section its own heading and anchor, name the battery input after the VBAT pins, and drop the battery ratings that contradict each other (48V maximum vs 12S, and an undamaged range below the operating range) until the manufacturer confirms the values.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
* docs(boards/accton-godwit): note GFH7 ships with PX4 bootloader
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
* Modify these messages:
1.RCDGV pad group.
2.Voltage Ratings info.
* modified message:
1. UART port description
2. Telemetry Radios description
* docs(boards/accton-godwit): match GFH7 page to the new serial port labels
#28817 moves the PX4 RC port to the SBUS connector (UART5), labels the
ELRS connector (UART4) TELEM/SERIAL 4 and the receive-only ESC telemetry
UART (USART1) EXT2, and fixes the 12 V enable polarity. Update the radio,
serial port mapping, power and debug build notes to match.
Assisted-by: Kiro:claude-opus-5.5
* chore(boards/accton-godwit): drop GFH7 board files from the docs branch
The board port is reviewed and updated in #28817. The copies here had
already drifted from it (for example TEL3 on /dev/ttyS7, which does not
exist), so keep this pull request to the documentation only.
Assisted-by: Kiro:claude-opus-5.5
* docs(boards/accton-godwit): document the GFH7 ELRS default and IMU heater
#28817 makes CRSF/ELRS on the ELRS connector the default RC input, turns
S.BUS off by default, and adds the IMU heater (off by default). Update
the radio, serial port mapping and debug build notes to match, and add
an IMU Heater section that explains how to enable it.
Assisted-by: Kiro:claude-opus-5.5
* docs(boards/accton-godwit): add GFH7 block diagram
Review on #28830 asked for a block diagram of the main components
(sensors, power supply), as required by the board support guide.
Assisted-by: Kiro:claude-opus-5.5
Signed-off-by: g945643frankie <g945643@oz.nthu.edu.tw>
* docs(boards/accton-godwit): note GFH7 boots in Stabilized mode
The board sets COM_FLTMODE_BOOT to Stabilized instead of the PX4
default of Hold, so users should know which mode they get on power-up
and that a mode switch overrides it.
Assisted-by: Kiro:claude-opus-5.5
Signed-off-by: g945643frankie <g945643@oz.nthu.edu.tw>
* docs(boards/accton-godwit): fix GFH7 debug port tables
* docs(boards/accton-godwit): list GFH7 OSD debug pads in board order
* docs(accton-godwit_gfh7): reference QGC board recognition PR in tip
Point the Building Firmware tip at mavlink/qgroundcontrol#15212 so it is accurate until QGC recognises GFH7.
* docs(boards/accton-godwit): fix GFH7 review issues
The block diagram named the wrong secondary IMU, the firmware tip linked
a QGC PR that was closed unmerged, and the S.BUS pin on the D-VTX
connector (shown in the pinout) was undocumented. Also tidy the
telemetry and debug port sections to the style guide.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
* docs(boards/accton-godwit): clarify GFH7 voltage ratings and label SBUS connector
Describe the 13V figure as the minimum for the 12V camera/VTX rail instead of a tested operating minimum, drop the unmeasured USB operational range, and relabel the UART5 connector in the block diagram as SBUS.
Signed-off-by: g945643frankie <g945643@oz.nthu.edu.tw>
* docs(boards): reorder Accton Godwit GFH7 page to match board template
Match the flight controller page template so the page reads like other
board pages, and keep the images in a folder named after the page.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
* docs(boards): tidy Accton Godwit GFH7 page and add release note
Address the remaining editorial review findings so the page matches the
board template and other board pages, and list the new board in the
release notes.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
* docs(boards): rename to G-FH7 and address review questions
Rename the reader-facing board name from GFH7 to G-FH7 in the board
page, sidebar, manufacturer list, and main release notes.
State the battery input as up to 12S LiPo, note that the IMU heater
current is calculated from the resistor value (not measured), correct
the UART5 wiring for the SBUS and A-VTX connectors, and link the
IST8310 datasheet.
Signed-off-by: g945643frankie <g945643@oz.nthu.edu.tw>
* docs(boards): update G-FH7 pin definition image
Replace the pinout with the updated drawing that labels UART5_TX on the
A-VTX connector and UART5_TX/UART5_RX on the SBUS connector.
Signed-off-by: g945643frankie <g945643@oz.nthu.edu.tw>
* docs(boards): tidy G-FH7 UART5 wording and block diagram battery label
Put the S.BUS setup line first in the SBUS receiver bullet, so "To use
it" refers to the receiver rather than the A-VTX TX pin, and shorten the
UART5 serial table cell and the duplicated heater current note.
Change the block diagram battery label from "4~12S" to "Up to 12S",
since the authors confirmed there is no verified lower limit and the
page now says "Up to 12S LiPo".
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
* docs(boards): document G-FH7 A-VTX control and VTX driver
The A-VTX TX pin is the SmartAudio/Tramp control line, shared with
UART5_TX on the SBUS connector. Document how to use it (VTX_SER_CFG set
to Radio Controller) and that it can't be used together with an S.BUS
receiver on the SBUS connector.
Signed-off-by: g945643frankie <g945643@oz.nthu.edu.tw>
* docs(boards): fix G-FH7 RC, buzzer and wording review issues
Tell readers to disable CRSF when enabling DSM or GHST, since CRSF is
on TELEM/SERIAL 4 by default, and note that DSM receivers can't be bound
from PX4 because the board defines no SPEKTRUM_POWER. Say the BZ output
needs an active buzzer, because the board drives it as a plain GPIO.
Also define DFU, PPS and VTX at first use, link parameter setting, use
"co-processor" for the OSD consistently, fix ambiguous references in
the OSD and debug pad text, and narrow the debug-build ELRS limit to
the ELRS connector.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
* docs: G-FH7: remove VTX control, apply ADC/power monitoring suggestions
PX4's VTX driver swaps RX/TX on the RC port (no RC_SERIAL_SWAP_RXTX on
this board), so SmartAudio/Tramp would not come out on the A-VTX TX pin.
State that PX4 does not use that pin instead.
Signed-off-by: g945643frankie <g945643@oz.nthu.edu.tw>
* Update docs/en/flight_controller/accton-godwit_gfh7.md
* Update docs/en/flight_controller/accton-godwit_gfh7.md
* Update docs/en/releases/main.md
* docs(accton-godwit_gfh7): address review feedback
Apply remaining Hamish review suggestions on the G-FH7 board page:
clarify the switchable 12 V BEC output, note serial flashing over TELEM only,
expand GHST as TBS Ghost, warn that 3.3 V DSM receivers need a separate supply,
and match the OSD SWD pad wording to the FMU debug table.
* docs(boards): tidy G-FH7 interface, power, BOOT and ESC wiring text
Move the Interface Summary under Pinouts to match the board page
template, note that current monitoring needs setup, name the board's
BOOT button, and describe the ESC wiring diagram as it is drawn
(4-in-1 ESC on the ESC connector only).
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
* docs(boards): flatten G-FH7 images onto white for dark mode
The board drawings were black line art on a transparent background, so
in dark mode the lines all but vanished against the dark page.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
* docs(boards): drop space between value and unit on G-FH7 page
PX4 prefers no space between a value and its unit symbol (3V, not 3 V).
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
---------
Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
Signed-off-by: g945643frankie <g945643@oz.nthu.edu.tw>
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
Co-authored-by: g945643frankie <g945643@oz.nthu.edu.tw>
Co-authored-by: g945643frankie <106499958+g945643frankie@users.noreply.github.com>
Covers what landed on release/1.18 after v1.18.0-rc1 and was missing from
the notes, and restores the distance-aware return upgrade item that only
the release/1.18 copy had (#29620), so main is again a superset of it.
Adds upgrade items for the heater parameter rename, the ARK FPV
fixed-wing and VTOL targets, the Matek H743 bootloader board ID and the
strict MAVLink command parameter checks, and amends the signing, AGP and
parameter file items.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
* feat(gnss): check that the position change matches the velocity
A receiver computes its position from the code (time of flight) and its
velocity from the Doppler shift. Multipath and other degradation hit the
two differently, so a degraded receiver's position change stops matching
its velocity, often before its reported accuracy shows it. The existing
drift checks compare the two only at rest on the ground.
The new strict check filters the position change rate minus the mean
velocity over about 1 s and fails above GNSS_REQ_POSVEL, also in flight,
so the selection prefers another receiver that passes. It is off by
default (GNSS_CHECK bit 12) until the threshold is tuned on logs; the
filtered value is logged in sensors_status_gnss either way.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Andrea Bernasconi <andrea.bernasconi@auterion.com>
* fix(gnss): skip the position step at a fix type change in the consistency check
When a receiver starts or stops applying differential or RTK corrections,
its position steps by up to a few meters in one epoch while the Doppler
velocity is unaffected. That is a new solution, not degradation, and it
shouldn't demote a receiver that just reached RTK fixed. On a 10 Hz log
with DGPS dropping in and out, these steps drove the filtered value to
4.5 m/s; without them it peaks at 0.8 m/s, during a real vertical drift.
Only the interval spanning the change is skipped and the filter keeps its
state, so a receiver that keeps switching isn't blind for longer.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Andrea Bernasconi <andrea.bernasconi@auterion.com>
* refactor(gnss): Reduce check description
* fix(GNSS): Make the feature enabled by default but with more margin
* fix(gnss): restrict the position/velocity consistency check to horizontal
Receivers that don't report the vertical velocity failed the check on any
climb. Merge the consistency tests into fewer cases.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Andrea Bernasconi <andrea.bernasconi@auterion.com>
* refactor(gnss): mark the position/velocity consistency check as horizontal
The check only compares the horizontal position change with the horizontal
velocity. Name the parameter, flags and status field after that, so that a
vertical counterpart can be added later as GNSS_REQ_VPOSVEL / CHECK_VPOSVEL.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Andrea Bernasconi <andrea.bernasconi@auterion.com>
* refactor(gnss): rename the position/velocity check to kinematic consistency
HPOSVEL read like a check on position and velocity separately, next to
HDRIFT and HSPEED. "Kinematic consistency" names the property being
tested and leaves room for a vertical counterpart (VKIN). Messages,
flag comments and the parameter's long description keep the plain
wording, since "kinematic" alone can be read as RTK.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Andrea Bernasconi <andrea.bernasconi@auterion.com>
---------
Signed-off-by: Andrea Bernasconi <andrea.bernasconi@auterion.com>
* fix(mavlink): scale DO_SET_ACTUATOR params 5/6 in mission items
MISSION_ITEM_INT carries params 5/6 in the int32 x/y fields, so the actuator
5 and 6 values (-1..1) only arrived as -1, 0 or 1, and an unset (INT32_MAX)
value drove the actuator to saturation instead of leaving it unchanged.
Scale them by 1e7 like COMMAND_INT does, map unset to NaN, and encode them
the same way on download.
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
Signed-off-by: Julian Oes <julian@oes.ch>
Assisted-by: Claude:claude-opus-5-5
* docs(navigator): list all supported mission commands
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Julian Oes <julian@oes.ch>
* fix(mavlink): keep ARM_DISARM and AUTOTUNE params on global-frame download
A global-frame mission item zeroes param1-4 before filling in the
command-specific ones, and COMPONENT_ARM_DISARM and DO_AUTOTUNE_ENABLE
had no case there. An uploaded "arm" (param1 = 1) therefore downloaded
as "disarm" (param1 = 0).
Signed-off-by: Julian Oes <julian@oes.ch>
Assisted-by: Claude:claude-opus-5-5
* fix(mavlink): ignore unset COMMAND_INT x and y individually
COMMAND_INT x/y were only treated as unset when both were INT32_MAX. A
DO_SET_ACTUATOR setting only actuator 5 (y = INT32_MAX) therefore set
actuator 6 to 214.7, saturating it, instead of leaving it unchanged.
Map each of x and y to NaN on its own when unset, which also covers
INT32_MIN from a NaN converted to int.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Julian Oes <julian@oes.ch>
Co-authored-by: Julian Oes <julian@oes.ch>
* fix(commander): continue fixed-wing mission takeoff without position
A fixed-wing vehicle losing its position estimate during Takeoff mode keeps
climbing wings-level (FW_POSCTRL_MODE_AUTO_TAKEOFF_NO_NAV), because fixed-wing
Takeoff mode does not require a position. During the takeoff item of a
mission, the mode fallback instead checked the Mission requirements and
escalated to Descend.
Check the mode fallback against the Takeoff mode requirements while a
fixed-wing vehicle flies the takeoff item of a mission, so both behave the
same. Once the takeoff item is done, the mission requirements apply again.
Assisted-by: Claude:claude-opus-5-5
* feat(commander): add FW mission takeoff state to failsafe simulator
The failsafe state now distinguishes the takeoff item of a fixed-wing
mission, which only needs the Takeoff mode requirements. Expose it in the
simulator so this fallback can be tried out there too.
Assisted-by: Claude:claude-opus-5-5
* Update docs/en/flight_modes_fw/mission.md
Co-authored-by: Mahima Yoga <mahima@auterion.com>
* Update docs/en/flight_modes_fw/mission.md
Co-authored-by: Mahima Yoga <mahima@auterion.com>
---------
Co-authored-by: Mahima Yoga <mahima@auterion.com>
* feat(boards/avianautomata): add 305AP flight controller
Add the Avian Automata 305AP: STM32H743, two IMU slots that accept
either an LSM6DSV16X or an ICM-45686, BMP581 barometer, MMC5983MA
magnetometer, two CAN buses and eight motor outputs plus docs.
Assisted-by: Claude:claude-opus-5-5
---------
Signed-off-by: Aaron <aaron.s.fuller@gmail.com>
Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
* feat(failure_injection): add wrong, garbage and drift injection for gyro and accel
Corrupt the addressed IMU's samples on all three axes: wrong adds a
constant bias (SYS_FAIL_{G,A}_BIAS), garbage uniform noise within
+-SYS_FAIL_{G,A}_NOISE and drift a bias growing by SYS_FAIL_{G,A}_DRIFT
per second since injection. Applied to both the plain and FIFO driver paths.
* refactor(failure_injection): handle IMU failures in process_imu()
Mirror process_gnss(): resolve the mode once, run the generic Off / Stuck
first and only then apply the Wrong / Garbage / Drift offset, so the Stuck
cache keeps the uncorrupted sample and a later Stuck never replays a
drifted one. Drop the second process() on the integrated FIFO report, which
cached the already-corrupted report. The offset is still computed before
Off so drift_start is reset while the sensor is off.
* docs(failure_injection): align IMU failure docs with code
The Syntax section did not list drift and described garbage as
uninitialised-memory output, while gyro/accel garbage adds bounded noise
to the real measurement. Also match the new parameter descriptions to
the wording of the existing SYS_FAIL_* parameters.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
* fix(failure_injection): add drift RC mode and clarify bias param text
* refactor(drivers): Drop extra comment
* test(mavsdk_tests): add SITL test for IMU failure injection
Fly the SIH quad through gyro and accel bias, noise and drift with the
default SYS_FAIL_{G,A}_* magnitudes and check it holds altitude.
Holding altitude alone also passes when the injection never reaches the
sensor data, so the test also checks that the IMU noise level jumps
while noise is injected and returns once cleared. Bias and drift are
not checked in the data: the rate controller and the estimator react
to them and partly hide them in flight.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Andrea Bernasconi <andrea.bernasconi@auterion.com>
* test(mavsdk_tests): inject IMU failures through MAVSDK 4.2.0
MAVSDK-Python 4.2.0 adds FailureType.DRIFT (mavlink/MAVSDK#3211), so the
IMU failure test no longer needs to send a raw MAV_CMD_INJECT_FAILURE
with its own copies of the unit and type values. Use the tester's
inject_failure() like the motor failure tests, and bump the mavsdk pin
so the new type is available.
Assisted-by: Claude:claude-fable-5-2
Signed-off-by: Andrea Bernasconi <andrea.bernasconi@auterion.com>
---------
Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
Signed-off-by: Andrea Bernasconi <andrea.bernasconi@auterion.com>
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
* feat(msg): rename rover throttle setpoint to surface_vehicle_*
The throttle setpoint was the last rover topic shared by rovers and boats
without the surface_vehicle_* prefix decided in #29524. Rename
RoverThrottleSetpoint to SurfaceVehicleThrottleSetpoint and the
TYPE_ROVER_THROTTLE_* setpoint types to TYPE_SURFACE_VEHICLE_THROTTLE_*.
The type values are unchanged.
The topic rename breaks ROS 2 users anyway, so also shorten the fields of
the throttle and speed setpoints to x and y: the message name already says
what the value is and [@frame Body] states the frame.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Michael Fritsche <frimi999@gmail.com>
* fix(zenoh): bring surface_vehicle rename to the zenoh dds topics
* fix(concept): rename rover throttle setpoint to surface_vehicle_* in navigation terminology
* fix(tools): update px4-ros2-interface-lib pin
* docs(msg): describe sideways fields as omnidirectional, not mecanum
The surface vehicle messages are shared by rovers and boats, and the lateral
axis applies to any vehicle that can move sideways, not only mecanum rovers.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Michael Fritsche <frimi999@gmail.com>
* docs(ros2): use the surface vehicle setpoint type names of the interface lib
The pinned px4-ros2-interface-lib names the rover setpoint types
SurfaceVehicle*SetpointType. The table and the example reference still used
the old Rover*SetpointType class names, which do not exist in that version.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Michael Fritsche <frimi999@gmail.com>
* feat(msg)!: rename surface vehicle throttle setpoint to thrust setpoint
The setpoint is a normalized force command along the body x and y axes,
which is a thrust, not a throttle. Throttle stays the name for the motor
command the actuator control derives from it.
surface_vehicle_throttle_setpoint is now surface_vehicle_thrust_setpoint
(SurfaceVehicleThrustSetpoint), and SetpointConfig
TYPE_SURFACE_VEHICLE_THROTTLE_* are now TYPE_SURFACE_VEHICLE_THRUST_*
(same values). The px4-ros2-interface-lib pin follows the matching rename
there.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Michael Fritsche <frimi999@gmail.com>
* fix(tools): update px4-ros2-interface-lib pin
* fix(commander): do not enable velocity control for surface vehicle thrust setpoints
The SurfaceVehicleThrust* setpoint types enabled the velocity flag, taken
over from the original interface lib configuration. Nothing in these types
uses velocity, and offboard mode maps the same combinations without it.
The flag kept the rover speed controller running: switching from a
SurfaceVehicleSpeed* to a SurfaceVehicleThrust* type sets the same flags,
so the controllers were not reset and a stale speed setpoint kept
overriding the commanded thrust. It also made external modes that only
command thrust require a local position estimate.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Michael Fritsche <frimi999@gmail.com>
* docs(msg): apply review suggestions for the surface vehicle setpoints
Add long descriptions to the thrust and speed setpoints and the speed
status, name modules instead of C++ classes, and use single spaces before
field comments. Rename the speed status PID integrals from pid_throttle_*
to pid_thrust_*, since the speed controller drives the thrust setpoint.
Update the docs and the rover control structure diagram for the thrust
setpoint and omnidirectional vehicles, note the Rover*SetpointType names of
PX4 v1.17 and v1.18, and add the ROS 2 release note.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Michael Fritsche <frimi999@gmail.com>
---------
Signed-off-by: Michael Fritsche <frimi999@gmail.com>
* fix(vtol_att_control): do not treat a commanded quad-chute as a fixed-wing failure
An operator can command a quad-chute (MAV_CMD_DO_VTOL_TRANSITION with
param2 = 1) when nothing has failed, e.g. to stop fixed-wing flight for
detect and avoid. It set fixed_wing_system_failure like a detected
failure, so COM_QC_ACT ran (Return by default) and arming was blocked
until reboot.
A commanded quad-chute now only forces the immediate switch to
multicopter, through a one-shot latch. The multicopter transition
command keeps the vehicle there until the next front transition.
The destructor now also deletes the VTOL type, which leaked.
Assisted-by: Claude:claude-opus-5-5
* refactor(vtol_att_control): track quad-chute by reason
Only a detected quad-chute is published as fixed_wing_system_failure.
* fix(vtol_att_control): no pusher assist after a commanded quad-chute
A further quad-chute is ignored while one is active.
* fix(vtol_att_control): reset commanded quadchute on disarm
* feat(vtol_att_control): keep pusher assist after a commanded quadchute
---------
Co-authored-by: Matthias Grob <maetugr@gmail.com>
* feat(simulator_sih): add a GeoTIFF terrain elevation model for SITL
SIH only simulates flat ground. This adds the loader for a terrain
elevation model (DEM) in a GeoTIFF file, the base for non-flat terrain
in SITL.
The DEM is read with libtiff and libgeotiff. A DEM in a projected CRS is
resampled once at load time with PROJ onto a WGS84 lat/lon grid, so a
lookup in the simulation loop is a plain bilinear interpolation. It is
built only for px4_sitl and only when the three libraries are found, so
hardware builds and SITL without them are unchanged.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Beniamino Pozzan <beniamino.pozzan@auterion.com>
* feat(simulator_sih): use the terrain DEM for ground contact and the rangefinder
With PX4_SIH_TERRAIN set to a GeoTIFF DEM, SIH in SITL places the vehicle
on the terrain at start, lands it on the terrain, ray-casts the downward
distance sensor against it, and publishes it as the groundtruth
terrain_alt. Outside the DEM the ground stays flat at SIH_LOC_H0.
Terrain is only used for multicopters, VTOLs and fixed-wing; other
vehicle types keep flat ground. The DEM is loaded in task_spawn() so a
bad file fails the start command, and because the SIH task stack is too
small for libtiff and PROJ.
The groundtruth terrain_alt now holds the WGS84 terrain altitude, as the
message documents, instead of the height above the origin.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Beniamino Pozzan <beniamino.pozzan@auterion.com>
* build(setup): install the SIH terrain dependencies with the simulation tools
Install libtiff, libgeotiff and PROJ so SITL builds SIH with terrain
elevation (DEM) support. They are optional: without them SIH builds as
before.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Beniamino Pozzan <beniamino.pozzan@auterion.com>
* docs(sim_sih): document terrain elevation from a GeoTIFF DEM
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Beniamino Pozzan <beniamino.pozzan@auterion.com>
* docs(sim_sih): fix and clarify the terrain elevation section
Address review findings on the new terrain section: list the sample
types the loader actually reads, note that the prebuilt px4 package and
px4io/px4-sitl container are built without terrain support, and say
when SIH_LOC_H0 still sets the start altitude.
Also add a version badge, link GeoTIFF, EPSG and GDAL, mention the
dist_bottom groundtruth field, and correct the GLO-30 coverage.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
* fix: cast to double for MAC builds
Signed-off-by: Beniamino Pozzan <beniamino.pozzan@auterion.com>
* chore: implement TerrainBase interface
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Beniamino Pozzan <beniamino.pozzan@auterion.com>
* chore: improve isolation of terrain logic from sih core
Signed-off-by: Beniamino Pozzan <beniamino.pozzan@auterion.com>
* refactor(simulator_sih): move DEM handling into the terrain classes
SIH should only use the terrain, not manage it. TerrainFlat becomes the
base class, since flat ground is what every terrain model builds on, and
TerrainDem falls back to it until a DEM is loaded. Terrain.hpp picks the
model at compile time, so SIH holds the terrain by value with no #ifdef,
new/delete or pointer handover, and NuttX builds only get the flat model.
Tracking whether the vehicle is inside the DEM, and the matching
warnings and status, move from SIH into TerrainDem.
The DEM is still loaded in task_spawn() because the SIH task stack is too
small for libtiff and PROJ, so the terrain is a static member that the
instance uses directly instead of moving it.
A terrain file with an unsupported vehicle type now fails the start like
a bad file instead of silently using flat ground.
---------
Signed-off-by: Beniamino Pozzan <beniamino.pozzan@auterion.com>
Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
Co-authored-by: Matthias Grob <maetugr@gmail.com>
* feat(simulator_sih): add orient command to pose the vehicle for calibration
Accel and mag calibration need the vehicle held still on each side and
rotated, which SIH could not do, so neither could be tested in
simulation. `simulator_sih orient` sets the attitude kinematically,
keeping the IMU and the simulated mag consistent with it, and `orient
all` runs every side in turn so a calibration started from a GCS
completes on its own.
Assisted-by: Claude:claude-opus-5-5
* fix(commander): hand a calibration cancel to the running calibration
A cancel got TEMPORARILY_REJECTED from Commander and ACCEPTED from the
calibration, in either order. The calibration polled for it with a
fresh vehicle_command subscription that only saw the newest command,
filtered it by a per-side start time, and did not poll while waiting
for the vehicle to be still or while measuring a side. Baro and level
calibration never polled. A cancel could be lost or take until the
vehicle was held still.
Commander now hands the cancel to the running calibration, which acks
it once when it stops, or rejects it if it ends without stopping.
Every calibration loop checks for it, and accel calibration no longer
reports a failure after a cancel.
Fixes#29424
Assisted-by: Claude:claude-opus-5-5
* test(mavsdk_tests): run accel and mag calibration and cancels on SIH
Covers a full accel and mag calibration, and a cancel in each place it
used to be missed or delayed, checking it gets exactly one ack.
Assisted-by: Claude:claude-opus-5-5
* perf(simulator_sih): build the orient command for SITL only
Commander denies sensor calibration when SIH runs on flight controller
hardware, so orient was about 1.8 KB of unusable code on every NuttX
board that builds SIH.
Assisted-by: Claude:claude-opus-5-5
* fix(commander): open calibration cancels before the worker thread starts
Commander handles one command per loop and the worker thread runs at
low priority, so a cancel queued right behind the start could be
rejected before the worker opened it, and the calibration kept running.
Assisted-by: Claude:claude-opus-5-5
* fix(commander): stop reporting a cancelled gyro calibration as failed
A cancel broke out of the retry loop into the failure report, as accel
calibration did before.
Assisted-by: Claude:claude-opus-5-5
* test(mavsdk_tests): cover gyro cancel and remove two calibration races
A retried start is rejected once the calibration runs, and that late
ack could be counted against the cancel, so the start is sent once.
The baro cancel landed 1 s into a 3 s calibration, about 200 ms of
host time at speed factor 10; it is now sent right after the start.
Assisted-by: Claude:claude-opus-5-5
* style(mavsdk_tests): wrap the calibration start assert for flake8
The 104-character line failed the Python CI checks.
Assisted-by: Claude:claude-opus-5-5
* fix(commander): require param7 zero for a calibration cancel
An ESC calibration (param7 = 1) or baro temperature calibration
(param7 = 3) sent while a calibration ran matched the cancel test. It
stopped the running calibration and was acked ACCEPTED, though the
requested calibration never started. `commander calibrate esc` did the
same.
Assisted-by: Claude:claude-fable-5-2