Commit Graph

41635 Commits

Author SHA1 Message Date
Daniel Agar 28e1f6790f Jenkinsfile-hardware: don't run logger on stack check build
- stackcheck build is so slow it will trigger the logger watchdog (error fails Jenkins)
2022-11-22 16:07:22 -05:00
David Sidrane 9faa8e23e8 NuttX Upgrade CONFIG_LIB_BOARDCTL->CONFIG_BOARDCTL 2022-11-22 14:30:08 -05:00
David Sidrane 6e78cbe746 NuttX Upgrade CONFIG_LIB_USRWORK->CONFIG_LIBC_USRWORK 2022-11-22 14:30:08 -05:00
Silvan Fuhrer 9cd3eae0aa Navigator: re-introduce min loiter alt, but only apply it for Loiters w/o a specified altitude setpoint
Also applies to Loiters that are started due to the previous mode being over (Takeoff,
VTOL_Takeoff, Mission).

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-11-22 13:46:25 -05:00
Thomas Stastny 8157d83bfc ROMFS: remove deprecated runway takeoff param sets 2022-11-22 13:46:25 -05:00
Thomas Stastny 263a1884b1 fixed-wing: explicitly define landing airspeed
landing airspeed was previously defined by a scale factor multiplied by minimum airspeed. this commit changes this parameter to an explicit speed, and when unspecified, defaults to the minimum airspeed
2022-11-22 13:46:25 -05:00
Silvan Fuhrer 9bdf09a300 Mission: fix float to double conversion when setting lat/lon to NAN
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-11-22 13:46:25 -05:00
Silvan Fuhrer 49c363674a FW Position Control: only prevent automatic aborts if already flaring, but allow manual aborts
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-11-22 13:46:25 -05:00
Silvan Fuhrer 94d44c40a7 FW Position control: remove param FW_CLMBOUT_DIFF and instead use hardcoded 10m for clearing aborted flag
Use kClearanceAltitudeBuffer for it, which is also used to ensure that during takeoff an
altitude setpoint above the clearance altitdue is set.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-11-22 13:46:25 -05:00
Silvan Fuhrer 0941ae7579 Navigator: remove MIS_LTRMIN_ALT param, and use new param MIS_LND_ABRT_ALT for landing abort
MIS_LTRMIN_ALt was used to limit the go-to altitude of a LOITER_TO_ALT (not the exit altitude,
but the altitude that the vehicle went to to fly to WP), and during landing abort to climb to
at least this altitude. The min entry altitude of LOITER_TO_ALT I remove with this commit, while
for the min alt during abort I added the new parameter MIS_LND_ABRT_ALT.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-11-22 13:46:25 -05:00
Thomas Stastny ed39eb4672 mission landing abort: take min loiter alt above land point or current vehicle alt (remove arbitrary +20m) 2022-11-22 13:46:25 -05:00
Thomas Stastny 0fc35ef082 fixed-wing landing abort: disable early landing config during a landing abort
previously, the next position setpoint in the triplet was left unchanged during an abort, which meant that the abort loiter current point combined with land next point triggered the early landing config logic. this commit is only a hack to make things work temporarily.. this needs to be handled better.
2022-11-22 13:46:25 -05:00
Thomas Stastny 08ba5d762f fixed-wing takeoff: sync launch logic with newer runway takeoff modifications
- explicitly defined takeoff airspeed setpoint
- dont use climbout mode
- allow max climb on takeoff
- dont handle post clearance altitude case (navigator will switch anyway)
2022-11-22 13:46:25 -05:00
Silvan Fuhrer a787a326e3 Fixed-wing: split out control of steering wheel into seperate message LandingGearWheel
Completely detach the steering wheel logic from the yaw controller (beside using the
same manual stick input in a manual flight mode).

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-11-22 13:46:25 -05:00
Silvan Fuhrer 6c611a7e8b VehicleAttitudeSetpoint: rename fw_control_yaw to fw_control_yaw_wheel to make usage clearer
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-11-22 13:46:25 -05:00
Thomas Stastny 4b036e6723 fixed-wing landing: dont allow land abort while flaring 2022-11-22 13:46:25 -05:00
Thomas Stastny a8c2eaf3e0 fixed-wing landing: add a touchdown time and subsequent ramp down to rwto pitch setpoint after the flare to keep wheels on ground 2022-11-22 13:46:25 -05:00
Thomas Stastny 1de1416773 fixed-wing landing: convert flare time pitch and throttle constraint ramps to sqrt function to make more aggressive 2022-11-22 13:46:25 -05:00
Thomas Stastny f23328d14f fixed-wing landing: ramp in flaring throttle setpoints from last throttle state to keep control continuity
- also put flaring internal states into a struct to organize a bit
- one concern with blending the throttle setpoint like this with the flare time param is that folding prop belly landing airframes may want to have a separate param for shorter throttle kill and still use the flare time ramps for everything else
2022-11-22 13:46:25 -05:00
Thomas Stastny 68e1921f27 make FW_LND_FL_TIME min positive non-zero to protect dividing by zero 2022-11-22 13:46:25 -05:00
Thomas Stastny 928be2958d fixed-wing landing: continue to follow path throughout flare
abruptly changing to a heading setpoint on flare can cause the aircraft to roll and deviate from the runway, this commit
- maintains path following control during the flare not to disrupt the tracking just before touchdown
- (unfortunately for crosswind landing) removes the body axis alignment for runway bearing - this is a compromise

