2084 Commits

Author SHA1 Message Date
Beat Küng
bc09a872fa mixer_module: do not enter test mode if kill switch is engaged 2019-10-24 09:27:29 +02:00
Beat Küng
285ae608a5 commander: add support for DO_MOTOR_TEST
- add an optional timeout to test_motor
- enforce a timeout when receiving DO_MOTOR_TEST
- limitation: DO_MOTOR_TEST can only control the MAIN outputs
2019-10-24 09:27:29 +02:00
Daniel Agar
35398e05ca
perf counter cleanup (mostly intervals)
Some of these perf counters were useful during initial development, but realistically aren't needed anymore, some are redundant when we can now see the average interval from `work_queue status` and some of them simply aren't worth the cost at higher rates.
2019-10-21 18:54:17 -04:00
Beat Küng
f956bafa4e MixingOutput: remove safety button check
The assumption is that the system can only ever get into armed state if
the safety button is already off.
2019-10-21 09:42:08 +02:00
Beat Küng
a8f6622831 OutputModuleInterface::updateOutputs return bool to control actuator_outputs pub
Required for pwm_out_sim: only publish actuator_outputs when we get
actuator_controls. Otherwise lockstep startup does not work.
The issue was there before but hidden, due to a long poll timeout.

Works with HIL too.
2019-10-21 09:42:08 +02:00
Beat Küng
380247168d mixer_module: avoid using an enum as px4::atomic argument
Does not compile on MacOS.
2019-10-21 09:42:08 +02:00
Beat Küng
0871802568 mixer_module: add support for test_motor (motor_test CLI command) 2019-10-21 09:42:08 +02:00
Beat Küng
349469cf75 refactor pwm_out_sim: use mixer_module and run on work queue
Tested with SITL + HITL
2019-10-21 09:42:08 +02:00
Beat Küng
2837152983 refactor mixer_module: move some code in update() into separate methods 2019-10-21 09:42:08 +02:00
Beat Küng
72a8be538a mixer_module: more robust logic to set 'stop_motors' flag
Checking the first output_limited for a disarmed value is fragile.
For example a disarmed value might be within the range of min/max output
values and could then be triggered while armed.
2019-10-21 09:42:08 +02:00
Matthias Grob
22c4bb498c FlightTaskDescend: set no vertical thrust when commanding velocity 2019-10-18 16:18:19 +02:00
Julian Oes
de90543d6f FlightTasks: add Descend task to land without GPS
This adds a flight task to catch the case where we want to do an
emergency descent without GPS but only a baro.

Previously, this would lead to the navigator land class being called
without position estimates which then made the flight tasks fail and
react with a flight task failsafe. This however meant that landed was
never detected and a couple of confusing error messages.

This applies if NAV_RCL_ACT is set to 3 "land".
2019-10-18 16:18:19 +02:00
Tanja Baumann
be1f966e5f Collision prevention: Option to enable flying outside FOV and rename parameters (new CP group)
* rename parameters to allow more descriptive names under CP group
* add option to enable moving where there is no data
* add test for param CP_GO_NO_DATA

Co-Authored-By: Martina Rivizzigno <martina@rivizzigno.it>
2019-10-17 11:23:50 -04:00
Daniel Agar
6ccb4af8b0 CollisionPrevention: remove unnecessary double precision floating point math 2019-10-17 08:44:33 +02:00
Daniel Agar
e942d3a3b2 FlightTasks: remove unnecessary double precision floating point math 2019-10-17 08:44:33 +02:00
Beat Küng
617f37afbf mixer_{multicopter,helicopter}: add buffer size check
Fixes a potential buffer overflow if an MC/helicopter mixer is used that
exceeds the number of physical pins.
This is not a useful/flyable configuration, but the system still should
not crash.
2019-10-16 13:13:17 +02:00
Matthias Grob
068f56d66f FlightTasks: fix switchTask() comment typo 2019-10-14 15:07:09 +02:00
Beat Küng
82106105b7 parameters: defer auto-saving to after disarming for flash-based params
This is especially important for DShot, that does not update when the CPU
stalls.
2019-10-11 08:14:17 +02:00
Beat Küng
93a12436a3 parameters: update perf counter for flash-based param_save_default() 2019-10-11 08:14:17 +02:00
Beat Küng
a545f7ee16 mixer_module: extend printf status output 2019-10-11 08:14:17 +02:00
Beat Küng
65f3c7f93d dshot: add telemetry and publish esc_status message 2019-10-11 08:14:17 +02:00
Beat Küng
f3eea85bef MOT_ORDERING, MC_AIRMODE: move param def to mixer_module and 'Mixer Output' group 2019-10-11 08:14:17 +02:00
Lasse
5ac0a3043b Clarify Documentation of THR_MDL_FAC
The documentation of the thrust model parameter `THR_MDL_FAC` did not
mention both thrust and "PWM" being relative values. Also the use of the
term PWM could be misleading, since the model is applicable to CAN ESCs
as well.

