Commit Graph

33975 Commits

Author SHA1 Message Date
RomanBapst dad5ce1e41 rtl: set proper acceptance radius for move_to_land item
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-04 11:58:16 +01:00
RomanBapst 6ff95ae645 RTL: implement proper RTL sequence for VTOL
- descend to RTL descend altitude
- transition
- move to land waypoint
- loiter and then land

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-04 11:58:16 +01:00
RomanBapst 197a21a22e rtl: for fixed wing (also vtol) make the descend state of RTL use type
NAV_CMD_LOITER_TO_ALT

- this allows vtol to track the loiter circle during the transition instead
of trying to fly to the landing position

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-04 11:58:16 +01:00
RomanBapst bb2826ad27 rtl: for vtol first desend down to RTL descend altitude before doing a transition
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-04 11:58:16 +01:00
RomanBapst e81d5daa66 rtl: if very close to home then do not descend if higher than RTL_DESCEND_ALT
before reaching home

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-04 11:58:16 +01:00
Silvan Fuhrer 7c727edc3f Simple mixer: add output slew rate
This adds the option to limit the rate of change (slew rate) of an output that's mixed by a simple mixer.
To enable it, a positive number has to be added at the end (6th number) of the output scaler line of the mixer,
specifying the min rise time of this output.
E.g. O:      10000  10000      0 -10000  10000 20000 for a rise time of 2s, resp. a max slew rate of 0.5s^-1.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-04 11:32:22 +01:00
Daniel Agar 98cff94702 px4_work_queue: directly support SITL lockstep
- the purpose is to ensure that every WorkItem (and WorkItems scheduled
by WorkItems) is allowed to run to completion every step
 - per workqueue register a lockstep component whenever a work item is
added (if not already registered)
 - once the work queue is empty unregister component
2021-01-04 09:38:05 +01:00
PX4 BuildBot 8c71ecd97e Update submodule ecl to latest Sat Jan 2 12:39:29 UTC 2021
- ecl in PX4/Firmware (03925cc70fd13c15a5dfe8ecc5653b91098ac68d): https://github/commit/18f334f4dbca61e3bcd1743c22cf820b5a8ff7ef
    - ecl current upstream: https://github/commit/78ce46f00777f07d24c31bdc5e2edb203be2c0f4
    - Changes: https://github/compare/18f334f4dbca61e3bcd1743c22cf820b5a8ff7ef...78ce46f00777f07d24c31bdc5e2edb203be2c0f4

    78ce46f 2020-12-19 Kamil Ritz - Removing Matlab derivation
