Compare commits

..

98 Commits

Author SHA1 Message Date
Martina Rivizzigno 1b3494fabd mission_block: acquire gimbal control also when the command from the gimbal
protocol v2 is parsed
2023-01-13 12:07:30 +01:00
Yannick Fuhrer f4948d1404 Battery: delay initialization of SoC (#20729)
* Battery: delay initialization of SoC

* battery: rework of battery initialization delay

Co-authored-by: Matthias Grob <maetugr@gmail.com>
2023-01-12 15:25:26 +01:00
bresch a460808774 HACK: do not trigger a mag reset after takeoff 2023-01-12 15:25:19 +01:00
bresch 34423a6c92 commander: do not check dead-reckoning flag to send GPS invalid msg
The dead-reckoning flag comes from EKF2 and isn't in sync with the other
commander flags. This can lead to the message not being printed because
EKF2 can take a bit more time to stop the GPS fusion and set the DR
flag.
2023-01-12 15:25:11 +01:00
Silvan Fuhrer 9fe5652252 HACK: add new topic to log vehicle_gps_position w/o lat/lon
Which has the same fields as vehicle_gps_position, but the lat/lon set to 0.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-01-12 15:22:52 +01:00
Silvan Fuhrer 3db5a35005 HACK: add new topic to log local position w/o reference
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-01-12 15:22:37 +01:00
Silvan Fuhrer ec1fbca575 Logger: add option to disable logging of topics with lat/lon fields (#2147)
* Logger: add option to disable logging of topics with lat/lon fields

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-01-12 15:22:22 +01:00
Thomas Stastny ebe0a4095c wip: squashed patch 2022-12-19 13:12:42 +01:00
fury1895 283aad01fd Airspeed params: change default for ASPD_SCALE_APPLY to 2 2022-06-10 14:02:41 +02:00
David Sidrane f15eb91814 px4_fmu-v6x:HB Mini add Ver 3, Ver 4 init 2022-06-10 04:20:26 -07:00
PX4 BuildBot e33199c182 Update submodule mavlink to latest Fri Jun 10 00:38:25 UTC 2022
- mavlink in PX4/Firmware (59630bcc7e7e983db2d9138c8254144c77855adc): https://github.com/mavlink/mavlink/commit/0909631552187b998dd6359f998ee78ee8765728
    - mavlink current upstream: https://github.com/mavlink/mavlink/commit/05864e218e204f1ebeee5555988150fcddbd873e
    - Changes: https://github.com/mavlink/mavlink/compare/0909631552187b998dd6359f998ee78ee8765728...05864e218e204f1ebeee5555988150fcddbd873e

    05864e21 2022-06-09 Peter Barker - common.xml: add ignition_voltage to EFI_STATUS (#1854)
adc9c3f5 2022-06-01 olliw42 - update storm32.xml (nfc) (#1851)
49dbdb66 2022-06-01 Randy Mackay - ardupilotmega: add nav_attitude_time command (#1852)
2022-06-10 01:01:20 -04:00
Thomas Debrunner 46c9d1e288 SIH in SITL with lockstep (#19028)
* sih: Move sih out of work queue
This reverts commit bb7dd0cf00.

* sih-sim: Enable sih in sitl, together with lockstep

* sih-sim: new files for sih: quadx and airplane

* sih: Added tailsitter for sih-sitl simulation

* sitl_target: Added seperate target loop for sih

* jmavsim_run: Allow jmavsim to run in UDP mode

* lockstep: Post semaphore on last lockstep component removed

* sih-sim: Added display for effectively achieved speed

* sih: increase stack size

* sih-sim: Improved sleep time computation, fixes bug of running too fast

* sitl_target: place omnicopter in alphabethic order

Co-authored-by: romain-chiap <romain.chiap@gmail.com>
Co-authored-by: Matthias Grob <maetugr@gmail.com>
2022-06-09 09:52:34 +02:00
Thomas Stastny a7e11464c1 fw pos ctrl: update method documentation 2022-06-09 09:23:02 +02:00
Thomas Stastny 594a6d6e80 fw pos ctrl: some incremental clean up of the class
- documentation of units, params, returns, and descriptions for variables and methods
- rename ambiguous or erroneous state variables
- remove unused or unecessary input arguments to functions
- remove ugly header white space
2022-06-09 09:23:02 +02:00
Silvan Fuhrer 9863c24b40 navigator_main: DO_REPOSITION: only trigger reposition setpoint update if vehicle is armed
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-06-08 21:47:06 +02:00
Thomas Stastny cbf0fe8803 fw pos ctrl: centralize parameter and state resets 2022-06-08 08:44:30 -05:00
Thomas Stastny ccfbbb553a fw pos ctrl: only manipulate heading hold yaw in manual position control mode 2022-06-08 08:44:30 -05:00
Thomas Stastny 67d8dd359d fw pos ctrl: calculate control interval once
- Use the same time interval for all position control logic (including TECS)
- Sync naming in control methods
- Remove some unused input arguments
2022-06-08 08:44:30 -05:00
Matthias Grob f5e7b1e6a8 Commander: switch battery bitflied to dedicated datatype 2022-06-08 11:32:26 +02:00
Matthias Grob 9b2166de72 manual_control_params: configure arm gesture doesn't require reboot
I added wrong documentation here.
2022-06-08 05:12:05 -04:00
Matthias Grob bd50a52c9c Commander: fix startup sound interrupted by safety button initialization
The safetyButtonHandler() reports that the safety statatus
changed on the first loop iteration when safety is disabled which makes
sense to inform the system that safety is off but the tune for the user
should not be played because it interrupts the startup tune.
2022-06-08 05:12:05 -04:00
Matthias Grob 71103e6114 Safety: keep initialized constant flags when safety disabled 2022-06-08 05:12:05 -04:00
Matthias Grob 44c4b8fa85 Style refactoring related to safety button 2022-06-08 05:12:05 -04:00
Daniel Agar ce70b6f4ac sensors/vehicle_angular_velocity: add IMU_GYRO_RATEMAX constraints 2022-06-07 15:45:47 -04:00
Daniel Agar 01f0992f49 sensors/vehicle_imu: don't bother checking IMU_GYRO_RATEMAX 2022-06-07 15:45:47 -04:00
Matthias Grob 5df266cedc MulticopterRateControl: use constructor to copy thrust setpoint array 2022-06-07 11:45:59 -04:00
bresch 4f1091792f ekf2 preflight: only check innovation of active height sources 2022-06-07 11:44:56 -04:00
Daniel Agar cb2738e187 Update submodule GPSDrivers to latest Sat Jun 4 12:38:49 UTC 2022 (#19766)
- GPSDrivers in PX4/Firmware (6e77a084cd43830c8b13018b7fd5470da9bc4ff5): https://github.com/PX4/PX4-GPSDrivers/commit/181fae1a4b5e33576d786755782adb2f195ecc48
    - GPSDrivers current upstream: https://github.com/PX4/PX4-GPSDrivers/commit/016c37cd1f18c716427e2465d8daa6aa1054b0f1
    - Changes: https://github.com/PX4/PX4-GPSDrivers/compare/181fae1a4b5e33576d786755782adb2f195ecc48...016c37cd1f18c716427e2465d8daa6aa1054b0f1

    016c37c 2022-06-01 Julian Oes - sbf: fix overrun on invalid length
2022-06-04 15:58:56 -04:00
PX4BuildBot a247b42907 [AUTO COMMIT] update change indication 2022-06-04 15:57:11 -04:00
PX4 BuildBot e86a74321e Update world_magnetic_model to latest Sat Jun 4 11:14:10 UTC 2022 2022-06-04 15:57:11 -04:00
Beat Küng da55256f2f test_multicopter_failure_injection: remove 'Reject before arming' test
Not sure why injection should fail before arming.
2022-06-04 07:40:29 +02:00
Beat Küng d1142008f6 FailureDetector: check if ESCs have current
And increase the timeout to 300ms, as some ESCs only update with 10Hz.
2022-06-04 07:40:29 +02:00
Beat Küng 8bf18e31be SITL: enable failure command (SYS_FAILURE_EN=1) 2022-06-04 07:40:29 +02:00
Beat Küng 56faaae959 failure: fix invalid memory access
failure_units[unit].key was incorrect
2022-06-04 07:40:29 +02:00
Beat Küng 0ab61aee2e control_allocator: show motor axis for MC (as advanced) 2022-06-04 07:40:29 +02:00
Beat Küng 99a329f937 mc_rate_control: pass through 3D thrust 2022-06-04 07:40:29 +02:00
Beat Küng 82eb71d70b failure_detector: allow disabling attitude failure (as already documented) 2022-06-04 07:40:29 +02:00
Jaeyoung-Lim bf68d3433e Add omnicopter SITL model
F
2022-06-04 07:40:29 +02:00
bresch e2955bdd61 terrain est: clear innovation/var/test ration when aiding stops 2022-06-03 17:31:14 -04:00
Matthias Grob fad3d46907 Use signNoZero() where possible 2022-06-03 16:08:16 +02:00
abarcis 4fc2640ee3 vehicle_command.msg: unneeded comment closings removed (#19759)
They cause problems with building px4_msgs in ROS2 Humble Hawksbill and removing them fixes the issue.

Co-authored-by: Agata Barcis <agata.barcis@tii.ae>
2022-06-03 07:25:05 +02:00
BA-ED b9be783b69 dshot: corrected DShot motor spin direction command
Some ESCs don't store DShot_cmd_spin_direction_reversed persistently
2022-06-02 13:36:40 +02:00
Thomas Watson d390e6d46d boards/mro/pixracerpro: fix voltage/current monitoring
This corrects the board definition to use the proper polarity
for the brick power valid signal, thus allowing the board to
detect the battery and monitor it properly.
2022-06-02 08:11:15 +02:00
Mark Sauder c19e74784a attitude_estimator_q: Run() method refactoring (#19526)
* Refactor attitude_estimator_q_main.cpp Run() method by breaking apart into separate method calls:
    * update_vehicle_local_position()
    * update_motion_capture_odometry()
    * update_visual_odometry()
    * update_magnetometer()
    * update_vehicle_attitude()
    * update_sensors()
 * Rename init_attitude_q()
 * Standardize whitespace formatting
 * Add remaining c++ style initializers.
2022-06-01 13:41:42 -04:00
Daniel Agar 21b1c933dc ekf2: EKFGSF_yaw delete unnecessary internal state 2022-06-01 13:16:06 -04:00
Daniel Agar 3889b79342 ekf2: yaw estimator add yaw_composite_valid boolean 2022-06-01 13:16:06 -04:00
Igor Mišić a218f4bfaf drivers/px4io: support legacy px4io firmware to enter BL 2022-06-01 13:15:13 -04:00
Igor Mišić 25488da944 px4io: replace safety_off state with safety button event (#19558)
internal PX4IO safety_off state is removed and replaced with a normal safety button event. From this 'commit' commander is taking care of the PX4IO safety.
2022-06-01 13:15:13 -04:00
Matthias Grob a9cdfff7a3 FlightModeManager: only execute flight task commands when multicopter 2022-06-01 15:14:07 +02:00
Matthias Grob 96b0304049 PreFlightCheck: disallow arming in land mode
after the automatic switch to Hold mode was introduced.
2022-06-01 12:08:32 +12:00
Matthias Grob 83c15fca9f Commander: switch back to Hold mode after autonomous landing 2022-06-01 12:08:32 +12:00
Matthias Grob 33df8b24f2 Commander: differentiate clearly between to arm and to disarm transition 2022-06-01 12:08:32 +12:00
Matthias Grob 400e1f8214 Commander: only initialize to tablet mode and don't switch back on RC loss 2022-06-01 12:08:32 +12:00
Daniel Agar 002579b3e0 Jenkins: reboot after ostest completes
- temporary workaround to ostest apparently leaving the system in a bad state
2022-05-31 01:41:07 -07:00
Daniel Agar 5b6e5a0968 boards: NuttX update all boards to preallocated sem holder list
- CONFIG_SEM_PREALLOCHOLDERS=32
 - CONFIG_SEM_NNESTPRIO=16 (default)
2022-05-31 01:41:07 -07:00
Beat Küng 0074894637 control_allocator: disable backup schedule with lockstep
The backup schedule triggers updates too early and leads to simulator errors:
ERROR [simulator] poll timeout 0, 22
2022-05-31 07:17:30 +02:00
Daniel Agar 132a07f53c boards: test boards add NuttX ostest and run on Jenkins test rack 2022-05-29 13:41:16 -04:00
Daniel Agar 0420d697e5 update NuttX and apps to latest with sem holder fixes and updated ostest 2022-05-29 13:41:16 -04:00
Daniel Agar cb8b5ae872 mavlink: MavlinkStatustextHandlerTest ignore Wcast-align 2022-05-29 09:44:48 -04:00
Daniel Agar d97bb168cf lib/motion_planning: VelocitySmoothingTest delete set but not used variable 2022-05-29 09:44:48 -04:00
Daniel Agar 095e0f0604 ekf2: sensor_simulator fix enum shadow 2022-05-29 00:21:08 -04:00
PX4 BuildBot 63155b5b01 Update submodule mavlink to latest Sat May 28 00:38:55 UTC 2022
- mavlink in PX4/Firmware (56106be4805cb2f70d22ad31b87fbd9774f0d0f3): https://github.com/mavlink/mavlink/commit/99e82cad70494903a23a67de08ff9cbb5918d8f3
    - mavlink current upstream: https://github.com/mavlink/mavlink/commit/0909631552187b998dd6359f998ee78ee8765728
    - Changes: https://github.com/mavlink/mavlink/compare/99e82cad70494903a23a67de08ff9cbb5918d8f3...0909631552187b998dd6359f998ee78ee8765728

    09096315 2022-05-26 Hamish Willee - Clarify and cross reference home position everywhere (#1836)
38c1a99f 2022-05-25 Julian Oes - WIND_COV: clarify description and unknown value (#1845)
2022-05-28 00:06:05 -04:00
David Lechner 995265c95e vscode: remove terminal settings
These terminal settings are a matter of personal preference and should
not be part of the project configuration.
2022-05-27 21:01:33 -04:00
Daniel Agar c27b9f3b1e boards: reduce SPI DMA buffers on older STM32F4 boards
- on common IMUs like the mpu6000, mpu9250, icm20602, etc each FIFO
sample is only 12 bytes so this is still more than large enough for the
worst case transfer
2022-05-27 16:27:41 -04:00
Daniel Agar 4561cf2ce6 boards: pixhawk 2 cube skip starting low quality l3gd20 gyro to save memory and cpu
- free memory is getting tight on these older boards (depending on
configuratoin) and the pixhawk 2 cube still has 2 other superior IMUs, so this is just
dropping dead weight
2022-05-27 16:27:41 -04:00
David Sidrane 74a2930315 px4_fmu-v6X:Added Holybro mini base board 2022-05-27 15:02:28 -04:00
David Sidrane dd6d7e9979 uc_stm32h7_can:Correct initalization of the mumber of interfaces
H7 Only supports 2 not 3 CAN interfaces.

   CanInitHelper passes in in the run time configuration of
   the number of interfaces. The code was ignoring these!
2022-05-27 15:02:28 -04:00
David Sidrane 9353c15e8a px4_fmu-v5X:Added Holybro mini base board 2022-05-27 15:02:28 -04:00
David Sidrane 479b52fd02 Update all H7 Bootloders 2022-05-27 14:25:25 -04:00
David Sidrane 645f4c3428 flash_cache:Flush complete cache line 2022-05-27 14:25:25 -04:00
David Sidrane fd81951391 boards: STM32H7 pad to 256 bit - 32 bytes (#19724) 2022-05-27 14:04:51 -04:00
Daniel Agar 1ba3610cfc boards: delete omnibus_f4sd_ekf2 due to flash overflow 2022-05-27 09:46:07 -04:00
David Sidrane 55cfd8597d px4_fmu-v6c:Fix mag rotation 2022-05-26 11:26:29 -07:00
Igor Misic 554283655c Revert "px4io: replace safety_off state with safety button event (#19558)"
This reverts commit 12a81979a8.
2022-05-26 10:06:32 -04:00
Igor Misic 6aefcbb6cf Revert "px4iofirmware: fix for bug introduced with #19558"
This reverts commit 79a34b5aed.
2022-05-26 10:06:32 -04:00
Matthias Grob c03f5b9481 Commander: fix overlooked rebase naming error 2022-05-25 21:10:19 +02:00
alessandro 29c4119e24 Match commander uORB var names to message names (#19707)
* match vehicle_status

* match home_position

* match vehicle_command_ack

* match actuator_armed

* match vehicle_control_mode

* match commander_state
2022-05-25 17:08:48 +02:00
Daniel Agar 98354ba10a Update submodule GPSDrivers to latest Wed May 25 12:38:58 UTC 2022
- devices in PX4/Firmware (7cc84e0f9e44697475b0f355df9a29de6ea6b9ff): https://github.com/PX4/PX4-GPSDrivers/commit/58968922b718176be8756f11113d16b2cfbc4022
    - devices current upstream: https://github.com/PX4/PX4-GPSDrivers/commit/181fae1a4b5e33576d786755782adb2f195ecc48
    - Changes: https://github.com/PX4/PX4-GPSDrivers/compare/58968922b718176be8756f11113d16b2cfbc4022...181fae1a4b5e33576d786755782adb2f195ecc48

    181fae1 2022-05-23 numan - README: add information for definition.h
2022-05-25 09:56:40 -04:00
Daniel Agar 58ea6235fe ekf2: estimator aid source status (range height) 2022-05-25 09:25:12 -04:00
Daniel Agar 1e25aee6fa ekf2: estimator aid source status (baro height) 2022-05-25 09:25:12 -04:00
Silvan Fuhrer 4dbe6f0a1c simulator_mavlink: fix MAV_TYPE_VTOL_TAILSITTER case
This type (23) doesn't specify a motor number, so it can't be properly handled.
There are duo (19) and quad (20) tailsitter types that still work in simulation.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-05-24 17:58:44 -04:00
Daniel Agar 376201e64d boards: px4_fmu-v5/v5x init all I2C pins 2022-05-24 11:02:03 -04:00
bresch d04a91a3ae ekf2_post-processing: use estimator_status_flags instead of bitmasks 2022-05-24 16:15:42 +02:00
Beat Küng 016b8aeb35 MulticopterRateControl: fix thrust sign for acro
Regression from fbc109436f
2022-05-24 15:03:17 +02:00
Matthias Grob 44be415e0e mission_block: make "Delay until" item work while landed
To enable landing, waiting and taking off again e.g. for delivery.
2022-05-24 13:42:03 +02:00
Matthias Grob 0be474430c Commander: don't disarm on landing amid a mission 2022-05-24 13:42:03 +02:00
Matthias Grob 4f34207c4e battery_params: increase default empty cellvoltage to 3.6v
Based on feedback that very often the battery is used down too low.
I observed this happens consistently when the cell voltage is properly
load compensated. The default load compensation before #19429 was very
inaccurate and resulted in unpredictable estimate.
After that if there is a usable current measurement and the battery is
within expected tolerances of the default internal resistance the
compensation is pretty good and 3.5V is too low for an empty compensated
cell voltage. That was seen in various logs where the compensated
cell voltage was already dropping fast after 3.6V.

In case the voltage is not load compensated the vehicle estimates the
state of charge a bit too low which is safer than to high
especially for a default configuration.
2022-05-24 11:26:58 +02:00
Mark Sauder a1fb9fb7c6 rcS: Keep Mag Cal with AUTOCONFIG param reset in rcS, deprecate rcS AUTOCNF param (#19693)
* Deprecate the rcS AUTOCNF script param and associated logic.

* Update posix rcS to match previous commit.
2022-05-23 20:35:22 -04:00
Daniel Agar 639222dd65 ekf2: estimator aid source status (GPS pos, GPS vel) 2022-05-23 16:21:49 -04:00
Daniel Agar 1ae467e9cd ekf2: estimator aid source status (starting with fake position) 2022-05-23 16:21:49 -04:00
Igor Misic 79a34b5aed px4iofirmware: fix for bug introduced with #19558 2022-05-23 14:59:11 -04:00
Daniel Agar d25a784a3a icm42688p: only check configured registers periodically (as intended) 2022-05-23 14:58:23 -04:00
bresch c57c575cfe ekf2: use explicit flags instead of bitmask position
This prevents bitmask mismatch when a new flag is inserted
2022-05-23 14:43:02 -04:00
Matthias Grob 62edcc7a57 battery: only compensate using sane current 2022-05-23 16:40:32 +02:00
Matthias Grob 2cbdcc9671 battery: default to reasonable internal resistance
instead of disabling the load compensation using current.
2022-05-23 16:40:32 +02:00
Matthias Grob 58b1139a21 battery: allow setting precise internal resistance with parameter 2022-05-23 16:40:32 +02:00
Matthias Grob 2c5a7ea118 battery: rather undercompensate for load
than over compensate which makes the estimate to high and breaks batteries
beause they get flown for too long.
2022-05-23 16:40:32 +02:00
Serhat Aksun bc220ddb82 sensors/vehicle_magnetometer: fix multi_mode check
Signed-off-by: Serhat Aksun <serhat.aksun@maxwell-innovations.com>
2022-05-23 10:09:41 -04:00
831 changed files with 34372 additions and 16050 deletions
+7 -1
View File
@@ -809,6 +809,9 @@ void runTests() {
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "top once"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "work_queue status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "ostest"'
sh './Tools/HIL/reboot.py --device `find /dev/serial -name *usb-*`' // reboot after ostest
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "commander_tests" || true'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "controllib_test"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "lightware_laser_test"'
@@ -864,12 +867,15 @@ void printTopics() {
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener cpuload" || true'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener distance_sensor" || true'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener ekf2_timestamps" || true'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener estimator_gps_status" || true'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener esc_status" || true'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener estimator_aid_src_fake_pos" || true'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener estimator_aid_src_gnss_pos" || true'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener estimator_aid_src_gnss_vel" || true'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener estimator_attitude" || true'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener estimator_baro_bias" || true'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener estimator_event_flags" || true'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener estimator_global_position" || true'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener estimator_gps_status" || true'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener estimator_innovation_test_ratios" || true'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener estimator_innovation_variances" || true'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener estimator_innovations" || true'
+10 -2
View File
@@ -1,11 +1,17 @@
---
Checks: '*,
-*-avoid-c-arrays,
-*-uppercase-literal-suffix,
-*-magic-numbers,
-altera-id-dependent-backward-branch,
-altera-unroll-loops,
-android*,
-bugprone-integer-division,
-cert-dcl50-cpp,
-cert-env33-c,
-cert-err34-c,
-cert-err58-cpp,
-cert-flp30-c,
-cert-msc30-c,
-cert-msc50-cpp,
-clang-analyzer-core.CallAndMessage,
@@ -18,6 +24,7 @@ Checks: '*,
-clang-analyzer-deadcode.DeadStores,
-clang-analyzer-optin.cplusplus.VirtualCall,
-clang-analyzer-optin.performance.Padding,
-clang-analyzer-security.FloatLoopCounter,
-clang-analyzer-security.insecureAPI.strcpy,
-clang-analyzer-unix.API,
-clang-analyzer-unix.cstring.BadSizeArg,
@@ -37,8 +44,7 @@ Checks: '*,
-cppcoreguidelines-pro-type-union-access,
-cppcoreguidelines-pro-type-vararg,
-cppcoreguidelines-special-member-functions,
-fuchsia-default-arguments,
-fuchsia-overloaded-operator,
-fuchsia-*,
-google-build-using-namespace,
-google-explicit-constructor,
-google-global-names-in-headers,
@@ -62,6 +68,7 @@ Checks: '*,
-hicpp-use-equals-delete,
-hicpp-use-override,
-hicpp-vararg,
-llvmlibc-*,
-llvm-header-guard,
-llvm-include-order,
-llvm-namespace-comment,
@@ -84,6 +91,7 @@ Checks: '*,
-modernize-use-override,
-modernize-use-trailing-return-type,
-modernize-use-using,
-modernize-use-trailing-return-type,
-performance-inefficient-string-concatenation,
-readability-avoid-const-params-in-decls,
-readability-container-size-empty,
+9 -12
View File
@@ -1,17 +1,14 @@
Please use [PX4 Discuss](http://discuss.px4.io/) or [Slack](http://slack.px4.io/) to align on pull requests if necessary. You can then open draft pull requests to get early feedback.
**How this PR solves the problem**
Depending on how complex the PR is, something between a line and a few paragraphs with logs and videos.
## Describe problem solved by this pull request
A clear and concise description of the problem this proposed change will solve. Or, what it will improve.
E.g. For this use case I ran into...
**JIRA ID in title, and link here**
Add a link and the title of the JIRA for context
## Describe your solution
A clear and concise description of what you have implemented.
**Upstream/develop PR that this was backported from**
If applicable, link to PR and/or commit
## Describe possible alternatives
A clear and concise description of alternative solutions or features you've considered.
**Critical bug that needs backporting?**
Yes/No, link to backport PR when applicable
## Test data / coverage
How was it tested? What cases were covered? Logs uploaded to https://review.px4.io/ and screenshots of the important plot parts.
## Additional context
**Additional context**
Add any other related context or media.
-34
View File
@@ -1,34 +0,0 @@
name: ClusterFuzzLite batch fuzzing
on:
schedule:
- cron: '0 6 * * *' # UTC 6am every day.
permissions: read-all
jobs:
BatchFuzzing:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sanitizer:
- address
- undefined
- memory
steps:
- name: Build Fuzzers (${{ matrix.sanitizer }})
id: build
uses: google/clusterfuzzlite/actions/build_fuzzers@v1
with:
sanitizer: ${{ matrix.sanitizer }}
- name: Run Fuzzers (${{ matrix.sanitizer }})
id: run
uses: google/clusterfuzzlite/actions/run_fuzzers@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
fuzz-seconds: 1800 # 30 mins
mode: 'batch'
sanitizer: ${{ matrix.sanitizer }}
# Optional but recommended: For storing certain artifacts from fuzzing.
# See later section on "Git repo for storage".
# storage-repo: https://${{ secrets.PERSONAL_ACCESS_TOKEN }}@github.com/OWNER/STORAGE-REPO-NAME.git
# storage-repo-branch: main # Optional. Defaults to "main"
# storage-repo-branch-coverage: gh-pages # Optional. Defaults to "gh-pages".
-51
View File
@@ -1,51 +0,0 @@
name: Checks
on:
push:
branches:
- 'master'
pull_request:
branches:
- '*'
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
check: [
"check_format",
"tests",
"tests_coverage",
"px4_fmu-v2_default stack_check",
"validate_module_configs",
"shellcheck_all",
"NO_NINJA_BUILD=1 px4_fmu-v5_default",
"NO_NINJA_BUILD=1 px4_sitl_default",
"BUILD_MICRORTPS_AGENT=1 px4_sitl_rtps",
"airframe_metadata",
"module_documentation",
"parameters_metadata",
]
container:
image: px4io/px4-dev-nuttx-focal:2021-09-08
options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined
steps:
- uses: actions/checkout@v1
with:
token: ${{ secrets.ACCESS_TOKEN }}
- name: check environment
run: |
export
ulimit -a
- name: ${{matrix.check}}
run: make ${{matrix.check}}
- name: upload coverage
if: contains(matrix.check, 'coverage')
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests
file: coverage/lcov.info
-21
View File
@@ -1,21 +0,0 @@
name: Clang Tidy
on:
push:
branches:
- 'master'
pull_request:
branches:
- '*'
jobs:
build:
runs-on: ubuntu-latest
container: px4io/px4-dev-clang:2021-09-08
steps:
- uses: actions/checkout@v1
with:
token: ${{secrets.ACCESS_TOKEN}}
- name: make clang-tidy-quiet
run: make clang-tidy-quiet
-54
View File
@@ -1,54 +0,0 @@
name: Linux Targets
on:
push:
branches:
- 'master'
pull_request:
branches:
- '*'
jobs:
build:
runs-on: ubuntu-latest
container: px4io/px4-dev-armhf:2021-09-08
strategy:
matrix:
config: [
beaglebone_blue_default,
emlid_navio2_default,
px4_raspberrypi_default,
scumaker_pilotpi_default,
]
steps:
- uses: actions/checkout@v1
with:
token: ${{secrets.ACCESS_TOKEN}}
- name: Prepare ccache timestamp
id: ccache_cache_timestamp
shell: cmake -P {0}
run: |
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
message("::set-output name=timestamp::${current_date}")
- name: ccache cache files
uses: actions/cache@v2
with:
path: ~/.ccache
key: ${{matrix.config}}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}}
restore-keys: ${{matrix.config}}-ccache-
- name: setup ccache
run: |
mkdir -p ~/.ccache
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
echo "compression = true" >> ~/.ccache/ccache.conf
echo "compression_level = 6" >> ~/.ccache/ccache.conf
echo "max_size = 100M" >> ~/.ccache/ccache.conf
echo "hash_dir = false" >> ~/.ccache/ccache.conf
ccache -s
ccache -z
- name: make ${{matrix.config}}
run: make ${{matrix.config}}
- name: ccache post-run
run: ccache -s
-51
View File
@@ -1,51 +0,0 @@
name: Linux ARM64 Targets
on:
push:
branches:
- 'master'
pull_request:
branches:
- '*'
jobs:
build:
runs-on: ubuntu-latest
container: px4io/px4-dev-aarch64:2021-09-08
strategy:
matrix:
config: [
scumaker_pilotpi_arm64,
]
steps:
- uses: actions/checkout@v1
with:
token: ${{secrets.ACCESS_TOKEN}}
- name: Prepare ccache timestamp
id: ccache_cache_timestamp
shell: cmake -P {0}
run: |
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
message("::set-output name=timestamp::${current_date}")
- name: ccache cache files
uses: actions/cache@v2
with:
path: ~/.ccache
key: ${{matrix.config}}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}}
restore-keys: ${{matrix.config}}-ccache-
- name: setup ccache
run: |
mkdir -p ~/.ccache
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
echo "compression = true" >> ~/.ccache/ccache.conf
echo "compression_level = 6" >> ~/.ccache/ccache.conf
echo "max_size = 100M" >> ~/.ccache/ccache.conf
echo "hash_dir = false" >> ~/.ccache/ccache.conf
ccache -s
ccache -z
- name: make ${{matrix.config}}
run: make ${{matrix.config}}
- name: ccache post-run
run: ccache -s
-56
View File
@@ -1,56 +0,0 @@
name: MacOS build
on:
push:
branches:
- 'master'
pull_request:
branches:
- '*'
jobs:
build:
runs-on: macos-10.15
strategy:
matrix:
config: [
px4_fmu-v5_default,
px4_sitl
#tests, # includes px4_sitl
]
steps:
- uses: actions/checkout@v1
with:
token: ${{secrets.ACCESS_TOKEN}}
- name: setup
run: ./Tools/setup/macos.sh; ./Tools/setup/macos.sh
- name: Prepare ccache timestamp
id: ccache_cache_timestamp
shell: cmake -P {0}
run: |
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
message("::set-output name=timestamp::${current_date}")
- name: ccache cache files
uses: actions/cache@v2
with:
path: ~/.ccache
key: macos_${{matrix.config}}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}}
restore-keys: macos_${{matrix.config}}-ccache-
- name: setup ccache
run: |
mkdir -p ~/.ccache
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
echo "compression = true" >> ~/.ccache/ccache.conf
echo "compression_level = 6" >> ~/.ccache/ccache.conf
echo "max_size = 40M" >> ~/.ccache/ccache.conf
echo "hash_dir = false" >> ~/.ccache/ccache.conf
ccache -s
ccache -z
- name: make ${{matrix.config}}
run: |
ccache -z
make ${{matrix.config}}
ccache -s
-126
View File
@@ -1,126 +0,0 @@
name: Nuttx Targets
on:
push:
branches:
- 'master'
pull_request:
branches:
- '*'
jobs:
build:
runs-on: ubuntu-latest
container: px4io/px4-dev-nuttx-focal:2021-09-08
strategy:
fail-fast: false
matrix:
config: [
airmind_mindpx-v2,
ark_can-flow,
ark_can-gps,
ark_can-rtk-gps,
ark_cannode,
atl_mantis-edu,
av_x-v1,
bitcraze_crazyflie,
bitcraze_crazyflie21,
cuav_can-gps-v1,
cuav_nora,
cuav_x7pro,
cubepilot_cubeorange,
cubepilot_cubeyellow,
diatone_mamba-f405-mk2,
freefly_can-rtk-gps,
holybro_can-gps-v1,
holybro_durandal-v1,
holybro_kakutef7,
holybro_kakuteh7,
holybro_pix32v5,
matek_gnss-m9n-f4,
matek_h743,
matek_h743-mini,
matek_h743-slim,
modalai_fc-v1,
modalai_fc-v2,
mro_ctrl-zero-f7,
mro_ctrl-zero-f7-oem,
mro_ctrl-zero-h7,
mro_ctrl-zero-h7-oem,
mro_pixracerpro,
mro_x21,
mro_x21-777,
nxp_fmuk66-e,
nxp_fmuk66-v3,
nxp_fmurt1062-v1,
nxp_ucans32k146,
omnibus_f4sd,
px4_fmu-v2,
px4_fmu-v3,
px4_fmu-v4,
px4_fmu-v4pro,
px4_fmu-v5,
px4_fmu-v5x,
px4_fmu-v6c,
px4_fmu-v6u,
px4_fmu-v6x,
raspberrypi_pico,
sky-drones_smartap-airlink,
spracing_h7extreme,
uvify_core
]
steps:
- uses: actions/checkout@v1
with:
token: ${{secrets.ACCESS_TOKEN}}
- name: Prepare ccache timestamp
id: ccache_cache_timestamp
shell: cmake -P {0}
run: |
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
message("::set-output name=timestamp::${current_date}")
- name: ccache cache files
uses: actions/cache@v2
with:
path: ~/.ccache
key: ${{matrix.config}}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}}
restore-keys: ${{matrix.config}}-ccache-
- name: setup ccache
run: |
mkdir -p ~/.ccache
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
echo "compression = true" >> ~/.ccache/ccache.conf
echo "compression_level = 6" >> ~/.ccache/ccache.conf
echo "max_size = 120M" >> ~/.ccache/ccache.conf
echo "hash_dir = false" >> ~/.ccache/ccache.conf
ccache -s
ccache -z
- name: make all_variants_${{matrix.config}}
run: make all_variants_${{matrix.config}}
timeout-minutes: 45
- name: make ${{matrix.config}} bloaty_compileunits
run: make ${{matrix.config}} bloaty_compileunits || true
- name: make ${{matrix.config}} bloaty_inlines
run: make ${{matrix.config}} bloaty_inlines || true
- name: make ${{matrix.config}} bloaty_segments
run: make ${{matrix.config}} bloaty_segments || true
- name: make ${{matrix.config}} bloaty_symbols
run: make ${{matrix.config}} bloaty_symbols || true
- name: make ${{matrix.config}} bloaty_templates
run: make ${{matrix.config}} bloaty_templates || true
- name: make ${{matrix.config}} bloaty_ram
run: make ${{matrix.config}} bloaty_ram || true
- name: make ${{matrix.config}} bloaty_compare_master
run: make ${{matrix.config}} bloaty_compare_master || true
- name: ccache post-run
run: ccache -s
- name: Upload px4 package
uses: actions/upload-artifact@v2
with:
name: px4_package_${{matrix.config}}
path: |
build/**/*.px4
build/**/*.bin
-54
View File
@@ -1,54 +0,0 @@
name: Deploy metadata for all targets
on:
push:
branches:
- 'master'
- 'release/*'
- 'pr-metadata-test'
jobs:
enumerate_targets:
runs-on: ubuntu-latest
container: px4io/px4-dev-base-focal:2021-09-08
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v1
with:
token: ${{secrets.ACCESS_TOKEN}}
- id: set-matrix
run: echo "::set-output name=matrix::$(./Tools/generate_board_targets_json.py)"
build:
runs-on: ubuntu-latest
needs: enumerate_targets
strategy:
matrix: ${{fromJson(needs.enumerate_targets.outputs.matrix)}}
container: px4io/px4-dev-${{ matrix.container }}:2021-09-08
steps:
- uses: actions/checkout@v1
with:
token: ${{secrets.ACCESS_TOKEN}}
- name: make ${{matrix.target}}
run: make ${{matrix.target}}
- name: parameter & events metadata
run: |
make ${{matrix.target}} ver_gen events_json actuators_json
./src/lib/version/get_git_tag_or_branch_version.sh build/${{ matrix.target }} >> $GITHUB_ENV
cd build/${{ matrix.target }}
mkdir _metadata || true
cp parameters.* events/*.xz actuators.json* _metadata
- uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read
env:
AWS_S3_BUCKET: 'px4-travis'
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-west-1'
SOURCE_DIR: 'build/${{ matrix.target }}/_metadata/'
DEST_DIR: 'Firmware/${{ env.version }}/${{ matrix.target }}/'
@@ -1,21 +0,0 @@
name: EKF Change Indicator
on: pull_request
jobs:
unit_tests:
runs-on: ubuntu-latest
container: px4io/px4-dev-base-focal:2021-09-08
steps:
- uses: actions/checkout@v2.3.1
with:
fetch-depth: 0
- name: checkout newest version of branch
run: |
git fetch origin pull/${{github.event.pull_request.number}}/head:${{github.head_ref}}
git checkout ${GITHUB_HEAD_REF}
- name: main test
run: make tests TESTFILTER=EKF
- name: Check if there is a functional change
run: git diff --exit-code
working-directory: src/modules/ekf2/test/change_indication
@@ -1,29 +0,0 @@
name: EKF Update Change Indicator
on: push
jobs:
unit_tests:
runs-on: ubuntu-latest
container: px4io/px4-dev-base-focal:2021-09-08
env:
GIT_COMMITTER_EMAIL: bot@px4.io
GIT_COMMITTER_NAME: PX4BuildBot
steps:
- uses: actions/checkout@v2.3.1
with:
fetch-depth: 0
- name: main test updates change indication files
run: make tests TESTFILTER=EKF
- name: Check if there exists diff and save result in variable
run: echo "CHANGE_INDICATED=$(git diff --exit-code --output=/dev/null || echo $?)" >> $GITHUB_ENV
working-directory: src/modules/ekf2/test/change_indication
- name: auto-commit any changes to change indication
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: '[AUTO COMMIT] update change indication'
commit_user_name: ${GIT_COMMITTER_NAME}
commit_user_email: ${GIT_COMMITTER_EMAIL}
- if: ${{env.CHANGE_INDICATED}}
name: if there is a functional change, fail check
run: exit 1
-139
View File
@@ -1,139 +0,0 @@
name: MAVROS Mission Tests
on:
push:
branches:
- 'master'
pull_request:
branches:
- '*'
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
config:
- {vehicle: "iris", mission: "MC_mission_box", build_type: "RelWithDebInfo"}
- {vehicle: "rover", mission: "rover_mission_1", build_type: "RelWithDebInfo"}
#- {vehicle: "plane", mission: "FW_mission_1", build_type: "RelWithDebInfo"}
#- {vehicle: "plane_catapult",mission: "FW_mission_1", build_type: "RelWithDebInfo"}
#- {vehicle: "standard_vtol", mission: "VTOL_mission_1", build_type: "Coverage"}
#- {vehicle: "standard_vtol", mission: "VTOL_mission_1", build_type: "AddressSanitizer"}
#- {vehicle: "tailsitter", mission: "VTOL_mission_1", build_type: "RelWithDebInfo"}
#- {vehicle: "tiltrotor", mission: "VTOL_mission_1", build_type: "RelWithDebInfo"}
container:
image: px4io/px4-dev-ros-melodic:2021-09-08
options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined
steps:
- uses: actions/checkout@v1
with:
token: ${{ secrets.ACCESS_TOKEN }}
- name: Prepare ccache timestamp
id: ccache_cache_timestamp
shell: cmake -P {0}
run: |
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
message("::set-output name=timestamp::${current_date}")
- name: ccache cache files
uses: actions/cache@v2
with:
path: ~/.ccache
key: sitl_tests-${{matrix.config.build_type}}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}}
restore-keys: sitl_tests-${{matrix.config.build_type}}-ccache-
- name: setup ccache
run: |
mkdir -p ~/.ccache
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
echo "compression = true" >> ~/.ccache/ccache.conf
echo "compression_level = 6" >> ~/.ccache/ccache.conf
echo "max_size = 100M" >> ~/.ccache/ccache.conf
echo "hash_dir = false" >> ~/.ccache/ccache.conf
ccache -s
ccache -z
- name: check environment
run: |
export
ulimit -a
- name: Build PX4 and sitl_gazebo
env:
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
run: |
ccache -z
make px4_sitl_default
make px4_sitl_default sitl_gazebo
ccache -s
- name: Core dump settings
run: |
ulimit -c unlimited
echo "`pwd`/%e.core" > /proc/sys/kernel/core_pattern
- name: Run SITL tests
env:
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
run: |
export
./test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=${{matrix.config.mission}} vehicle:=${{matrix.config.vehicle}}
timeout-minutes: 45
- name: Look at core files
if: failure()
run: gdb build/px4_sitl_default/bin/px4 px4.core -ex "thread apply all bt" -ex "quit"
- name: Upload px4 coredump
if: failure()
uses: actions/upload-artifact@v2-preview
with:
name: coredump
path: px4.core
- name: ecl EKF analysis
if: always()
run: ./Tools/ecl_ekf/process_logdata_ekf.py ~/.ros/log/*/*.ulg || true
- name: Upload logs to flight review
if: always()
run: ./Tools/upload_log.py -q --description "${GITHUB_WORKFLOW} ${GITHUB_RUN_ID}" --feedback "${GITHUB_WORKFLOW} ${GITHUB_RUN_ID} ${GITHUB_REPOSITORY} ${GITHUB_REF}" --source CI ~/.ros/log/*/*.ulg
- name: Upload px4 binary
if: failure()
uses: actions/upload-artifact@v2
with:
name: binary
path: build/px4_sitl_default/bin/px4
- name: Store PX4 log
if: failure()
uses: actions/upload-artifact@v2
with:
name: px4_log
path: ~/.ros/log/*/*.ulg
- name: Store ROS log
if: failure()
uses: actions/upload-artifact@v2
with:
name: ros_log
path: ~/.ros/**/rostest-*.log
# Report test coverage
- name: Upload coverage
if: contains(matrix.config.build_type, 'Coverage')
run: |
git config --global credential.helper "" # disable the keychain credential helper
git config --global --add credential.helper store # enable the local store credential helper
echo "https://x-access-token:${{ secrets.ACCESS_TOKEN }}@github.com" >> ~/.git-credentials # add credential
git config --global url."https://github.com/".insteadof git@github.com: # credentials add credential
mkdir -p coverage
lcov --directory build/px4_sitl_default --base-directory build/px4_sitl_default --gcov-tool gcov --capture -o coverage/lcov.info
- name: Upload coverage information to Codecov
if: contains(matrix.config.build_type, 'Coverage')
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: mavros_mission
file: coverage/lcov.info
-134
View File
@@ -1,134 +0,0 @@
name: MAVROS Offboard Tests
on:
push:
branches:
- 'master'
pull_request:
branches:
- '*'
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
config:
- {test_file: "mavros_posix_tests_offboard_posctl.test", vehicle: "iris", build_type: "RelWithDebInfo"}
#- {test_file: "mavros_posix_tests_offboard_attctl.test", vehicle: "iris", build_type: "RelWithDebInfo"}
#- {test_file: "mavros_posix_tests_offboard_rpyrt_ctl.test", vehicle: "iris", build_type: "RelWithDebInfo"}
container:
image: px4io/px4-dev-ros-melodic:2021-09-08
options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined
steps:
- uses: actions/checkout@v1
with:
token: ${{ secrets.ACCESS_TOKEN }}
- name: Prepare ccache timestamp
id: ccache_cache_timestamp
shell: cmake -P {0}
run: |
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
message("::set-output name=timestamp::${current_date}")
- name: ccache cache files
uses: actions/cache@v2
with:
path: ~/.ccache
key: sitl_tests-${{matrix.config.build_type}}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}}
restore-keys: sitl_tests-${{matrix.config.build_type}}-ccache-
- name: setup ccache
run: |
mkdir -p ~/.ccache
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
echo "compression = true" >> ~/.ccache/ccache.conf
echo "compression_level = 6" >> ~/.ccache/ccache.conf
echo "max_size = 100M" >> ~/.ccache/ccache.conf
echo "hash_dir = false" >> ~/.ccache/ccache.conf
ccache -s
ccache -z
- name: check environment
run: |
export
ulimit -a
- name: Build PX4 and sitl_gazebo
env:
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
run: |
ccache -z
make px4_sitl_default
make px4_sitl_default sitl_gazebo
ccache -s
- name: Core dump settings
run: |
ulimit -c unlimited
echo "`pwd`/%e.core" > /proc/sys/kernel/core_pattern
- name: Run SITL tests
env:
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
run: |
export
./test/rostest_px4_run.sh ${{matrix.config.test_file}} vehicle:=${{matrix.config.vehicle}}
timeout-minutes: 45
- name: Look at core files
if: failure()
run: gdb build/px4_sitl_default/bin/px4 px4.core -ex "thread apply all bt" -ex "quit"
- name: Upload px4 coredump
if: failure()
uses: actions/upload-artifact@v2-preview
with:
name: coredump
path: px4.core
- name: ecl EKF analysis
if: always()
run: ./Tools/ecl_ekf/process_logdata_ekf.py ~/.ros/log/*/*.ulg || true
- name: Upload logs to flight review
if: always()
run: ./Tools/upload_log.py -q --description "${GITHUB_WORKFLOW} ${GITHUB_RUN_ID}" --feedback "${GITHUB_WORKFLOW} ${GITHUB_RUN_ID} ${GITHUB_REPOSITORY} ${GITHUB_REF}" --source CI ~/.ros/log/*/*.ulg
- name: Upload px4 binary
if: failure()
uses: actions/upload-artifact@v2
with:
name: binary
path: build/px4_sitl_default/bin/px4
- name: Store PX4 log
if: failure()
uses: actions/upload-artifact@v2
with:
name: px4_log
path: ~/.ros/log/*/*.ulg
- name: Store ROS log
if: failure()
uses: actions/upload-artifact@v2
with:
name: ros_log
path: ~/.ros/**/rostest-*.log
# Report test coverage
- name: Upload coverage
if: contains(matrix.config.build_type, 'Coverage')
run: |
git config --global credential.helper "" # disable the keychain credential helper
git config --global --add credential.helper store # enable the local store credential helper
echo "https://x-access-token:${{ secrets.ACCESS_TOKEN }}@github.com" >> ~/.git-credentials # add credential
git config --global url."https://github.com/".insteadof git@github.com: # credentials add credential
mkdir -p coverage
lcov --directory build/px4_sitl_default --base-directory build/px4_sitl_default --gcov-tool gcov --capture -o coverage/lcov.info
- name: Upload coverage information to Codecov
if: contains(matrix.config.build_type, 'Coverage')
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: mavros_offboard
file: coverage/lcov.info
-157
View File
@@ -1,157 +0,0 @@
name: Metadata
on:
push:
branches:
- 'master'
- 'release/*'
- 'pr-metadata-test'
jobs:
airframe:
runs-on: ubuntu-latest
container: px4io/px4-dev-base-focal:2021-09-08
steps:
- uses: actions/checkout@v1
with:
token: ${{ secrets.ACCESS_TOKEN }}
- name: airframe metadata
run: |
make airframe_metadata
./src/lib/version/get_git_tag_or_branch_version.sh build/px4_sitl_default >> $GITHUB_ENV
cd build/px4_sitl_default/docs
# TODO: deploy to userguide gitbook
- uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read
env:
AWS_S3_BUCKET: 'px4-travis'
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-west-1'
SOURCE_DIR: 'build/px4_sitl_default/docs/'
DEST_DIR: 'Firmware/${{ env.version }}/_general/'
module:
runs-on: ubuntu-latest
container: px4io/px4-dev-base-focal:2021-09-08
steps:
- uses: actions/checkout@v1
with:
token: ${{ secrets.ACCESS_TOKEN }}
- name: module documentation
run: |
make module_documentation
cd build/px4_sitl_default/docs
ls -ls *
# TODO: deploy to userguide gitbook and s3
parameter:
runs-on: ubuntu-latest
container: px4io/px4-dev-base-focal:2021-09-08
steps:
- uses: actions/checkout@v1
with:
token: ${{ secrets.ACCESS_TOKEN }}
- name: parameter metadata
run: |
make parameters_metadata
./src/lib/version/get_git_tag_or_branch_version.sh build/px4_sitl_default >> $GITHUB_ENV
- uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read
env:
AWS_S3_BUCKET: 'px4-travis'
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-west-1'
SOURCE_DIR: 'build/px4_sitl_default/docs/'
DEST_DIR: 'Firmware/${{ env.version }}/_general/'
events:
runs-on: ubuntu-latest
container: px4io/px4-dev-base-focal:2021-09-08
steps:
- uses: actions/checkout@v1
with:
token: ${{ secrets.ACCESS_TOKEN }}
- name: events metadata
run: |
make extract_events
./src/lib/version/get_git_tag_or_branch_version.sh build/px4_sitl_default >> $GITHUB_ENV
cd build/px4_sitl_default
mkdir _events_full || true
cp events/all_events_full.json.xz _events_full/all_events.json.xz
- uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read
env:
AWS_S3_BUCKET: 'px4-travis'
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-west-1'
SOURCE_DIR: 'build/px4_sitl_default/_events_full/'
DEST_DIR: 'Firmware/${{ env.version }}/_general/'
uorb_graph:
runs-on: ubuntu-latest
container: px4io/px4-dev-nuttx-focal:2021-09-08
steps:
- uses: actions/checkout@v1
with:
token: ${{ secrets.ACCESS_TOKEN }}
- name: uORB graph
run: |
make uorb_graphs
cd Tools/uorb_graph
ls -ls *
# TODO: deploy graph_px4_sitl.json to S3 px4-travis:Firmware/master/
micrortps_agent:
runs-on: ubuntu-latest
container: px4io/px4-dev-base-focal:2021-09-08
steps:
- uses: actions/checkout@v1
with:
token: ${{ secrets.ACCESS_TOKEN }}
- name: microRTPS agent
run: |
make px4_sitl_rtps
git clone https://github.com/PX4/micrortps_agent.git
cp -R build/px4_sitl_rtps/src/modules/micrortps_bridge/micrortps_agent/* micrortps_agent
ROS_msgs:
runs-on: ubuntu-latest
container: px4io/px4-dev-base-focal:2021-09-08
steps:
- uses: actions/checkout@v1
with:
token: ${{ secrets.ACCESS_TOKEN }}
- name: PX4 ROS msgs
run: |
git clone https://github.com/PX4/px4_msgs.git
python3 msg/tools/uorb_to_ros_msgs.py msg/ px4_msgs/msg/
ROS2_bridge:
runs-on: ubuntu-latest
container: px4io/px4-dev-base-focal:2021-09-08
steps:
- uses: actions/checkout@v1
with:
token: ${{ secrets.ACCESS_TOKEN }}
- name: PX4 ROS2 bridge
run: |
git clone https://github.com/PX4/px4_ros_com.git
./msg/tools/uorb_to_ros_urtps_topics.py -i msg/tools/urtps_bridge_topics.yaml -o px4_ros_com/templates/urtps_bridge_topics.yaml
-25
View File
@@ -1,25 +0,0 @@
name: Python CI Checks
on:
push:
branches:
- 'master'
pull_request:
branches:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
token: ${{ secrets.ACCESS_TOKEN }}
- name: Install Python3
run: sudo apt-get install python3 python3-setuptools python3-pip -y
- name: Install tools
run: pip3 install --user mypy types-requests flake8
- name: Check MAVSDK test scripts with mypy
run: $HOME/.local/bin/mypy --strict test/mavsdk_tests/*.py
- name: Check MAVSDK test scripts with flake8
run: $HOME/.local/bin/flake8 test/mavsdk_tests/*.py
-135
View File
@@ -1,135 +0,0 @@
name: SITL Tests
on:
push:
branches:
- 'master'
pull_request:
branches:
- '*'
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
config:
- {model: "iris", latitude: "59.617693", longitude: "-151.145316", altitude: "48", build_type: "RelWithDebInfo" } # Alaska
- {model: "standard_vtol", latitude: "-38.071235", longitude: "145.281220", altitude: "31", build_type: "AddressSanitizer" } # Australia
- {model: "tailsitter" , latitude: "29.660316", longitude: "-82.316658", altitude: "30", build_type: "RelWithDebInfo" } # Florida
- {model: "standard_vtol", latitude: "47.397742", longitude: "8.545594", altitude: "488", build_type: "Coverage" } # Zurich
container:
image: px4io/px4-dev-simulation-focal:2021-09-08
options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined
steps:
- uses: actions/checkout@v1
with:
token: ${{ secrets.ACCESS_TOKEN }}
- name: Download MAVSDK
run: wget "https://github.com/mavlink/MAVSDK/releases/download/v$(cat test/mavsdk_tests/MAVSDK_VERSION)/libmavsdk-dev_$(cat test/mavsdk_tests/MAVSDK_VERSION)_ubuntu20.04_amd64.deb"
- name: Install MAVSDK
run: dpkg -i "libmavsdk-dev_$(cat test/mavsdk_tests/MAVSDK_VERSION)_ubuntu20.04_amd64.deb"
- name: Prepare ccache timestamp
id: ccache_cache_timestamp
shell: cmake -P {0}
run: |
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
message("::set-output name=timestamp::${current_date}")
- name: ccache cache files
uses: actions/cache@v2
with:
path: ~/.ccache
key: sitl_tests-${{matrix.config.build_type}}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}}
restore-keys: sitl_tests-${{matrix.config.build_type}}-ccache-
- name: setup ccache
run: |
mkdir -p ~/.ccache
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
echo "compression = true" >> ~/.ccache/ccache.conf
echo "compression_level = 6" >> ~/.ccache/ccache.conf
echo "max_size = 100M" >> ~/.ccache/ccache.conf
echo "hash_dir = false" >> ~/.ccache/ccache.conf
ccache -s
ccache -z
- name: check environment
env:
PX4_HOME_LAT: ${{matrix.config.latitude}}
PX4_HOME_LON: ${{matrix.config.longitude}}
PX4_HOME_ALT: ${{matrix.config.altitude}}
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
run: |
export
ulimit -a
- name: Build PX4
env:
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
run: make px4_sitl_default
- name: ccache post-run px4/firmware
run: ccache -s
- name: Build SITL Gazebo
env:
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
run: make px4_sitl_default sitl_gazebo
- name: ccache post-run sitl_gazebo
run: ccache -s
- name: Build MAVSDK tests
env:
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
DONT_RUN: 1
run: make px4_sitl_default gazebo mavsdk_tests
- name: ccache post-run mavsdk_tests
run: ccache -s
- name: Core dump settings
run: |
ulimit -c unlimited
echo "`pwd`/%e.core" > /proc/sys/kernel/core_pattern
- name: Run SITL tests
env:
PX4_HOME_LAT: ${{matrix.config.latitude}}
PX4_HOME_LON: ${{matrix.config.longitude}}
PX4_HOME_ALT: ${{matrix.config.altitude}}
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
run: test/mavsdk_tests/mavsdk_test_runner.py --speed-factor 20 --abort-early --model ${{matrix.config.model}} --upload test/mavsdk_tests/configs/sitl.json --verbose
timeout-minutes: 45
- name: Look at core files
if: failure()
run: gdb build/px4_sitl_default/bin/px4 px4.core -ex "thread apply all bt" -ex "quit"
- name: Upload px4 coredump
if: failure()
uses: actions/upload-artifact@v2-preview
with:
name: coredump
path: px4.core
- name: Upload px4 binary
if: failure()
uses: actions/upload-artifact@v2-preview
with:
name: binary
path: build/px4_sitl_default/bin/px4
# Report test coverage
- name: Upload coverage
if: contains(matrix.config.build_type, 'Coverage')
run: |
git config --global credential.helper "" # disable the keychain credential helper
git config --global --add credential.helper store # enable the local store credential helper
echo "https://x-access-token:${{ secrets.ACCESS_TOKEN }}@github.com" >> ~/.git-credentials # add credential
git config --global url."https://github.com/".insteadof git@github.com: # credentials add credential
mkdir -p coverage
lcov --directory build/px4_sitl_default --base-directory build/px4_sitl_default --gcov-tool gcov --capture -o coverage/lcov.info
- name: Upload coverage information to Codecov
if: contains(matrix.config.build_type, 'Coverage')
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: mavsdk
file: coverage/lcov.info
+3 -3
View File
@@ -1,6 +1,6 @@
[submodule "src/modules/mavlink/mavlink"]
path = src/modules/mavlink/mavlink
url = https://github.com/mavlink/mavlink.git
url = https://github.com/Auterion/mavlink.git
branch = master
[submodule "src/drivers/uavcan/libuavcan"]
path = src/drivers/uavcan/libuavcan
@@ -12,8 +12,8 @@
branch = master
[submodule "Tools/sitl_gazebo"]
path = Tools/sitl_gazebo
url = https://github.com/PX4/PX4-SITL_gazebo.git
branch = master
url = git@github.com:Auterion/sitl_gazebo.git
branch = develop
[submodule "src/drivers/gps/devices"]
path = src/drivers/gps/devices
url = https://github.com/PX4/PX4-GPSDrivers.git
-2
View File
@@ -126,8 +126,6 @@
},
"search.showLineNumbers": true,
"telemetry.enableTelemetry": false,
"terminal.integrated.copyOnSelection": true,
"terminal.integrated.rightClickBehavior": "paste",
"terminal.integrated.scrollback": 5000,
"window.title": "${dirty} ${activeEditorMedium}${separator}${rootName}",
"workbench.editor.highlightModifiedTabs": true,
+18
View File
@@ -175,6 +175,12 @@ include(kconfig)
message(STATUS "PX4 config: ${PX4_CONFIG}")
message(STATUS "PX4 platform: ${PX4_PLATFORM}")
if($ENV{CLION_IDE})
# CLion automatically executes some compiler commands after configuring the
# project. This would fail on NuttX, as visibility.h tries to (indirectly)
# include nuttx/config.h, which at that point does not exist yet
add_definitions(-DPX4_DISABLE_GCC_POISON)
endif()
if(${PX4_PLATFORM} STREQUAL "posix")
if(ENABLE_LOCKSTEP_SCHEDULER)
@@ -185,6 +191,18 @@ if(${PX4_PLATFORM} STREQUAL "posix")
endif()
endif()
option(PX4_RESTRICTED_BUILD "Enable restricted build (limit param access)" OFF)
if(PX4_RESTRICTED_BUILD)
add_definitions(-DPX4_RESTRICTED_BUILD)
message(STATUS "Enabling restricted build")
endif()
if(PX4_EXPORT_CONTROLLED_BUILD)
add_definitions(-DPX4_EXPORT_CONTROLLED_BUILD)
message(STATUS "Enabling export controlled build (with flight time and wind restrictions)")
endif()
# external modules
set(EXTERNAL_MODULES_LOCATION "" CACHE STRING "External modules source location")
+26 -2
View File
@@ -129,6 +129,22 @@ else
BUILD_DIR_SUFFIX :=
endif
ifdef PX4_RESTRICTED_BUILD
CMAKE_ARGS += -DPX4_RESTRICTED_BUILD=ON
BUILD_DIR_SUFFIX := $(BUILD_DIR_SUFFIX)_restricted
endif
# pass the PX4_EXPORT_CONTROLLED_BUILD on to CMAKE_ARGS, and set it to 0 (OFF) by default
PX4_EXPORT_CONTROLLED_BUILD ?= 0
ifeq ($(PX4_EXPORT_CONTROLLED_BUILD),1)
CMAKE_ARGS += -DPX4_EXPORT_CONTROLLED_BUILD=ON
BUILD_DIR_SUFFIX := $(BUILD_DIR_SUFFIX)_export_controlled
else ifeq ($(PX4_EXPORT_CONTROLLED_BUILD),0)
CMAKE_ARGS += -DPX4_EXPORT_CONTROLLED_BUILD=OFF
else
$(error ERROR: Invalid value of flag PX4_EXPORT_CONTROLLED_BUILD, has to be '0' or '1')
endif
# additional config parameters passed to cmake
ifdef EXTERNAL_MODULES_LOCATION
CMAKE_ARGS += -DEXTERNAL_MODULES_LOCATION:STRING=$(EXTERNAL_MODULES_LOCATION)
@@ -245,6 +261,12 @@ define deprecation_warning
$(warning $(1) has been deprecated and will be removed, please use $(2)!)
endef
skynode:
$(MAKE) px4_fmu-v5x $(ARGS)
skynode_rtps:
$(MAKE) px4_fmu-v5x_rtps $(ARGS)
# All targets with just dependencies but no recipe must either be marked as phony (or have the special @: as recipe).
.PHONY: all px4_sitl_default all_config_targets all_default_targets
@@ -314,7 +336,9 @@ uorb_graphs:
@$(MAKE) --no-print-directory px4_fmu-v5_default uorb_graph
@$(MAKE) --no-print-directory px4_sitl_default uorb_graph
px4io_update: px4_io-v2_default cubepilot_io-v2_default
px4io_update:
@$(MAKE) --no-print-directory px4_io-v2_default
@$(MAKE) --no-print-directory cubepilot_io-v2_default
# px4_io-v2_default
cp build/px4_io-v2_default/px4_io-v2_default.bin boards/holybro/durandal-v1/extras/px4_io-v2_default.bin
cp build/px4_io-v2_default/px4_io-v2_default.bin boards/holybro/pix32v5/extras/px4_io-v2_default.bin
@@ -331,7 +355,7 @@ px4io_update: px4_io-v2_default cubepilot_io-v2_default
cp build/cubepilot_io-v2_default/cubepilot_io-v2_default.bin boards/cubepilot/cubeyellow/extras/cubepilot_io-v2_default.bin
git status
bootloaders_update: cuav_nora_bootloader cuav_x7pro_bootloader cubepilot_cubeorange_bootloader holybro_durandal-v1_bootloader matek_h743_bootloader matek_h743-mini_bootloader matek_h743-slim_bootloader modalai_fc-v2_bootloader mro_ctrl-zero-classic_bootloader mro_ctrl-zero-h7_bootloader mro_ctrl-zero-h7-oem_bootloader mro_pixracerpro_bootloader px4_fmu-v6u_bootloader px4_fmu-v6x_bootloader
bootloaders_update: cuav_nora_bootloader cuav_x7pro_bootloader cubepilot_cubeorange_bootloader holybro_durandal-v1_bootloader holybro_kakuteh7_bootloader matek_h743_bootloader matek_h743-mini_bootloader matek_h743-slim_bootloader modalai_fc-v2_bootloader mro_ctrl-zero-classic_bootloader mro_ctrl-zero-h7_bootloader mro_ctrl-zero-h7-oem_bootloader mro_pixracerpro_bootloader px4_fmu-v6c_bootloader px4_fmu-v6u_bootloader px4_fmu-v6x_bootloader
git status
.PHONY: coverity_scan
@@ -0,0 +1,101 @@
#!/bin/sh
#
# @name 6DoF Omnicopter SITL
#
# @type Quadrotor Wide
#
# @maintainer Jaeyoung Lim <jalim@ethz.ch>
#
. ${R}etc/init.d/rc.mc_defaults
param set-default SYS_CTRL_ALLOC 1
param set-default CA_AIRFRAME 0
param set-default CA_ROTOR_COUNT 8
param set-default CA_R_REV 255
param set-default CA_ROTOR0_PX 0.14435
param set-default CA_ROTOR0_PY -0.14435
param set-default CA_ROTOR0_PZ -0.14435
param set-default CA_ROTOR0_KM 0.05 # CCW
param set-default CA_ROTOR0_AX -0.788675
param set-default CA_ROTOR0_AY -0.211325
param set-default CA_ROTOR0_AZ -0.57735
param set-default CA_ROTOR1_PX -0.14435
param set-default CA_ROTOR1_PY -0.14435
param set-default CA_ROTOR1_PZ -0.14435
param set-default CA_ROTOR1_KM 0.05
param set-default CA_ROTOR1_AX 0.211325
param set-default CA_ROTOR1_AY -0.788675
param set-default CA_ROTOR1_AZ 0.57735
param set-default CA_ROTOR2_PX 0.14435
param set-default CA_ROTOR2_PY 0.14435
param set-default CA_ROTOR2_PZ -0.14435
param set-default CA_ROTOR2_KM 0.05
param set-default CA_ROTOR2_AX -0.211325
param set-default CA_ROTOR2_AY 0.788675
param set-default CA_ROTOR2_AZ 0.57735
param set-default CA_ROTOR3_PX -0.14435
param set-default CA_ROTOR3_PY 0.14435
param set-default CA_ROTOR3_PZ -0.14435
param set-default CA_ROTOR3_KM 0.05
param set-default CA_ROTOR3_AX 0.788675
param set-default CA_ROTOR3_AY 0.211325
param set-default CA_ROTOR3_AZ -0.57735
param set-default CA_ROTOR4_PX 0.14435
param set-default CA_ROTOR4_PY -0.14435
param set-default CA_ROTOR4_PZ 0.14435
param set-default CA_ROTOR4_KM 0.05
param set-default CA_ROTOR4_AX 0.788675
param set-default CA_ROTOR4_AY 0.211325
param set-default CA_ROTOR4_AZ -0.57735
param set-default CA_ROTOR5_PX -0.14435
param set-default CA_ROTOR5_PY -0.14435
param set-default CA_ROTOR5_PZ 0.14435
param set-default CA_ROTOR5_KM 0.05
param set-default CA_ROTOR5_AX -0.211325
param set-default CA_ROTOR5_AY 0.788675
param set-default CA_ROTOR5_AZ 0.57735
param set-default CA_ROTOR6_PX 0.14435
param set-default CA_ROTOR6_PY 0.14435
param set-default CA_ROTOR6_PZ 0.14435
param set-default CA_ROTOR6_KM 0.05
param set-default CA_ROTOR6_AX 0.211325
param set-default CA_ROTOR6_AY -0.788675
param set-default CA_ROTOR6_AZ 0.57735
param set-default CA_ROTOR7_PX -0.14435
param set-default CA_ROTOR7_PY 0.14435
param set-default CA_ROTOR7_PZ 0.14435
param set-default CA_ROTOR7_KM 0.05
param set-default CA_ROTOR7_AX -0.788675
param set-default CA_ROTOR7_AY -0.211325
param set-default CA_ROTOR7_AZ -0.57735
param set-default PWM_MAIN_FUNC1 101
param set-default PWM_MAIN_FUNC2 102
param set-default PWM_MAIN_FUNC3 103
param set-default PWM_MAIN_FUNC4 104
param set-default PWM_MAIN_FUNC5 105
param set-default PWM_MAIN_FUNC6 106
param set-default PWM_MAIN_FUNC7 107
param set-default PWM_MAIN_FUNC8 108
# disable MC desaturation which improves attitude tracking
param set-default CA_METHOD 0
# disable attitude failure detection
param set-default FD_FAIL_P 0
param set-default FD_FAIL_R 0
set MIXER skip
set MIXER_AUX none
@@ -0,0 +1,10 @@
mixer append /dev/pwm_output0 etc/mixers/mount_legs.aux.mix
mavlink start -x -u 14558 -r 4000 -f -m onboard -o 14530
# shellcheck disable=SC2154
mavlink stream -r 10 -s MOUNT_ORIENTATION -u $udp_gcs_port_local
# shellcheck disable=SC2154
mavlink stream -r 50 -s ATTITUDE_QUATERNION -u $udp_offboard_port_local
mavlink stream -r 10 -s MOUNT_ORIENTATION -u $udp_offboard_port_local
@@ -0,0 +1,12 @@
#!/bin/sh
#
# @name Quadrotor SITL model for JSBSim
#
# @type Quadrotor Wide
#
# @maintainer Jaeyoung Lim <jaeyoung@auterion.com>
#
. ${R}etc/init.d/rc.mc_defaults
set MIXER quad_w
@@ -0,0 +1,30 @@
#!/bin/sh
#
# @name Hexacopter SITL model for JSBSim
#
# @type Hexarotor x
#
# @maintainer Jaeyoung Lim <jaeyoung@auterion.com>
#
. ${R}etc/init.d/rc.mc_defaults
param set-default MC_PITCHRATE_P 0.1
param set-default MC_PITCHRATE_I 0.05
param set-default MC_PITCH_P 6.0
param set-default MC_ROLLRATE_P 0.15
param set-default MC_ROLLRATE_I 0.1
param set-default MC_ROLL_P 6.0
param set-default MPC_XY_VEL_I_ACC 4
param set-default MPC_XY_VEL_P_ACC 3
param set-default RTL_DESCEND_ALT 10
param set-default TRIG_INTERFACE 3
param set-default TRIG_MODE 4
param set-default MNT_MODE_IN 4
param set-default MNT_DO_STAB 2
param set-default MAV_TYPE 13
set MIXER hexa_x
@@ -0,0 +1,23 @@
#!/bin/sh
#
# @name QuadrotorX SITL for SIH
#
# @type Quadrotor
#
# @maintainer Romain Chiappinelli <romain.chiap@gmail.com>
#
. ${R}etc/init.d/rc.mc_defaults
set MIXER quad_x
# disable some checks to allow to fly:
# - with usb
param set-default CBRK_USB_CHK 197848
# - without real battery
param set-default CBRK_SUPPLY_CHK 894281
# - without safety switch
param set-default COM_PREARM_MODE 0
param set-default CBRK_IO_SAFETY 22027
param set SIH_VEHICLE_TYPE 0
@@ -0,0 +1,33 @@
#!/bin/sh
#
# @name Plane SITL for SIH
#
# @type Plane
#
# @maintainer Romain Chiappinelli <romain.chiap@gmail.com>
. ${R}etc/init.d/rc.fw_defaults
set MIXER AERT
# disable some checks to allow to fly:
# - with usb
param set-default CBRK_USB_CHK 197848
# - without real battery
param set-default CBRK_SUPPLY_CHK 894281
# - without safety switch
param set-default COM_PREARM_MODE 0
param set-default CBRK_IO_SAFETY 22027
param set-default BAT_N_CELLS 3
param set SIH_T_MAX 6.0
param set SIH_MASS 0.3
param set SIH_IXX 0.00402
param set SIH_IYY 0.0144
param set SIH_IZZ 0.0177
param set SIH_IXZ 0.00046
param set SIH_KDV 0.2
param set SIH_VEHICLE_TYPE 1 # sih as fixed wing
param set RWTO_TKOFF 1 # enable takeoff from runway (as opposed to launched)
@@ -0,0 +1,45 @@
#!/bin/sh
#
# @name SIH Tailsitter Duo
#
# @type VTOL
#
# @maintainer Romain Chiappinelli <romain.chiap@gmail.com>
. ${R}etc/init.d/rc.vtol_defaults
param set-default VT_ELEV_MC_LOCK 0
param set-default VT_TYPE 0
param set-default VT_FW_DIFTHR_EN 1
param set-default VT_FW_DIFTHR_SC 0.3
param set-default MPC_MAN_Y_MAX 60
param set-default MC_PITCH_P 5
param set-default MAV_TYPE 19
set MAV_TYPE 19
set MIXER vtol_tailsitter_duo_sat
# disable some checks to allow to fly:
# - with usb
param set-default CBRK_USB_CHK 197848
# - without real battery
param set-default CBRK_SUPPLY_CHK 894281
# - without safety switch
param set-default COM_PREARM_MODE 0
param set-default CBRK_IO_SAFETY 22027
param set-default BAT_N_CELLS 3
param set SIH_T_MAX 2.0
param set SIH_Q_MAX 0.0165
param set SIH_MASS 0.2
# IXX and IZZ are inverted from the thesis as the body frame is pitched by 90 deg
param set SIH_IXX 0.00354
param set SIH_IYY 0.000625
param set SIH_IZZ 0.00300
param set SIH_IXZ 0.0
param set SIH_KDV 0.2
param set SIH_L_ROLL 0.145
# sih as tailsitter
param set SIH_VEHICLE_TYPE 2
@@ -0,0 +1,11 @@
#!/bin/sh
#
# @name 3DR Iris Quadrotor SITL (Depth Camera)
#
# @type Quadrotor Wide
#
. ${R}etc/init.d-posix/airframes/10016_iris
# param set COM_OBS_AVOID 1
param set-default MPC_XY_CRUISE 5.0
@@ -10,16 +10,12 @@ param set-default EKF2_MAG_YAWLIM 0
param set-default FW_LND_AIRSPD_SC 1
param set-default FW_LND_ANG 8
param set-default FW_THR_LND_MAX 0
param set-default FW_L1_PERIOD 12
param set-default FW_MAN_P_MAX 30
param set-default FW_PR_P 0.9
param set-default FW_PR_FF 0.2
param set-default FW_PSP_OFF 2
param set-default FW_P_LIM_MAX 32
param set-default FW_P_LIM_MIN -15
param set-default FW_RR_FF 0.1
@@ -29,7 +25,7 @@ param set-default FW_SPOILERS_LND 0.4
param set-default FW_THR_MAX 0.6
param set-default FW_THR_MIN 0.05
param set-default FW_THR_CRUISE 0.25
param set-default FW_THR_TRIM 0.25
param set-default FW_T_CLMB_MAX 8
param set-default FW_T_SINK_MAX 2.7
@@ -7,12 +7,9 @@
param set-default FW_LND_AIRSPD_SC 1.1
param set-default FW_LND_ANG 5
param set-default FW_THR_LND_MAX 0
param set-default FW_LND_HHDIST 30
param set-default FW_LND_FL_PMIN 9.5
param set-default FW_LND_FL_PMAX 20
param set-default FW_LND_FLALT 5
param set-default FW_LND_TLALT 15
param set-default FW_L1_PERIOD 25
@@ -38,7 +35,6 @@ param set-default NAV_DLL_ACT 2
param set-default RWTO_TKOFF 1
param set-default RWTO_MAX_PITCH 20
param set-default RWTO_MAX_ROLL 10
param set-default RWTO_PSP 8
param set-default RWTO_AIRSPD_SCL 1.8
@@ -7,12 +7,9 @@
param set-default FW_LND_AIRSPD_SC 1.1
param set-default FW_LND_ANG 5
param set-default FW_THR_LND_MAX 0
param set-default FW_LND_HHDIST 30
param set-default FW_LND_FL_PMIN 9.5
param set-default FW_LND_FL_PMAX 20
param set-default FW_LND_FLALT 5
param set-default FW_LND_TLALT 15
param set-default FW_L1_PERIOD 25
@@ -38,7 +35,6 @@ param set-default NAV_DLL_ACT 2
param set-default RWTO_TKOFF 1
param set-default RWTO_MAX_PITCH 20
param set-default RWTO_MAX_ROLL 10
param set-default RWTO_PSP 8
param set-default RWTO_AIRSPD_SCL 1.8
@@ -10,7 +10,6 @@ param set-default EKF2_MAG_YAWLIM 0
param set-default FW_LND_AIRSPD_SC 1
param set-default FW_LND_ANG 8
param set-default FW_THR_LND_MAX 0
param set-default FW_L1_PERIOD 15
@@ -7,12 +7,9 @@
param set-default FW_LND_AIRSPD_SC 1.1
param set-default FW_LND_ANG 5
param set-default FW_THR_LND_MAX 0
param set-default FW_LND_HHDIST 30
param set-default FW_LND_FL_PMIN 9.5
param set-default FW_LND_FL_PMAX 20
param set-default FW_LND_FLALT 5
param set-default FW_LND_TLALT 15
param set-default FW_L1_PERIOD 25
@@ -37,7 +34,6 @@ param set-default NAV_DLL_ACT 2
param set-default RWTO_TKOFF 1
param set-default RWTO_MAX_PITCH 20
param set-default RWTO_MAX_ROLL 10
param set-default RWTO_PSP 8
param set-default RWTO_AIRSPD_SCL 1.8
@@ -10,16 +10,12 @@ param set-default EKF2_MAG_YAWLIM 0
param set-default FW_LND_AIRSPD_SC 1
param set-default FW_LND_ANG 8
param set-default FW_THR_LND_MAX 0
param set-default FW_L1_PERIOD 12
param set-default FW_MAN_P_MAX 30
param set-default FW_PR_P 0.9
param set-default FW_PR_FF 0.2
param set-default FW_PSP_OFF 2
param set-default FW_P_LIM_MAX 32
param set-default FW_P_LIM_MIN -15
param set-default FW_RR_FF 0.1
@@ -27,7 +23,7 @@ param set-default FW_RR_P 0.3
param set-default FW_THR_MAX 0.6
param set-default FW_THR_MIN 0.05
param set-default FW_THR_CRUISE 0.25
param set-default FW_THR_TRIM 0.25
param set-default FW_T_ALT_TC 2
param set-default FW_T_CLMB_MAX 8
@@ -5,5 +5,5 @@
. ${R}etc/init.d-posix/airframes/1030_plane
param set-default FW_THR_CRUISE 0.0
param set-default FW_THR_TRIM 0.0
param set-default RWTO_TKOFF 0
@@ -49,21 +49,20 @@ param set-default PWM_MAIN_FUNC7 202
param set-default PWM_MAIN_FUNC8 203
param set-default FW_L1_PERIOD 12
param set-default FW_MAN_P_MAX 30
param set-default FW_PR_FF 0.2
param set-default FW_PR_P 0.9
param set-default FW_PSP_OFF 2
param set-default FW_P_LIM_MAX 32
param set-default FW_P_LIM_MIN -15
param set-default FW_RR_FF 0.1
param set-default FW_RR_P 0.3
param set-default FW_THR_CRUISE 0.25
param set-default FW_THR_TRIM 0.25
param set-default FW_THR_MAX 0.6
param set-default FW_THR_MIN 0.05
param set-default FW_T_CLMB_MAX 8
param set-default FW_T_SINK_MAX 2.7
param set-default FW_T_SINK_MIN 2.2
param set-default MC_AIRMODE 1
param set-default MC_ROLLRATE_P 0.3
param set-default MC_YAW_P 1.6
@@ -44,14 +44,12 @@ param set-default PWM_MAIN_FUNC7 202
param set-default PWM_MAIN_REV 96 # invert both elevons
param set-default FW_L1_PERIOD 12
param set-default FW_MAN_P_MAX 30
param set-default FW_PR_I 0.2
param set-default FW_PR_P 0.2
param set-default FW_PSP_OFF 2
param set-default FW_P_LIM_MAX 32
param set-default FW_P_LIM_MIN -15
param set-default FW_RR_P 0.2
param set-default FW_THR_CRUISE 0.33
param set-default FW_THR_TRIM 0.33
param set-default FW_THR_MAX 0.6
param set-default FW_THR_MIN 0.05
param set-default FW_T_ALT_TC 2
@@ -61,6 +59,7 @@ param set-default FW_T_SINK_MAX 2.7
param set-default FW_T_SINK_MIN 2.2
param set-default FW_T_TAS_TC 2
param set-default MC_AIRMODE 1
param set-default MC_ROLLRATE_P 0.3
param set-default MPC_ACC_HOR_MAX 2
@@ -35,9 +35,7 @@ param set-default CA_SV_CS1_TYPE 2
param set-default CA_SV_CS2_TRQ_P 1.0
param set-default CA_SV_CS2_TYPE 3
param set-default CA_SV_CS_COUNT 3
param set-default CA_SV_TL0_CT 0
param set-default CA_SV_TL1_CT 0
param set-default CA_SV_TL2_CT 0
param set-default CA_SV_TL3_CT 0
param set-default CA_SV_TL_COUNT 4
@@ -54,15 +52,13 @@ param set-default PWM_MAIN_FUNC10 202
param set-default PWM_MAIN_FUNC11 203
param set-default FW_L1_PERIOD 12
param set-default FW_MAN_P_MAX 30
param set-default FW_PR_FF 0.2
param set-default FW_PR_P 0.9
param set-default FW_PSP_OFF 2
param set-default FW_P_LIM_MAX 32
param set-default FW_P_LIM_MIN -15
param set-default FW_RR_FF 0.1
param set-default FW_RR_P 0.3
param set-default FW_THR_CRUISE 0.38
param set-default FW_THR_TRIM 0.38
param set-default FW_THR_MAX 0.6
param set-default FW_THR_MIN 0.05
param set-default FW_T_CLMB_MAX 8
@@ -70,6 +66,9 @@ param set-default FW_T_SINK_MAX 2.7
param set-default FW_T_SINK_MIN 2.2
param set-default MC_YAW_P 1.6
param set-default MC_AIRMODE 1
param set-default MC_YAWRATE_P 0.3
param set-default MC_YAWRATE_I 0.3
param set-default MIS_TAKEOFF_ALT 10
@@ -8,15 +8,13 @@
. ${R}etc/init.d/rc.vtol_defaults
param set-default FW_L1_PERIOD 12
param set-default FW_MAN_P_MAX 30
param set-default FW_PR_FF 0.2
param set-default FW_PR_P 0.9
param set-default FW_PSP_OFF 2
param set-default FW_P_LIM_MAX 32
param set-default FW_P_LIM_MIN -15
param set-default FW_RR_FF 0.1
param set-default FW_RR_P 0.3
param set-default FW_THR_CRUISE 0.25
param set-default FW_THR_TRIM 0.25
param set-default FW_THR_MAX 0.6
param set-default FW_THR_MIN 0.05
param set-default FW_T_ALT_TC 2
@@ -0,0 +1,17 @@
#!/bin/sh
#
# @name Standard VTOL with gimbal
#
# @type Standard VTOL with gimbal
#
. ${R}etc/init.d-posix/1040_standard_vtol
param set-default TRIG_INTERFACE 3
param set-default TRIG_MODE 4
param set-default MNT_MODE_IN 0
param set-default MAV_TYPE 22
set MIXER_FILE etc/mixers-sitl/standard_vtol_sitl.main.mix
set MIXER custom
@@ -0,0 +1,10 @@
mixer append /dev/pwm_output0 etc/mixers/mount_legs.aux.mix
mavlink start -x -u 14558 -r 4000 -f -m onboard -o 14530
# shellcheck disable=SC2154
mavlink stream -r 10 -s MOUNT_ORIENTATION -u $udp_gcs_port_local
# shellcheck disable=SC2154
mavlink stream -r 50 -s ATTITUDE_QUATERNION -u $udp_offboard_port_local
mavlink stream -r 10 -s MOUNT_ORIENTATION -u $udp_offboard_port_local
@@ -0,0 +1,54 @@
#!/bin/sh
#
# @name VTOL Tiltrotor Tricopter
#
# @type VTOL Tiltrotor Tricopter
#
. ${R}etc/init.d/rc.vtol_defaults
param set-default FW_AIRSPD_MAX 25
param set-default FW_AIRSPD_MIN 14
param set-default FW_AIRSPD_TRIM 16
param set-default FW_L1_PERIOD 12
param set-default MC_ROLLRATE_P 0.3
param set-default MIS_LTRMIN_ALT 10
param set-default MIS_TAKEOFF_ALT 10
param set-default MIS_YAW_TMT 10
param set-default MC_PITCHRATE_P 0.3
param set-default MC_PITCH_P 5.0
param set-default MC_ROLLRATE_P 0.4
param set-default MC_ROLL_P 5.0
param set-default MC_YAWRATE_P 0.8
param set-default MC_YAW_P 1.5
param set-default MPC_ACC_HOR_MAX 2
param set-default MPC_ACC_HOR_MAX 2
param set-default MPC_MAN_Y_MAX 70
param set-default MPC_THR_MIN 0.1
param set-default MPC_TKO_SPEED 1
param set-default MPC_XY_P 0.15
param set-default MPC_XY_VEL_D 0.005
param set-default MPC_XY_VEL_I 0.2
param set-default MPC_XY_VEL_P 0.05
param set-default MPC_Z_VEL_MAX_DN 1.5
param set-default MPC_Z_VEL_P 0.8
param set-default NAV_ACC_RAD 5
param set-default NAV_LOITER_RAD 80
param set-default VT_F_TRANS_DUR 5.0
param set-default VT_F_TRANS_THR 0.75
param set-default VT_TILT_FW 3.1415
param set-default VT_TILT_TRANS 1.2
param set-default VT_ELEV_MC_LOCK 0
param set-default VT_TYPE 1
param set-default VT_B_TRANS_DUR 8
param set-default MAV_TYPE 24
set MIXER_FILE etc/mixers-sitl/tiltrotor_tri_sitl.main.mix
set MIXER custom
@@ -0,0 +1,39 @@
#!/bin/sh
#
# @name Rover
#
. ${R}etc/init.d/rc.rover_defaults
param set-default GND_L1_DIST 5
param set-default GND_SP_CTRL_MODE 1
param set-default GND_SPEED_D 0.001
param set-default GND_SPEED_I 3
param set-default GND_SPEED_IMAX 0.125
param set-default GND_SPEED_P 0.25
param set-default GND_SPEED_THR_SC 1
param set-default GND_SPEED_TRIM 4
param set-default GND_THR_CRUISE 0.3
param set-default GND_THR_IDLE 0
param set-default GND_THR_MAX 0.5
param set-default GND_THR_MIN 0
param set-default MIS_LTRMIN_ALT 0.01
param set-default MIS_TAKEOFF_ALT 0.01
param set-default NAV_ACC_RAD 0.5
param set-default NAV_LOITER_RAD 2
param set-default CBRK_AIRSPD_CHK 162128
param set-default GND_MAX_ANG 0.6
param set-default GND_WHEEL_BASE 2.0
param set-default TRIG_INTERFACE 3
param set-default TRIG_MODE 4
param set-default MNT_MODE_IN 4
param set-default MNT_MODE_OUT 2
param set-default MNT_DO_STAB 2
param set-default MAV_TYPE 10
set MIXER_FILE etc/mixers-sitl/rover_ackermann_sitl.main.mix
@@ -0,0 +1,10 @@
mixer append /dev/pwm_output0 etc/mixers/mount_legs.aux.mix
mavlink start -x -u 14558 -r 4000 -f -m onboard -o 14530
# shellcheck disable=SC2154
mavlink stream -r 10 -s MOUNT_ORIENTATION -u $udp_gcs_port_local
# shellcheck disable=SC2154
mavlink stream -r 50 -s ATTITUDE_QUATERNION -u $udp_offboard_port_local
mavlink stream -r 10 -s MOUNT_ORIENTATION -u $udp_offboard_port_local
@@ -38,10 +38,9 @@ param set-default FW_P_LIM_MAX 25
param set-default FW_P_LIM_MIN -5
param set-default FW_R_LIM 30
param set-default FW_MAN_P_MAX 30.0
param set-default FW_MAN_R_MAX 30.0
param set-default FW_THR_CRUISE 0.8
param set-default FW_THR_TRIM 0.8
param set-default FW_THR_IDLE 0
param set-default COM_DISARM_PRFLT 0
@@ -20,8 +20,14 @@ param set-default MC_ROLLRATE_I 0.0400
param set-default MC_ROLLRATE_D 0.0010
param set-default MC_ROLL_P 9.0
param set-default MPC_XY_VEL_I_ACC 4
param set-default MPC_XY_VEL_P_ACC 3
param set-default MC_PITCHRATE_P 0.0800
param set-default MC_PITCHRATE_I 0.0400
param set-default MC_PITCHRATE_D 0.0010
param set-default MC_PITCH_P 9.0
param set-default MC_ROLLRATE_P 0.0800
param set-default MC_ROLLRATE_I 0.0400
param set-default MC_ROLLRATE_D 0.0010
param set-default MC_ROLL_P 9.0
param set-default RTL_DESCEND_ALT 10
param set-default RTL_LAND_DELAY 0
@@ -35,8 +35,15 @@ px4_add_romfs_files(
10016_iris
10017_iris_ctrlalloc
10018_iris_foggy_lidar
10019_omnicopter
10020_if750a
10020_if750a.post
10028_quadrotor_x
10029_hexarotor_x
10030_px4vision
10040_quadx
10041_airplane
10042_xvert
1010_iris_opt_flow
1010_iris_opt_flow.post
1011_iris_irlock
@@ -52,6 +59,7 @@ px4_add_romfs_files(
1020_uuv_generic
1021_uuv_hippocampus
1022_uuv_bluerov2_heavy
1025_iris_depth_camera
1030_plane
1031_plane_cam
1032_plane_catapult
@@ -67,9 +75,14 @@ px4_add_romfs_files(
1042_tiltrotor
1043_standard_vtol_drop
1043_standard_vtol_drop.post
1058_standard_vtol_gimbal
1058_standard_vtol_gimbal.post
1059_tiltrotor_tri
1060_rover
1061_r1_rover
1062_tf-r1
1063_rover_gimbal
1063_rover_gimbal.post
1070_boat
3010_quadrotor_x
3011_hexarotor_x
@@ -24,9 +24,19 @@ mavlink stream -r 10 -s OPTICAL_FLOW_RAD -u $udp_gcs_port_local
# API/Offboard link
mavlink start -x -u $udp_offboard_port_local -r 4000000 -f -m onboard -o $udp_offboard_port_remote
mavlink stream -r 2 -s COMMAND_CANCEL -u $udp_offboard_port_local
# Onboard link to camera
mavlink start -x -u $udp_onboard_payload_port_local -r 4000 -f -m onboard -o $udp_onboard_payload_port_remote
# Onboard link to gimbal
mavlink start -x -u $udp_onboard_gimbal_port_local -r 400000 -m gimbal -o $udp_onboard_gimbal_port_remote
# To display for SIH sitl
if [ "$SIM_MODE" = "sihsim" ]; then
udp_sihsim_port_local=$((19450+px4_instance))
udp_sihsim_port_remote=$((19410+px4_instance))
mavlink start -x -u $udp_sihsim_port_local -r 400000 -m custom -o $udp_sihsim_port_remote
mavlink stream -r 200 -s HIL_ACTUATOR_CONTROLS -u $udp_sihsim_port_local
mavlink stream -r 25 -s HIL_STATE_QUATERNION -u $udp_sihsim_port_local
fi
+16 -12
View File
@@ -30,6 +30,7 @@ set MIXER_FILE none
set OUTPUT_MODE sim
set EXTRA_MIXER_MODE none
set PWM_OUT none
set PWM_AUX_OUT none
set SDCARD_MIXERS_PATH etc/mixers
set USE_IO no
set VEHICLE_TYPE none
@@ -95,15 +96,15 @@ fi
if param compare SYS_AUTOCONFIG 1
then
# Reset params except Airframe, RC calibration, sensor calibration, flight modes, total flight time, and next flight UUID.
param reset_all SYS_AUTOSTART RC* CAL_* COM_FLTMODE* LND_FLIGHT* TC_* COM_FLIGHT*
set AUTOCNF yes
# Wipe out params except RC*, flight modes, total flight time, accel cal, gyro cal, next flight UUID
param reset_all SYS_AUTO* RC* COM_FLTMODE* LND_FLIGHT* TC_* CAL_ACC* CAL_GYRO* COM_FLIGHT*
fi
# multi-instance setup
# shellcheck disable=SC2154
param set MAV_SYS_ID $((px4_instance+1))
param set MNT_MAV_SYSID $((px4_instance+1))
if [ $AUTOCNF = yes ]
then
@@ -155,6 +156,8 @@ param set-default SDLOG_DIRS_MAX 7
param set-default TRIG_INTERFACE 3
param set-default SYS_FAILURE_EN 1
# Adapt timeout parameters if simulation runs faster or slower than realtime.
if [ -n "$PX4_SIM_SPEED_FACTOR" ]; then
COM_DL_LOSS_T_LONGER=$(echo "$PX4_SIM_SPEED_FACTOR * 10" | bc)
@@ -196,14 +199,6 @@ fi
. "$autostart_file"
#
# If autoconfig parameter was set, reset it and save parameters.
#
if [ $AUTOCNF = yes ]
then
param set SYS_AUTOCONFIG 0
fi
# Simulator IMU data provided at 250 Hz
param set IMU_INTEG_RATE 250
@@ -211,8 +206,11 @@ param set IMU_INTEG_RATE 250
. px4-rc.params
dataman start
# start sih in sih_sim mode, otherwise simulator module
if [ "$SIM_MODE" = "sihsim" ]; then
sih start
# only start the simulator if not in replay mode, as both control the lockstep time
if ! replay tryapplyparams
elif ! replay tryapplyparams
then
. px4-rc.simulator
fi
@@ -259,6 +257,12 @@ then
gyro_calibration start
fi
# Payload deliverer module if gripper is enabled
if param compare -s PD_GRIPPER_EN 1
then
payload_deliverer start
fi
#user defined mavlink streams for instances can be in PATH
. px4-rc.mavlink
@@ -39,8 +39,10 @@ px4_add_romfs_files(
rc.balloon_apps
rc.balloon_defaults
rc.boat_defaults
rc.autostart_ext
rc.fw_apps
rc.fw_defaults
rc.heli_defaults
rc.interface
rc.logging
rc.mc_apps
@@ -29,9 +29,6 @@ param set-default FW_L1_DAMPING 0.74
param set-default FW_L1_PERIOD 16
param set-default FW_LND_ANG 15
param set-default FW_LND_FLALT 5
param set-default FW_LND_HVIRT 13
param set-default FW_LND_TLALT 5
param set-default FW_THR_LND_MAX 0
param set-default FW_PR_FF 0.35
param set-default FW_PR_P 0.2
param set-default FW_RR_FF 0.6
@@ -1,36 +0,0 @@
#!/bin/sh
#
# @name Team Blacksheep Discovery
#
# @type Quadrotor Wide
# @class Copter
#
# @output MAIN1 motor 1
# @output MAIN2 motor 2
# @output MAIN3 motor 3
# @output MAIN4 motor 4
# @output MAIN5 feed-through of RC AUX1 channel
# @output MAIN6 feed-through of RC AUX2 channel
#
# @output AUX1 feed-through of RC AUX1 channel
# @output AUX2 feed-through of RC AUX2 channel
# @output AUX3 feed-through of RC AUX3 channel
# @output AUX4 feed-through of RC FLAPS channel
#
# @maintainer Lorenz Meier <lorenz@px4.io>
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.mc_defaults
param set-default MC_ROLLRATE_P 0.1
param set-default MC_ROLLRATE_I 0.05
param set-default MC_ROLLRATE_D 0.0017
param set-default MC_PITCHRATE_P 0.14
param set-default MC_PITCHRATE_I 0.1
param set-default MC_PITCHRATE_D 0.0025
param set-default MC_YAWRATE_P 0.28
set MIXER quad_w
@@ -1,40 +0,0 @@
#!/bin/sh
#
# @name 3DR Iris Quadrotor
#
# @type Quadrotor Wide
# @class Copter
#
# @output MAIN1 motor 1
# @output MAIN2 motor 2
# @output MAIN3 motor 3
# @output MAIN4 motor 4
#
# @output AUX1 feed-through of RC AUX1 channel
# @output AUX2 feed-through of RC AUX2 channel
# @output AUX3 feed-through of RC AUX3 channel
# @output AUX4 feed-through of RC FLAPS channel
#
# @maintainer Lorenz Meier <lorenz@px4.io>
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.mc_defaults
# TODO tune roll/pitch separately
param set-default MC_ROLL_P 7
param set-default MC_ROLLRATE_I 0.05
param set-default MC_ROLLRATE_D 0.004
param set-default MC_PITCH_P 7
param set-default MC_PITCHRATE_I 0.05
param set-default MC_PITCHRATE_D 0.004
param set-default MC_YAW_P 2.5
param set-default MC_YAWRATE_P 0.25
param set-default MC_YAWRATE_I 0.25
param set-default BAT1_V_DIV 12.27559
param set-default BAT1_A_PER_V 15.391030303103
set MIXER quad_w
@@ -1,43 +0,0 @@
#!/bin/sh
#
# @name Team Blacksheep Discovery Endurance
#
# @type Quadrotor Wide
# @class Copter
#
# @output MAIN1 motor 1
# @output MAIN2 motor 2
# @output MAIN3 motor 3
# @output MAIN4 motor 4
# @output MAIN5 feed-through of RC AUX1 channel
# @output MAIN6 feed-through of RC AUX2 channel
#
# @output AUX1 feed-through of RC AUX1 channel
# @output AUX2 feed-through of RC AUX2 channel
# @output AUX3 feed-through of RC AUX3 channel
# @output AUX4 feed-through of RC FLAPS channel
#
# @maintainer Simon Wilks <simon@uaventure.com>
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.mc_defaults
param set-default BAT1_N_CELLS 6
param set-default BAT1_V_EMPTY 3.5
param set-default MC_ROLL_P 7
param set-default MC_ROLLRATE_P 0.08
param set-default MC_ROLLRATE_I 0.02
param set-default MC_PITCH_P 7
param set-default MC_PITCHRATE_P 0.13
param set-default MC_PITCHRATE_I 0.02
param set-default MC_PITCHRATE_D 0.005
param set-default MPC_XY_VEL_MAX 2
param set-default PWM_MAIN_MIN 1080
set MIXER quad_w
@@ -45,7 +45,6 @@ param set-default MPC_XY_VEL_I_ACC 4
param set-default MPC_XY_VEL_P_ACC 3
param set-default MPC_Z_VEL_P_ACC 12
param set-default MPC_Z_VEL_I_ACC 3
param set-default MPC_Z_VEL_MAX_DN 1.5
param set-default NAV_ACC_RAD 5
param set-default NAV_DLL_ACT 2
@@ -1,22 +1,10 @@
#!/bin/sh
#
# @name Generic Quadplane VTOL
# @name Generic Standard VTOL
#
# @type Standard VTOL
# @class VTOL
#
# @maintainer
#
# @output MAIN1 motor 1
# @output MAIN2 motor 2
# @output MAIN3 motor 3
# @output MAIN4 motor 4
# @output AUX1 Aileron 1
# @output AUX2 Aileron 2
# @output AUX3 Elevator
# @output AUX4 Rudder
# @output AUX5 Throttle
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
# @board holybro_kakutef7 exclude
@@ -24,21 +12,21 @@
. ${R}etc/init.d/rc.vtol_defaults
param set-default SYS_CTRL_ALLOC 1
param set-default CA_AIRFRAME 2
param set-default CA_ROTOR_COUNT 5
param set-default CA_ROTOR0_PX 0.15
param set-default CA_ROTOR0_PY 0.15
param set-default CA_ROTOR1_PX -0.15
param set-default CA_ROTOR1_PY -0.15
param set-default CA_ROTOR2_PX 0.15
param set-default CA_ROTOR2_PY -0.15
param set-default CA_ROTOR0_PX 1
param set-default CA_ROTOR0_PY 1
param set-default CA_ROTOR1_PX -1
param set-default CA_ROTOR1_PY -1
param set-default CA_ROTOR2_PX 1
param set-default CA_ROTOR2_PY -1
param set-default CA_ROTOR2_KM -0.05
param set-default CA_ROTOR3_PX -0.15
param set-default CA_ROTOR3_PY 0.15
param set-default CA_ROTOR3_PX -1
param set-default CA_ROTOR3_PY 1
param set-default CA_ROTOR3_KM -0.05
param set-default CA_ROTOR4_AX 1.0
param set-default CA_ROTOR4_AZ 0.0
param set-default CA_ROTOR4_PX 0.2
param set-default CA_SV_CS_COUNT 4
param set-default CA_SV_CS0_TYPE 1
param set-default CA_SV_CS0_TRQ_R -0.5
@@ -48,16 +36,5 @@ param set-default CA_SV_CS2_TYPE 3
param set-default CA_SV_CS2_TRQ_P 1.0
param set-default CA_SV_CS3_TRQ_Y 1.0
param set-default CA_SV_CS3_TYPE 4
param set-default PWM_AUX_DIS5 950
param set-default VT_TYPE 2
param set-default VT_MOT_ID 1234
param set-default VT_FW_MOT_OFFID 1234
param set-default MAV_TYPE 22
set MIXER quad_x
set MIXER_AUX vtol_AAERT
set PWM_OUT 1234
@@ -1,43 +0,0 @@
#!/bin/sh
#
# @name Caipiroshka Duo Tailsitter
#
# @type VTOL Duo Tailsitter
# @class VTOL
#
# @output MAIN1 motor right
# @output MAIN2 motor left
# @output MAIN5 elevon right
# @output MAIN6 elevon left
#
# @maintainer Roman Bapst <roman@px4.io>
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
# @board holybro_kakutef7 exclude
#
. ${R}etc/init.d/rc.vtol_defaults
param set-default MAV_TYPE 19
param set-default MC_ROLL_P 6
param set-default MC_ROLLRATE_P 0.12
param set-default MC_ROLLRATE_I 0.002
param set-default MC_PITCH_P 4.5
param set-default MC_PITCHRATE_P 0.3
param set-default MC_PITCHRATE_I 0.002
param set-default MC_YAW_P 3.8
param set-default MC_YAWRATE_P 0.22
param set-default MC_YAWRATE_I 0.02
param set-default VT_IDLE_PWM_MC 1080
param set-default VT_ELEV_MC_LOCK 0
param set-default VT_MOT_ID 12
param set-default VT_TYPE 0
set MIXER vtol_tailsitter_duo
set PWM_OUT 123456
@@ -1,53 +0,0 @@
#!/bin/sh
#
# @name BirdsEyeView Aerobotics FireFly6
# @type VTOL Tiltrotor
# @class VTOL
#
# @maintainer Roman Bapst <roman@uaventure.com>
#
# @output MAIN1 Front right motor bottom
# @output MAIN2 Front right motor top
# @output MAIN3 Back motor bottom
# @output MAIN4 Back motor top
# @output MAIN5 Front left motor bottom
# @output MAIN6 Front left motor top
# @output AUX1 Tilt servo
# @output AUX2 Elevon 1
# @output AUX3 Elevon 2
# @output AUX4 Gear
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.vtol_defaults
param set-default MAV_TYPE 21
param set-default MC_ROLL_P 7
param set-default MC_ROLLRATE_P 0.19
param set-default MC_ROLLRATE_I 0.002
param set-default MC_ROLLRATE_D 0.005
param set-default MC_PITCH_P 7
param set-default MC_PITCHRATE_P 0.14
param set-default MC_PITCHRATE_I 0.002
param set-default MC_PITCHRATE_D 0.004
param set-default MC_YAW_P 4
param set-default MC_YAWRATE_P 0.22
param set-default MC_YAWRATE_I 0.02
param set-default VT_FW_MOT_OFFID 34
param set-default VT_IDLE_PWM_MC 1080
param set-default VT_MOT_ID 123456
param set-default VT_FW_MOT_OFFID 56
param set-default VT_TILT_MC 0.08
param set-default VT_TILT_TRANS 0.5
param set-default VT_TILT_FW 0.9
param set-default VT_ELEV_MC_LOCK 0
param set-default VT_TYPE 1
set MIXER firefly6
set MIXER_AUX firefly6
set PWM_OUT 12345678
@@ -43,7 +43,7 @@ param set-default MPC_YAWRAUTO_MAX 40
param set-default FW_PR_I 0.02
param set-default FW_RR_FF 0.6
param set-default FW_RR_I 0.01
param set-default FW_THR_CRUISE 0.75
param set-default FW_THR_TRIM 0.75
param set-default VT_ARSP_BLEND 6
param set-default VT_ARSP_TRANS 12
@@ -1,53 +0,0 @@
#!/bin/sh
#
# @name QuadRanger
#
# @type Standard VTOL
# @class VTOL
#
# @maintainer Sander Smeets <sander@droneslab.com>
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.vtol_defaults
param set-default FW_THR_CRUISE 65
param set-default FW_RR_FF 0.6
param set-default MIS_YAW_TMT 10
param set-default MC_ROLL_P 7
param set-default MC_ROLLRATE_I 0.1
param set-default MC_ROLLRATE_D 0.004
param set-default MC_PITCH_P 7
param set-default MC_PITCHRATE_I 0.1
param set-default MC_PITCHRATE_D 0.004
param set-default MC_YAW_P 3.5
param set-default MC_YAWRATE_P 0.6
param set-default MC_YAWRATE_I 0.04
param set-default MC_YAWRATE_MAX 40
param set-default MPC_ACC_HOR_MAX 2
param set-default MPC_Z_VEL_MAX_DN 1.5
param set-default MPC_LAND_SPEED 0.8
param set-default MPC_YAWRAUTO_MAX 40
param set-default PWM_AUX_DIS5 950
param set-default PWM_AUX_REV1 1
param set-default PWM_AUX_REV2 1
param set-default VT_ARSP_TRANS 15
param set-default VT_ARSP_BLEND 8
param set-default VT_F_TRANS_THR 0.75
param set-default VT_IDLE_PWM_MC 1080
param set-default VT_MOT_ID 1234
param set-default VT_FW_MOT_OFFID 1234
param set-default VT_TYPE 2
set MIXER quad_x
set MIXER_AUX vtol_AAERT
set PWM_OUT 1234
@@ -1,83 +0,0 @@
#!/bin/sh
#
# @name Sparkle Tech Ranger VTOL
#
# @type Standard VTOL
# @class VTOL
#
# @maintainer Andreas Antener <andreas@uaventure.com>
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
# @board holybro_kakutef7 exclude
#
. ${R}etc/init.d/rc.vtol_defaults
param set-default FW_AIRSPD_MAX 22
param set-default FW_AIRSPD_MIN 14
param set-default FW_AIRSPD_TRIM 16
param set-default FW_L1_PERIOD 25
param set-default FW_PR_P 0.060
param set-default FW_P_RMAX_NEG 40
param set-default FW_P_RMAX_POS 40
param set-default FW_RR_FF 0.4
param set-default FW_RR_P 0.04
param set-default FW_R_RMAX 40
param set-default MC_PITCHRATE_D 0.004
param set-default MC_PITCHRATE_I 0
param set-default MC_PITCHRATE_MAX 60
param set-default MC_PITCHRATE_P 0.21
param set-default MC_PITCH_P 4
param set-default MC_ROLLRATE_D 0.004
param set-default MC_ROLLRATE_I 0.002
param set-default MC_ROLLRATE_MAX 60
param set-default MC_ROLLRATE_P 0.24
param set-default MC_ROLL_P 4
param set-default MC_YAWRATE_I 0.02
param set-default MC_YAWRATE_MAX 40
param set-default MC_YAWRATE_P 0.18
param set-default MIS_TAKEOFF_ALT 2.5
param set-default MIS_YAW_TMT 20
param set-default MPC_ACC_HOR_MAX 1
param set-default MPC_HOLD_MAX_XY 0.5
param set-default MPC_HOLD_MAX_Z 0.5
param set-default MPC_LAND_SPEED 1
param set-default MPC_MANTHR_MIN 0.05
param set-default MPC_MAN_Y_MAX 120
param set-default MPC_THR_MIN 0.07
param set-default MPC_TILTMAX_AIR 35
param set-default MPC_TILTMAX_LND 20
param set-default MPC_TKO_SPEED 1
param set-default MPC_XY_P 0.3
param set-default MPC_XY_VEL_MAX 3
param set-default MPC_XY_VEL_P_ACC 1
param set-default MPC_Z_P 0.5
param set-default MPC_Z_VEL_P_ACC 2
param set-default MPC_YAWRAUTO_MAX 40
param set-default NAV_ACC_RAD 3
param set-default PWM_AUX_REV1 1
param set-default PWM_AUX_REV2 1
param set-default PWM_AUX_REV3 1
param set-default PWM_AUX_REV4 1
param set-default PWM_AUX_DIS5 950
param set-default VT_ARSP_TRANS 15
param set-default VT_F_TRANS_THR 0.6
param set-default VT_IDLE_PWM_MC 1180
param set-default VT_MOT_ID 1234
param set-default VT_FW_MOT_OFFID 1234
param set-default VT_TRANS_MIN_TM 5
param set-default VT_TRANS_TIMEOUT 30
param set-default VT_TYPE 2
set MIXER quad_x
set MIXER_AUX vtol_AAERT
set PWM_OUT 1234
@@ -34,8 +34,6 @@ param set-default FW_ACRO_X_MAX 270
param set-default FW_ACRO_Y_MAX 270
param set-default FW_ACRO_Z_MAX 180
param set-default FW_PSP_OFF 5
param set-default FW_P_LIM_MAX 30
param set-default FW_P_LIM_MIN -30
param set-default FW_RR_FF 0.33
param set-default FW_RR_P 0.11
@@ -74,4 +72,4 @@ then
set PWM_OUT 1234
else
set PWM_OUT 3456
fi
fi
@@ -53,9 +53,8 @@ param set-default FW_T_CLMB_MAX 3
param set-default FW_T_SINK_MAX 3
param set-default FW_T_SINK_MIN 1
param set-default FW_T_VERT_ACC 6
param set-default FW_THR_CRUISE 0.70
param set-default FW_THR_TRIM 0.70
param set-default FW_THR_SLEW_MAX 1
param set-default FW_MAN_P_MAX 30
param set-default FW_P_LIM_MAX 15
param set-default FW_P_LIM_MIN -25
param set-default FW_P_RMAX_NEG 45
@@ -90,7 +89,6 @@ param set-default MPC_ACC_HOR_MAX 2
param set-default MPC_LAND_SPEED 1.2
param set-default MPC_TILTMAX_LND 35
param set-default MPC_Z_VEL_MAX_UP 1.5
param set-default MPC_Z_VEL_MAX_DN 1.5
param set-default MPC_HOLD_MAX_XY 0.5
param set-default MPC_HOLD_MAX_Z 0.5
param set-default MPC_TKO_RAMP_T 0.8
@@ -31,7 +31,6 @@ param set-default FW_AIRSPD_MAX 30
param set-default FW_AIRSPD_MIN 19
param set-default FW_AIRSPD_TRIM 23
param set-default FW_L1_R_SLEW_MAX 40
param set-default FW_MAN_P_MAX 30
param set-default FW_PSP_OFF 3
param set-default FW_P_LIM_MAX 18
param set-default FW_P_LIM_MIN -25
@@ -39,7 +38,7 @@ param set-default FW_RLL_TO_YAW_FF 0.1
param set-default FW_RR_P 0.08
param set-default FW_R_LIM 45
param set-default FW_R_RMAX 50
param set-default FW_THR_CRUISE 0.65
param set-default FW_THR_TRIM 0.65
param set-default FW_THR_MIN 0.3
param set-default FW_THR_SLEW_MAX 0.6
param set-default FW_T_HRATE_FF 0
@@ -71,7 +70,6 @@ param set-default MPC_VEL_MANUAL 3
param set-default MPC_XY_CRUISE 3
param set-default MPC_XY_VEL_MAX 3.5
param set-default MPC_YAWRAUTO_MAX 40
param set-default MPC_Z_VEL_MAX_DN 1.5
param set-default MPC_Z_VEL_MAX_UP 2
param set-default NAV_ACC_RAD 3
@@ -0,0 +1,44 @@
#!/bin/sh
#
# @name Generic Tiltrotor VTOL
#
# @type VTOL Tiltrotor
# @class VTOL
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.vtol_defaults
param set-default SYS_CTRL_ALLOC 1
param set-default CA_AIRFRAME 3
param set-default CA_ROTOR_COUNT 4
param set-default CA_ROTOR0_PX 1
param set-default CA_ROTOR0_PY 1
param set-default CA_ROTOR0_TILT 2
param set-default CA_ROTOR1_PX -1
param set-default CA_ROTOR1_PY -1
param set-default CA_ROTOR2_PX 1
param set-default CA_ROTOR2_PY -1
param set-default CA_ROTOR2_TILT 1
param set-default CA_ROTOR2_KM -0.05
param set-default CA_ROTOR3_PX -1
param set-default CA_ROTOR3_PY 1
param set-default CA_ROTOR3_KM -0.05
param set-default CA_SV_CS_COUNT 4
param set-default CA_SV_CS0_TYPE 1
param set-default CA_SV_CS0_TRQ_R -0.5
param set-default CA_SV_CS1_TYPE 2
param set-default CA_SV_CS1_TRQ_R 0.5
param set-default CA_SV_CS2_TYPE 7
param set-default CA_SV_CS2_TRQ_P 0.5
param set-default CA_SV_CS2_TRQ_Y 0.5
param set-default CA_SV_CS3_TYPE 8
param set-default CA_SV_CS3_TRQ_P 0.5
param set-default CA_SV_CS3_TRQ_Y -0.5
param set-default CA_SV_TL_COUNT 2
param set-default MAV_TYPE 21
param set-default VT_TYPE 1
@@ -1,17 +1,10 @@
#!/bin/sh
#
# @name Generic Tailsitter
# @name Generic VTOL Tailsitter
#
# @type VTOL Duo Tailsitter
# @type VTOL Tailsitter
# @class VTOL
#
# @output MAIN1 motor right
# @output MAIN2 motor left
# @output MAIN5 elevon right
# @output MAIN6 elevon left
#
# @maintainer Roman Bapst <roman@px4.io>
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
# @board holybro_kakutef7 exclude
@@ -19,18 +12,13 @@
. ${R}etc/init.d/rc.vtol_defaults
param set-default MAV_TYPE 19
param set-default VT_ELEV_MC_LOCK 0
param set-default VT_MOT_COUNT 2
param set-default VT_TYPE 0
param set-default SYS_CTRL_ALLOC 1
param set-default CA_AIRFRAME 4
param set-default CA_ROTOR_COUNT 2
param set-default CA_ROTOR0_KM -0.05
param set-default CA_ROTOR0_PY 0.2
param set-default CA_ROTOR1_KM -0.05
param set-default CA_ROTOR1_PY -0.2
param set-default CA_ROTOR0_PY -0.2
param set-default CA_ROTOR1_KM 0.05
param set-default CA_ROTOR1_PY 0.2
param set-default CA_SV_CS_COUNT 2
param set-default CA_SV_CS0_TRQ_P 0.5
param set-default CA_SV_CS0_TRQ_Y 0.5
@@ -39,6 +27,6 @@ param set-default CA_SV_CS1_TRQ_P 0.5
param set-default CA_SV_CS1_TRQ_Y -0.5
param set-default CA_SV_CS1_TYPE 6
set MIXER vtol_tailsitter_duo
set PWM_OUT 1234
param set-default MAV_TYPE 19
param set-default VT_TYPE 0
param set-default VT_ELEV_MC_LOCK 0
@@ -1,54 +1,26 @@
#!/bin/sh
#
# @name Blade 130X
# @name Generic Helicopter (Tail ESC)
#
# @type Helicopter
# @class Copter
#
# @maintainer Bart Slinger <bartslinger@gmail.com>
#
# @output MAIN1 main motor
# @output MAIN2 front swashplate servo
# @output MAIN3 right swashplate servo
# @output MAIN4 left swashplate servo
# @output MAIN5 tail-rotor servo
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.mc_defaults
. ${R}etc/init.d/rc.heli_defaults
# Configure as helicopter (number 4 defined in commander_helper.cpp)
param set-default MAV_TYPE 4
set MIXER blade130
set PWM_OUT none
param set-default ATT_BIAS_MAX 0
param set-default CBRK_IO_SAFETY 22027
param set-default MC_ROLL_P 5
# Disable PID gains for initial setup. These should be enabled after setting the FF gain.
# P is expected to be lower than FF.
param set-default MC_ROLLRATE_P 0
param set-default MC_ROLLRATE_I 0
param set-default MC_ROLLRATE_D 0
param set-default MC_ROLLRATE_FF 0.15
param set-default MC_ROLLRATE_FF 0.1
param set-default MC_PITCHRATE_P 0
param set-default MC_PITCHRATE_I 0
param set-default MC_PITCHRATE_D 0
param set-default MC_PITCHRATE_FF 0.15
param set-default MC_YAW_P 3
param set-default MC_YAWRATE_P 0.1
param set-default MC_YAWRATE_I 0
param set-default MC_ROLLRATE_MAX 720
param set-default MC_PITCHRATE_MAX 720
param set-default MC_YAWRATE_MAX 400
param set-default MC_ACRO_R_MAX 360
param set-default MC_ACRO_P_MAX 360
param set-default MC_PITCHRATE_FF 0.1
param set-default MPC_THR_MIN 0.06
param set-default MPC_MANTHR_MIN 0.06
param set-default PWM_MAIN_MIN 1075
param set-default CA_AIRFRAME 10
@@ -1,51 +0,0 @@
#!/bin/sh
#
# @name ThunderFly Auto-G2
#
# @type Autogyro
# @class Autogyro
#
# @output MAIN1 rotor_head_L
# @output MAIN2 rotor_head_R
# @output MAIN3 elevator
# @output MAIN4 rudder
# @output MAIN5 rudder (second, optional)
# @output MAIN6 throttle
# @output MAIN7 wheel
#
# @output AUX1 feed-through of RC AUX1 channel for prerotator (optional)
# @output AUX2 feed-through of RC AUX2 channel for release device (optional)
#
# @url https://github.com/ThunderFly-aerospace/Auto-G2/
# @maintainer ThunderFly s.r.o., Roman Dvorak <dvorakroman@thunderfly.cz>
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.fw_defaults
param set-default BAT1_CAPACITY 2500
param set-default BAT1_N_CELLS 3
param set-default PWM_AUX_RATE 50
param set-default PWM_MAIN_RATE 50
param set-default SENS_BOARD_ROT 8
param set-default FW_AIRSPD_MAX 20
param set-default FW_AIRSPD_MIN 7
param set-default FW_AIRSPD_TRIM 13
param set-default FW_THR_CRUISE 0.8
param set-default FW_MAN_P_MAX 25
param set-default FW_MAN_R_MAX 25
param set-default FW_PR_I 0.02
param set-default FW_R_LIM 40
param set-default FW_P_LIM_MAX 25
param set-default FW_P_LIM_MIN -5
param set-default FW_P_RMAX_NEG 20
set MIXER TF-AutoG2
set MIXER_AUX pass
@@ -1,46 +0,0 @@
#!/bin/sh
#
# @name ThunderFly TF-G2
#
# @type Autogyro
# @class Autogyro
#
# @output MAIN2 rotor_head_L
# @output MAIN3 rotor_head_R
# @output MAIN4 rudder
# @output MAIN5 throttle
#
#
# @url https://github.com/ThunderFly-aerospace/TF-G2/
# @maintainer ThunderFly s.r.o., Roman Dvorak <dvorakroman@thunderfly.cz>
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.fw_defaults
param set-default BAT1_CAPACITY 3300
param set-default BAT1_N_CELLS 3
param set-default PWM_AUX_RATE 50
param set-default PWM_MAIN_RATE 50
param set-default SENS_BOARD_ROT 4
param set-default FW_AIRSPD_MAX 20
param set-default FW_AIRSPD_MIN 7
param set-default FW_AIRSPD_TRIM 13
param set-default FW_THR_CRUISE 0.8
param set-default FW_MAN_P_MAX 25
param set-default FW_MAN_R_MAX 25
param set-default FW_PR_I 0.02
param set-default FW_R_LIM 40
param set-default FW_P_LIM_MAX 25
param set-default FW_P_LIM_MIN -5
param set-default FW_P_RMAX_NEG 20
set MIXER TF-G2
set MIXER_AUX pass
@@ -1,28 +1,16 @@
#!/bin/sh
#
# @name Standard Plane
# @name Generic Standard Plane
#
# @type Standard Plane
# @class Plane
#
# @output MAIN1 aileron
# @output MAIN2 elevator
# @output MAIN3 throttle
# @output MAIN4 rudder
# @output MAIN5 flaps
# @output MAIN6 gear
#
# @output AUX1 feed-through of RC AUX1 channel
# @output AUX2 feed-through of RC AUX2 channel
# @output AUX3 feed-through of RC AUX3 channel
#
# @maintainer Lorenz Meier <lorenz@px4.io>
#
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.fw_defaults
param set-default SYS_CTRL_ALLOC 1
param set-default CA_AIRFRAME 1
param set-default CA_ROTOR_COUNT 1
param set-default CA_ROTOR0_PX 0.3
@@ -34,11 +22,3 @@ param set-default CA_SV_CS2_TRQ_P 1.0
param set-default CA_SV_CS2_TYPE 3
param set-default CA_SV_CS3_TRQ_Y 1.0
param set-default CA_SV_CS3_TYPE 4
param set-default PWM_AUX_RATE 50
param set-default PWM_MAIN_RATE 50
set MIXER AETRFG
# Rate must be set by group (see pwm info).
# Throttle is in the same group as servos.
@@ -1,45 +0,0 @@
#!/bin/sh
#
# @name Bormatec Maja
#
# @type Standard Plane
# @class Plane
#
# @output MAIN1 aileron
# @output MAIN2 aileron
# @output MAIN3 elevator
# @output MAIN4 rudder
# @output MAIN5 throttle
# @output MAIN6 wheel
# @output MAIN7 flaps
#
# @output AUX1 feed-through of RC AUX1 channel
# @output AUX2 feed-through of RC AUX2 channel
# @output AUX3 feed-through of RC AUX3 channel
#
# @maintainer Andreas Antener <andreas@uaventure.com>
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.fw_defaults
param set-default FW_MAN_P_MAX 55
param set-default FW_MAN_R_MAX 55
param set-default FW_R_LIM 55
param set-default FW_WR_FF 0.2
param set-default FW_WR_I 0.2
param set-default FW_WR_IMAX 0.8
param set-default FW_WR_P 1
param set-default FW_W_RMAX 0
# set disarmed value for the ESC
param set-default PWM_MAIN_DISARM 1000
set MIXER AAERTWF
# use PWM parameters for throttle channel
set PWM_OUT 5
@@ -1,48 +0,0 @@
#!/bin/sh
#
# @name X-UAV Mini Talon
#
# @type Plane V-Tail
# @class Plane
#
# @output MAIN1 aileron right
# @output MAIN2 aileron left
# @output MAIN3 v-tail right
# @output MAIN4 v-tail left
# @output MAIN5 throttle
# @output MAIN6 wheel
# @output MAIN7 flaps right
# @output MAIN8 flaps left
#
# @output AUX1 feed-through of RC AUX1 channel
# @output AUX2 feed-through of RC AUX2 channel
# @output AUX3 feed-through of RC AUX3 channel
#
# @maintainer Friedrich Beckmann <friedrich.beckmann@hs-augsburg.de>
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.fw_defaults
param set-default FW_MAN_P_MAX 55
param set-default FW_MAN_R_MAX 55
param set-default FW_R_LIM 55
param set-default FW_WR_FF 0.2
param set-default FW_WR_I 0.2
param set-default FW_WR_IMAX 0.8
param set-default FW_WR_P 1
param set-default FW_W_RMAX 0
# set disarmed value for the ESC
param set-default PWM_MAIN_DISARM 1000
# The Mini Talon does not have a wheel and
# no flaps. I leave them here because the mixer
# computes also wheel and flap controls.
set MIXER AAVVTWFF_vtail
# use PWM parameters for throttle channel
set PWM_OUT 5
@@ -5,19 +5,20 @@
# @type Flying Wing
# @class Plane
#
# @output MAIN1 left aileron
# @output MAIN2 right aileron
# @output MAIN4 throttle
#
# @output AUX1 feed-through of RC AUX1 channel
# @output AUX2 feed-through of RC AUX2 channel
# @output AUX3 feed-through of RC AUX3 channel
#
# @maintainer
#
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.fw_defaults
set MIXER fw_generic_wing
param set-default SYS_CTRL_ALLOC 1
param set-default CA_AIRFRAME 1
param set-default CA_ROTOR_COUNT 1
param set-default CA_ROTOR0_PX 0.15
param set-default CA_SV_CS_COUNT 2
param set-default CA_SV_CS0_TYPE 5
param set-default CA_SV_CS0_TRQ_P 0.5
param set-default CA_SV_CS0_TRQ_R -0.5
param set-default CA_SV_CS1_TYPE 6
param set-default CA_SV_CS1_TRQ_P 0.5
param set-default CA_SV_CS1_TRQ_R 0.5
@@ -1,49 +0,0 @@
#!/bin/sh
#
# @name Phantom FPV Flying Wing
#
# @url https://docs.px4.io/master/en/frames_plane/wing_wing_z84.html
#
# @type Flying Wing
# @class Plane
#
# @output MAIN1 left aileron
# @output MAIN2 right aileron
# @output MAIN4 throttle
#
# @output AUX1 feed-through of RC AUX1 channel
# @output AUX2 feed-through of RC AUX2 channel
# @output AUX3 feed-through of RC AUX3 channel
#
# @maintainer Simon Wilks <simon@uaventure.com>
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.fw_defaults
param set-default FW_AIRSPD_MIN 13
param set-default FW_AIRSPD_MAX 25
param set-default FW_R_TC 0.3
param set-default FW_P_TC 0.3
param set-default FW_L1_PERIOD 15
param set-default FW_PR_FF 0.2
param set-default FW_PR_IMAX 0.2
param set-default FW_PR_P 0.03
param set-default FW_P_LIM_MAX 50
param set-default FW_P_LIM_MIN -50
param set-default FW_RR_P 0.08
param set-default FW_R_LIM 50
param set-default FW_R_RMAX 50
param set-default PWM_MAIN_DISARM 1000
# Bottom of bay and nominal zero-pitch attitude differ
# the payload bay is pitched up about 7 degrees
param set-default SENS_BOARD_Y_OFF 7
set MIXER fw_generic_wing
# Provide ESC a constant 1000 us pulse
set PWM_OUT 4
@@ -1,40 +0,0 @@
#!/bin/sh
#
# @name Skywalker X5 Flying Wing
#
# @type Flying Wing
# @class Plane
#
# @output MAIN1 left aileron
# @output MAIN2 right aileron
# @output MAIN4 throttle
#
# @output AUX1 feed-through of RC AUX1 channel
# @output AUX2 feed-through of RC AUX2 channel
# @output AUX3 feed-through of RC AUX3 channel
#
# @maintainer Julian Oes <julian@px4.io>
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.fw_defaults
param set-default FW_AIRSPD_MIN 15
param set-default FW_AIRSPD_TRIM 20
param set-default FW_AIRSPD_MAX 40
param set-default FW_R_TC 0.3
param set-default FW_P_TC 0.3
param set-default FW_L1_DAMPING 0.74
param set-default FW_L1_PERIOD 16
param set-default FW_LND_ANG 15
param set-default FW_LND_FLALT 5
param set-default FW_LND_HVIRT 13
param set-default FW_LND_TLALT 5
param set-default FW_THR_LND_MAX 0
param set-default FW_PR_FF 0.35
param set-default FW_RR_FF 0.6
param set-default FW_RR_P 0.04
set MIXER fw_generic_wing
@@ -1,48 +0,0 @@
#!/bin/sh
#
# @name Wing Wing (aka Z-84) Flying Wing
#
# @url https://docs.px4.io/master/en/frames_plane/wing_wing_z84.html
#
# @type Flying Wing
# @class Plane
#
# @output MAIN1 left aileron
# @output MAIN2 right aileron
# @output MAIN4 throttle
#
# @output AUX1 feed-through of RC AUX1 channel
# @output AUX2 feed-through of RC AUX2 channel
# @output AUX3 feed-through of RC AUX3 channel
#
# @maintainer Lorenz Meier <lorenz@px4.io>
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.fw_defaults
param set-default BAT1_N_CELLS 2
param set-default FW_AIRSPD_MAX 15
param set-default FW_AIRSPD_TRIM 13
param set-default FW_R_TC 0.3
param set-default FW_P_TC 0.3
param set-default FW_L1_DAMPING 0.74
param set-default FW_L1_PERIOD 16
param set-default FW_LND_ANG 15
param set-default FW_LND_FLALT 5
param set-default FW_LND_HVIRT 13
param set-default FW_LND_TLALT 5
param set-default FW_THR_LND_MAX 0
param set-default FW_PR_FF 0.35
param set-default FW_RR_FF 0.6
param set-default FW_RR_P 0.04
param set-default PWM_MAIN_DISARM 1000
# Set mixer.
set MIXER fw_generic_wing
# Provide ESC a constant 1000 us pulse.
set PWM_OUT 4
@@ -1,49 +0,0 @@
#!/bin/sh
#
# @name Sparkle Tech Pigeon
#
# @url http://www.sparkletech.hk/
#
# @type Flying Wing
# @class Plane
#
# @output MAIN1 left aileron
# @output MAIN2 right aileron
# @output MAIN4 throttle
#
# @output AUX1 feed-through of RC AUX1 channel
# @output AUX2 feed-through of RC AUX2 channel
# @output AUX3 feed-through of RC AUX3 channel
#
# @maintainer Simon Wilks <simon@uaventure.com>
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.fw_defaults
param set-default FW_AIRSPD_MIN 15
param set-default FW_AIRSPD_TRIM 20
param set-default FW_AIRSPD_MAX 27
param set-default FW_ATT_TC 0.3
param set-default FW_PR_FF 0.35
param set-default FW_PR_IMAX 0.2
param set-default FW_PR_P 0.05
param set-default FW_P_TC 0.3
param set-default FW_RR_FF 0.3
param set-default FW_RR_P 0.03
param set-default FW_R_LIM 40
param set-default FW_R_RMAX 50
param set-default FW_R_TC 0.3
param set-default PWM_MAIN_DISARM 1000
# Bottom of bay and nominal zero-pitch attitude differ
# the payload bay is pitched up about 7 degrees
param set-default SENS_BOARD_Y_OFF 11.9
set MIXER fw_generic_wing
# Provide ESC a constant 1000 us pulse
set PWM_OUT 4
@@ -1,61 +0,0 @@
#!/bin/sh
#
# @name TBS Caipirinha
#
# @type Flying Wing
# @class Plane
#
# @output MAIN1 left aileron
# @output MAIN2 right aileron
# @output MAIN4 throttle
#
# @output AUX1 feed-through of RC AUX1 channel
# @output AUX2 feed-through of RC AUX2 channel
# @output AUX3 feed-through of RC AUX3 channel
#
# @maintainer Lorenz Meier <lorenz@px4.io>
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.fw_defaults
param set-default FW_AIRSPD_MAX 25
param set-default FW_AIRSPD_MIN 12.5
param set-default FW_AIRSPD_TRIM 16.5
param set-default FW_L1_PERIOD 15
param set-default FW_LND_ANG 15
param set-default FW_LND_FLALT 8
param set-default FW_LND_HVIRT 13
param set-default FW_LND_TLALT 10
param set-default FW_THR_LND_MAX 0
param set-default FW_P_LIM_MAX 20
param set-default FW_P_LIM_MIN -30
param set-default FW_R_LIM 45
param set-default FW_PR_FF 0.45
param set-default FW_PR_P 0.005
param set-default FW_RR_FF 0.45
param set-default FW_RR_P 0.013
param set-default FW_P_RMAX_NEG 70
param set-default FW_P_RMAX_POS 70
param set-default FW_R_RMAX 70
param set-default FW_THR_CRUISE 0.55
param set-default LNDFW_AIRSPD_MAX 6
param set-default LNDFW_XYACC_MAX 4
param set-default LNDFW_VEL_XY_MAX 3
param set-default LNDFW_VEL_Z_MAX 5
param set-default MIS_TAKEOFF_ALT 50
param set-default NAV_LOITER_RAD 30
param set-default PWM_MAIN_REV1 1
param set-default PWM_MAIN_REV2 1
param set-default PWM_MAIN_MIN 900
param set-default PWM_MAIN_MAX 2100
set MIXER fw_generic_wing
set PWM_OUT 1234
@@ -69,7 +69,6 @@ param set-default CP_DIST 6
param set-default MPC_ACC_DOWN_MAX 5
param set-default MPC_ACC_HOR_MAX 10
param set-default MPC_ACC_UP_MAX 4
param set-default MPC_MANTHR_MIN 0
param set-default MPC_MAN_Y_MAX 120
param set-default MPC_TILTMAX_AIR 45
param set-default MPC_THR_HOVER 0.3
@@ -26,7 +26,6 @@ param set-default MC_ROLLRATE_MAX 1600
param set-default MC_PITCHRATE_MAX 1600
param set-default MC_YAWRATE_MAX 1000
param set-default MPC_MANTHR_MIN 0
param set-default MPC_MAN_TILT_MAX 60
# use thrust curve factor (instead of TPA)
@@ -44,19 +44,12 @@ px4_add_romfs_files(
# [2000, 2999] Standard planes"
2100_standard_plane
2105_maja
2106_albatross
2200_mini_talon
2507_cloudship
# [3000, 3999] Flying wing"
3000_generic_wing
3031_phantom
3032_skywalker_x5
3033_wingwing
3036_pigeon
3100_tbs_caipirinha
# [4000, 4999] Quadrotor x"
4001_quad_x
@@ -67,8 +60,6 @@ px4_add_romfs_files(
4016_holybro_px4vision
4017_nxp_hovergames
4019_x500_v2
4030_3dr_solo
4031_3dr_quad
4040_reaper
4041_beta75x
4050_generic_250
@@ -77,11 +68,8 @@ px4_add_romfs_files(
4053_holybro_kopis2
4061_atl_mantis_edu
4071_ifo
4072_draco
4073_ifo-s
4080_zmr250
4090_nanomind
4100_tiltquadrotor
4500_clover4
4900_crazyflie
4901_crazyflie21
@@ -102,10 +90,6 @@ px4_add_romfs_files(
# [9000, 9999] Octorotor +"
9001_octo_+
# [10000, 10999] Quadrotor Wide arm / H frame"
10015_tbs_discovery
10016_3dr_iris
10018_tbs_endurance
# [11000, 11999] Hexa Cox
11001_hexa_cox
@@ -115,44 +99,31 @@ px4_add_romfs_files(
# [13000, 13999] VTOL
13000_generic_vtol_standard
13001_caipirinha_vtol
13002_firefly6
13003_quad_tailsitter
13004_quad+_tailsitter
13005_vtol_AAERT_quad
13006_vtol_standard_delta
13007_vtol_AAVVT_quad
13008_QuadRanger
13009_vtol_spt_ranger
13012_convergence
13100_generic_vtol_tiltrotor
13013_deltaquad
13014_vtol_babyshark
13030_generic_vtol_quad_tiltrotor
13050_generic_vtol_octo
13200_generic_vtol_tailsitter
# [14000, 14999] Tri Y
14001_tri_y_yaw+
14002_tri_y_yaw-
15001_coax_heli
16001_helicopter
# [17000, 17999] Autogyro
17002_TF-AutoG2
17003_TF-G2
# [18000, 18999] High-altitude balloons
18001_TF-B1
# [22000, 22999] Reserve for custom models
24001_dodeca_cox
50000_generic_ground_vehicle
50003_aion_robotics_r1_rover
50004_nxpcup_car_dfrobot_gpx
# [60000, 61000] (Unmanned) Underwater Robots
60000_uuv_generic
+1 -1
View File
@@ -14,7 +14,7 @@ param set-default MAV_TYPE 1
# Default parameters for fixed wing UAVs.
#
param set-default COM_POS_FS_DELAY 5
param set-default COM_POS_FS_EPH 15
param set-default COM_POS_FS_EPH 50
param set-default COM_POS_FS_EPV 30
param set-default COM_VEL_FS_EVH 5
# Disable preflight disarm to not interfere with external launching
@@ -0,0 +1,17 @@
#!/bin/sh
#
# Helicopter default parameters.
#
# NOTE: Script variables are declared/initialized/unset in the rcS script.
#
# Inherit from mc
. ${R}etc/init.d/rc.mc_defaults
param set-default MAV_TYPE 4
param set-default COM_PREARM_MODE 2
param set-default COM_SPOOLUP_TIME 10
# No need for minimum collective pitch (or airmode) to keep torque authority
param set-default MPC_MANTHR_MIN 0
+8 -5
View File
@@ -32,14 +32,17 @@ fi
#
# If mount (gimbal) control is enabled and output mode is AUX, set the aux
# mixer to mount (override the airframe-specific MIXER_AUX setting).
# mixer to mount if no other aux mixer has been set.
#
if param greater -s MNT_MODE_IN -1
then
if param compare -s MNT_MODE_OUT 0
then
set MIXER_AUX mount
fi
if param compare -s MNT_MODE_OUT 0
then
if [ $MIXER_AUX = none ]
then
set MIXER_AUX mount
fi
fi
fi
#
+1 -5
View File
@@ -129,11 +129,7 @@ fi
# Sensirion SDP3X differential pressure sensor external I2C
if param compare -s SENS_EN_SDP3X 1
then
if ! sdp3x start -X
then
# try another common address
sdp3x start -X -a 0x22
fi
sdp3x start -X -k
fi
# TE MS4515 differential pressure sensor external I2C
+12 -6
View File
@@ -10,6 +10,8 @@ set VEHICLE_TYPE vtol
# MAV_TYPE_VTOL_FIXEDROTOR 22
param set-default MAV_TYPE 22
param set-default COM_POS_FS_EPH 50
param set-default MIS_TAKEOFF_ALT 20
param set-default MIS_YAW_TMT 10
@@ -21,16 +23,20 @@ param set-default HTE_VXY_THR 2.0
param set-default MIS_DIST_WPS 5000
param set-default MPC_ACC_HOR_MAX 2
param set-default MPC_TKO_SPEED 1
param set-default MPC_VEL_MANUAL 3
param set-default MPC_XY_CRUISE 3
param set-default MPC_VEL_MANUAL 5
param set-default MPC_XY_CRUISE 5
param set-default MPC_XY_ERR_MAX 5
param set-default MPC_XY_VEL_MAX 4
param set-default MPC_Z_VEL_MAX_DN 1.5
param set-default MPC_XY_VEL_MAX 8
param set-default MPC_JERK_MAX 4.5
param set-default MPC_YAW_MODE 4
param set-default NAV_ACC_RAD 3
# reduce aggressiveness around roll and yaw axis,
# as VTOLs usually have high intertia and lot af drag due to wings
param set-default MC_ROLL_P 5
param set-default MC_ROLLRATE_MAX 120
param set-default MC_YAW_P 2
param set-default MC_YAWRATE_MAX 120
param set-default MPC_MAN_Y_MAX 90
param set-default PWM_AUX_RATE 50
param set-default PWM_MAIN_RATE 400
+55 -50
View File
@@ -21,7 +21,6 @@ set +e
# it wastes flash
#
set R /
set AUTOCNF no
set FCONFIG /fs/microsd/etc/config.txt
set FEXTRAS /fs/microsd/etc/extras.txt
set FRC /fs/microsd/etc/rc.txt
@@ -108,6 +107,16 @@ then
fi
fi
# Check for an update
if [ -e /fs/microsd/new ]
then
echo "Updating external autostart files"
# FIXME: add NuttX support for recursive rm, then we can remove the
# directory (for now this is done during updating via MAVLink FTP)
#rm -r $SDCARD_EXT_PATH
mv /fs/microsd/new $SDCARD_EXT_PATH
fi
set PARAM_FILE /fs/microsd/params
fi
@@ -177,13 +186,12 @@ else
fi
#
# Set AUTOCNF flag to use it in AUTOSTART scripts.
# If the airframe has been previously reset SYS_AUTCONFIG will have been set to 1 and other params will be reset on the next boot.
#
if param greater SYS_AUTOCONFIG 0
then
# Wipe out params except RC*, flight modes, total flight time, calibration parameters, next flight UUID
param reset_all SYS_AUTO* RC* COM_FLTMODE* LND_FLIGHT* TC_* CAL_ACC* CAL_GYRO* COM_FLIGHT*
set AUTOCNF yes
# Reset params except Airframe, RC calibration, sensor calibration, flight modes, total flight time, and next flight UUID.
param reset_all SYS_AUTOSTART RC* CAL_* COM_FLTMODE* LND_FLIGHT* TC_* COM_FLIGHT*
fi
#
@@ -208,6 +216,26 @@ else
fi
unset BOARD_RC_DEFAULTS
#
# Set parameters and env variables for selected SYS_AUTOSTART.
#
set AUTOSTART_PATH etc/init.d/rc.autostart
if ! param compare SYS_AUTOSTART 0
then
if param greater SYS_AUTOSTART 1000000
then
# Use external startup file
if [ $SDCARD_AVAILABLE = yes ]
then
set AUTOSTART_PATH etc/init.d/rc.autostart_ext
else
echo "ERROR [init] SD card not mounted - trying to load airframe from ROMFS"
fi
fi
. ${R}$AUTOSTART_PATH
fi
unset AUTOSTART_PATH
#
# Start the tone_alarm driver.
# Needs to be started after the parameters are loaded (for CBRK_BUZZER).
@@ -245,26 +273,6 @@ else
rgbled start -X -q
rgbled_ncp5623c start -X -q
#
# Set parameters and env variables for selected AUTOSTART.
#
set AUTOSTART_PATH etc/init.d/rc.autostart
if ! param compare SYS_AUTOSTART 0
then
if param greater SYS_AUTOSTART 1000000
then
# Use external startup file
if [ $SDCARD_AVAILABLE = yes ]
then
set AUTOSTART_PATH etc/init.d/rc.autostart_ext
else
echo "ERROR [init] SD card not mounted - trying to load airframe from ROMFS"
fi
fi
. ${R}$AUTOSTART_PATH
fi
unset AUTOSTART_PATH
#
# Override parameters from user configuration file.
#
@@ -274,14 +282,6 @@ else
. $FCONFIG
fi
#
# If autoconfig parameter was set, reset it and save parameters.
#
if [ $AUTOCNF = yes ]
then
param set SYS_AUTOCONFIG 0
fi
#
# Check if UAVCAN is enabled, default to it for ESCs.
#
@@ -313,7 +313,7 @@ else
then
# Check for the mini using build with px4io fw file
# but not a px4IO
if ver hwtypecmp V540 V560
if ver hwtypecmp V5004000 V5006000
then
param set SYS_USE_IO 0
else
@@ -409,6 +409,21 @@ else
commander start
fi
# PPS capture driver (before pwm_out)
if param greater -s PPS_CAP_ENABLE 0
then
pps_capture start
fi
# Camera capture driver (before pwm_out)
if param greater -s CAM_CAP_FBACK 0
then
if camera_capture start
then
camera_capture on
fi
fi
#
# Configure vehicle type specific parameters.
# Note: rc.vehicle_setup is the entry point for rc.interface,
@@ -451,21 +466,6 @@ else
rc_input start $RC_INPUT_ARGS
fi
# PPS capture driver (before pwm_out)
if param greater -s PPS_CAP_ENABLE 0
then
pps_capture start
fi
# Camera capture driver (before pwm_out)
if param greater -s CAM_CAP_FBACK 0
then
if camera_capture start
then
camera_capture on
fi
fi
#
# Play the startup tune (if not disabled or there is an error)
#
@@ -515,6 +515,12 @@ else
px4flow start -X &
fi
# Payload deliverer module if gripper is enabled
if param compare -s PD_GRIPPER_EN 1
then
payload_deliverer start
fi
#
# Optional board supplied extras: rc.board_extras
#
@@ -565,7 +571,6 @@ fi
# Unset all script parameters to free RAM.
#
unset R
unset AUTOCNF
unset FCONFIG
unset FEXTRAS
unset FRC
@@ -39,5 +39,6 @@ px4_add_romfs_files(
quad_x_vtol.main.mix
standard_vtol_sitl.main.mix
tiltrotor_sitl.main.mix
tiltrotor_tri_sitl.main.mix
uuv_x_sitl.main.mix
)
@@ -0,0 +1,38 @@
Mixer for quad tiltrotor (x motor configuration)
================================================
This file defines a single mixer for a tiltrotor (SITL gazebo) with motors in X configuration. The plane has two ailerons and one elevator.
R: 3y 10000 10000 10000 0
# tilt servo motor 1 (right)
M: 2
O: 10000 10000 0 -10000 10000
S: 1 8 0 20000 -10000 -10000 10000
S: 0 2 -10000 -10000 0 -10000 10000
# tilt servo motor 2 (left)
M: 2
O: 10000 10000 0 -10000 10000
S: 1 8 0 20000 -10000 -10000 10000
S: 0 2 10000 10000 0 -10000 10000
# tilt servo motor 3 (rear)
-------------
M: 1
S: 1 8 0 20000 -10000 -10000 10000
# mixer for the left aileron
M: 1
O: 10000 10000 0 -10000 10000
S: 1 0 -10000 -10000 0 -10000 10000
# mixer for the right aileron
M: 1
O: 10000 10000 0 -10000 10000
S: 1 0 10000 10000 0 -10000 10000
# mixer for the elevator
M: 1
O: 10000 10000 0 -10000 10000
S: 1 1 10000 10000 0 -10000 10000
-48
View File
@@ -1,48 +0,0 @@
Helicopter 120 degree Cyclic-Collective-Pitch Mixing (CCPM) for PX4FMU
==================================================
Output 0 - Rear Servo Mixer
----------------
Rear Servo = Collective (Thrust - 3) + Elevator (Pitch - 1)
M: 2
S: 0 3 10000 10000 0 -10000 10000
S: 0 1 10000 10000 0 -10000 10000
Output 1 - Left Servo Mixer
-----------------
Left Servo = Collective (Thurst - 3) - 0.5 * Elevator (Pitch - 1) + 0.866 * Aileron (Roll - 0)
M: 3
S: 0 3 -10000 -10000 0 -10000 10000
S: 0 1 -5000 -5000 0 -10000 10000
S: 0 0 8660 8660 0 -10000 10000
Output 2 - Right Servo Mixer
----------------
Right Servo = Collective (Thurst - 3) - 0.5 * Elevator (Pitch - 1) - 0.866 * Aileron (Roll - 0)
M: 3
S: 0 3 -10000 -10000 0 -10000 10000
S: 0 1 -5000 -5000 0 -10000 10000
S: 0 0 -8660 -8660 0 -10000 10000
Output 3 - Tail Servo Mixer
----------------
Tail Servo = Yaw (control index = 2)
M: 1
S: 0 2 10000 10000 0 -10000 10000
Output 4 - Motor speed mixer
-----------------
This would be the motor speed control output from governor power demand- not sure what index to use here?
M: 1
S: 0 4 0 20000 -10000 -10000 10000
@@ -38,16 +38,11 @@ px4_add_romfs_files(
AERT.main.mix
AETRFG.main.mix
babyshark.main.mix
blade130.main.mix
CCPM.main.mix
cloudship.main.mix
coax.main.mix
delta.main.mix
deltaquad.main.mix
dodeca_bottom_cox.aux.mix
dodeca_top_cox.main.mix
firefly6.aux.mix
firefly6.main.mix
fw_generic_wing.main.mix
generic_diff_rover.main.mix
hexa_cox.main.mix
@@ -74,7 +69,6 @@ px4_add_romfs_files(
rover_diff_and_servo.main.mix
rover_generic.main.mix
standard_vtol_hitl.main.mix
TF-AutoG2.main.mix
tilt_quad.aux.mix
tilt_quad.main.mix
tri_y_yaw+.main.mix
@@ -84,8 +78,6 @@ px4_add_romfs_files(
vtol_AAERT.aux.mix
vtol_AAVVT.aux.mix
vtol_TTTTAAER.aux.mix
vtol_convergence.main.mix
vtol_delta.aux.mix
vtol_tailsitter_duo.main.mix
vtol_tailsitter_duo_sat.main.mix
)
@@ -1,56 +0,0 @@
Aileron/rudder/elevator/throttle mixer for PX4FMU
==================================================
# @board px4_fmu-v2 exclude
Inputs to the mixer come from channel group 0 (vehicle attitude), channels 0
(roll), 1 (pitch) and 3 (thrust).
CH1, 2: rotor-head mixer
-------------
Two scalers total (output, roll).
M: 2
O: 10000 10000 0 -10000 10000
S: 0 0 -10000 -10000 0 -10000 10000
S: 0 1 10000 10000 0 -10000 10000
M: 2
O: 10000 10000 0 -10000 10000
S: 0 0 -10000 -10000 0 -10000 10000
S: 0 1 -10000 -10000 0 -10000 10000
CH3: Elevator, prerotator mixer
------------
Two scalers total (output, roll).
M: 1
O: 7500 7500 0 -10000 10000
S: 3 6 10000 10000 0 -10000 10000
CH4, 5: Rudder mixer
------------
Two scalers total (output, yaw).
M: 1
S: 0 2 10000 10000 0 -10000 10000
M: 1
S: 0 2 -10000 -10000 0 -10000 10000
CH4: Motor speed mixer
-----------------
Two scalers total (output, thrust).
M: 1
S: 0 3 0 20000 -10000 -10000 10000
CH3: Wheel mixer
------------
Two scalers total (output, yaw).
M: 1
S: 0 2 10000 10000 0 -10000 10000
-40
View File
@@ -1,40 +0,0 @@
TF-G2 autogyro mixer
==================================================
# @board px4_fmu-v2 exclude
Inputs to the mixer come from channel group 0 (vehicle attitude), channels 0
(roll), 1 (pitch) and 3 (thrust).
CH1: empty - fixing cuav nano jittering of 1st output.
Z:
CH2, 3: rotor-head mixer
-------------
Two scalers total (output, roll).
M: 2
O: 10000 10000 0 -10000 10000
S: 0 0 -10000 -10000 0 -10000 10000
S: 0 1 10000 10000 0 -10000 10000
M: 2
O: 10000 10000 0 -10000 10000
S: 0 0 -10000 -10000 0 -10000 10000
S: 0 1 -10000 -10000 0 -10000 10000
CH4: Rudder mixer
------------
Two scalers total (output, yaw).
M: 1
S: 0 2 10000 10000 0 -10000 10000
CH5: Motor speed mixer
-----------------
Two scalers total (output, thrust).
M: 1
S: 0 3 0 20000 -10000 -10000 10000
@@ -1,15 +0,0 @@
Helicopter Cyclic-Collective-Pitch Mixing (CCPM) for PX4FMU
Blade 130x helicopter has longer servo arms left and right. The front servo arm is shortest and has normalized length 10000.
==================================================
H: 3
T: 0 3000 6000 8000 10000
P: 500 1500 2500 3500 4500
# Swash plate servos:
S: 0 10000 10000 0 -8000 8000
S: 140 13054 10000 0 -8000 8000
S: 220 13054 10000 0 -8000 8000
# Tail servo:
M: 1
S: 0 2 10000 10000 0 -10000 10000
-29
View File
@@ -1,29 +0,0 @@
Coaxial helicopter mixer
- Two servomotors act on the swashplate (90 degree angle on the swashplate, decoupled effect on roll and pitch).
- No collective pitch.
- One motor per rotor.
===========================
Left swashplate servomotor, pitch axis
-------------
M: 1
S: 0 1 -10000 -10000 0 -10000 10000
Right swashplate servomotor, roll axis
-------------
M: 1
S: 0 0 10000 10000 0 -10000 10000
Upper rotor (CCW)
Mixing between yaw and thrust
-------------
M: 2
S: 0 2 10000 10000 0 -10000 10000
S: 0 3 0 20000 -10000 -10000 10000
Lower rotor (CW)
Mixing between yaw and thrust
-------------
M: 2
S: 0 2 -10000 -10000 0 -10000 10000
S: 0 3 0 20000 -10000 -10000 10000
@@ -1,24 +0,0 @@
# mixer for the FireFly6 tilt mechansim servo, elevons and landing gear
=======================================================================
# @board px4_fmu-v2 exclude
Tilt mechanism servo mixer
---------------------------
M: 1
S: 1 8 0 20000 -10000 -10000 10000
Elevon mixers
-------------
M: 2
S: 1 0 7500 7500 0 -10000 10000
S: 1 1 8000 8000 0 -10000 10000
M: 2
S: 1 0 7500 7500 0 -10000 10000
S: 1 1 -8000 -8000 0 -10000 10000
Landing gear mixer
------------------
M: 1
S: 3 6 10000 10000 0 -10000 10000
@@ -1,6 +0,0 @@
# FireFly6 mixer for PX4FMU
#
#===========================
# @board px4_fmu-v2 exclude
R: 6c
@@ -1,39 +0,0 @@
Tailsitter duo mixer
============================
This file defines a mixer for a generic duo tailsitter VTOL (eg TBS Caipirinha tailsitter edition). This vehicle
has two motors in total, one attached to each wing. It also has two elevons which
are located in the slipstream of the propellers. This mixer generates 4 PWM outputs
on the main PWM ouput port, two at 400Hz for the motors, and two at 50Hz for the
elevon servos. Channels 1-4 are configured to run at 400Hz, while channels 5-8 run
at the default rate of 50Hz. Note that channels 3 and 4 are assigned but not used.
Motor mixer
------------
Channel 1 connects to the right (starboard) motor.
Channel 2 connects to the left (port) motor.
R: 2-
Zero mixer (2x)
---------------
Channels 3,4 are unused.
Z:
Z:
Elevons mixer
--------------
Channel 5 connects to the right (starboard) elevon.
Channel 6 connects to the left (port) elevon.
Here we saturate the elevons before their full range
to avoid roll-pitch-yaw coupling during faster maneuvers
M: 2
S: 1 0 10000 10000 0 -6000 6000
S: 1 1 10000 10000 0 -6000 6000
M: 2
S: 1 0 10000 10000 0 -6000 6000
S: 1 1 -10000 -10000 0 -6000 6000

Some files were not shown because too many files have changed in this diff Show More