to achieve both runway bearing body axis alignment AND a specific touchdown point, either
1. the wind would need to be considered, and an appropriate diagonal approach (obstructions allowing)  defined to the runway
2. slip control added, keeping path following outputs only commanding roll (controlling airspeed vector) and using yaw-rate command (only actuated by e.g. rudder) to align body axis with the runway
2022-11-22 13:46:25 -05:00
Thomas Stastny e5a9a57d79 fixed-wing landing: ramp in throttle constraints during flare 2022-11-22 13:46:25 -05:00
Thomas Stastny 4fbfc42805 fixed-wing runway takeoff: ramp in pitch constraints and throttle setpoint on takeoff rotation
- consolidate takeoff rotation transition times for pitch constraints and throttle setpoint with a single param
- consolidate pitch takeoff constraint parameters (remove rwto_max_pitch, use nominal max)
- input correct units to rwto pitch constraint getters
- encapsulate absolute time interpolator method for transitions
- start runway ops from idle throttle
2022-11-22 13:46:25 -05:00
Thomas Stastny a4349193b5 fixed-wing runway takeoff: climbout at specified takeoff airspeed and max climb rate
TECS climbout mode was used for takeoff climbout, which puts throttle to full and does not regulate a specific airspeed.
This commit sets the desired takeoff airspeed explicitly and allows max climb rate to track the ascent.
2022-11-22 13:46:25 -05:00
Thomas Stastny 47963b5b67 fixed-wing runway takeoff: define explicit takeoff speeds
previously a scale factor param on min airspeed was used to define the climbout airspeed for runway takeoff
additionally, the rotation speed was defined by another hardcoded scale on top of the previously scaled min airspeed
this commit explicitly defines a takeoff speed and rotation speed for runway takeoff in params, with option to disable
2022-11-22 13:46:25 -05:00
Beat Küng 46dbb7cf63 fix pwm_out, px4io: prevent disarm and rate param updates during boot
Before, the logic to update disarm and rate values also triggered during
bootup on the px4io, because the output functions are only set in
updateSubscriptions().
Therefore change the check to prevent updating during the first cycle.
2022-11-22 13:41:16 -05:00
Beat Küng a20c581111 mixer_module: remove unused limit_callbacks_to_primary argument 2022-11-22 13:41:16 -05:00
dsix-ls2n 2833832968
simulation/gz_bridge: ignition with no lockstep (#20561)
When using ignition SITL simulation with NO_LOCKSTEP, the SITL PX4 fails to update the IMU data from Ignition Gazebo.

The timestamp for the IMU data is taken from the ignition message:

 - In LOCKSTEP mode the clock from the ignition simulation and the one from PX4 SITL are synchronized, hence everything works fine
 - In NO_LOCKSTEP mode, those clocks are not synchronized anymore, so the timestamp for the IMU data should not be the one from Ignition but the current time in PX4 SITL when receiving the message.
2022-11-22 11:26:11 -05:00
Matthias Grob 55b454a8a5 MulticopterPositionControl: avoid invalid setpoint message when switching to altitude controlled mode 2022-11-22 16:03:41 +01:00
bresch 60c448ce3a ekf2: GNSS yaw, use reported yaw accuracy when available 2022-11-22 09:59:31 -05:00
bresch b25bc1b982 ekf2: GNSS yaw, update->fuse pattern 2022-11-22 09:59:31 -05:00
bresch 4cb327fba3 ekf2: remove old GPS yaw autogenerated code 2022-11-22 09:59:31 -05:00
bresch 16a3fee54f ekf2_test: check behavior of GNSS yaw fusion at singularities 2022-11-22 09:59:31 -05:00
bresch 4116de31ad ekf2: compare GNSS yaw fusion sympy vs symforce 2022-11-22 09:59:31 -05:00
bresch eff2c6adcf ekf2: migrate GNSS yaw fusion to SymForce 2022-11-22 09:59:31 -05:00
Michael Schaeuble 19bca47b9e Preserve gimbal control when receiving updates from an input that is not active
The update function of InputMavlinkGimbalV2 returns UpdatedNotActive when receiving control commands from a system or component that doesn't match the primary control. This can happen if a component just sends commands without being in control or when transitioning to a different primary control.
If the input is marked as already_active, it will reset last_input_active which in turn resets the primary control in the next iteration. According to the MAVLink gimbal protocol v2, a component needs to send  MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE to start controlling the gimbal and to remove control. However, with the current implementation there are several other commands that would reset the primary control.

With this PR, the primary control remains with the component that requested it last if updates from a not active component are received.
2022-11-22 12:08:47 +01:00
JaeyoungLim 2586900c26
Log local position setpoint reference for fixedwings when running NPFG (#20512)
* Log position setpoint reference of npfg

This commit logs the local position setpoint reference when using NPFG

* Address review comments

This commit address review comments from @tstastny
2022-11-22 08:19:38 +01:00
Silvan Fuhrer c24f9561e9 FW Att C: use new param FW_MAN_YR_MAX to control yawing with sticks in attitude controlled mode
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-11-21 21:26:20 -05:00
Silvan Fuhrer c186f798b6 FW Att C: do not directly override actuator_controls[YAW] but only change yaw rate sp
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-11-21 21:26:20 -05:00
Daniel Agar 08cdb96f77
boards: px4_fmu-v5_uavcanv0periph disable systemcmds to save flash 2022-11-21 21:23:02 -05:00
Daniel Agar 16564af788
Jenkinsfile-hardware: remove px4_fmu-v3 2022-11-21 21:18:01 -05:00
Silvan Fuhrer 44f831c41a Navigator: Mission feasibilty check: set _has_landing also for normal landing waypoints (without pattern)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-11-21 18:03:21 +01:00
Silvan Fuhrer e68ba81d6d MissionFeasibilityChecker: for MC only find if landing is present, but don't do any validation
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-11-21 18:03:21 +01:00
Silvan Fuhrer f2f094c33d MissionFeasibilityChecker: add @briefs
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-11-21 18:03:21 +01:00
Silvan Fuhrer 4cd7dfa162 MissionFeasibility: add combined takeoff/landing requirement check
Replace the existing check for the availability of a takeoff mission item with a combined
check for takeoff and landing item (or landing pattern). New param MIS_TKO_LAND_REQ
can be set to require only a takeoff, only a landing, both takeoff and landing, and
both or none. The latter is meant to be set if is e.g. deemed unsafe to start a flight
through a Takeoff WP without though defining a Landing - as then in case of a RTL the
vehicle doesn't follow a pre-defined path but instead only can do default RTL that especially
for FW and VTOL isn't always safe.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-11-21 18:03:21 +01:00
Alex Mikhalev cce3b43b4f mavlink: Fix setting MAV_SIK_RADIO_ID
The AT commands were formatted incorrectly
2022-11-21 08:12:40 +01:00
Daniel Agar 2cb4ef0629
NuttX 10.3+ upgrade (#20190)
Co-authored-by: Peter van der Perk <peter.vanderperk@nxp.com>
Co-authored-by: David Sidrane <David.Sidrane@NscDg.com>
Co-authored-by: alexklimaj <alex@arkelectron.com>
2022-11-20 20:28:07 -05:00
Beat Küng 45b390b0bf microdds: use UXR_DURABILITY_VOLATILE for data reader
This corresponds to the ROS2 default. Using reader=TRANSIENT_LOCAL and
writer=VOLATILE (=default) is incompatible according to
https://docs.ros.org/en/rolling/Concepts/About-Quality-of-Service-Settings.html
2022-11-18 21:41:24 -05:00
Silvan Fuhrer b36758b1a0 Update src/modules/fw_pos_control_l1/FixedwingPositionControl.hpp
fix typo

Co-authored-by: Thomas Stastny <thomas.stastny@auterion.com>
2022-11-18 17:35:34 +01:00
Silvan Fuhrer c4c94febfa FW Pos C: clearly define FW_AIRSPD_MIN as stall+margin, and automatically increase f(load_factor)
Previously the minimum airspeed setpoint was adjusted to the load_factor compensated
stall speed, which, when the stall speed was set without margin, gave the controller
no room for error (the vehicle would stall if the controller has even a small airspeed
error).

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-11-18 17:35:34 +01:00