From efb4ff3353f919add020dec2349e52d296b64d62 Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Thu, 24 Jul 2025 09:46:30 +1000 Subject: [PATCH] update modules ref --- docs/en/modules/modules_controller.md | 114 ++++------ docs/en/modules/modules_driver.md | 146 ++++++------- .../modules/modules_driver_distance_sensor.md | 79 +++++-- .../en/modules/modules_driver_magnetometer.md | 26 +++ docs/en/modules/modules_system.md | 195 +++++++++--------- 5 files changed, 298 insertions(+), 262 deletions(-) diff --git a/docs/en/modules/modules_controller.md b/docs/en/modules/modules_controller.md index 049a5659df..626633d7b6 100644 --- a/docs/en/modules/modules_controller.md +++ b/docs/en/modules/modules_controller.md @@ -1,13 +1,11 @@ # Modules Reference: Controller - - ## airship_att_control Source: [modules/airship_att_control](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/airship_att_control) - ### Description + This implements the airship attitude and rate controller. Ideally it would take attitude setpoints (`vehicle_attitude_setpoint`) or rate setpoints (in acro mode via `manual_control_setpoint` topic) as inputs and outputs actuator control messages. @@ -15,8 +13,8 @@ via `manual_control_setpoint` topic) as inputs and outputs actuator control mess Currently it is feeding the `manual_control_setpoint` topic directly to the actuators. ### Implementation -To reduce control latency, the module directly polls on the gyro topic published by the IMU driver. +To reduce control latency, the module directly polls on the gyro topic published by the IMU driver. ### Usage {#airship_att_control_usage} @@ -34,8 +32,8 @@ airship_att_control [arguments...] Source: [modules/control_allocator](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/control_allocator) - ### Description + This implements control allocation. It takes torque and thrust setpoints as inputs and outputs actuator setpoint messages. @@ -55,12 +53,11 @@ control_allocator [arguments...] Source: [modules/flight_mode_manager](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/flight_mode_manager) - ### Description + This implements the setpoint generation for all modes. It takes the current mode state of the vehicle as input and outputs setpoints for controllers. - ### Usage {#flight_mode_manager_usage} ``` @@ -77,10 +74,9 @@ flight_mode_manager [arguments...] Source: [modules/fw_att_control](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/fw_att_control) - ### Description -fw_att_control is the fixed wing attitude controller. +fw_att_control is the fixed wing attitude controller. ### Usage {#fw_att_control_usage} @@ -99,10 +95,9 @@ fw_att_control [arguments...] Source: [modules/fw_lateral_longitudinal_control](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/fw_lateral_longitudinal_control) - ### Description -fw_lat_lon_control computes attitude and throttle setpoints from lateral and longitudinal control setpoints. +fw_lat_lon_control computes attitude and throttle setpoints from lateral and longitudinal control setpoints. ### Usage {#fw_lat_lon_control_usage} @@ -121,13 +116,12 @@ fw_lat_lon_control [arguments...] Source: [modules/fw_mode_manager](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/fw_mode_manager) - ### Description + This implements the setpoint generation for all PX4-internal fixed-wing modes, height-rate control and higher. It takes the current mode state of the vehicle as input and outputs setpoints consumed by the fixed-wing lateral-longitudinal controller and and controllers below that (attitude, rate). - ### Usage {#fw_mode_manager_usage} ``` @@ -144,10 +138,9 @@ fw_mode_manager [arguments...] Source: [modules/fw_rate_control](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/fw_rate_control) - ### Description -fw_rate_control is the fixed-wing rate controller. +fw_rate_control is the fixed-wing rate controller. ### Usage {#fw_rate_control_usage} @@ -166,8 +159,8 @@ fw_rate_control [arguments...] Source: [modules/mc_att_control](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/mc_att_control) - ### Description + This implements the multicopter attitude controller. It takes attitude setpoints (`vehicle_attitude_setpoint`) as inputs and outputs a rate setpoint. @@ -180,7 +173,6 @@ Institute for Dynamic Systems and Control (IDSC), ETH Zurich https://www.research-collection.ethz.ch/bitstream/handle/20.500.11850/154099/eth-7387-01.pdf - ### Usage {#mc_att_control_usage} ``` @@ -198,8 +190,8 @@ mc_att_control [arguments...] Source: [modules/mc_pos_control](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/mc_pos_control) - ### Description + The controller has two loops: a P loop for position error and a PID loop for velocity error. Output of the velocity controller is thrust vector that is split to thrust direction (i.e. rotation matrix for multicopter orientation) and thrust scalar (i.e. multicopter thrust itself). @@ -224,14 +216,13 @@ mc_pos_control [arguments...] Source: [modules/mc_rate_control](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/mc_rate_control) - ### Description + This implements the multicopter rate controller. It takes rate setpoints (in acro mode via `manual_control_setpoint` topic) as inputs and outputs actuator control messages. The controller has a PID loop for angular rate error. - ### Usage {#mc_rate_control_usage} ``` @@ -249,20 +240,20 @@ mc_rate_control [arguments...] Source: [modules/navigator](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/navigator) - ### Description + Module that is responsible for autonomous flight modes. This includes missions (read from dataman), takeoff and RTL. It is also responsible for geofence violation checking. ### Implementation + The different internal modes are implemented as separate classes that inherit from a common base class `NavigatorMode`. The member `_navigation_mode` contains the current active mode. Navigator publishes position setpoint triplets (`position_setpoint_triplet_s`), which are then used by the position controller. - ### Usage {#navigator_usage} ``` @@ -283,8 +274,8 @@ navigator [arguments...] Source: [modules/rover_ackermann](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/rover_ackermann) - ### Description + Rover ackermann module. ### Usage {#rover_ackermann_usage} @@ -303,8 +294,8 @@ rover_ackermann [arguments...] Source: [modules/rover_differential](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/rover_differential) - ### Description + Rover differential module. ### Usage {#rover_differential_usage} @@ -323,8 +314,8 @@ rover_differential [arguments...] Source: [modules/rover_mecanum](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/rover_mecanum) - ### Description + Rover mecanum module. ### Usage {#rover_mecanum_usage} @@ -339,54 +330,15 @@ rover_mecanum [arguments...] status print status info ``` -## rover_pos_control - -Source: [modules/rover_pos_control](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/rover_pos_control) - - -### Description -Controls the position of a ground rover using an L1 controller. - -Publishes `vehicle_thrust_setpoint (only in x) and vehicle_torque_setpoint (only yaw)` messages at IMU_GYRO_RATEMAX. - -### Implementation -Currently, this implementation supports only a few modes: - - * Full manual: Throttle and yaw controls are passed directly through to the actuators - * Auto mission: The rover runs missions - * Loiter: The rover will navigate to within the loiter radius, then stop the motors - -### Examples -CLI usage example: -``` -rover_pos_control start -rover_pos_control status -rover_pos_control stop -``` - - -### Usage {#rover_pos_control_usage} - -``` -rover_pos_control [arguments...] - Commands: - start - - stop - - status print status info -``` - ## spacecraft Source: [modules/spacecraft](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/spacecraft) + ### Description + This implements control allocation for spacecraft vehicles. + It takes torque and thrust setpoints as inputs and outputs + actuator setpoint messages. - ### Description - This implements control allocation for spacecraft vehicles. - It takes torque and thrust setpoints as inputs and outputs - actuator setpoint messages. - ### Usage {#spacecraft_usage} ``` @@ -394,6 +346,8 @@ spacecraft [arguments...] Commands: start + status + stop status print status info @@ -403,27 +357,29 @@ spacecraft [arguments...] Source: [modules/uuv_att_control](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/uuv_att_control) - ### Description + Controls the attitude of an unmanned underwater vehicle (UUV). Publishes `vehicle_thrust_setpont` and `vehicle_torque_setpoint` messages at a constant 250Hz. ### Implementation + Currently, this implementation supports only a few modes: - * Full manual: Roll, pitch, yaw, and throttle controls are passed directly through to the actuators - * Auto mission: The uuv runs missions +- Full manual: Roll, pitch, yaw, and throttle controls are passed directly through to the actuators +- Auto mission: The uuv runs missions ### Examples + CLI usage example: + ``` uuv_att_control start uuv_att_control status uuv_att_control stop ``` - ### Usage {#uuv_att_control_usage} ``` @@ -440,16 +396,22 @@ uuv_att_control [arguments...] Source: [modules/uuv_pos_control](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/uuv_pos_control) - ### Description + Controls the attitude of an unmanned underwater vehicle (UUV). Publishes `attitude_setpoint` messages. + ### Implementation + Currently, this implementation supports only a few modes: - * Full manual: Roll, pitch, yaw, and throttle controls are passed directly through to the actuators - * Auto mission: The uuv runs missions + +- Full manual: Roll, pitch, yaw, and throttle controls are passed directly through to the actuators +- Auto mission: The uuv runs missions + ### Examples + CLI usage example: + ``` uuv_pos_control start uuv_pos_control status @@ -472,8 +434,8 @@ uuv_pos_control [arguments...] Source: [modules/vtol_att_control](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/vtol_att_control) - ### Description + fw_att_control is the fixed wing attitude controller. ### Usage {#vtol_att_control_usage} diff --git a/docs/en/modules/modules_driver.md b/docs/en/modules/modules_driver.md index 1b8d7d6f2f..33b5a38955 100644 --- a/docs/en/modules/modules_driver.md +++ b/docs/en/modules/modules_driver.md @@ -14,7 +14,6 @@ Subcategories: - [Rpm Sensor](modules_driver_rpm_sensor.md) - [Transponder](modules_driver_transponder.md) - ## MCP23009 Source: [drivers/gpio/mcp23009](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/gpio/mcp23009) @@ -51,10 +50,9 @@ MCP23009 [arguments...] Source: [drivers/adc/board_adc](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/adc/board_adc) - ### Description -ADC driver. +ADC driver. ### Usage {#adc_usage} @@ -75,7 +73,6 @@ adc [arguments...] Source: [drivers/adc/ads1115](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/adc/ads1115) - ### Description Driver to enable an external [ADS1115](https://www.adafruit.com/product/1085) ADC connected via I2C. @@ -89,7 +86,6 @@ It is enabled/disabled using the parameter, and is disabled by default. If enabled, internal ADCs are not used. - ### Usage {#ads1115_usage} ``` @@ -114,8 +110,8 @@ ads1115 [arguments...] Source: [drivers/osd/atxxxx](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/osd/atxxxx) - ### Description + OSD driver for the ATXXXX chip that is mounted on the OmnibusF4SD board for example. It can be enabled with the OSD_ATXXXX_CFG parameter. @@ -144,17 +140,19 @@ atxxxx [arguments...] Source: [drivers/smart_battery/batmon](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/smart_battery/batmon) - ### Description + Driver for SMBUS Communication with BatMon enabled smart-battery Setup/usage information: https://rotoye.com/batmon-tutorial/ + ### Examples + To start at address 0x0B, on bus 4 + ``` batmon start -X -a 11 -b 4 ``` - ### Usage {#batmon_usage} ``` @@ -185,17 +183,18 @@ batmon [arguments...] Source: [drivers/batt_smbus](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/batt_smbus) - ### Description + Smart battery driver for the BQ40Z50 fuel gauge IC. ### Examples + To write to flash to set parameters. address, number_of_bytes, byte0, ... , byteN + ``` batt_smbus -X write_flash 19069 2 27 0 ``` - ### Usage {#batt_smbus_usage} ``` @@ -261,8 +260,8 @@ bst [arguments...] Source: [drivers/dshot](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/dshot) - ### Description + This is the DShot output driver. It is similar to the fmu driver, and can be used as drop-in replacement to use DShot as ESC communication protocol instead of PWM. @@ -270,16 +269,20 @@ On startup, the module tries to occupy all available pins for DShot output. It skips all pins already in use (e.g. by a camera trigger module). It supports: + - DShot150, DShot300, DShot600 - telemetry via separate UART and publishing as esc_status message - sending DShot commands via CLI ### Examples + Permanently reverse motor 1: + ``` dshot reverse -m 1 dshot save -m 1 ``` + After saving, the reversed direction will be regarded as the normal one. So to reverse again repeat the same commands. ### Usage {#dshot_usage} @@ -324,9 +327,6 @@ dshot [arguments...] beep5 Send Beep pattern 5 [-m ] Motor index (1-based, default=all) - esc_info Request ESC information - -m Motor index (1-based) - stop status print status info @@ -336,10 +336,8 @@ dshot [arguments...] Source: [examples/fake_gps](https://github.com/PX4/PX4-Autopilot/tree/main/src/examples/fake_gps) - ### Description - ### Usage {#fake_gps_usage} ``` @@ -356,10 +354,8 @@ fake_gps [arguments...] Source: [examples/fake_imu](https://github.com/PX4/PX4-Autopilot/tree/main/src/examples/fake_imu) - ### Description - ### Usage {#fake_imu_usage} ``` @@ -376,8 +372,8 @@ fake_imu [arguments...] Source: [examples/fake_magnetometer](https://github.com/PX4/PX4-Autopilot/tree/main/src/examples/fake_magnetometer) - ### Description + Publish the earth magnetic field as a fake magnetometer (sensor_mag). Requires vehicle_attitude and vehicle_gps_position. @@ -397,7 +393,6 @@ fake_magnetometer [arguments...] Source: [drivers/wind_sensor/ft_technologies](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/wind_sensor/ft_technologies) - ### Description Serial bus driver for the FT Technologies Digital Wind Sensor FT742. This driver is required to operate alongside @@ -408,10 +403,13 @@ Most boards are configured to enable/start the driver on a specified UART using ### Examples Attempt to start driver on a specified serial device. + ``` ft_technologies_serial start -d /dev/ttyS1 ``` + Stop driver + ``` ft_technologies_serial stop ``` @@ -431,15 +429,17 @@ ft_technologies_serial [arguments...] Source: [modules/gimbal](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/gimbal) - ### Description + Mount/gimbal Gimbal control driver. It maps several different input methods (eg. RC or MAVLink) to a configured output (eg. AUX channels or MAVLink). Documentation how to use it is on the [gimbal_control](https://docs.px4.io/main/en/advanced/gimbal_control.html) page. ### Examples + Test the output by setting a angles (all omitted axes are set to 0): + ``` gimbal test pitch -45 yaw 30 ``` @@ -471,8 +471,8 @@ gimbal [arguments...] Source: [drivers/gps](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/gps) - ### Description + GPS driver module that handles the communication with the device and publishes the position via uORB. It supports multiple protocols (device vendors) and by default automatically selects the correct one. @@ -481,17 +481,20 @@ on the second uORB topic instance, but it's currently not used by the rest of th data will be logged, so that it can be used for comparisons). ### Implementation + There is a thread for each device polling for data. The GPS protocol classes are implemented with callbacks so that they can be used in other projects as well (eg. QGroundControl uses them too). ### Examples Starting 2 GPS devices (the main GPS on /dev/ttyS3 and the secondary on /dev/ttyS4): + ``` gps start -d /dev/ttyS3 -e /dev/ttyS4 ``` Initiate warm restart of GPS device + ``` gps reset warm ``` @@ -529,10 +532,8 @@ gps [arguments...] Source: [modules/simulation/gz_bridge](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/simulation/gz_bridge) - ### Description - ### Usage {#gz_bridge_usage} ``` @@ -551,8 +552,8 @@ gz_bridge [arguments...] Source: [drivers/power_monitor/ina220](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/power_monitor/ina220) - ### Description + Driver for the INA220 power monitor. Multiple instances of this driver can run simultaneously, if each instance has a separate bus OR I2C address. @@ -564,7 +565,6 @@ the -f flag. If this flag is set, then if initialization fails, the driver will every 0.5 seconds. With this flag set, you can plug in a battery after the driver starts, and it will work. Without this flag set, the battery must be plugged in before starting the driver. - ### Usage {#ina220_usage} ``` @@ -594,8 +594,8 @@ ina220 [arguments...] Source: [drivers/power_monitor/ina226](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/power_monitor/ina226) - ### Description + Driver for the INA226 power monitor. Multiple instances of this driver can run simultaneously, if each instance has a separate bus OR I2C address. @@ -607,7 +607,6 @@ the -f flag. If this flag is set, then if initialization fails, the driver will every 0.5 seconds. With this flag set, you can plug in a battery after the driver starts, and it will work. Without this flag set, the battery must be plugged in before starting the driver. - ### Usage {#ina226_usage} ``` @@ -635,8 +634,8 @@ ina226 [arguments...] Source: [drivers/power_monitor/ina228](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/power_monitor/ina228) - ### Description + Driver for the INA228 power monitor. Multiple instances of this driver can run simultaneously, if each instance has a separate bus OR I2C address. @@ -648,7 +647,6 @@ the -f flag. If this flag is set, then if initialization fails, the driver will every 0.5 seconds. With this flag set, you can plug in a battery after the driver starts, and it will work. Without this flag set, the battery must be plugged in before starting the driver. - ### Usage {#ina228_usage} ``` @@ -676,8 +674,8 @@ ina228 [arguments...] Source: [drivers/power_monitor/ina238](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/power_monitor/ina238) - ### Description + Driver for the INA238 power monitor. Multiple instances of this driver can run simultaneously, if each instance has a separate bus OR I2C address. @@ -689,7 +687,6 @@ the -f flag. If this flag is set, then if initialization fails, the driver will every 0.5 seconds. With this flag set, you can plug in a battery after the driver starts, and it will work. Without this flag set, the battery must be plugged in before starting the driver. - ### Usage {#ina238_usage} ``` @@ -717,8 +714,8 @@ ina238 [arguments...] Source: [drivers/telemetry/iridiumsbd](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/telemetry/iridiumsbd) - ### Description + IridiumSBD driver. Creates a virtual serial port that another module can use for communication (e.g. mavlink). @@ -769,8 +766,8 @@ irlock [arguments...] Source: [drivers/linux_pwm_out](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/linux_pwm_out) - ### Description + Linux PWM output driver with board-specific backend implementation. ### Usage {#linux_pwm_out_usage} @@ -815,20 +812,22 @@ lsm303agr [arguments...] Source: [drivers/osd/msp_osd](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/osd/msp_osd) - ### Description + MSP telemetry streamer ### Implementation + Converts uORB messages to MSP telemetry packets ### Examples + CLI usage example: + ``` msp_osd ``` - ### Usage {#msp_osd_usage} ``` @@ -837,21 +836,26 @@ msp_osd [arguments...] stop status print status info + + channel Change VTX channel ``` ## newpixel Source: [drivers/lights/neopixel](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/lights/neopixel) - ### Description + This module is responsible for driving interfasing to the Neopixel Serial LED ### Examples + It is typically started with: + ``` neopixel -n 8 ``` + To drive all available leds. ### Usage {#newpixel_usage} @@ -920,8 +924,8 @@ paw3902 [arguments...] Source: [drivers/pca9685_pwm_out](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/pca9685_pwm_out) - ### Description + This is a PCA9685 PWM output driver. It runs on I2C workqueue which is asynchronous with FC control loop, @@ -931,12 +935,13 @@ It can do full 12bits output as duty-cycle mode, while also able to output preci that can be accepted by most ESCs and servos. ### Examples + It is typically started with: + ``` pca9685_pwm_out start -a 0x40 -b 1 ``` - ### Usage {#pca9685_pwm_out_usage} ``` @@ -957,10 +962,9 @@ pca9685_pwm_out [arguments...] Source: [drivers/power_monitor/pm_selector_auterion](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/power_monitor/pm_selector_auterion) - ### Description -Driver for starting and auto-detecting different power monitors. +Driver for starting and auto-detecting different power monitors. ### Usage {#pm_selector_auterion_usage} @@ -1004,10 +1008,9 @@ pmw3901 [arguments...] Source: [drivers/pps_capture](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/pps_capture) - ### Description -This implements capturing PPS information from the GNSS module and calculates the drift between PPS and Real-time clock. +This implements capturing PPS information from the GNSS module and calculates the drift between PPS and Real-time clock. ### Usage {#pps_capture_usage} @@ -1025,13 +1028,12 @@ pps_capture [arguments...] Source: [drivers/pwm_out](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/pwm_out) - ### Description + This module is responsible for driving the output pins. For boards without a separate IO chip (eg. Pixracer), it uses the main channels. On boards with an IO chip (eg. Pixhawk), it uses the AUX channels, and the px4io driver is used for main ones. - ### Usage {#pwm_out_usage} ``` @@ -1048,8 +1050,8 @@ pwm_out [arguments...] Source: [modules/simulation/pwm_out_sim](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/simulation/pwm_out_sim) - ### Description + Driver for simulated PWM outputs. Its only function is to take `actuator_control` uORB messages, @@ -1058,7 +1060,6 @@ mix them with any loaded mixer and output the result to the It is used in SITL and HITL. - ### Usage {#pwm_out_sim_usage} ``` @@ -1101,8 +1102,8 @@ px4flow [arguments...] Source: [drivers/px4io](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/px4io) - ### Description + Output driver communicating with the IO co-processor. ### Usage {#px4io_usage} @@ -1197,8 +1198,8 @@ rgbled_is31fl3195 [arguments...] Source: [drivers/lights/rgbled_lp5562](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/lights/rgbled_lp5562) - ### Description + Driver for [LP5562](https://www.ti.com/product/LP5562) LED driver connected via I2C. This used in some GPS modules by Holybro for [PX4 status notification](../getting_started/led_meanings.md) @@ -1231,14 +1232,13 @@ rgbled_lp5562 [arguments...] Source: [drivers/roboclaw](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/roboclaw) - ### Description This driver communicates over UART with the [Roboclaw motor driver](https://www.basicmicro.com/motor-controller). It performs two tasks: - - Control the motors based on the OutputModuleInterface. - - Read the wheel encoders and publish the raw data in the `wheel_encoders` uORB topic +- Control the motors based on the OutputModuleInterface. +- Read the wheel encoders and publish the raw data in the `wheel_encoders` uORB topic In order to use this driver, the Roboclaw should be put into Packet Serial mode (see the linked documentation), and your flight controller's UART port should be connected to the Roboclaw as shown in the documentation. @@ -1279,12 +1279,11 @@ rpm_capture [arguments...] Source: [drivers/safety_button](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/safety_button) - ### Description + This module is responsible for the safety button. Pressing the safety button 3 times quickly will trigger a GCS pairing request. - ### Usage {#safety_button_usage} ``` @@ -1301,8 +1300,8 @@ safety_button [arguments...] Source: [drivers/gnss/septentrio](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/gnss/septentrio) - ### Description + Driver for Septentrio GNSS receivers. It can automatically configure them and make their output available for the rest of the system. A secondary receiver is supported for redundancy, logging and dual-receiver heading. @@ -1312,17 +1311,20 @@ If others are used, the driver will use 230400 and give a warning. ### Examples Use one receiver on port `/dev/ttyS0` and automatically configure it to use baud rate 230400: + ``` septentrio start -d /dev/ttyS0 -b 230400 ``` Use two receivers, the primary on port `/dev/ttyS3` and the secondary on `/dev/ttyS4`, detect baud rate automatically and preserve them: + ``` septentrio start -d /dev/ttyS3 -e /dev/ttyS4 ``` Perform warm reset of the receivers: + ``` gps reset warm ``` @@ -1354,32 +1356,37 @@ septentrio [arguments...] Source: [drivers/hygrometer/sht3x](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/hygrometer/sht3x) - ### Description + SHT3x Temperature and Humidity Sensor Driver by Senserion. ### Examples + CLI usage example: + ``` sht3x start -X ``` - Start the sensor driver on the external bus + +Start the sensor driver on the external bus ``` sht3x status ``` - Print driver status + +Print driver status ``` sht3x values ``` - Print last measured values + +Print last measured values ``` sht3x reset ``` - Reinitialize senzor, reset flags +Reinitialize senzor, reset flags ### Usage {#sht3x_usage} @@ -1410,7 +1417,6 @@ sht3x [arguments...] Source: [drivers/tap_esc](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/tap_esc) - ### Description This module controls the TAP_ESC hardware via UART. It listens on the @@ -1445,10 +1451,9 @@ tap_esc [arguments...] Source: [drivers/tone_alarm](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/tone_alarm) - ### Description -This module is responsible for the tone alarm. +This module is responsible for the tone alarm. ### Usage {#tone_alarm_usage} @@ -1466,7 +1471,6 @@ tone_alarm [arguments...] Source: [drivers/uwb/uwb_sr150](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/uwb/uwb_sr150) - ### Description Driver for NXP UWB_SR150 UWB positioning system. This driver publishes a `uwb_distance` message @@ -1479,7 +1483,7 @@ Start the driver with a given device: ``` uwb start -d /dev/ttyS2 ``` - + ### Usage {#uwb_usage} ``` @@ -1517,13 +1521,12 @@ vertiq_io [arguments...] Source: [drivers/voxl2_io](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/voxl2_io) - ### Description + This module is responsible for driving the output pins. For boards without a separate IO chip (eg. Pixracer), it uses the main channels. On boards with an IO chip (eg. Pixhawk), it uses the AUX channels, and the px4io driver is used for main ones. - ### Usage {#voxl2_io_usage} ``` @@ -1548,20 +1551,22 @@ voxl2_io [arguments...] Source: [drivers/actuators/voxl_esc](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/actuators/voxl_esc) - ### Description + This module is responsible for... ### Implementation + By default the module runs on a work queue with a callback on the uORB actuator_controls topic. ### Examples + It is typically started with: + ``` todo ``` - ### Usage {#voxl_esc_usage} ``` @@ -1635,11 +1640,10 @@ voxlpm [arguments...] Source: [modules/zenoh](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/zenoh) - ### Description Zenoh demo bridge - + ### Usage {#zenoh_usage} ``` diff --git a/docs/en/modules/modules_driver_distance_sensor.md b/docs/en/modules/modules_driver_distance_sensor.md index 6d34f31794..af48d491a5 100644 --- a/docs/en/modules/modules_driver_distance_sensor.md +++ b/docs/en/modules/modules_driver_distance_sensor.md @@ -4,7 +4,6 @@ Source: [drivers/distance_sensor/broadcom/afbrs50](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/distance_sensor/broadcom/afbrs50) - ### Description Driver for the Broadcom AFBRS50. @@ -12,10 +11,13 @@ Driver for the Broadcom AFBRS50. ### Examples Attempt to start driver on a specified serial device. + ``` afbrs50 start ``` + Stop driver + ``` afbrs50 stop ``` @@ -30,8 +32,6 @@ afbrs50 [arguments...] [-r ] Sensor rotation - downward facing by default default: 25 - test Test driver - stop Stop driver ``` @@ -63,7 +63,6 @@ gy_us42 [arguments...] Source: [drivers/distance_sensor/leddar_one](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/distance_sensor/leddar_one) - ### Description Serial bus driver for the LeddarOne LiDAR. @@ -75,10 +74,13 @@ Setup/usage information: https://docs.px4.io/main/en/sensor/leddar_one.html ### Examples Attempt to start driver on a specified serial device. + ``` leddar_one start -d /dev/ttyS1 ``` + Stop driver + ``` leddar_one stop ``` @@ -100,7 +102,6 @@ leddar_one [arguments...] Source: [drivers/distance_sensor/lightware_laser_i2c](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/distance_sensor/lightware_laser_i2c) - ### Description I2C bus driver for Lightware SFxx series LIDAR rangefinders: SF10/a, SF10/b, SF10/c, SF11/c, SF/LW20. @@ -133,7 +134,6 @@ lightware_laser_i2c [arguments...] Source: [drivers/distance_sensor/lightware_laser_serial](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/distance_sensor/lightware_laser_serial) - ### Description Serial bus driver for the LightWare SF02/F, SF10/a, SF10/b, SF10/c, SF11/c Laser rangefinders. @@ -145,10 +145,13 @@ Setup/usage information: https://docs.px4.io/main/en/sensor/sfxx_lidar.html ### Examples Attempt to start driver on a specified serial device. + ``` lightware_laser_serial start -d /dev/ttyS1 ``` + Stop driver + ``` lightware_laser_serial stop ``` @@ -170,19 +173,20 @@ lightware_laser_serial [arguments...] Source: [drivers/distance_sensor/lightware_sf45_serial](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/distance_sensor/lightware_sf45_serial) - ### Description Serial bus driver for the Lightware SF45/b Laser rangefinder. - ### Examples Attempt to start driver on a specified serial device. + ``` lightware_sf45_serial start -d /dev/ttyS1 ``` + Stop driver + ``` lightware_sf45_serial stop ``` @@ -200,12 +204,11 @@ lightware_sf45_serial [arguments...] ## ll40ls -Source: [drivers/distance_sensor/ll40ls_pwm](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/distance_sensor/ll40ls_pwm) - +Source: [drivers/distance_sensor/ll40ls](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/distance_sensor/ll40ls) ### Description -PWM driver for LidarLite rangefinders. +I2C bus driver for LidarLite rangefinders. The sensor/driver must be enabled using the parameter SENS_EN_LL40LS. @@ -215,6 +218,42 @@ Setup/usage information: https://docs.px4.io/main/en/sensor/lidar_lite.html ``` ll40ls [arguments...] + Commands: + start + [-I] Internal I2C bus(es) + [-X] External I2C bus(es) + [-b ] board-specific bus (default=all) (external SPI: n-th bus + (default=1)) + [-f ] bus frequency in kHz + [-q] quiet startup (no message if no device found) + [-a ] I2C address + default: 98 + [-R ] Sensor rotation - downward facing by default + default: 25 + + regdump + + stop + + status print status info +``` + +## ll40ls_pwm + +Source: [drivers/distance_sensor/ll40ls_pwm](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/distance_sensor/ll40ls_pwm) + +### Description + +PWM driver for LidarLite rangefinders. + +The sensor/driver must be enabled using the parameter SENS_EN_LL40LS. + +Setup/usage information: https://docs.px4.io/main/en/sensor/lidar_lite.html + +### Usage {#ll40ls_pwm_usage} + +``` +ll40ls_pwm [arguments...] Commands: start Start driver [-R ] Sensor rotation - downward facing by default @@ -277,7 +316,6 @@ mb12xx [arguments...] Source: [drivers/distance_sensor/pga460](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/distance_sensor/pga460) - ### Description Ultrasonic range finder driver that handles the communication with the device and publishes the distance via uORB. @@ -335,14 +373,12 @@ srf02 [arguments...] Source: [drivers/distance_sensor/srf05](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/distance_sensor/srf05) +### Description - ### Description +Driver for HY-SRF05 / HC-SR05 and HC-SR04 rangefinders. - Driver for HY-SRF05 / HC-SR05 and HC-SR04 rangefinders. +The sensor/driver must be enabled using the parameter SENS_EN_HXSRX0X. - The sensor/driver must be enabled using the parameter SENS_EN_HXSRX0X. - - ### Usage {#srf05_usage} ``` @@ -365,7 +401,6 @@ srf05 [arguments...] Source: [drivers/distance_sensor/teraranger](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/distance_sensor/teraranger) - ### Description I2C bus driver for TeraRanger rangefinders. @@ -426,7 +461,6 @@ tf02pro [arguments...] Source: [drivers/distance_sensor/tfmini](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/distance_sensor/tfmini) - ### Description Serial bus driver for the Benewake TFmini LiDAR. @@ -438,10 +472,13 @@ Setup/usage information: https://docs.px4.io/main/en/sensor/tfmini.html ### Examples Attempt to start driver on a specified serial device. + ``` tfmini start -d /dev/ttyS1 ``` + Stop driver + ``` tfmini stop ``` @@ -467,7 +504,6 @@ tfmini [arguments...] Source: [drivers/distance_sensor/ulanding_radar](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/distance_sensor/ulanding_radar) - ### Description Serial bus driver for the Aerotenna uLanding radar. @@ -477,10 +513,13 @@ Setup/usage information: https://docs.px4.io/main/en/sensor/ulanding_radar.html ### Examples Attempt to start driver on a specified serial device. + ``` ulanding_radar start -d /dev/ttyS1 ``` + Stop driver + ``` ulanding_radar stop ``` diff --git a/docs/en/modules/modules_driver_magnetometer.md b/docs/en/modules/modules_driver_magnetometer.md index 8d527cfa4e..f687e7c99e 100644 --- a/docs/en/modules/modules_driver_magnetometer.md +++ b/docs/en/modules/modules_driver_magnetometer.md @@ -325,6 +325,32 @@ qmc5883l [arguments...] status print status info ``` +## qmc5883p + +Source: [drivers/magnetometer/qmc5883p](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/magnetometer/qmc5883p) + +### Usage {#qmc5883p_usage} + +``` +qmc5883p [arguments...] + Commands: + start + [-I] Internal I2C bus(es) + [-X] External I2C bus(es) + [-b ] board-specific bus (default=all) (external SPI: n-th bus + (default=1)) + [-f ] bus frequency in kHz + [-q] quiet startup (no message if no device found) + [-a ] I2C address + default: 44 + [-R ] Rotation + default: 0 + + stop + + status print status info +``` + ## rm3100 Source: [drivers/magnetometer/rm3100](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/magnetometer/rm3100) diff --git a/docs/en/modules/modules_system.md b/docs/en/modules/modules_system.md index 051b7137db..6c9473873d 100644 --- a/docs/en/modules/modules_system.md +++ b/docs/en/modules/modules_system.md @@ -1,16 +1,11 @@ # Modules Reference: System - - ## battery_simulator Source: [modules/simulation/battery_simulator](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/simulation/battery_simulator) - ### Description - - ### Usage {#battery_simulator_usage} ``` @@ -27,16 +22,15 @@ battery_simulator [arguments...] Source: [modules/battery_status](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/battery_status) - ### Description The provided functionality includes: + - Read the output from the ADC driver (via ioctl interface) and publish `battery_status`. - ### Implementation -It runs in its own thread and polls on the currently selected gyro topic. +It runs in its own thread and polls on the currently selected gyro topic. ### Usage {#battery_status_usage} @@ -54,7 +48,6 @@ battery_status [arguments...] Source: [modules/camera_feedback](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/camera_feedback) - ### Description The camera_feedback module publishes `CameraCapture` UORB topics when image capture has been triggered. @@ -69,7 +62,7 @@ The `CAMERA_IMAGE_CAPTURED` message is then emitted (by streaming code) followin ### Implementation `CameraTrigger` topics are published by the `camera_trigger` module (`feedback` field set `false`) -when image capture is triggered, and may also be published by the `camera_capture` driver +when image capture is triggered, and may also be published by the `camera_capture` driver (with `feedback` field set `true`) if the camera capture pin is activated. The `camera_feedback` module subscribes to `CameraTrigger`. @@ -77,7 +70,6 @@ It discards topics from the `camera_trigger` module if camera capture is enabled For the topics that are not discarded it creates a `CameraCapture` topic with the timestamp information from the `CameraTrigger` and position information from the vehicle. - ### Usage {#camera_feedback_usage} ``` @@ -94,8 +86,8 @@ camera_feedback [arguments...] Source: [drivers/cdcacm_autostart](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/cdcacm_autostart) - ### Description + This module listens on USB and auto-configures the protocol depending on the bytes received. The supported protocols are: MAVLink, nsh, and ublox serial passthrough. If the parameter SYS_USB_AUTO=2 the module will only try to start mavlink as long as the USB VBUS is detected. Otherwise it will spin @@ -117,8 +109,8 @@ cdcacm_autostart [arguments...] Source: [modules/commander](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/commander) - ### Description + The commander module contains the state machine for mode switching and failsafe behavior. ### Usage {#commander_usage} @@ -173,10 +165,11 @@ commander [arguments...] Source: [modules/dataman](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/dataman) - ### Description + Module to provide persistent storage for the rest of the system in form of a simple database through a C API. Multiple backends are supported depending on the board: + - a file (eg. on the SD card) - RAM (this is obviously not persistent) @@ -184,8 +177,8 @@ It is used to store structured data of different types: mission waypoints, missi Each type has a specific type and a fixed maximum amount of storage items, so that fast random access is possible. ### Implementation -Reading and writing a single item is always atomic. +Reading and writing a single item is always atomic. ### Usage {#dataman_usage} @@ -209,7 +202,6 @@ dataman [arguments...] Source: [systemcmds/dmesg](https://github.com/PX4/PX4-Autopilot/tree/main/src/systemcmds/dmesg) - ### Description Command-line tool to show bootup console messages. @@ -218,6 +210,7 @@ Note that output from NuttX's work queues and syslog are not captured. ### Examples Keep printing all messages in the background: + ``` dmesg -f & ``` @@ -234,10 +227,9 @@ dmesg [arguments...] Source: [modules/esc_battery](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/esc_battery) - ### Description -This implements using information from the ESC status and publish it as battery status. +This implements using information from the ESC status and publish it as battery status. ### Usage {#esc_battery_usage} @@ -255,10 +247,9 @@ esc_battery [arguments...] Source: [modules/gyro_calibration](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/gyro_calibration) - ### Description -Simple online gyroscope calibration. +Simple online gyroscope calibration. ### Usage {#gyro_calibration_usage} @@ -276,10 +267,8 @@ gyro_calibration [arguments...] Source: [modules/gyro_fft](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/gyro_fft) - ### Description - ### Usage {#gyro_fft_usage} ``` @@ -292,12 +281,39 @@ gyro_fft [arguments...] status print status info ``` +## hardfault_stream + +Source: [modules/hardfault_stream](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/hardfault_stream) + +### Description + +Background process that streams the latest hardfault via MAVLink. + +The module is especially useful when it is necessary to quickly push a hard fault to the ground station. +This is useful in cases where the drone experiences a hard fault during flight. +It ensures that some data is retained in case the permanent storage is destroyed during a crash. + +To reliably stream, it is necessary to send the STATUSTEXT message via MAVLink at a +high enough frequency. The recommended frequency is 10 Hz or higher. + +### Usage {#hardfault_stream_usage} + +``` +hardfault_stream [arguments...] + Commands: + start Start the background task + + stop + + status print status info +``` + ## heater Source: [drivers/heater](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/heater) - ### Description + Background process running periodically on the LP work queue to regulate IMU temperature at a setpoint. This task can be started at boot from the startup scripts by setting SENS_EN_THERMAL or via CLI. @@ -318,10 +334,9 @@ heater [arguments...] Source: [systemcmds/i2c_launcher](https://github.com/PX4/PX4-Autopilot/tree/main/src/systemcmds/i2c_launcher) - ### Description -Daemon that starts drivers based on found I2C devices. +Daemon that starts drivers based on found I2C devices. ### Usage {#i2c_launcher_usage} @@ -341,9 +356,8 @@ i2c_launcher [arguments...] Source: [modules/internal_combustion_engine_control](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/internal_combustion_engine_control) - ### Description - + The module controls internal combustion engine (ICE) features including: ignition (on/off), throttle and choke level, starter engine delay, and user request. @@ -360,7 +374,7 @@ CONFIG_DRIVERS_RPM_CAPTURE=y Additionally, to enable the module: - Set [ICE_EN](../advanced_config/parameter_reference.md#ICE_EN) -to true and adjust the other `ICE_` module parameters according to your needs. + to true and adjust the other `ICE_` module parameters according to your needs. - Set [RPM_CAP_ENABLE](../advanced_config/parameter_reference.md#RPM_CAP_ENABLE) to true. The module outputs control signals for ignition, throttle, and choke, @@ -377,18 +391,20 @@ The ICE is implemented with a (4) state machine: ![Architecture](../../assets/hardware/ice/ice_control_state_machine.png) The state machine: - + - Checks if [Rpm.msg](../msg_docs/Rpm.md) is updated to know if the engine is running - Allows for user inputs from: - - AUX{N} + - Manual control AUX - Arming state in [VehicleStatus.msg](../msg_docs/VehicleStatus.md) +- In the state "Stopped" the throttle is set to NAN, which by definition will set the + throttle output to the disarmed value configured for the specific output. The module publishes [InternalCombustionEngineControl.msg](../msg_docs/InternalCombustionEngineControl.md). - + The architecture is as shown below: ![Architecture](../../assets/hardware/ice/ice_control_diagram.png) - + ### Usage {#internal_combustion_engine_control_usage} @@ -407,18 +423,20 @@ internal_combustion_engine_control [arguments...] Source: [modules/land_detector](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/land_detector) - ### Description + Module to detect the freefall and landed state of the vehicle, and publishing the `vehicle_land_detected` topic. Each vehicle type (multirotor, fixedwing, vtol, ...) provides its own algorithm, taking into account various states, such as commanded thrust, arming state and vehicle motion. ### Implementation + Every type is implemented in its own class with a common base class. The base class maintains a state (landed, maybe_landed, ground_contact). Each possible state is implemented in the derived classes. A hysteresis and a fixed priority of each internal state determines the actual land_detector state. #### Multicopter Land Detector + **ground_contact**: thrust setpoint and velocity in z-direction must be below a defined threshold for time GROUND_CONTACT_TRIGGER_TIME_US. When ground_contact is detected, the position controller turns off the thrust setpoint in body x and y. @@ -448,8 +466,8 @@ land_detector [arguments...] Source: [modules/load_mon](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/load_mon) - ### Description + Background process running periodically on the low priority work queue to calculate the CPU load and RAM usage and publish the `cpuload` topic. @@ -472,13 +490,14 @@ load_mon [arguments...] Source: [modules/logger](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/logger) - ### Description + System logger which logs a configurable set of uORB topics and system printf messages (`PX4_WARN` and `PX4_ERR`) to ULog files. These can be used for system and flight performance evaluation, tuning, replay and crash analysis. It supports 2 backends: + - Files: write ULog files to the file system (SD card) - MAVLink: stream ULog data via MAVLink to a client (the client must support this) @@ -490,7 +509,9 @@ vehicle management. It can be enabled and configured via SDLOG_MISSION parameter The normal log is always a superset of the mission log. ### Implementation + The implementation uses two threads: + - The main thread, running at a fixed rate (or polling on a topic if started with -p) and checking for data updates - The writer thread, writing data to the file @@ -499,12 +520,15 @@ In between there is a write buffer with configurable size (and another fixed-siz the mission log). It should be large to avoid dropouts. ### Examples + Typical usage to start logging immediately: + ``` logger start -e -t ``` Or if already running: + ``` logger on ``` @@ -548,8 +572,8 @@ logger [arguments...] Source: [modules/mag_bias_estimator](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/mag_bias_estimator) - ### Description + Online magnetometer bias estimator. ### Usage {#mag_bias_estimator_usage} @@ -568,10 +592,9 @@ mag_bias_estimator [arguments...] Source: [modules/manual_control](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/manual_control) - ### Description -Module consuming manual_control_inputs publishing one manual_control_setpoint. +Module consuming manual_control_inputs publishing one manual_control_setpoint. ### Usage {#manual_control_usage} @@ -589,36 +612,37 @@ manual_control [arguments...] Source: [systemcmds/netman](https://github.com/PX4/PX4-Autopilot/tree/main/src/systemcmds/netman) +### Description - ### Description - Network configuration manager saves the network settings in non-volatile - memory. On boot the `update` option will be run. If a network configuration - does not exist. The default setting will be saved in non-volatile and the - system rebooted. +Network configuration manager saves the network settings in non-volatile +memory. On boot the `update` option will be run. If a network configuration +does not exist. The default setting will be saved in non-volatile and the +system rebooted. - #### update +#### update - `netman update` is run automatically by [a startup script](../concept/system_startup.md#system-startup). - When run, the `update` option will check for the existence of `net.cfg` in the root of the SD Card. - It then saves the network settings from `net.cfg` in non-volatile memory, - deletes the file and reboots the system. +`netman update` is run automatically by [a startup script](../concept/system_startup.md#system-startup). +When run, the `update` option will check for the existence of `net.cfg` in the root of the SD Card. +It then saves the network settings from `net.cfg` in non-volatile memory, +deletes the file and reboots the system. - #### save +#### save - The `save` option will save settings from non-volatile memory to a file named - `net.cfg` on the SD Card filesystem for editing. Use this to edit the settings. - Save does not immediately apply the network settings; the user must reboot the flight stack. - By contrast, the `update` command is run by the start-up script, commits the settings to non-volatile memory, - and reboots the flight controller (which will then use the new settings). +The `save` option will save settings from non-volatile memory to a file named +`net.cfg` on the SD Card filesystem for editing. Use this to edit the settings. +Save does not immediately apply the network settings; the user must reboot the flight stack. +By contrast, the `update` command is run by the start-up script, commits the settings to non-volatile memory, +and reboots the flight controller (which will then use the new settings). - #### show +#### show - The `show` option will display the network settings in `net.cfg` to the console. +The `show` option will display the network settings in `net.cfg` to the console. - ### Examples - $ netman save # Save the parameters to the SD card. - $ netman show # display current settings. - $ netman update -i eth0 # do an update +### Examples + +$ netman save # Save the parameters to the SD card. +$ netman show # display current settings. +$ netman update -i eth0 # do an update ### Usage {#netman_usage} @@ -639,10 +663,9 @@ netman [arguments...] Source: [drivers/pwm_input](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/pwm_input) - ### Description -Measures the PWM input on AUX5 (or MAIN5) via a timer capture ISR and publishes via the uORB 'pwm_input` message. +Measures the PWM input on AUX5 (or MAIN5) via a timer capture ISR and publishes via the uORB 'pwm_input` message. ### Usage {#pwm_input_usage} @@ -660,15 +683,15 @@ pwm_input [arguments...] Source: [modules/rc_update](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/rc_update) - ### Description + The rc_update module handles RC channel mapping: read the raw input channels (`input_rc`), then apply the calibration, map the RC channels to the configured channels & mode switches and then publish as `rc_channels` and `manual_control_input`. ### Implementation -To reduce control latency, the module is scheduled on input_rc publications. +To reduce control latency, the module is scheduled on input_rc publications. ### Usage {#rc_update_usage} @@ -686,12 +709,13 @@ rc_update [arguments...] Source: [modules/replay](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/replay) - ### Description + This module is used to replay ULog files. There are 2 environment variables used for configuration: `replay`, which must be set to an ULog file name - it's the log file to be replayed. The second is the mode, specified via `replay_mode`: + - `replay_mode=ekf2`: specific EKF2 replay mode. It can only be used with the ekf2 module, but allows the replay to run as fast as possible. - Generic otherwise: this can be used to replay any module(s), but the replay will be done with the same speed as the @@ -724,8 +748,8 @@ replay [arguments...] Source: [modules/events](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/events) - ### Description + Background process running periodically on the LP work queue to perform housekeeping tasks. It is currently only responsible for tone alarm on RC Loss. @@ -747,10 +771,9 @@ send_event [arguments...] Source: [modules/simulation/sensor_agp_sim](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/simulation/sensor_agp_sim) - ### Description -Module to simulate auxiliary global position measurements with optional failure modes for SIH simulation. +Module to simulate auxiliary global position measurements with optional failure modes for SIH simulation. ### Usage {#sensor_agp_sim_usage} @@ -768,11 +791,8 @@ sensor_agp_sim [arguments...] Source: [modules/simulation/sensor_airspeed_sim](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/simulation/sensor_airspeed_sim) - ### Description - - ### Usage {#sensor_arispeed_sim_usage} ``` @@ -789,11 +809,8 @@ sensor_arispeed_sim [arguments...] Source: [modules/simulation/sensor_baro_sim](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/simulation/sensor_baro_sim) - ### Description - - ### Usage {#sensor_baro_sim_usage} ``` @@ -810,11 +827,8 @@ sensor_baro_sim [arguments...] Source: [modules/simulation/sensor_gps_sim](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/simulation/sensor_gps_sim) - ### Description - - ### Usage {#sensor_gps_sim_usage} ``` @@ -831,11 +845,8 @@ sensor_gps_sim [arguments...] Source: [modules/simulation/sensor_mag_sim](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/simulation/sensor_mag_sim) - ### Description - - ### Usage {#sensor_mag_sim_usage} ``` @@ -852,12 +863,13 @@ sensor_mag_sim [arguments...] Source: [modules/sensors](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/sensors) - ### Description + The sensors module is central to the whole system. It takes low-level output from drivers, turns it into a more usable form, and publishes it for the rest of the system. The provided functionality includes: + - Read the output from the sensor drivers (`SensorGyro`, etc.). If there are multiple of the same type, do voting and failover handling. Then apply the board rotation and temperature calibration (if enabled). And finally publish the data; one of the @@ -868,8 +880,8 @@ The provided functionality includes: - Do sensor consistency checks and publish the `SensorsStatusImu` topic. ### Implementation -It runs in its own thread and polls on the currently selected gyro topic. +It runs in its own thread and polls on the currently selected gyro topic. ### Usage {#sensors_usage} @@ -888,11 +900,8 @@ sensors [arguments...] Source: [modules/simulation/system_power_simulator](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/simulation/system_power_simulator) - ### Description - - ### Usage {#system_power_simulation_usage} ``` @@ -909,10 +918,9 @@ system_power_simulation [arguments...] Source: [drivers/tattu_can](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/tattu_can) - ### Description -Driver for reading data from the Tattu 12S 16000mAh smart battery. +Driver for reading data from the Tattu 12S 16000mAh smart battery. ### Usage {#tattu_can_usage} @@ -930,15 +938,14 @@ tattu_can [arguments...] Source: [modules/temperature_compensation](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/temperature_compensation) - ### Description + The temperature compensation module allows all of the gyro(s), accel(s), and baro(s) in the system to be temperature compensated. The module monitors the data coming from the sensors and updates the associated sensor_correction topic whenever a change in temperature is detected. The module can also be configured to perform the coeffecient calculation routine at next boot, which allows the thermal calibration coeffecients to be calculated while the vehicle undergoes a temperature cycle. - ### Usage {#temperature_compensation_usage} ``` @@ -963,13 +970,12 @@ temperature_compensation [arguments...] Source: [modules/time_persistor](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/time_persistor) - ### Description + Writes the RTC time cyclically to a file and reloads this value on startup. This allows monotonic time on systems that only have a software RTC (that is not battery powered). Explicitly setting the time backwards (e.g. via system_time) is still possible. - ### Usage {#time_persistor_usage} ``` @@ -986,7 +992,6 @@ time_persistor [arguments...] Source: [systemcmds/tune_control](https://github.com/PX4/PX4-Autopilot/tree/main/src/systemcmds/tune_control) - ### Description Command-line tool to control & test the (external) tunes. @@ -1000,6 +1005,7 @@ https://github.com/PX4/PX4-Autopilot/blob/main/src/lib/tunes/tune_definition.des ### Examples Play system tune #2: + ``` tune_control play -t 2 ``` @@ -1029,11 +1035,12 @@ tune_control [arguments...] Source: [modules/uxrce_dds_client](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/uxrce_dds_client) - ### Description + UXRCE-DDS Client used to communicate uORB topics with an Agent over serial or UDP. ### Examples + ``` uxrce_dds_client start -t serial -d /dev/ttyS3 -b 921600 uxrce_dds_client start -t udp -h 127.0.0.1 -p 15555 @@ -1066,12 +1073,10 @@ uxrce_dds_client [arguments...] Source: [systemcmds/work_queue](https://github.com/PX4/PX4-Autopilot/tree/main/src/systemcmds/work_queue) - ### Description Command-line tool to show work queue status. - ### Usage {#work_queue_usage} ```