209 Commits

Author SHA1 Message Date
Jacob Dahl
f00e46f618
feat(dshot): Extended Telemetry and EEPROM support
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
2026-03-17 16:38:33 -08:00
ttechnick
c4330f5a47 feat(fw_att_control): tilt-tracking controller 2026-03-17 17:59:20 +01:00
ttechnick
e370b3f4b8 feat(fw_att_control): Add Initial Quat Controller + Debug topic
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.
2026-03-17 17:59:20 +01:00
Jacob Dahl
88a57c5b65 logger: add sensor_gnss_relative to High Rate Sensors 2026-03-04 10:10:16 -09:00
CaFeZn
963a776fa6
feat(heater): Add multi-instance support for heaters (#26325)
* heater: add multi-instance support, refactor parameter handling, remove legacy params file

This change introduces multi-instance heater support to allow independent temperature control for multiple IMUs.

Main changes:
- Add support for multiple heater instances
- Refactor parameter handling to use per-instance parameters
- Remove the legacy parameter file and migrate to the updated parameter structure

This improves scalability and makes heater configuration consistent across setups with multiple sensors.

* Refactor heater configuration across multiple boards

- Updated heater GPIO definitions to introduce a new naming convention for better clarity and consistency.
- Replaced `GPIO_HEATER_OUTPUT` with `GPIO_HEATER1_OUTPUT` and adjusted the corresponding output enable macros.
- Changed parameter names from `SENS_TEMP_ID` to `HEATER1_IMU_ID` in various board default configurations to reflect the new heater setup.
- Ensured all affected board configurations are updated to maintain functionality with the new heater definitions.

* heater: fix missing HEATER1_OUTPUT_EN control

* heater: fix more missing HEATER1_OUTPUT_EN control

* heater: tidy config, docs, and instance handling

- Remove unused controller period member and use CONTROLLER_PERIOD_DEFAULT
- Improve HEATER${i}_IMU_ID description and instance-related logging/behavior
- Add a guard when HEATER_NUM exceeds HEATER_MAX_INSTANCES

Note: drop intermediate/reverted change around the 'celsius' spelling.

* heater: refactor constructor to remove unused parameter and add instance name function

- Remove unused ModuleParams argument from Heater constructor
- Add heater_instance_name() helper to provide per-instance work queue task names
- Use instance-specific parameter lookup (HEATER{n}_*) during initialization

Use heater_instance_name() to label each instance (heater_1/2/3) in work queue.
Also drop unused ModuleParams argument from constructor and keep per-instance
parameter handle lookup in initialization.

* format

* board: update GPIO configuration for multiple heater instances, add HEATER_NUM for boards using PX4IO

* heater: update heater control to use HEATER1_OUTPUT_EN when using PX4IO for consistency

* heater: add a TODO for px4io multi-instance

* heater: update missing GPIO_HEATER1_OUTPUT in  sky-drones

* heater: fix multiple newlines at EOF (resolve CI check failure)

* heater: switch to PublicationMulti for heater_status and log multi-instance

- Changed _heater_status_pub from Publication to PublicationMulti to support independent per-instance publications without overwriting.
- Updated logged_topics.cpp to use add_optional_topic_multi("heater_status")

This fixes the issue where multiple heater instances were writing to the same heater_status topic, causing data overwriting and incorrect update rates in logs.

---------

Co-authored-by: Jacob Dahl <dahl.jakejacob@gmail.com>
Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>
2026-03-02 12:13:08 -09:00
Marco Hauswirth
8a9be9a8f0 ekf2: update logger, mavlink, DDS, and replay for AuxGlobalPosition
Update integrations to use the new AuxGlobalPosition message instead
of the VehicleGlobalPosition-based aux_global_position topic.
2026-02-20 17:43:45 +01:00
Niklas Hauser
c0c265cd1f [vtx] Add VTX driver with Tramp and SmartAudio support 2026-01-26 11:05:22 +01:00
Phil-Engljaehringer
46d9b14ba0
Feat: Add driver for TMP102 temperature sensor for Skynode-N (#26241)
* feat: added driver for tmp102 temperature sensor

* style: removed new line

* style: adjusted date in header

* style: removed duplicated logging

* fix: moved start-up command from rc.board_sensors to rc.sensors

* style: used consexpr for expected config reg value

* feat: added retry logic to probe function

* style: added _ as prefix to global variable

* style: used make format

* fix: corrected temperature calculation

* fix: mask AL-bit in probe function

* style: removed header files from CMakeLists

* style: used correct english in comments

* refactor: return error right after failure

* style: moved init call to correct place

* fix: corrected temperature calculation (again)

* refactor: removed _curr_pr variable => always have to set PR to desired register on read

* fix: add multi logged topic
2026-01-12 18:42:51 +01:00
Alex Klimaj
d8220d4948
logger: add logger_status topic to default topics (#26197) 2026-01-05 10:50:03 -09:00
Jacob Dahl
699ec30c9c
logger: gps_dump non-optional (#26096) 2025-12-17 09:59:38 -09:00
Claudio Chies
24d06047bd
UAVCAN: Add device tracking and information publishing (#25617)
* uavcan: collect node info and publish every second

* UORB: Add DeviceInformation Message

Format DeviceInformation.msg with standard comment spaces

* SENS: add getter for device_id

* UAVCAN: add publishing of DeviceInformation based on publised message type, and Node Information

* LOG: add deviceInformation

* MSG:BAT: fix comment to be inline with the max_instaces

* UAVCAN: DeviceInformation, incorporated feedback

* UAVCAN: DeviceInformation, incorporated feedback

* UAVCAN: DeviceInformation, Fixed bug with Powermonitor

---------

Co-authored-by: Beat Küng <beat-kueng@gmx.net>
2025-12-16 14:53:44 -09:00
Balduin
8604604a5b
logged_topics: clean up old commented-out topics (#26120) 2025-12-15 09:53:24 -09:00
bresch
3646032296 fw rate: add gain compression algorithm 2025-11-27 17:33:06 +01:00
TedObrien
5483d901f9 MPC9808: Run ScheduleOnInterval() at desired publishing rate and remove elapsed time check and timestamp_sample field from message as no longer needed.
MCP9808: Replaced PX4_INFO with PX4_DEBUG

MCP9808: Update date in headers

MCP9808: Define functions before variables

MCP9808: Increase logging interval for sensor_temp

MCP9808: Removed extra space

MCP9808: Remove this->
2025-11-06 10:00:26 -09:00
TedObrien
a94ee4382b MCP9808: Create driver for MCP9808 temperature sensor 2025-11-06 10:00:26 -09:00
mahima-yoga
be29f647cb logging: log sensor_baro with add_topic_multi
Ensures external barometers (e.g., over UAVCAN) are also logged.
2025-10-06 10:19:01 +02:00
Claudio Chies
f90d6c03fc LOG: increase number of loggable batteries to 3 2025-09-22 15:02:24 +02:00
chfriedrich98
a1bc09a6ad
rover: seperate speed control 2025-08-20 10:54:16 +02:00
Ian Scholl
5736b948ac increase battery max logging instances to 3 2025-07-30 16:43:21 +02:00
Sindre Meyer Hegre
3be0cb077c
Neural Control Mode (#24366)
* Add tflm to px4 with module

 - Add TensorFlow Lite Micro(TFLM) as a library in px4
 - Make a module that uses neural network inference for control, which uses TFLM for inference
 - Make board config files for PX4 with neural module

* Added neural flight mode

* Add posibility to read of inference times

* Fix comments from review:

- Switch ssh link to https link in submodule
- Remove mc_nn_control from startup

* Add tflm to px4 with module

 - Add TensorFlow Lite Micro(TFLM) as a library in px4
 - Make a module that uses neural network inference for control, which uses TFLM for inference
 - Make board config files for PX4 with neural module

* Added neural flight mode

* Add posibility to read of inference times

* Remove auto start

* Add logging from neural control module

* Fix automatic startup to only be when module is included

* Switch to flight mode registration

* Add docs

* Change min/max/coeff to actual parameters

* add figures to neural network docs

* Switch to e2e network

* Remove toolchain changes and replace with instructions in docs

* Get ready for merge after toolchain upgrade

* switch back to submodule

* Try to figure out cmake

* Get CI working with new toolchain

* Remove fork dependency

* Finalize PR

* fix toolchain inclusion

* Fix ctype_base.h include

* Cleanup includes for TFLM

* Remove redundant std

* Update FW module names in board files

* Fix docs

* Remove cstdlib copy

* Copy header from nuttx

* Prettier, markup, layout

* NeuralControl.msg - update uorb comments to current standard

* Add description to neural topic

* Fix typo

* Typo

* TFLM and Module utitlities

* Neural networks top level

* Update docs

* Add manual control

* Update docs

* Revert the manual control attempt

* Update docs/en/advanced/nn_module_utilities.md

* Add posibility to set trajectory setpoint with manual control

---------

Co-authored-by: Pedro Roque <padr@kth.se>
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
Co-authored-by: Ramon Roche <mrpollo@gmail.com>
2025-07-25 09:42:12 -08:00
Jacob Dahl
af878cee7b
uavcan: add node status logging to uORB (#23890)
Co-authored-by: Jordan Leiber <jordan.leiber@vertiq.co>
2025-07-22 23:17:58 -08:00
Matthias Grob
d7ab21b8d6 Add battery_info message with serial number compatible with UAVCAN, MAVLink and drivers
I'm starting the separate battery info message because no char[32] should be published and logged
at high rate and we need a separate battery info message for static information as discussed.
2025-06-17 09:05:22 +02:00
Jacob Dahl
3bbe3e5268 logger: add new mask for high rate sensors 2025-05-27 08:09:28 +02:00
Silvan Fuhrer
2600946172 FW Attitude Controller: Wheel controller rework
add RunwayControl messge to pass wheel steering controls to wheel controller

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>

Runway takeoff: specify that RWTO_TKOFF is directly applied during takeoff

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>

msg/RateCtrlStatus: remove unused wheel_rate_integ field

The wheel rate controller is not run in the moduels that are now
running the MC/FW rate controllers, so thsi field canot be filled.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>

wheel rate controller: use speed scaler quadratically on integrator

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>

wheel yaw controller: use a time constant of 0.1

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>

FW Attitude Controller: lock heading setpoint for wheels to initial heading

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2025-05-26 14:47:38 +02:00
RomanBapst
779a55c6dc FW Position Controller rework
- split up old module into two, one handling setpoint generation, one control
- add lateral and longitudinal control setpoints topics that can also be
injected from companion computer
- add configuration topics that (optionally) configure the controller
with limits and momentary settings

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2025-05-26 14:47:38 +02:00
chfriedrich98
1857920a5f rover: clean up velocity setpoint 2025-05-13 10:23:35 +02:00
chfriedrich98
04512ee91f mecanum: separate velocity control 2025-05-05 11:38:17 +02:00
chfriedrich98
0ab9071606 differential: seperate velocity control 2025-04-29 14:49:44 +02:00
chfriedrich98
9fe98b0724 ackermann: seperate velocity control 2025-04-08 12:27:11 +02:00
Jacob Dahl
543851db50
[Sponsored by ARK] Bidirectional DShot (#23863)
* Bidirectional DShot

Co-authored-by: Julian Oes <julian@oes.ch>

* f4/f1 support, not supported

* fix f1 build target

* sanity check timer_channel value, fix CCxNP ifdef, debug stuff

* removed debug code, added define for H7 HAVE_GTIM_CCXNP

* round robin sampling for less than 4 DMA

* unlimited esc_status logging

* dshot: fix formatting

* dshot: add define for number of DMA channels to use

This allows individual boards to override the number of DShot channels
and hence avoid round robin capture of the RPM feedback.

* ARK: enable 4 DMA channels for DShot on 6X

* dshot: publish when all channels are updated

This slows down the ESC_STATUS publication in the case of round robin
capture. E.g. for 800 Hz output with one DMA channel, the ESC_STATUS is
now published at 200 Hz.

* dshot: avoid duplicate publications for bidir and telem

Instead of publishing both bidirectional dshot updates as well as
telemetry updates, we now combine the data from both streams, and
publish whenever we get RPM updates, as the latter arrives with higher
rate, e.g. 200 Hz with round robin, or faster otherwise.

When combining the data, we take RPM from bidirectional dshot, and the
rest from telemetry.

When we have only one of the two, either telemetry or bidirectional
dshot, we just publish that one.

* boards: add ark fpv and pi6x BOARD_DMA_NUM_DSHOT_CHANNELS

* dshot: turn off debug build

---------

Co-authored-by: Julian Oes <julian@oes.ch>
Co-authored-by: alexklimaj <alex@arkelectron.com>
2025-03-12 12:55:15 -06:00
chfriedrich98
d1b0be18b2 pure_pursuit: update library 2025-03-10 11:14:00 +01:00
chfriedrich98
7c63468e8b mecanum: refactor code architecture 2025-02-25 17:06:17 +01:00
chfriedrich98
04a3c4af20
Differential Rover: Refactor and clean up, align with Ackermann rover(#24318)
* differential: refactor code architecture

* Offboard fix

* fix accel/decel slew rate
2025-02-18 18:26:38 +01:00
Silvan Fuhrer
3c129aefa1
Add IC engine control module (#24055)
Internal combustion engine control module.
New actuator functions and RPM based start/restart logic.
Not enabled by default. 

---------

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
Co-authored-by: Pernilla <pernilla@auterion.com>
2025-02-18 17:15:32 +01:00
Silvan
b916a96e00 Remove uorb topics exclusively used for avoidance
- TrajectoryBezier.msg
- TrajectoryWaypoint.msg
- VehicleTrajectoryBezier.msg
- VehicleTrajectoryWaypoint.msg

Additionally remove TRAJECTORY_REPRESENTATION_WAYPOINTS mavlink stream.

Signed-off-by: Silvan <silvan@auterion.com>
2025-02-18 14:33:16 +01:00
chfriedrich98
55f51d7e7e ackermann: refactor code architecture 2025-02-10 15:54:24 +01:00
bresch
c76e74338b ekf-replay: fix airspeed replay
If available, the EKF uses airspeed_validated, not airspeed
2025-01-26 23:05:39 -05:00
Jacob Dahl
0fb8463b79
logger: always log can_interface_status (#24071)
* logger: always log can_interface_status

* logger: log topic can_interface_status using CONFIG_BOARD_UAVCAN_INTERFACES
2025-01-13 10:15:40 -07:00
Claudio Chies
1718b37fe4 SENS: RNG: SF45 changed data processing and publication design, moved to a publishing per sector design.
other minor improvements
2024-12-16 10:49:13 +01:00
chfriedrich98
6a7edac10d ackermann: restructure module 2024-10-31 16:15:37 +01:00
chfriedrich98
0e65679c9e
Mecanum rover: add dedicated module for mecanum rovers (#23708) 2024-09-25 09:35:41 +02:00
Konrad
aab2390e51 navigator: publish distance sensor mode change request when in RTL landing phase or during mission landing 2024-09-16 09:11:23 +02:00
chfriedrich98
f8188f0981
differential: update module (#23629)
Improve the slow down effect and add support for speed change in mission mode.
Seperate code related to turning setpoints into motor commands into its own folder and refactor code.
2024-08-29 15:27:08 +02:00
bresch
9f69e9ee6c navigator: publish navigator_state
feedback to commander
2024-08-14 11:08:02 +02:00
chfriedrich98
33d99a13e8
differential: restructure and update module (#23430)
* differential: rename module

* differential: restructure and update module
2024-08-07 09:53:37 +02:00
chfriedrich98
03ff837c50 ackermann: new features and improvements
added return mode support, slew rates for actuators, new ackermann specific message, improved cornering slow down effect and fixed logging issue.
2024-07-10 12:06:48 +02:00
Daniel Agar
30b854da35
ekf2: verbose logging control (new EKF2_LOG_VERBOSE)
- new parameter EKF2_LOG_VERBOSE to enable (currently enabled by default)
 - force advertise topics immediately (based on EKF2_LOG_VERBOSE and per aid source configuration)
 - logger optionally log all estimator topics at minimal rate
2024-06-27 01:10:57 -04:00
bresch
68980b59e2 ekf2: add terrain state 2024-06-26 11:05:38 +02:00
Jonas Eschmann
54c8f9e8c9 Adding vehicle_acceleration and actuator_motors to the logged topics for system identification 2024-06-17 22:19:24 -04:00
Nuno Marques
a8cb5a7715 Add fuel tank status report support
* Adds support to DroneCAN FuelTankStatus messages
* Adds fuel_tank_status uORB message
* Adds FUEL_STATUS MAVLink stream
* Adds parameter to define max fuel tank capacity
2024-06-17 12:58:46 -07:00