Commit Graph

30219 Commits

Author SHA1 Message Date
Mark Sauder 4a6742c3e6 Deprecate the non-functioning HC_SR04 driver. (#13021) 2019-09-25 10:34:50 +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
bresch 6139812293 FailureDetector - use standard topic subscription for attitude topic and
pass vehicle_status from commander instead of subscribing to it.
2019-09-24 14:17:58 +02:00
bresch 000c1e364c FailureDetector - Ignore attitude check for MC in acro and rattude, and FW in manual, acro and rattitude modes 2019-09-24 14:17:58 +02:00
kamilritz 35c50f693f Add missing id for vehicle_visual_odometry_aligned for rtps 2019-09-24 10:49:33 +01: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
kritz 7427768e70 ECL reference frame alignment fix (#12771)
* Fix EKF frame alignemen in ECL

* Remove empty lines

* Add initalization for ev_odom

* Only use yaw covariance for angErr

* Improve frame naming in comments

* Use copyTo

* Add aligned as suffix

* Add missing vehicle_visual_odometry_aligned
2019-09-23 14:24:52 -04:00
Matthias Grob 412b44ff6e Commander: allow RC to override during RTL 2019-09-23 12:42:33 +02:00
Matthias Grob 4f44fde080 Commander: remove not disarming by RC message
Refactoring the condition to be more clear.
2019-09-23 12:42:33 +02:00
Christian Clauss 41516fbd55 Old style exceptions are Python 3 syntax errors 2019-09-22 17:47:37 -04:00
Daniel Agar bc35251799 Update submodule mavlink v2.0 to latest Sun Sep 22 08:37:26 EDT 2019
- mavlink v2.0 in PX4/Firmware (09bd7bbcab7ba508043018eefbe020ff74d79c66): https://github.com/mavlink/c_library_v2/commit/be2f1fbe0a8235ff4632e7df1d54c89a3c8615bd
    - mavlink v2.0 current upstream: https://github.com/mavlink/c_library_v2/commit/d4a4a4314b8912015e999e17a3f66afee434a9cd
    - Changes: https://github.com/mavlink/c_library_v2/compare/be2f1fbe0a8235ff4632e7df1d54c89a3c8615bd...d4a4a4314b8912015e999e17a3f66afee434a9cd
2019-09-22 14:23:56 -04: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
cclauss c18104d48b Use print() function in both Python 2 and Python 3
Legacy __print__ statements are syntax errors in Python 3 but __print()__ function works as expected in both Python 2 and Python 3.
2019-09-22 13:54:24 -04:00
mcsauder cdbe4a3ee8 Refactor the terraranger driver. 2019-09-22 12:23:25 -04:00
PX4 Build Bot c67a7536d4 Update submodule matrix to latest Sun Sep 22 08:37:30 EDT 2019
- matrix in PX4/Firmware (8b1f9546aabfe6ab2a0431f1d5af6dcc976d4f59): https://github.com/PX4/Matrix/commit/60c9c99dcc44ea12bed0c3f9b95d01e2aa6d7d9e
    - matrix current upstream: https://github.com/PX4/Matrix/commit/c34e8dc98fd05ea55dcd4c9fc551b11a3d23a601
    - Changes: https://github.com/PX4/Matrix/compare/60c9c99dcc44ea12bed0c3f9b95d01e2aa6d7d9e...c34e8dc98fd05ea55dcd4c9fc551b11a3d23a601

    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
Daniel Agar fe4f6c186e Mavlink: ifdef networking code 2019-09-21 13:46:01 -04:00
Daniel Agar 86dc4c5a00 cmake generate vscode launch.json 2019-09-21 13:06:49 -04:00
PX4 Build Bot 42ca17ce77 Update submodule v2.0 to latest Thu Sep 19 20:38:28 EDT 2019
- v2.0 in PX4/Firmware (103595e866882191593136495a52825c455d2026): https://github.com/mavlink/c_library_v2/commit/ac40c0329e88b70ae5db4c1467ed5853d305af54
    - v2.0 current upstream: https://github.com/mavlink/c_library_v2/commit/be2f1fbe0a8235ff4632e7df1d54c89a3c8615bd
    - Changes: https://github.com/mavlink/c_library_v2/compare/ac40c0329e88b70ae5db4c1467ed5853d305af54...be2f1fbe0a8235ff4632e7df1d54c89a3c8615bd

    be2f1fb 2019-09-17 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/b21a2652249a27a151b38cd3da5c4ac9d51fcb69
d465e22 2019-09-17 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/af677f748aa2c3268f71db6f3a1c867530b51894
5631a1e 2019-09-16 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/2876e4c06e707519a8770b661abaac008feef703
05a4389 2019-09-16 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/77a18b1cb7d4667b669e0429d86082ed38b79886
2019-09-20 11:41:27 +02: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
bresch 080eedfd02 ManualPositionSmoothVel - Split large function into smaller ones, split XY and Z axes
Next step is to move as much as possible to a library in order to
reuse the Z axis in the Altitude FlightTask
2019-09-19 17:31:49 +02:00
Dennis Mannhart 453b6a39e4 TrajMath: move from FlightTasks/Utility into mathlib library because the function is also used by other libraries 2019-09-19 14:09:44 +02:00
Dennis Mannhart e6b7062442 TrajMath: replace type placeholder with floats 2019-09-19 14:09:44 +02:00
bresch e9ab6a75ba MC rate control - Scale the integrator with K during the integration
part to avoid having to scale its saturation separately. This is
required to avoid premature saturation of the integrator when using
the K term.
Also remove double saturation of the integrator
2019-09-19 14:05:28 +02:00
bresch 67e528ec0c Takeoff - allow publishing NAN longitude and latitude
A NAN is interpreted in the FlightTaskAuto as a non-valid global coordinate and sets a local position.
If a zero is sent instead, the global coordinate is recognized as valid and will be executed.
This is a problem when the global position is gained for the first time after takeoff and that a valid global reference did not exist before
2019-09-19 14:03:58 +02:00
Nico van Duijn 549a962553 EKF2: move handling of invalid range into ECL (#12988)
* ekf2: Move handling of invalid range finder data inside ecl library

The ecl library EKF is able to use vehicle motion and in-air status to better determine when the default on-ground range finder reading can be used.
The description for the EKF2_MIN_RNG parameter has been updated to make its use clearer.
2019-09-19 11:29:34 +02:00
Matthias Grob fa13f63db6 ekf2: temporarily hardcode new quality information to unkown
until priseborough's and nicovanduijn's pr #12950
2019-09-18 22:01:36 -04:00
Matthias Grob c8d0eba1d2 Update ecl and matrix to safe matrix access 2019-09-18 22:01:36 -04:00
Matthias Grob 1ecbf8efd2 test_matrix: remove duplicate namespace accesses 2019-09-18 22:01:36 -04:00
Julian Kent 2d4ecab3b0 Remove unsafe access to .data() and _data in Matrix 2019-09-18 22:01:36 -04:00
Daniel Agar 78bf12f0db px4_tasks: reduce POSITION_CONTROL priority
* this is to prevent the loss of any sensor data or estimator time slip in the event of a position controller or flight task overrun
2019-09-18 09:55:06 -04:00
Daniel Agar 494f35d5f4 Mavlink: wait for boot complete before sending or receiving anything 2019-09-18 09:07:55 -04:00
Daniel Agar be61d93d64 tfmini split out header and main 2019-09-17 21:50:59 -04:00
Daniel Agar 9b7ef7141f tfmini cleanup and use PX4Rangefinder 2019-09-17 21:50:59 -04:00
Nico van Duijn 18eaeb564d PMW3901 improvements (#12977)
* PMW3901: use frame count and quality metric

* PMW3901: set qual to 0 for unsuccessful SPI reads

* PMW3901: improve comment for collect_time

* PMW3901: set qual to zero for huge flow values
2019-09-17 10:54:56 -04:00
Maximilian Laiacker 72e93a9c36 fixed total flight time counting bug
After landing it can happen that a second take off is detected and then the _takeoff_time is rest, resulting in a wrong total flight time counter. With this fix the flight time is reliably counted from the first take off until the vehicle is disarmed. Normally the vehicle will not spend much time armed after landing, if it does the flight time will be off but this is the same as before this fix. This fix was tested in several flight experiments.
2019-09-17 14:52:27 +02:00
Daniel Agar c13835c0f0 replay module split replay_main.cpp into separate compilation units 2019-09-17 14:33:04 +02:00
Matthias Grob 270e12a4df VelocitySmoothing: refactor local scope t variables instead of array 2019-09-17 09:27:00 +02:00
bresch da8ac8cafb VelocitySmoothing - Clean up updateTraj function based on Matthias' comments 2019-09-17 09:27:00 +02:00
bresch b82fa68893 VelocitySmoothingTest - Fix typo and use "zero" instead of "null" 2019-09-17 09:27:00 +02:00
bresch 42cedb7fda VelocitySmoothing - Change direction of "brake" as braking means that
only the T3 part is required and that the jerk applied during T3 is the
opposite of the one defined by "_direction".
2019-09-17 09:27:00 +02:00
bresch 8490266be8 VelocitySmoothing - (Re)set _state_init every time _state is (re)set 2019-09-17 09:27:00 +02:00
bresch 654938f6a1 VelocitySmoothing - Cosmetic changes (new lines, reorganize functions),
regroup both updateTraj functions and edit some comments
2019-09-17 09:27:00 +02:00
bresch 0b765a1642 AltitudeSmoothVel - Update to use new implementation of VelocitySmoothing
Remove jerk reduction (not needed in the new implementation)
2019-09-17 09:27:00 +02:00