31316 Commits

Author SHA1 Message Date
Silvan Fuhrer
f4df3fb5f2 pre arm check: VTOL: do not allow arming if not in multicopter mode
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2020-01-28 00:30:24 +01:00
Daniel Agar
1237402fa4
sensors: compute and publish vehicle_angular_acceleration
- introduces parameter IMU_DGYRO_CUTOFF to configure the angular acceleration low pass filter
 - the angular acceleration is computed by differentiating angular velocity after the notch filter (IMU_GYRO_NF_FREQ & IMU_GYRO_NF_BW) is applied

Co-authored-by: Julien Lecoeur <jlecoeur@users.noreply.github.com>
2020-01-27 16:44:01 -05:00
Roman Dvořák
497ab07daf airframes: add ThunderFly Auto-G2 autogyro (#14015) 2020-01-27 16:21:52 +01:00
Daniel Agar
24f0c2d72a
sensors: move gyro filtering to sensors/vehicle_angular_velocity
- gyro filtering (low-pass and notch) only performed on primary gyro in `sensors/vehicle_angular_velocity` instead of every gyro in `PX4Gyroscope`
 - sample rate is calculated from actual updates (the fixed value was slightly wrong in many cases, and very wrong in a few)
 - In the FIFO case the array is now averaged and published in `sensor_gyro` for filtering downstream. I'll update this in the future to use the full FIFO array (if available), but right now it should be fine.
2020-01-27 10:05:33 -05:00
kamilritz
0d2e5f1c50 Update sitl_gazebo: Vision fix 2020-01-27 14:09:45 +00:00
JaeyoungLim
15835ce7a3 Add standard_vtol as supported model for multivehicle sim gazebo
Fix
2020-01-27 09:16:24 +01:00
Daniel Agar
3545ba97ca commander: don't run preflightCheck during calibration on reconnect 2020-01-27 09:10:22 +01:00
Daniel Agar
10410fc868 msg: rename sensor_bias -> estimator_sensor_bias 2020-01-27 09:03:27 +01:00
Beat Küng
db49e5abcd fix commander: run preflight checks on GCS connection
Regression from 6dec451babf1b4c6394fbf8678585d66932adefb, leading to
preflight failures not being reported at all. Only after a failed arming
attempt the messages would be sent. And for GPS check failures, in case
they are set to optional (default), arming would be possible, but switching
to position would be rejected w/o error.

We need to run the preflight checks periodically, but this at least restores
the previous behavior.
2020-01-25 11:17:33 +01:00
Beat Küng
2a67d22ac7 commander powerCheck: simplify logic
refactoring only
2020-01-25 11:17:33 +01:00
Beat Küng
9e7dcd4b06 commander: fix prearm flag to preflightCheck
This was inverted, i.e. set to false in most cases, whereas it should be
true.

As a consequence, both powerCheck and airspeed.confidence checks were not
executed.
2020-01-25 11:17:33 +01:00
Daniel Agar
4fef3dd7d5 simulated sensors minor cleanup
- mavlink receiver use PX4Accelerometer/PX4Gyroscope for hil_sensor and hil_state_quaternion
 - simulator module remove unnecessary fake scaling
 - sih module remove unnecessary fake scaling
2020-01-24 12:50:22 -05:00
RomanBapst
27e9b1e3d4 updated ecl 2020-01-24 16:49:17 +03:00
kamilritz
5a5b3a44ee Update flow interface 2020-01-24 16:49:17 +03:00
Julian Oes
ab133b41b2 workflows: Install mavsdk from GitHub release 2020-01-24 12:04:47 +01:00
Beat Küng
0542ac0e5f fix simulator_mavlink: orb_copy requires a valid data pointer
orb_copy() just returns if data==nullptr.

Fixes lockstep for ekf2. estimator_status.time_slip now stays constant
after startup, even with high speedup factor and high system load.
2020-01-24 12:04:47 +01:00
Julian Oes
30edcad752 Revert "Simulator: Remove EKF2 based wait"
This reverts commit 1834c156d280b7562945d61ac7a711c59eb3754b.
2020-01-24 12:04:47 +01:00
Julian Oes
30188d2884 Revert "Simulation: Set scheduling policy RR for lockstep"
This reverts commit 742b1839d517bb4ebc5a4ad9b3d292157bf68fd8.
2020-01-24 12:04:47 +01:00
Julian Oes
f64a0982c7 mavsdk_tests: fix build instructions 2020-01-24 12:04:47 +01:00
Julian Oes
0f77e3ba44 mavsdk_tests: actually use chosen model
This does not work for plane yet, and VTOL only acts as multicopter for
now, so doesn't make much sense just yet.
2020-01-24 12:04:47 +01:00
Julian Oes
5589812104 mavsdk_tests: refactor/cleanup
This splits the main function which has become way too long.
2020-01-24 12:04:47 +01:00
mohammad
f5a81f5793 capture.result
Boolean indicating success (1) or failure (0) while capturing this image.
2020-01-24 11:42:03 +01:00
Julian Oes
1280351feb mavlink: forward everything except what is for us
The previous forwarding rules exclude another onboard MAVLink node to
send messages to a specific target.

E.g. a message from a companion computer with sysid 1 (same as
autopilot) with target sysid 190 (for the ground station) was not
forwarded.

With the new rules, anything that is not specifically addressed to the
autopilot's sysid and compid is forwarded.
2020-01-24 11:14:44 +01:00
Jacob Dahl
562062b303 batt_smbus: fix potential buffer overrun bug (#13904) 2020-01-24 11:01:25 +01:00
Beat Küng
5cacf17e47 navigator mission: simplify reset logic
This can be simplified because we now only activate Mission while armed.
2020-01-24 08:42:16 +01:00
Beat Küng
92aa341c18 navigator: do not set a mode while disarmed
This avoids premature state machine execution, most notably for missions.

In particular this fixes these issues:
- when landed, and the vehicle has a valid mission: switching to mission
  would execute the first item.
- after executing a mission with a land waypoint, the mission is reset
  and the first item is executed.

In case the first waypoint is a takeoff, it would print a user message:
"Takeoff to x meters above home.". If it was a vehicle command, it would
execute that.
Note that because the vehicle is disarmed, the vehicle would not actually
do anything (except for commands that are accepted while disarmed).
2020-01-24 08:42:16 +01:00
Beat Küng
e939f60a9e FlightTaskAuto: accept invalid triplet_setpoint (and interpret as loiter)
This will allow navigator to not output any setpoints while disarmed.
Otherwise the position controller outputs warnings in the form of:
Auto activation failed with error: Activation Failed

The risk here is that it could hide problems, where navigator sends invalid
triplets when it should not.
2020-01-24 08:42:16 +01:00
Beat Küng
c0352027fb mc_pos_control: do not warn when going into failsafe while disarmed
It's possible to get invalid or no setpoints from navigator while disarmed.
2020-01-24 08:42:16 +01:00
Beat Küng
d68e595514 vehicle_control_mode: fix invalid comment for flag_armed 2020-01-24 08:42:16 +01:00
kritz
47cab3dba5 Update external vision interface (#13989)
* Update external vision interface

* Update ECL Version
2020-01-23 15:36:08 +01:00
kamilritz
9554f8f98b Update ECL version 2020-01-23 13:27:30 +01:00
kamilritz
8d25dcd543 Update EKF auxiliary velocity interface 2020-01-23 13:27:30 +01:00
kamilritz
9d184ea3d6 Update EKF range finder interface 2020-01-23 13:27:30 +01:00
kamilritz
230d7f2558 Update EKF airspeed interface 2020-01-23 13:27:30 +01:00
kamilritz
8772e09963 Update EKF gps interface 2020-01-23 13:27:30 +01:00
kamilritz
19b7421f86 Update EKF baro interface 2020-01-23 13:27:30 +01:00
kamilritz
439a20bfcb Update EKF mag interface 2020-01-23 13:27:30 +01:00
Daniel Agar
009ba638f5 PX4Accelerometer/PX4Gyroscope update FIFO case to trapezoidal integration 2020-01-22 18:35:41 -05:00
Daniel Agar
697dbfb9f8 sensors/vehicle_imu: incremental step towards multi-EKF 2020-01-22 18:04:29 -05:00
RomanBapst
0e90448e52 navigator: add position setpoint reset helper with safe defaults
- use in reset_triplets()
2020-01-22 18:03:25 -05:00
Daniel Agar
98042bf58f
uORB: introduce SubscriptionBlocking
- uORB::SubscriptionBlocking is a specialized uORB::Subscription that allows you to do a blocking read
 - this is intended to be an easy to use, hard to misuse replacement for the typical orb fd + poll pattern we've relied on historically
2020-01-22 17:56:28 -05:00
Daniel Agar
036a45377d boards rename auav_x21 -> mro_x21 2020-01-22 15:33:02 -05:00
SalimTerryLi
3ed8e876b7 New pca9685 pwm output driver 2020-01-22 15:19:47 -05:00
Daniel Agar
693d532bba
mRo x2.1 777 board support 2020-01-22 15:02:55 -05:00
Claudio Micheli
421a06685c BMM150: Fix priority assignment
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2020-01-22 12:26:49 -05:00
Beat Küng
db36edffe8 commander: fix mission topic publication
The local scope caused the topic to be unadvertised, which in turn caused
a copy() failure in navigator and 'mission update failed' printf error.
2020-01-22 12:08:32 -05:00
Beat Küng
c61e44f55b commander: fix variable naming 2020-01-22 12:07:51 -05:00
Beat Küng
8bfbfa033c fix commander: avoid LED printf errors on every SITL startup 2020-01-22 12:07:51 -05:00
Beat Küng
67f3234b5b posix cdev_platform: set errno on px4_open failure 2020-01-22 12:07:51 -05:00
Daniel Agar
21a8d7db7f WorkItem modules: Run() shouldn't be public 2020-01-22 12:03:03 -05:00