This commit rephrases the user documentation string and a few source
code comments, but no logic changes are made.

Closes PX4/Firmware#13105
2019-10-09 08:06:51 +02:00
Julian Oes
5e663b9321 Remove eigen leftovers
It looks like we're not using Eigen for a while now.
2019-10-07 12:04:50 +02:00
Matthias Grob
c8f3f07ff7 matrix: pull explicit constructors 2019-10-05 11:46:07 -04:00
PX4 Build Bot
5f040fe24c Update submodule ecl to latest Wed Oct 2 20:37:33 EDT 2019
- ecl in PX4/Firmware (4d0ac1a400cc007af392c99bbfa809d59d3e7ecd): b78429aa60
    - ecl current upstream: f005e0ea8f
    - Changes: b78429aa60...f005e0ea8f

    f005e0e 2019-09-27 kamilritz - Remove deprecated ev_innov_gate param
2019-10-03 00:26:16 -04:00
PX4 Build Bot
cee8c31649 Update submodule matrix to latest Wed Oct 2 20:37:38 EDT 2019
- matrix in PX4/Firmware (cb369cb6a75cae71035d72a3bacecce3e109f971): c34e8dc98f
    - matrix current upstream: 973999a4d3
    - Changes: c34e8dc98f...973999a4d3

    973999a 2019-09-23 Matthias Grob - Fix some template type conversions and style
2019-10-03 00:25:18 -04:00
Daniel Agar
26364d44c9
px4_work_queue: command line status output and shutdown empty queues
* adds a work_queue systemcmd that will bring a tree view of all active work queues and work items
 * WorkQueues now track attached WorkItems and will shutdown when the last WorkItem is detached
2019-10-02 12:23:17 -04:00
Daniel Agar
0fe271b7f5 CollisionPrevention add more distance_sensor orientations 2019-10-01 21:05:37 -04:00
Daniel Agar
6941077218
FlightTasks: orbit and obstacle test use new uORB::Publication<> 2019-09-30 18:26:01 -04:00
Daniel Agar
045f6233d4
FlightTasks: switch to uORB::Subscription
- delete SubscriptionArray
 - all FlightTasks are now responsible for updating their own subscriptions (typically in updateInitialize()).
2019-09-30 18:16:36 -04:00
Daniel Agar
62bc0ab8ad
CollisionPrevention: limit collision warning to every 3 seconds and minor cleanup
- whitespace and formatting fixes
 - mark locals const for readability
