* 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>
MAVLink 2 now supports 32-bit system IDs. The uORB fields carrying a
MAVLink system ID need to hold them, so VehicleStatus (v5),
VehicleCommand (v1), VehicleCommandAck (v2) and ManualControlSetpoint
(v2) get uint32 system ID fields, with translations to the previous
versions. Older versions get IDs above 255 clamped to 255.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Julian Oes <julian@oes.ch>
* feat(navigator): hold a commanded course after the fixed-wing takeoff
A finite yaw in MAV_CMD_NAV_TAKEOFF (param4) ends the climbout in a
course hold at the takeoff altitude instead of a loiter, and the vehicle
stays in Takeoff mode. NaN keeps the loiter.
* feat(navigator): continue in Guided Course after a course takeoff
* fix(navigator): ignore lat/lon during a course-based takeoff
* fix(navigator): add guard for 0 heading takeoff
---------
Co-authored-by: federicomagri12 <federico.magri@auterion.com>
PX4 never said in which frame fixed-wing pitch angles are given, and
FW_PSP_OFF was described as an offset added to the pitch setpoint and as
the angle of attack, which holds only for TECS and Stabilized mode, and
only in level flight measured from the body x-axis.
- Trimming guide: a side-view diagram of the body frame, the pitch angle
and FW_PSP_OFF, and where FW_PSP_OFF is used.
- Messages: state that pitch setpoints and limits are absolute, drop the
FRD frame tag on an Euler angle, correct the pitch range to +-pi/2,
and describe the TECS pitch integrator as a correction term.
Comment-only, so no message version change.
- Parameters: describe FW_PSP_OFF as the level-flight pitch, mark the
absolute pitch parameters as such, and describe the asymmetric
FW_MAN_P_MAX range with a non-zero FW_PSP_OFF.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Silvan <silvan@auterion.com>
* fix(battery): don't let a charging battery switch off the battery failsafes
Since #28422 a DroneCAN battery that sets its charging flag reports
WARNING_CHARGING, which is 7. The battery check keeps the highest warning
across batteries and, while armed, only lets it rise, but the failsafe has
no action for 7. So one charging report outranked a real emergency on
another pack and stayed latched until disarm, and a vehicle that armed
while still charging on a dock never got a low battery failsafe at all.
The driver also replaced a real low, critical or emergency warning with
charging, so a nearly empty pack on a charger still passed the arming
check.
The driver now reports charging only while the pack has no real warning,
and the battery check treats charging as no warning when it picks the
worst one. MAVLink still shows charging while the pack has no warning.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Saibernard Yogendran <bernie97@seas.upenn.edu>
* test(commander): cover a charging battery in the battery check
A charging pack doesn't outrank another pack's emergency, charging at
arming doesn't latch over a later low or critical warning, and charging
on its own is no warning. All three fail without the fix.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Saibernard Yogendran <bernie97@seas.upenn.edu>
* docs(msg): say WARNING_CHARGING is a state, not a severity
The DroneCAN driver only reports charging when no other warning applies,
and the battery check and HIGH_LATENCY2 stream rely on that and on not
ordering it against the real warnings.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
* fix(mavlink): don't flag a charging battery as failed in HIGH_LATENCY2
WARNING_CHARGING is 7, so the greater-than-LOW test set
HL_FAILURE_FLAG_BATTERY for every healthy pack on a charger.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
---------
Signed-off-by: Saibernard Yogendran <bernie97@seas.upenn.edu>
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
Co-authored-by: Jacob Dahl <dahl.jakejacob@gmail.com>
* feat(commander): only report safety button as available when it is available and configured to be used via COM_PREARM_MODE
* feat(commander): add a new option to COM_PREARM_MODE to explicitly and exclusively allow prearming via VEHICLE_CMD_DO_SET_SAFETY_SWITCH_STATE
* feat(commander): explicit dedicated safety-button-only and mavlink-only prearm modes
* fix(commander): also accept VEHICLE_CMD_DO_SET_SAFETY_SWITCH_STATE on Always and Disarmed pre-arm profiles to match documentation
* docs(prearm): update docs with new prearm mode behaviour
* fix(commander): fix syntax for bool
* docs(prearm): revert last param table, as COM_FORCE_SAFETY is already mentioned in a table above.
* docs(prearm): fix MAVLink spelling, grammar and parameter table
Make the pre-arm docs consistent with the COM_PREARM_MODE parameter and
the docs style guide: MAVLink is spelled consistently (page and option
labels), selectable option names are shown in code style, the parameter
table lists all five COM_PREARM_MODE options with the correct default,
and sentences are fixed and put one per line.
Question for the author: the COM_PREARM_MODE option labels say "Safety
button", while the docs say "safety switch". Are these synonyms? If so,
which term should we use in both places? If not, what is the difference?
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
* fix(commander): clean up _button_disabled logic: button still needs to be enabled in Disabled and Always prearmed modes to switch safety off.
* docs(prearm): adjust COM_PREARM_MODE description and clarify/fix/improve prearm docs
* chore(VehicleCommand.msg): improved comments
* chore(msg): v0->v1 translation for VehicleCommand.msg
* Revert "chore(msg): v0->v1 translation for VehicleCommand.msg"
This reverts commit 50ea14fc76310ba7b53ebcd1c6ee8cf4e1c0776b.
* feat(commander): deny VEHICLE_CMD_DO_SET_SAFETY_SWITCH_STATE when not accepted
* feat(commander): COM_SAFETY_MODE replaces CBRK_IO_SAFETY
* docs(prearm): update docs with new COM_SAFETY_MODE behaviour
* docs(prearm): minor cleanup
* fix(commander): migrate CBRK_IO_SAFETY and correct safety ACKs
A stored CBRK_IO_SAFETY=0 was dropped on import, so upgraded vehicles booted with COM_SAFETY_MODE=0 and safety off. The CAN GPS nodes have no commander, so setting COM_SAFETY_MODE there only logged an error at boot. A SAFETY_SAFE command in mode 0 and ESC calibration with safety on were ACKed ACCEPTED while doing nothing.
Assisted-by: Claude:claude-opus-5-5
---------
Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
Co-authored-by: Jacob Dahl <dahl.jakejacob@gmail.com>
* refactor(msg): rename SensorGps to SensorGnss and add VehicleGnss
GPS is one constellation; the receivers and the rest of PX4 handle GNSS. Field names lose their units (latitude, speed_accuracy, course, ...), which move into the metadata comments. The sensors module's output becomes VehicleGnss on vehicle_gnss: the selected receiver's sample next to what the sensors module adds to it (corrected sample time, antenna position, selected instance), so a consumer can tell the two apart and later selection and check results have a place to go.
Assisted-by: Claude:claude-opus-5-5
* refactor(drivers/gps): publish sensor_gnss
Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.
Assisted-by: Claude:claude-opus-5-5
* refactor(drivers/septentrio): publish sensor_gnss
Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.
Assisted-by: Claude:claude-opus-5-5
* refactor(drivers/pps_capture): read sensor_gnss
Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.
Assisted-by: Claude:claude-opus-5-5
* refactor(lib/gnss): select receivers on sensor_gnss
Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.
Assisted-by: Claude:claude-opus-5-5
* refactor(sensors): publish VehicleGnss on vehicle_gnss and rename SENS_GPS* to SENS_GNSS*
The sensors module's output nests the selected receiver's sample, with the corrected sample time, antenna position and selected instance next to it. SENS_GPS_MASK/TAU/PRIME and SENS_GPSn_ID/OFFX/OFFY/OFFZ/DELAY take the SENS_GNSS name the heading parameters already use; saved parameters migrate on import, and the EKF2_GPS_POS/EKF2_GPS_DELAY translations now land on the new names directly.
Assisted-by: Claude:claude-opus-5-5
* refactor(logger): log sensor_gnss and vehicle_gnss
Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.
Assisted-by: Claude:claude-opus-5-5
* refactor(ekf2): fuse vehicle_gnss
Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.
Assisted-by: Claude:claude-opus-5-5
* refactor(replay): replay vehicle_gnss
Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.
Assisted-by: Claude:claude-opus-5-5
* refactor(local_position_estimator): read vehicle_gnss
Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.
Assisted-by: Claude:claude-opus-5-5
* refactor(attitude_estimator_q): read vehicle_gnss
Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.
Assisted-by: Claude:claude-opus-5-5
* refactor(lib/terrain_estimation): take sensor_gnss
Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.
Assisted-by: Claude:claude-opus-5-5
* refactor(lib/wind_estimator): read vehicle_gnss in the replay script
Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.
Assisted-by: Claude:claude-opus-5-5
* refactor(vision_target_estimator): read vehicle_gnss
Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.
Assisted-by: Claude:claude-opus-5-5
* refactor(navigator): read vehicle_gnss
Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.
Assisted-by: Claude:claude-opus-5-5
* refactor(commander): read sensor_gnss and vehicle_gnss
Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.
Assisted-by: Claude:claude-opus-5-5
* refactor(mavlink): stream sensor_gnss and vehicle_gnss
Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.
Assisted-by: Claude:claude-opus-5-5
* refactor(uxrce_dds_client): bridge vehicle_gnss
Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.
Assisted-by: Claude:claude-opus-5-5
* refactor(zenoh): bridge vehicle_gnss
Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.
Assisted-by: Claude:claude-opus-5-5
* refactor(failure_injection): inject GNSS failures on sensor_gnss
Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.
Assisted-by: Claude:claude-opus-5-5
* refactor(drivers/ins): publish sensor_gnss
Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.
Assisted-by: Claude:claude-opus-5-5
* refactor(drivers/uavcan): publish sensor_gnss
Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.
Assisted-by: Claude:claude-opus-5-5
* refactor(drivers/uavcannode): read sensor_gnss
Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.
Assisted-by: Claude:claude-opus-5-5
* refactor(drivers/cyphal): bridge sensor_gnss
Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.
Assisted-by: Claude:claude-opus-5-5
* refactor(drivers/telemetry): read vehicle_gnss
Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.
Assisted-by: Claude:claude-opus-5-5
* refactor(drivers/rc): read vehicle_gnss for telemetry
Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.
Assisted-by: Claude:claude-opus-5-5
* refactor(drivers/osd): read vehicle_gnss
Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.
Assisted-by: Claude:claude-opus-5-5
* refactor(drivers/transponder): read sensor_gnss
Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.
Assisted-by: Claude:claude-opus-5-5
* refactor(boards/modalai): publish sensor_gnss from the voxl2 drivers
Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.
Assisted-by: Claude:claude-opus-5-5
* refactor(examples): publish sensor_gnss and read vehicle_gnss
Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.
Assisted-by: Claude:claude-opus-5-5
* refactor(simulation): publish sensor_gnss
Follows the SensorGps to SensorGnss and vehicle_gps_position to VehicleGnss rename.
Assisted-by: Claude:claude-opus-5-5
* refactor(gnss): name GNSS variables gnss in the sensors module and receiver drivers
GPS is one constellation. Identifiers that hold or handle GNSS samples, or bind to the renamed parameters, follow the message and parameter rename; classes, files, modules and names tied to parameters that keep GPS stay.
Assisted-by: Claude:claude-opus-5-5
* refactor(gnss): name GNSS variables gnss in the estimators and navigator
GPS is one constellation. Identifiers that hold or handle GNSS samples, or bind to the renamed parameters, follow the message and parameter rename; classes, files, modules and names tied to parameters that keep GPS stay.
Assisted-by: Claude:claude-opus-5-5
* refactor(gnss): name GNSS variables gnss in commander, mavlink and failure injection
GPS is one constellation. Identifiers that hold or handle GNSS samples, or bind to the renamed parameters, follow the message and parameter rename; classes, files, modules and names tied to parameters that keep GPS stay.
Assisted-by: Claude:claude-opus-5-5
* refactor(gnss): name GNSS variables gnss in the remaining drivers and simulation
GPS is one constellation. Identifiers that hold or handle GNSS samples, or bind to the renamed parameters, follow the message and parameter rename; classes, files, modules and names tied to parameters that keep GPS stay.
Assisted-by: Claude:claude-opus-5-5
* docs(gnss): reference sensor_gnss, vehicle_gnss and SENS_GNSS* parameters
The upgrade guide covers the topic, field, ROS 2, parameter and Cyphal register renames.
Assisted-by: Claude:claude-opus-5-5
* fix(boards): name EKF2::UpdateGnssSample in the fmu-v6xrt ITCM lists
The rename left the old UpdateGpsSample symbol in the lists, so the ITCM check fails and the function drops out of ITCM on the boards it doesn't check.
Assisted-by: Claude:claude-opus-5-5
* chore(drivers/gps): bump PX4-GPSDrivers to the merged sensor_gnss rename
The submodule pointed at the PX4-GPSDrivers#243 branch commit; #243 is merged.
Assisted-by: Claude:claude-opus-5-5
* docs(msg): restore WGS84 in SensorGnss and point VehicleGlobalPosition at vehicle_gnss
The rename dropped the only mention of the WGS84 datum and ellipsoid, and left VehicleGlobalPosition referring to the removed vehicle_gps_position topic.
Assisted-by: Claude:claude-opus-5-5
* refactor(msg): drop selected_instance from VehicleGnss
receiver.device_id already names the selected receiver, and 0 while blended. The sensor_gnss instance depends on the order drivers advertise at boot, so it doesn't identify a receiver across boots or logs, and nothing reads it. It would also be meaningless on the per-receiver VehicleGnss instances proposed in #28894.
Assisted-by: Claude:claude-opus-5-5
* refactor(gnss): fuse vehicle_gnss.timestamp_sample directly and document the receiver's corrected time
vehicle_gnss.timestamp is now the sensors module's publish time, so EKF2's check of timestamp_sample against it was always true; the sensors module always fills timestamp_sample. The message docs described receiver.timestamp_sample as the driver's uncorrected value, but the sensors module writes the corrected time into it as well.
Assisted-by: Claude:claude-opus-5-5
* docs(msg): point VehicleGnss users at the top-level timestamp_sample
uXRCE-DDS shifts only top-level timestamp and timestamp_sample into agent time, so receiver.timestamp_sample reaches ROS 2 on the PX4 boot clock even though it holds the same value on uORB.
Assisted-by: Claude:claude-opus-5-5
* docs(releases): tell ROS 2 users which VehicleGnss timestamps to read
Only top-level timestamps are converted to ROS time, so a port that reads receiver.timestamp gets the PX4 boot clock, and vehicle_gnss.timestamp is now the sensors module's publish time rather than the receiver's.
Assisted-by: Claude:claude-opus-5-5
* feature(new-mode): Add new parking mode
This mode is an extension of the manual mode.
It is to be used to manoevre platforms precisely in tight spaces, such as when parking rovers or when docking a boat.
It is designed to be used with a joystick and allows for precise control of the vehicle's position and orientation.
* feat(rover): implement manual parking modes and add docs
* fix(rover): move from percent based to normalized max throttle in manual parking mode
* fix(rover): improve parking mode description in docs
---------
Co-authored-by: Michael Fritsche <frimi999@gmail.com>
* fix(msg): correct comments regarding default values
The mentioned defaulting happens in
FwLateralLongitudinalControl::updateLongitudinalControlConfiguration,
where they clearly default to the climb / sink rate _setpoint_, not the
respective maximum.
No new message version needed as only comment is changed.
* fix(msg): correct stale publisher reference in FixedWingLateralGuidanceStatus
fw_pos_control was split into fw_mode_manager and
fw_lateral_longitudinal_control; the topic is published by
the mode manager.
* feat(mavlink): stream manual input status which specifies the active source for manual control setpoint generation on the autopilot
---------
Signed-off-by: RomanBapst <bapstroman@gmail.com>
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
Co-authored-by: Matthias Grob <maetugr@gmail.com>
unitName()/typeName() lacked the FAILURE_UNIT_DATALINK_*/FAILURE_UNIT_BUS_* units, so `failure can off` was announced as unit "unknown". FailureInjection.msg and VehicleCommand.msg also disagreed on FAILURE_TYPE_DRIFT (MAVLink FAILURE_TYPE 8).
Name every unit and type, add FAILURE_TYPE_DRIFT to both messages and the `failure` console command, and add a test that fails whenever a message constant has no name.
* feat(uavcan): parse STATUS_FLAG_CHARGING from BatteryInfo
- Map UAVCAN STATUS_FLAG_CHARGING to uORB STATE_CHARGING
- Cover both Raw and Filter data paths
- Enables MAVLink BATTERY_STATUS.charge_state to report CHARGING(7)
* refactor(msg): rename STATE_UNHEALTHY/STATE_CHARGING to WARNING_UNHEALTHY/WARNING_CHARGING
Rename for naming consistency: these enum values belong to the
'warning' field, so they should use the WARNING_ prefix like the
other values (WARNING_NONE, WARNING_LOW, etc.).
Also fix @enum annotation from 'WARNING STATE' to 'WARNING'.
* fix(land_detector): latch rotational_movement between publications
* fix(land_detector): latch all purely diagnostic flags
such that we don't have to publish on every change e.g. every movement threshold corssing but still see the least land detection friendly state per publish period.
---------
Co-authored-by: Matthias Grob <maetugr@gmail.com>
* feat(failure_injection): add ADS-B traffic-avoidance failure injection
Wire up FAILURE_UNIT_SYSTEM_TRAFFIC_AVOIDANCE (107) for the MAVLink-based
traffic avoidance path:
- OFF suppresses and STUCK freezes the incoming transponder_report, applied
both at the MAVLink ADS-B ingestion (handle_message_adsb_vehicle) and at
the navigator consumer (check_traffic), so it works for real ADS-B over
MAVLink, simulated ADS-B and the fake_traffic command.
- OFF additionally marks the ADS-B/FLARM heartbeat unhealthy so the traffic
avoidance system health check fails, using a message-less process()
overload.
- Add the unit to the capability catalogue (OK/OFF/STUCK), the failure
console command, the RC-switch unit selector and the docs.
The matching MAVLink FAILURE_UNIT enum entry lives in the mavlink submodule
(common.xml) and is handled by a separate PR; the uORB mirrors in
VehicleCommand.msg and FailureInjection.msg are included here.
* feat(failure_injection): enhance battery failure injection with severity levels
* feat(failure_injection): improve battery failure handling with dynamic threshold parameters
* refactor(failure_injection): remove traffic avoidance example from documentation
* docs(docs): subedit
* feat(failure_injection): add variance setting for distance sensor and integrate rangefinder in simulator
* feat(docs): add failure injection to release notes
* docs(docs): Add sim_mavlink back to heading
* fix(failure_injection): update default battery failure injection severity to Emergency
* docs(docs): get away from footnotes
* feat(failure_injection): enhance battery failure injection handling and update traffic unit support
* feat(failure_injection): add traffic avoidance handling tests and configurations
* [AUTO COMMIT] update EKF change indication
See .github/workflows/checks.yml for more details
* Apply suggestion from @hamishwillee
* feat(failure_injection): update failure types and handling for traffic avoidance and ESC telemetry
* fix(typo)
* [AUTO COMMIT] update EKF change indication
See .github/workflows/checks.yml for more details
* fix(docs): clarify notes on GPS and airspeed handling in failure injection documentation
---------
Co-authored-by: Claudio Chies <chiesc@chies.com>
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
* feat(failure_injection): integrate failure injection support across sensor drivers
* feat(failure_injection): enhance failure injection with RC switch support and instance bitmasking
feat(failure_injection): add disabled failure injection manager and system command support for v5x and v6x boards
* feat(failure_injection): add battery failure injection
Add a value-mutating apply-site for FAILURE_UNIT_SYSTEM_BATTERY. On an
injected OFF the outgoing battery_status is reported as a depleted pack
(zero remaining, emergency warning) so the low-battery failsafe triggers.
The apply-site lives in the shared Battery library, covering the analog
ADC, INA power monitors, ESC battery and SITL in one place, plus the
UAVCAN battery driver which publishes battery_status directly. The
previous SITL-only hack in BatterySimulator is removed in favour of this
shared path so simulation and hardware behave identically.
* fix(failure_injection): change parameter types from int32 to enum
* refactor(failure_injection): disable failure injection manager and system commands across multiple boards
* feat(failure_injection): enhance failure injection with timestamp handling and message-less support
* refactor(failure_injection): simplify has_timestamp_sample implementation and remove unused includes
* refactor(failure_injection):move conditional compilation into helper libary
* refactor(failure_injection): update CMakeLists to include failure_injection dependency across multiple drivers
---------
Co-authored-by: Claudio Chies <chiesc@chies.com>
Switches from using VehicleControlMode to a specific setpoint type message
with reply.
Reasons:
- in case a VehicleControlMode was dropped (e.g. when the mode switched
setpoint type), no confirmation was returned, and resulting in wrong
controller flags.
- cleaner interface separation: external modes do not need to configure
(or know) which controller to run for a certain setpoint
- allows for external modes to check for compatibility: e.g. a mode using
fixed-wing setpoint types can now be rejected on a multicopter.
- allows for further extensions, like a setpoint timeout
This makes it a bit more effort to add a new setpoint type. Specifically,
setpoint_types.cpp needs to be extended when adding a new setpoint message.
PX4 internal modes also make use of the setpoint types. The information
flow is:
nav_state -> setpoint type -> vehicle control mode flags
It also adds a timeout to the setpoint config, but is not implemented
yet.
This changes the interface for external modes and thus the compatibility
version is increased.
* feat(manual_control): trigger RC override on stick velocity
COM_RC_STICK_OV is now a velocity threshold (1/s) instead of a deflection percentage.
Default 3.0, range [1.0, 10.0]. A stick held statically cannot trigger override.
* docs(manual_control): update COM_RC_STICK_OV description for velocity-based override
* feat(manual_control): gate RC override with sign-consistency check
* fix(ManualControl): lower threshold and filter constant for RC override, add tests for MovingDiff
* refactor(commander): merge RC override params into COM_RC_OVR_SPEED
Replace the COM_RC_OVERRIDE bitmask + COM_RC_STICK_OV threshold with a
single float COM_RC_OVR_SPEED (stick override velocity, 0 = disabled).
Override now applies uniformly in auto and offboard modes.
- ManualControl: rename param, treat 0 as disabled (FLT_EPSILON guard)
- Commander: drop the per-mode bitmask gate and the RcOverrideBits enum
- param_translation: migrate COM_RC_OVERRIDE on import (enabled -> 1.0,
disabled -> 0.0) and drop the unit-incompatible COM_RC_STICK_OV value
- docs: collapse the two params into one across the mode pages
* fix(manual_override): Move configuration to manual_control module
with MAN_OVERRIDE_SPD parameter and a negative value disabling the feature. All other logic stays in Commander.
* docs(releases): add release note for RC override rework (MAN_OVERRIDE_SPD)
---------
Co-authored-by: Matthias Grob <maetugr@gmail.com>
The ArmingCheckReply uORB queue was sized to 4 (ORB_QUEUE_LENGTH) while
ExternalChecks supports up to MAX_NUM_REGISTRATIONS (8) external modes,
each of which publishes a reply for every ArmingCheckRequest. With more
than 4 registered modes the replies from the 5th+ mode overwrote earlier
ones within a single request cycle, so those modes were flagged
"unresponsive" and silently failed to activate.
Increase ORB_QUEUE_LENGTH to 8 to match MAX_NUM_REGISTRATIONS, and add a
static_assert so the two limits cannot drift apart again.
Fixes#27271
Signed-off-by: Marko T <marko.tavcar@c-astral.com>
Implements a new GUIDED_COURSE navigator mode that maintains a constant
ground-track bearing, altitude, and airspeed without manual stick input.
The mode is activated via MAVLink and accepts real-time in-flight updates:
- MAV_CMD_GUIDED_CHANGE_HEADING (HEADING_TYPE_COURSE_OVER_GROUND): set course
- MAV_CMD_DO_CHANGE_ALTITUDE: adjust target altitude
- MAV_CMD_DO_CHANGE_SPEED: adjust target airspeed
On activation the vehicle captures its current velocity vector as the
initial course bearing. A valid horizontal velocity estimate (GPS or
dead-reckoning) is required; course commands are rejected if unavailable.
* fix(ekf2): report HAGL variance for dist_bottom_var
dist_bottom_var was published as P(terrain, terrain) only. When the
range finder is the EKF height reference (EKF2_HGT_REF=2), the terrain
state is reset to 0 and not directly observed, so this variance does
not represent the actual uncertainty of dist_bottom (HAGL).
Use ComputeHaglInnovVar(P, 0) to report the proper HAGL variance,
which accounts for terrain state, vertical position state, and their
covariance.
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
* fix(ekf2): clamp HAGL variance to non-negative
H*P*H^T should be >= 0 for a valid covariance, but float drift or
mildly non-PSD P can produce a tiny negative result. Clamp at the
accessor so consumers of lpos.dist_bottom_var never see a negative
variance.
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
---------
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
* feat(crsf_rc): add CRSF receiver bind command
Add ability to initiate CRSF receiver binding from QGroundControl or
the NSH console. When MAV_CMD_START_RX_PAIR is received with
RC_TYPE_CRSF, the driver sends the CRSF bind command frame over UART.
Binding is rejected when armed or on singlewire configurations.
Also adds RC_TYPE and RC_SUB_TYPE constants to VehicleCommand.msg and
replaces magic numbers in DsmRc and RCInput drivers.
Based on PX4/PX4-Autopilot#23294.
* style(crsf_rc): use C++ style comment
* style(crsf_rc): zero-init vcmd, remove noisy comments, drop unused enum value
* fix(rc): check write return value in BindCRSF, guard Spektrum bind against invalid sub-type
* fix(rc): warn and deny invalid Spektrum bind sub-type
Previously, an unrecognized param2 sub-type would silently leave
dsm_bind_pulses at 0 and return the generic UNSUPPORTED ACK. Add an
explicit else-branch that logs a PX4_WARN and returns DENIED so users
get clear feedback in QGC.
* forwarding offboard setpoints in modes using the external mode registration
* requesting offboard setpoint in RAPTOR
* adding old message versions
* bumping vehicle status
* adding message translations
* updating reference to versioned old message on previous translations
The failure_detector_status bitmask in vehicle_status duplicates the
separate FailureDetectorStatus topic. Remove it and read directly from
the dedicated topic in failureDetectorCheck and HIGH_LATENCY2.
Overhauls the DShot driver with per-timer BDShot selection, multi-timer
sequential capture, Extended DShot Telemetry (EDT), and AM32 ESC EEPROM
read/write via MAVLink. Expands ESC support from 8 to 12 channels.
BDShot:
- Per-timer BDShot protocol selection via actuator config UI
- Multi-timer sequential burst/capture on any DMA-capable timer
- Adaptive per-channel GCR bitstream decoding
- Per-channel online/offline detection with hysteresis
Extended DShot Telemetry (EDT):
- Temperature, voltage, current from BDShot frames (no serial wire)
- New DSHOT_BIDIR_EDT parameter
- EDT data merged with serial telemetry when both available
AM32 EEPROM:
- Read/write AM32 ESC settings via MAVLink ESC_EEPROM message
- ESCSettingsInterface abstraction for future ESC firmware types
- New DSHOT_ESC_TYPE parameter
Other changes:
- Per-motor pole count params DSHOT_MOT_POL1–12 (replaces MOT_POLE_COUNT)
- EscStatus/EscReport expanded to 12 ESCs with uint16 bitmasks
- Numerous bounds-check, overflow, and concurrency fixes
- Updated DShot documentation
This commit introduces a new control mode for fixed-wing aircraft that
utilizes Euler angles for attitude control.
Additionally, a new logged topic has been added to facilitate debugging and
monitoring of the Euler rates setpoints during flight.
* moving raptor
bump
compiles and raptor mode appears
hovering with RAPTOR seems to work
Using Raptor to execute offboard commands works (using multirobot f03825a5795a77c5a095f799eeb8e0b646fe7176 to feed the trajectory_setpoint). Requires more testing
simplified rotmat
runtime inference frequency multiple
arming request response reflects actual readiness
adjusting to fit IMU gyro ratemax
relaxing control timing warning thresholds for SITL
Using mode registration to signal if offboard commands should be forwarded to trajectory_setpoint instead of just hardcoding vehicle_status.nav_state == vehicle_status_s::NAVIGATION_STATE_OFFBOARD
adopting new "request_offboard_setpoint" in raptor module
replace offboard seems good
mc_raptor: overwrite offboard parameter
separate raptor config
addendum
Raptor off by default
RAPTOR readme
Loading raptor checkpoint from tar works.
check if load was successful
refactoring: cutting out the pure C interface to allow direct testing of the policy input/output behavior from the file, without fully loading it into memory first
adapter not needed anymore
ripping out test observation mode (not used in a long time)
fixing warnings
bump RLtools to fix the remaining warnings
Loading RAPTOR checkpoint from sdcard seems to work on FMU-6C
embedding Raptor policy into flash works again
also printing checkpoint name when using the embedded policy
cleaner handling of the checkpoint name
back to reading from file
ripping out visual odometry checks
cleaner
more debug but no success
bump rlt
bump
pre next rebase
we can publish the no angvel update because we latch onto it with the scheduled work item anyways
this kind of runs on the 6c
still bad
SIH almost flying
saving stale traj setpoint yaw
new error. timestamp not the problem anymore
bump rlt; SIH works with executor
shaping up
bumping blob (include tar checkpoint)
cleaning up
fixing formatting
update readme
* moving raptor
bump
compiles and raptor mode appears
hovering with RAPTOR seems to work
Using Raptor to execute offboard commands works (using multirobot f03825a5795a77c5a095f799eeb8e0b646fe7176 to feed the trajectory_setpoint). Requires more testing
simplified rotmat
runtime inference frequency multiple
arming request response reflects actual readiness
adjusting to fit IMU gyro ratemax
relaxing control timing warning thresholds for SITL
Using mode registration to signal if offboard commands should be forwarded to trajectory_setpoint instead of just hardcoding vehicle_status.nav_state == vehicle_status_s::NAVIGATION_STATE_OFFBOARD
adopting new "request_offboard_setpoint" in raptor module
replace offboard seems good
mc_raptor: overwrite offboard parameter
separate raptor config
addendum
Raptor off by default
RAPTOR readme
Loading raptor checkpoint from tar works.
check if load was successful
refactoring: cutting out the pure C interface to allow direct testing of the policy input/output behavior from the file, without fully loading it into memory first
adapter not needed anymore
ripping out test observation mode (not used in a long time)
fixing warnings
bump RLtools to fix the remaining warnings
Loading RAPTOR checkpoint from sdcard seems to work on FMU-6C
embedding Raptor policy into flash works again
also printing checkpoint name when using the embedded policy
cleaner handling of the checkpoint name
back to reading from file
ripping out visual odometry checks
cleaner
more debug but no success
bump rlt
bump
pre next rebase
we can publish the no angvel update because we latch onto it with the scheduled work item anyways
this kind of runs on the 6c
still bad
SIH almost flying
saving stale traj setpoint yaw
new error. timestamp not the problem anymore
bump rlt; SIH works with executor
shaping up
bumping blob (include tar checkpoint)
cleaning up
fixing formatting
update readme
updating gitignore
* fixing format and declaring submodules as cmake dependencies
* adding uORB message documentation
* fixing comment alignment
* Adding option to restrict mc_raptor to not listen to the trajectory_setpoint (use the position and yaw at activation time as reference instead)
* bump RLtools; relax timing thresholds and adding real world readme
* smooth traj tracking performance
* Measuring trajectory_setpoint timing (providing stats in raptor_status); reverting accidental .gitignore modification
* More ideomatic way of setting the path to the policy checkpoint
* Reset trajectory_setpoint on raptor mode activation
* Adding internal trajectory generation (feeding trajectory_setpoint over Mavlink is too noisy). Quite agile trajectory tracking, good performance
* stable flight
* Update msg/versioned/RaptorInput.msg
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
* adopting message formatting conventions
* sort raptor.px4board
* Archiving RegisterExtComponentRequestV1.msg
* Add message versioning for VehicleStatus v2 and RegisterExtComponentRequest v2
* fixing formatting
* making internal reference configurable via command
* RAPTOR docs wip
* raptor internal reference documentation
* Finishing RAPTOR docs first draft
* adding logging instructions
* Fixing missing command documentation test error
* fixing format
* adding motor layout warning
* raptor minimal subedit - prettier, images etc
* Improve intro
* Fix up Neural_Networks version
* Mentioning "Adaptive" in the RAPTOR documentation's title
* Adding clarifications about the internal reference trajectory generator
* Removing "foundation policy" wording
* Fixing new-line check
* Removing redundant (evident through directory hierarchy) raptor_ from filenames
* Unifying Neural Network docs (mc_nn_control and mc_raptor) under the "Neural Network" topic
* Fix to standard structure
* Making the distinction between mc_nn_control and mc_raptor more clear and fixing the comparison table
* Removing trajectory_setpoint forwarding flag from external mode registration request and from the vehicle status
* Trivial layout and wording fixes
* fixing docs error
---------
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>