Commit Graph

42399 Commits

Author SHA1 Message Date
Julian Oes d9b1a695b5 ROMFS: auto try RGBLED is31fl3195
This is required to auto-start the is31fl3195 driver if connected.

Signed-off-by: Julian Oes <julian@oes.ch>
2023-07-06 09:19:00 +12:00
Silvan Fuhrer 8838ebd77d Navigator: Loiter: always establish new Loiter with center at current pos
When switching into Hold mode establish a Loiter around current position,
even if we were before already loitering (eg in Mission mode).

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-07-04 17:03:14 +02:00
Silvan Fuhrer 7e0f0516a5 ROMFS: set default for VT_B_TRANS_DUR for all tailsitter configs to 5s
5s is a more reasobale time for tailsitters, which rely differently on this param
than other VTOL types. Tailsitters will ramp the pitch up withing this time,
while for other VTOLS types its only the max transitiont time.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-06-29 15:21:20 +02:00
Silvan Fuhrer 5b3d19944c ROMFS: tailsitter SITL config: improve tuning after model changes
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-06-29 15:21:20 +02:00
Silvan Fuhrer f2e706d7c4 ROMFS: quadtailsitter SITL config: improve tuning
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-06-29 15:21:20 +02:00
Julian Oes 5a5849d61a ROMFS: initial quadtailsitter tuning
This is now using the advanced lift drag plugin.

The important step was to enable airmode for yaw, otherwise yaw gets
saturated at low throttle and we can barely roll.

The other trick was to raise airspeed a little bit to avoid operating
too much at the lower end of throttle where control authority is low.