2019-09-30 10:48:12 -04:00
Daniel Agar
fd67bd0680 uORB: SubscriptionCallback cleanup naming 2019-09-28 13:43:56 -04:00
mcsauder
7b16c3482d Refactor the ll40ls namespace driver methods to more closely match the cm8jl65, mappydot, leddar_one, and other distance sensor driver implementations. 2019-09-27 07:55:53 +01:00
kritz
190c817a9e ekf2: update to latest ecl version [continued] (#13023)
* ekf2: update to latest ecl version

Includes compatibility changes for renamed variables.

* ekf2: Add write of odometry velocity data

Co-Authored-By: kritz <kritz@ethz.ch>

* ekf2: Modify parameters to enable control of vision velocity fusion

* ekf2: Update to latest ecl with timestamp messages
2019-09-26 10:21:53 +02:00
Daniel Agar
dedd257433 CollisionPrevention: fix integer rounding (#13028) 2019-09-26 09:45:55 +02:00
Daniel Agar
88fb6f7b8e
cm8jl65: move to PX4Rangefinder and cleanup
* cm8jl65 split out header and main
* cm8jl65: move to PX4Rangefinder
* PX4Rangefinder: move signal_quality handling to PX4Rangefinder
2019-09-25 12:52:45 -04:00
Mark Sauder
db8e203a7a Update the Integrator class local variable dt from double to float and utilize the hrt_abstime typedef. (#12935) 2019-09-25 14:41:54 +02:00
Julian Kent
07d656e971
Guidance feature for Collision Prevention (#13017)
* add guidance

* remove COL_PREV_ANG and replace with COL_PREV_CNG

* safe max ranges per bin

* increase default value for colprev delay to account for tracking delay

* update parameter description

* fix and extend testing

* add handling for overlapping sensor data

* fix decision process for overlapping sensors
2019-09-24 17:00:04 +02:00
Matthias Grob
6a5ca6e336 FlightTask: use inline assignment initializer for reset_counters struct 2019-09-24 10:34:08 +02:00
bresch
679b1659eb AutoLineSmoothVel - Reorganize functions declarations to match cpp file 2019-09-24 10:34:08 +02:00
bresch
c811cf4784 FlightTask - Move ekf reset counter monitoring logic in the base FlihtTask
Each child FlightTask can simply implement what it wants to do in case
of an EKF reset event by overriding one of the _ekfResetHandler functions
2019-09-24 10:34:08 +02:00
bazooka joe
fb3a91cc4f added circuit_breaker_enabled_by_val()
added and using circuit_breaker_enabled_by_val() where possible instead of circuit_breaker_enabled() which search for cbrk parameters by name, which is extensive process.
2019-09-22 13:55:40 -04:00
PX4 Build Bot
c67a7536d4 Update submodule matrix to latest Sun Sep 22 08:37:30 EDT 2019
- matrix in PX4/Firmware (8b1f9546aabfe6ab2a0431f1d5af6dcc976d4f59): 60c9c99dcc
    - matrix current upstream: c34e8dc98f
    - Changes: 60c9c99dcc...c34e8dc98f

    c34e8dc 2019-09-17 Matthias Grob - helper: consider matrices with the same NANs and INFINITYs equal
bbaa938 2019-09-17 Matthias Grob - helper: consider NAN equal to NAN such that vectors can be compared exactly
33a6291 2019-09-17 Matthias Grob - Matrix: add proper print function testing
b0b7d72 2019-09-17 Matthias Grob - Multiplication test: fix division resulting in NAN
3747232 2019-09-17 Matthias Grob - LeastSquaresSolver: Fix nasty GCC compile optimization error
5844b0e 2019-09-16 Matthias Grob - Implement one float equality check and use it everywhere
1e80807 2019-09-16 Matthias Grob - test: Add uncovered equality checks with NAN and INFINITE
a374f37 2019-09-16 Matthias Grob - Include helper_functions like all other library components
2019-09-22 11:34:53 -04:00
bresch
6f3868b5ba ManualVelocitySmoothing - Fix unlock initialization 2019-09-19 17:31:49 +02:00
bresch
0153e1b126 Matrix - Explicitly cast array[3] to Vector3f
Use .xy() for Vector2 -> Vector3 assignment
2019-09-19 17:31:49 +02:00
bresch
f405bf506b AltitudeSmoothVel - Use ManualVelocitySmoothingZ class instead of re-implementing the logic 2019-09-19 17:31:49 +02:00
bresch
ce96d98621 ManualVelocitySmoothing - Cosmetic changes (renaming, indentation,..)
Set the classes as final and set destructor to non-virtual
2019-09-19 17:31:49 +02:00
bresch
7cdb2364e9 ManualVelocitySmoothingXY - Add simple unit test 2019-09-19 17:31:49 +02:00
bresch
f5d7eb4d87 Refactor FlightTaskManualPositionSmoothVel 2019-09-19 17:31:49 +02:00