2021-01-02 11:54:56 -05:00
RomanBapst d502292d07 mission: for vtol takeoff don't use next waypoint as target during transition
- this caused the navigator to use the next waypoint (after the vtol takeoff item)
to be used as target during the transition. If the altitude of that waypoint
was much higher than the takeoff altitude then there were FOH effects
after the transition which caused the vehicle to first descend before
climbing again.

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-02 02:18:59 +01:00
PX4 BuildBot a1b81df445 Update submodule sitl_gazebo to latest Fri Jan 1 12:39:16 UTC 2021
- sitl_gazebo in PX4/Firmware (a444d2610a): ca6c738fff
    - sitl_gazebo current upstream: 054e0a1be6
    - Changes: ca6c738fff...054e0a1be6

    054e0a1 2021-01-01 pjdewitte - Jinja generation: add protection against accidental overwriting (#682)
869225e 2020-12-31 JaeyoungLim - Fix lightsource for high fidelity worlds (#680)
2021-01-01 21:57:05 +01:00
Lorenz Meier 0bdae5745a
Update dsm.cpp
Fix documentation comment (reported by @Roman-, thanks!)
2021-01-01 15:30:25 +01:00
Lorenz Meier 9409122638 RC tests: Add new test file
This file is using a PX4IO-bound receiver on a DX9
2021-01-01 14:26:36 +01:00
Lorenz Meier 8d6239f11f PX4IO: Use DSM frame drops
These will now be reported the same as on SBUS.
2021-01-01 14:26:36 +01:00
Lorenz Meier 47fcf97442 DSM: Report frame drops
Frame drops were measured but not reported on PX4IO.
2021-01-01 14:26:36 +01:00
Lorenz Meier 00e6d11dfa PX Uploader: Disable windowed mode
The windowed mode has been added for Windows targets originally. It gets very often incorrectly detected and slows down flashing considerably. This even applies to serial links. We are disabling it now in most circumstances.
2021-01-01 14:26:36 +01:00
Daniel Agar 95dd2f7e8d rc/dsm: remove system field check, add new validity checks
- unfortunately we can't depend on the system field due to potential
external binding and non-genuine Spektrum equipment
 - reject any DSM frame with duplicate channels
 - add 16 channel mask
 - tighten valid PWM range 990-2010us (±100% travel is 1102-1898µs)
 - update RCTest rejected frame count
2021-01-01 14:26:36 +01:00
Daniel Agar d7b89ecc86 boards: px4/fmu-v5 disable px4io in rc.board_defaults
- avoid keeping this kind of logic in the common rcS
2021-01-01 14:12:26 +01:00
Lorenz Meier a444d2610a Spektrum passive power: Only use if present 2020-12-31 13:22:52 +01:00
Lorenz Meier 641cc33d79 RC input: Always report DSM state 2020-12-31 13:22:52 +01:00
Lorenz Meier e85afb22a5 FMUv5: Default Spektrum power to passive 2020-12-31 13:22:52 +01:00
Lorenz Meier cc34d4601d FMUv5: Support passive power controls
This ensures that FMU-side power controls are not interfering with IO-side power controls of DSM receivers if they happen to be OR-ed in the schematics
2020-12-31 13:22:52 +01:00
Lorenz Meier 6529e1444f RC input: Better monitoring
The output is now less confusing in terms of which protocol is currently active.
2020-12-31 13:22:52 +01:00
Lorenz Meier af28a298e5 DSM driver: Add option for passive power controls 2020-12-31 13:22:52 +01:00
Lorenz Meier 4237c8be25 Commander: Do not acknowledge binding
This is now done in the respective modules directly and based on implementation and execution state.
2020-12-31 13:22:52 +01:00
Lorenz Meier 2d1551e5bf PX4IO: Acknowledge binding 2020-12-31 13:22:52 +01:00
Lorenz Meier 8445a08bff RC input: Acknowledge binding (or indicate that feature is not implemented) 2020-12-31 13:22:52 +01:00
Lorenz Meier 44bdd5456f PX4IO: Bind if not armed
DSM binding was disabled before if safety was off, which on a lot of multicopters is today the default. The logic is now checking instead for wether the system is armed.
2020-12-31 13:22:52 +01:00
Lorenz Meier a34e57a4cc Simulator: Increase stack, publication affinity
This commit increases the send thread stack size and changes the thread affinity of the lockstep clocking topic. It also improves verbosity in case error states occur.
2020-12-31 01:05:30 +01:00
Lorenz Meier fda63f802e Tone alarm: Adjust log levels
The earlier log levels represented normal operation scenarios as errors, this aligns the log levels.
2020-12-31 01:05:30 +01:00
Lorenz Meier 3cc53f551d MAVSDK tests: Use full system timeout off
Depending on loop iterations for timeouts is not accurate, as usleep behavior depends on the system load and asking for a 0 ms sleep can potentially return immediately.
2020-12-31 01:05:30 +01:00
Lorenz Meier e27d80abc4 Camera feedback: Indicate success
If the feedback module is loaded then we want to provide capture feedback.
2020-12-30 23:36:47 +01:00
Daniel Agar 404f74f996 boards: mro/pixracerpro add flight_mode_manager 2020-12-30 10:25:08 -05:00
RomanBapst fe2e299046 FlightModeManager: small rebase change
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2020-12-30 10:25:08 -05:00
Matthias Grob e92795b474 Temporary logging addition to debug CI 2020-12-30 10:25:08 -05:00
Matthias Grob fafbb687d8 FlightModeManager: fix integral reset on ground
This information could also be used for yaw and integral
resets of the lower level controllers.
2020-12-30 10:25:08 -05:00
Matthias Grob 7de288877a MulticoperPositionControl: 3rd pass get rid of zombie members 2020-12-30 10:25:08 -05:00
Matthias Grob 62ada2e2dc FlightModeManager: restore weathervane calls
I had to do an extra subscription to the vehicle attitude.
I don't know how to test this.
2020-12-30 10:25:08 -05:00
Matthias Grob aa888223f0 FlightModeManager: fix takeoff state in stabilized mode 2020-12-30 10:25:08 -05:00
Matthias Grob 8edb06e94f FlightModeManager: make sure emergency failsafe works 2020-12-30 10:25:08 -05:00
Matthias Grob 8329208b84 FlightModeManager: fix takeoff ramp from zero 2020-12-30 10:25:08 -05:00
Matthias Grob 88c274b3cd MulticopterPositionControl: 2nd pass to move to FlightModeManager 2020-12-30 10:25:08 -05:00
Matthias Grob f52bad87e2 mc_pos_control: separate out flight_tasks (into FlightModeManager) 2020-12-30 10:25:08 -05:00
Matthias Grob 7545249215 Add flight_mode_manager to all targets with mc_pos_control 2020-12-30 10:25:08 -05:00
Matthias Grob fa7170bc4f Add FlightModeManager
to separate out setpoint generation from controllers
2020-12-30 10:25:08 -05:00
Daniel Agar 49d4cc7d5b commander: CMD_NAV_LAND/CMD_NAV_PRECLAND reply RESULT_ACCEPTED unless transition is denied 2020-12-30 12:05:41 +01:00
Benjamin Linne 80068093d6 add esc_battery module to modalai/fc-v1 build 2020-12-29 23:41:22 -05:00
Daniel Agar 91f5f26618 commander: main_state_transition call trivial style fixes 2020-12-30 00:26:14 +01:00
Daniel Agar 4f62355dec
msg: new estimator_status_flags message for more accessible ekf2 status logging
- log all estimator (ekf2) flags as separate booleans in a new dedicated low rate message (only publishes at 1 Hz or immediately on any change)
 - this is a bit verbose, but it avoids the duplicate bit definitions we currently have across PX4 msgs, ecl analysis script, flight review, and many other custom tools and it's much easier for casual log review in FlightPlot, PlotJuggler, csv, etc
 - for compatibility I've left estimator_status filter_fault_flags, innovation_check_flags, and solution_status_flags in place, but they can gradually be removed as tooling is updated

Co-authored-by: Mathieu Bresciani <brescianimathieu@gmail.com>
2020-12-29 11:27:21 -05:00
Lorenz Meier ddc1f964d2 Mac OS CI: Harden against intermittent install failures 2020-12-28 23:43:57 +01:00
Lorenz Meier 565da15f2f MAVSDK test: Increase timeout 2020-12-28 22:04:08 +01:00