Signed-off-by: Julian Oes <julian@oes.ch>
2023-06-29 15:21:20 +02:00
JaeyoungLim 682190a21f Support quadtailsitter in SITL 2023-06-29 15:21:20 +02:00
Alex Klimaj e0a2e0b223
GPS RTCM selection fixes (#21666)
* uavcan rtcm set max num injections
* Subscribe to all instances of gps_inject_data and mirror uavcan rtcm pub mirror gps driver
* Minor logic refactor in gps and uavcan gps inject data
2023-06-20 11:24:06 -04:00
Silvan Fuhrer d9585bf3d3 FWRateController: use param find for VT_DIFTHR_EN as pure FW build doesn't have VTOL module built
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-06-19 11:00:23 +02:00
Matthias Grob 2374937388 FixedwingRateControl: rework VTOL differential thrust saturation
Co-authored-by: Silvan Fuhrer <silvan@auterion.com>
2023-06-19 11:00:23 +02:00
Matthias Grob ce8c4094a8 RateControl: allow setting individual saturation flags
This helps for more complicated cases where certain axes are controlled
through and get feedback from a different allocator.
2023-06-19 11:00:23 +02:00
Matthias Grob 11436f4109 esc_calibration: handle timeout wraps better
Co-authored-by: Beat Küng <beat-kueng@gmx.net>
2023-06-16 15:48:20 +02:00
Matthias Grob db89bd5b5e esc_calibration: allow to calibrate ESCs without battery detection
Before this the ESC calibration aborts if battery detection doesn't work.
The problem is if the user still connects the battery as he gets instructed
and the calibration aborts then the ESCs are in calibration mode and
after abortion calibrate to the wrong value.

Also I realized there's no additional safety by aborting the calibration
if the battery cannot be detected during the timeout because a pixhawk
board without power module will report a battery status from the
ADC driverand in it that no battery is connected which is the best
it can do. In this situation the motors will still spin if the
ESCs are powered.
2023-06-16 15:48:20 +02:00
Matthias Grob ae678e8e2f esc_calibration: adjust timing to work with all tested ESCs
Some ESCs e.g. Gaui enter the menu relatively quickly if the
signal is high for too long. To solve that it's kept high shorter.
Also all tested ESCs detect the low signal within a shorter time
so no need to wait longer.
2023-06-16 15:48:20 +02:00
Matthias Grob 53bcb8789f esc_calibration: Improve readability and robustness
- Change timings for a more reliable calibration.
- Make sure there's an error message when battery measurement is not
available also when it gets disabled after system boot in the power
just above the calibration button.
- Safety check if measured electrical current goes up after issuing the
high calibration value for the case the user did not unplug power
and the detection either fails or is not enforced.
2023-06-16 15:48:20 +02:00
Matthias Grob afa56d21c5 mixer_module: consistent PWM/oneshot calibration range 2023-06-16 15:48:20 +02:00
Matthias Grob 8cb7a67819 actuator_test: condition order refactoring 2023-06-16 15:48:20 +02:00
Matthias Grob c89f0776f6 Unify MixingOutput constructor calls
to make them easy to search for and check the arguments.
2023-06-16 15:48:20 +02:00
Julian Oes b21e7e6c87 lights: Add LP5562 RGBLED driver
This adds support for the TI LP5562 RGB LED driver.

Things to note:
- The driver is initialized in simple PWM mode using its internal clock,
  for R,G,B, but not for W(hite).
- The chip doesn't have a WHO_AM_I or DEVICE_ID register to check.
  Instead we read the W_CURRENT register that we're generally not using
  and therefore doesn't get changed.
- The current is left at the default 17.5 mA but could be changed using
  the command line argument.

Datasheet:
https://www.ti.com/lit/ds/symlink/lp5562.pdf

Signed-off-by: Julian Oes <julian@oes.ch>
2023-06-13 13:51:59 +12:00
Matthias Grob ccb46a2152 PULL_REQUEST_TEMPLATE: fix typo 2023-06-06 17:44:32 +02:00
Matthias Grob f34fbdf0d3 rc_update: throttle trim centering fix for reverse channel
The entire logic did not work for the case when the throttle channel is
reversed because then QGC sets trim = max for that channel and
the result is only half the throttle range.
2023-06-06 17:44:32 +02:00
Junwoo Hwang 7cbf720d26
Geofence: Disable pre-emptive geofence predictor by default (#21657)
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
2023-06-06 11:22:47 -04:00
Ramon Roche 29a3abb817 netman: update module description (#21664)
Co-authored-by: David Sidrane <David.Sidrane@Nscdg.com>
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
2023-06-02 15:07:31 -04:00
Silvan Fuhrer 4e4ba40289 FW TECS: reduce default for FW_T_I_GAIN_THR to more appropriate 0.05
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-06-02 13:06:10 +02:00
Silvan Fuhrer d5cbf5df01 VTOL: params: add missing @decimal and @increment
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-06-02 13:06:10 +02:00
Silvan Fuhrer 0d7933beac Tiltrotor params: set default for VT_TILT_TRANS to 0.4
0.4 tilt is more reasobale to get nice transitions than
the previous 0.3.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-06-02 13:06:10 +02:00
Silvan Fuhrer 19029526d0 FWAttitudeController: params: increases parameter ranges
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-06-02 13:06:10 +02:00
Silvan Fuhrer b0712ef7a0 Commander: open up limits on TRIM_ROLL/PITCH/YAW to +/- 50%
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-06-02 13:06:10 +02:00
Silvan Fuhrer 71293b4943 FWRateController: fix @group, all should be in FW Rate Control group
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-06-02 13:06:10 +02:00
Silvan Fuhrer fb1491de33 FW Rate Controller: relax param ranges
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-06-02 13:06:10 +02:00
Silvan Fuhrer 487b9ca7ef Navigator: make sure to reset mission.item fields touched by set_vtol_transition_item
set_vtol_transition_item sets the params of the mission item directly
to values that make sense for NAV_CMD_DO_VTOL_TRANSITION, but don't
for other NAV_CMDs. So make sure that whenever we use it, we then in
the next step reset the touched mission_item fields.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-06-02 10:22:34 +02:00
Roman Bapst 5aa5fc2da5 Refactor uncommanded descend Quad-Chute (#21598)
* refactored uncommanded descend quadchute
- use fixed altitude error threshold
- compute error relative to higest altitude the vehicle has achieved
since it has flown below the altitude reference (setpoint)

* disabled altitude loss quadchute by default

* altitude loss quadchute: added protection against invalid local z


---------

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2023-06-02 10:22:34 +02:00
Silvan Fuhrer 4b7da42a6e
FWPositionControl: navigateWaypoints: fix logic if already past waypoint and need to turn back (#21642)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-06-01 09:25:09 +02:00
Daniel Agar bb0f2875a9 ekf2: disable multi-EKF across mags by default (H7 & SITL) for now
- re-enable once the estimator selector respects configured mag
priority (at least initially) or is otherwise able to automatically
prefer an external mag over internal
 - for SITL disabled because the full matrix of esitmator instances
(IMUs X mags) was too many topics for logger currently
2023-05-19 18:35:57 -06:00
PX4 BuildBot 74105907c9 Update submodule mavlink to latest Fri May 19 12:38:47 UTC 2023
- mavlink in PX4/Firmware (0ff9816579d1c5a4086ec7b9d05fe7a79c410df2): 3ee5382d0c
    - mavlink current upstream: 18955a04c7
    - Changes: 3ee5382d0c...18955a04c7

    18955a04 2023-05-11 Nick Exton - common.xml: Add MAV_RESULT_COMMAND_LONG_ONLY and MAV_RESULT_COMMAND_INT_ONLY to MAV_RESULT (#1982)
b92321ba 2023-03-30 Hamish Willee - Update message_definitions/v1.0/common.xml
58ff70f4 2023-03-30 Hamish Willee - COMMAND_ACK progress/result_param2 clarification
31b4aebb 2023-05-11 Julian Oes - cmake: locally install pip dependencies (#1984)
e9bf6a61 2023-05-10 Hamish Willee - Gimbal manager messages - remove WIP tagging (#1980)
0416967f 2023-05-10 Beat Küng - development: changes to standard flight modes (#1915)
ce00667f 2023-05-04 Jonas Vautherin - New cmakelists (#1977)
fdef5cc0 2023-05-03 Nick Exton - common.xml: Prefer COMMAND_INT when command includes altitude field (#1983)
89676d1d 2023-05-03 Nick Exton - common.xml: Add ZOOM_TYPE_HORIZONTAL_FOV to CAMERA_ZOOM_TYPE enum (#1979)
2023-05-19 08:41:38 -06:00
PX4 BuildBot 6c9dcd535c Update submodule devices to latest Fri May 19 12:38:42 UTC 2023
- devices in PX4/Firmware (6a645f244654695f3b178b576f7f8972f87ad774): 7d19f689f0
    - devices current upstream: 99f5960eca
    - Changes: 7d19f689f0...99f5960eca

    99f5960 2023-05-02 Eric Katzfey - sbf: fixed compile errors for Qurt platform (#129)
2023-05-19 08:41:21 -06:00
PX4 BuildBot 8ae7720569 Update submodule sitl_gazebo-classic to latest Fri May 19 12:38:32 UTC 2023
- sitl_gazebo-classic in PX4/Firmware (599a66c8a5): 3f2b9678af
    - sitl_gazebo-classic current upstream: 2e3ed9bfb0
    - Changes: 3f2b9678af...2e3ed9bfb0

    2e3ed9b 2023-05-14 JaeyoungLim - Add Quadtailsitter model based on the swan K1 (#982)
670d4d2 2023-05-12 Julian Oes - airspeed: rotate tube so it faces forward (#981)
803254d 2023-05-11 Julian Oes - tailsitter: add valid inertia, fix CG (#980)
6fd1d17 2023-05-09 JaeyoungLim - Fix advanced plane model (#979)
506f10c 2023-05-05 Julian Oes - iris: move IMU and GPS where they are (#978)
2023-05-19 08:41:03 -06:00
Peter van der Perk 9a17fddc31 Hardfault_log progmem always clear when re-arming 2023-05-19 08:40:07 -06:00
Daniel Agar bcf87b4b35
Tools/HIL/test_airframes.sh remove gps stop (not present everywhere) 2023-05-19 10:35:26 -04:00
Silvan Fuhrer 599a66c8a5 Tailsitter: make pitch angle thresholds for transition in Stabilized depending on max manual pitch
Transitions in Stabilized mode are done manually, the pilot controls the pitch angle
and if it's above the threshold the transition is declared finished (plus airspeed
check for front transition). Thus we can't have fixed thresholds but need to link
them to the actual max pitch angle in Stabilized mode.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-05-16 10:12:24 +02:00
Silvan Fuhrer 1ddacec36b FW Att/Rate controller: move max attitude params to Att Controller params
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-05-15 14:35:34 +02:00
Silvan Fuhrer bf25d8b180 FW Position Controller: increase default of FW_T_SPD_DEV_STD to 0.2
We currently fuse 0 as airspeed rate measurement, and thus simply low-pass
filter the airspeed measurements. Testing has shown that the current default
on the airspeed rate measurement noise is set to low, and thus the airspeed
mesurement is filtered too much.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-05-15 13:54:11 +02:00
Silvan Fuhrer 77d09785f3 TECS: init _velocity_control_traj_generator properly
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-05-15 13:53:32 +02:00
bresch 616a71a959 MC_auto: avoid yaw step if previous setpoint is NAN
A VTOL plane in MC mode has no yaw setpoint during takeoff because of
weather-vane. To align for the front transition, the yaw target jumps
and caused a step in the controller, making it reach saturation.

With this commit, the previous yaw setpoint is set to the current yaw
when no yaw setpoint is sent in order to create a smooth yaw trajectory
starting at the current orientation when yaw target is suddenly finite.

The yawspeed filter also now contains the yaw speed instead of dyaw in
order to prevent chattering due to dt jitter.
2023-05-12 13:42:09 +02:00
Silvan Fuhrer f19b81880f VTOL: adapt VT_QC_T_ALT_LOSS param
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-05-12 11:10:43 +02:00
Silvan Fuhrer 06713cb655 VTOL: only run front transition alt loss QC if altitude is controlled
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-05-12 11:10:43 +02:00
Silvan Fuhrer c1d94c7f05 VTOL: extend front transition QC to first 5s after completing transition
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-05-12 11:10:43 +02:00
Silvan Fuhrer 0d156f84e6 VTOL: fix transition quadchute below home
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-05-12 11:10:43 +02:00
Silvan Fuhrer 233d901934 VTOL: align setting of _tecs_running_ts on all VTOL types
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-05-12 11:10:43 +02:00
Alejandro Hernández Cordero be03b7f098 Allow to modify uxrce_dds_client port with a env var
Signed-off-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
2023-05-10 08:17:56 -07:00