12947 Commits

Author SHA1 Message Date
TSC21
ad4d4287fa mavlink odometry: properly set the frame id fields 2020-05-28 15:45:13 +01:00
TSC21
562d57fee8 mavlink: fix odometry frames of reference setup 2020-05-28 15:45:13 +01:00
Daniel Agar
0ec48cfef3 ekf2: increase default baro noise 2 -> 3.5 m 2020-05-28 08:35:07 -04:00
Hamish Willee
14853539e3
CBRK_FLIGHTTERM: Does not affect takeoff failure safety detection (#14972)
* CBRK_FLIGHTTERM: Clarify does not affect takeoff failure safety detection

* FD_FAIL_P FD_FAIL_R - clarify apply on takeoff

* Improve param text

Co-authored-by: Mathieu Bresciani <brescianimathieu@gmail.com>
2020-05-28 08:30:48 +02:00
Pandacoolcool
664c79742b
navigator_main.cpp: don't reset wv enable status (#14901)
* navigator_main.cpp: don't reset wv enable status

* fix review
2020-05-27 15:49:04 +03:00
Matthias Grob
d92e66863a mc_pos_control: migrate MPC_*_VEL_* parameter to acceleration scaling
Before #14212 the velocity control gains used in the multicopter
position controller were defined as a scale between velocity error in
one axis (or it's integral and derivative respectively) and the unit
thrust vector. The problem with this is that the normalization of the
unit thrust vector changes per vehicle or even vehicle configuration
as 0 and 100% thrust get a different physical response. That's why
the gains are now defined as scale between velocity error
(integral/derivative) and the output acceleration in m/s².
2020-05-26 14:44:41 +02:00
Matthias Grob
e482081f91 mc_att_control: grab attitude setpoint before processing estimate reset 2020-05-26 15:07:45 +03:00
Matthias Grob
12ee75700a mc_att_control: adapt setpoint on estimation reset
There was a gap where the attitude controller already used the estimate
with a new reference but the last known attitude setpoint was still based
on the old reference. This leads to a big glitch on reset because until
the attitude setpoint gets updated the error is wrong and as large as the
attitude delta of the reset.
2020-05-26 15:07:45 +03:00
Matthias Grob
cf658494ad mc_attitude_control: keep last attitude setpoint as member
The last attitude setpoint that is known from the position controller
is now kept inside the AttitudeControl class such that we don't
keep the whole vehicle_attitude_setpoint struct and always copy over from
there to run an update step.
2020-05-26 15:07:45 +03:00
RomanBapst
bd154bf33c FixedWingAttitudeControl: removed parachute from gimbal control group
- parachute is handled separately based on flight termination in px4io

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2020-05-25 11:44:35 -04:00
Daniel Agar
ade8a13203 commander: CMD_COMPONENT_ARM_DISARM don't block disarm if maybe_landed 2020-05-25 11:43:14 -04:00
Matthias Grob
7b41ce4711 simulator: rename parameter variable according to convention 2020-05-25 11:04:24 +02:00
Matthias Grob
88c21337fa Make all battery sensor drivers report their sample interval
To make use of the time abstraction in the leaky integrator.
2020-05-25 11:04:24 +02:00
BazookaJoe1900
cd8850b43b
mavlink: bring class LogListHelper into MavlinkLogHandler (#14452)
This is in order to avoid dynamic allocation of LogListHelper when downloading logs.
2020-05-25 10:08:25 +02:00
Dusan Zivkovic
b7ebdab7fd mavlink_receiver: handle LANDING_TARGET message: publish irlock_report when landing target position invalid 2020-05-23 11:42:21 -04:00
Silvan Fuhrer
504794eddc
VTOL: reject transition command in certain flight modes 2020-05-20 15:54:31 -04:00
Matthias Grob
27586db93e rc_update: remove obsolete RC filtering 2020-05-20 19:30:19 +02:00
Matthias Grob
1a3c692e4e mc_att_control: add an optional stick tilt input filter 2020-05-20 19:30:19 +02:00
Beat Küng
6c16a29d26 mavlink: remove unneeded TIMESYNC stream from MAVLINK_MODE_EXTVISION
set in MAVLINK_MODE_EXTVISIONMIN by fallthrough
2020-05-20 09:12:50 +02:00
Beat Küng
107ab16e96 mavlink: reorder streams to optimize latency
In particular this together with the previous commit reduces timesync
round-trip time spikes by more than 10ms, and makes it generally more
stable.

Other streams are reordered according to onboard priority.
2020-05-20 09:12:50 +02:00
Beat Küng
fa8def903d mavlink: move ulog handling after stream updates
reduces latency for the mavlink streams
2020-05-20 09:12:50 +02:00
Michal Stasiak
4f82f028e7 airspeed_calibration: Fix FD leak 2020-05-19 13:48:43 +02:00
Julian Oes
793eb82153 navigator: allow mission items with same position
This reverts the addition of a check against mission items that have the
same position. This breaks existing MAVSDK implementations where a
LOITER_TIME item is set right after a WAYPOINT with the same
coordinates. It is an interim hack to allow the vehicle to hold still
during a photo is captured.

This leaves the check in place for gates where we need to be able to
calculate the direction between gate and waypoint.
2020-05-19 08:51:21 +02:00
Silvan Fuhrer
b5cc3c4ef5
mavlink_messages: send EAS instead of IAS (#14858)
Send equivalent_airspeed_m_s instead of indicated_airspeed_m_s for HUD on groundstation.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2020-05-18 10:34:39 +02:00
Matthias Grob
03bafd5581 powerCheck: make 5V warning threshold 0.1V lower
Because of warnings on every flight on setups without
any need for concern. Some even high quality supply voltage regulators
that are rated for 5V can with tolerances and load get lower than 4.9V.
2020-05-13 11:37:20 -04:00
ealdaz
c96b5246ff Improved Hold behaviour
Added local position as a valid source of position
2020-05-13 13:08:41 +02:00
kritz
3897030c6f
Support odometry velocity in body and local frame (#14703)
* Update submodule ECL

* increase lower bound on EVV param
2020-05-13 12:43:02 +02:00
Daniel Agar
05886e053f mavlink_log_info: always print to console and merge with mavlink_and_console_log_info 2020-05-12 08:53:51 +02:00
Daniel Agar
2bbdef205e sensors/vehicle_angular_velocity: don't remove bias twice 2020-05-10 15:30:37 -04:00
Daniel Agar
ec2cd3b1be
sensors: use sensor_gyro timestamp_sample for sensor_combined timestamp
The timestamp actually used by ekf2 is the sensor_combined timestamp, so we should be setting it with the actual data sample timestamp, rather than the aggregated sensors topic publication metadata.

Later the sensor_combined message will be replaced with vehicle_imu that carries a separate publication timestamp and raw sample timestamp.
2020-05-10 15:24:32 -04:00
Daniel Agar
d53bb581c2 navigator: check _navigation_mode_array before run 2020-05-09 11:46:39 -04:00
Silvan Fuhrer
0c75385395
replace IAS with EAS in FW attitude controller (#14868)
The EAS is the calibrated airspeed corrected with a scaling factor to account for sensor error/placement of pitot.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2020-05-08 10:46:24 +02:00
Daniel Agar
aa380f351f uORB: SubscriptionInterval last update shift forward with interval 2020-05-07 13:18:09 -04:00
Daniel Agar
7cf8a7ca64 uORB top readd initial clear screen 2020-05-07 09:31:15 +02:00
Daniel Agar
a2d170d850 uORB: top output improvements
- sleep slightly longer than 1s to capture 1 Hz topics
 - round msg rate calculation
 - add topic size to outpu
 - by default only print topics with subscribers
 - clear previous output (past cursor)
2020-05-07 09:31:15 +02:00
Daniel Agar
41660c3550
commander: update EKF accel & gyro bias arming limits
- these should have been rescaled when the ecl/EKF filter update period changed from 8 ms -> 10 ms
2020-05-07 01:21:47 -04:00
Daniel Agar
7207301e56 simulator: temperature only updated with baro 2020-05-06 15:34:21 -04:00
Daniel Agar
10b289b43c commander: only report manual control lost if found once 2020-05-06 13:53:54 -04:00
Daniel Agar
7bb256f4b7 commander: skip continuous preflight check if calibrating 2020-05-06 13:53:54 -04:00
Daniel Agar
6705ac3e3b commander: reject PREFLIGHT_CALIBRATION and PREFLIGHT_STORAGE if armed or shutting down 2020-05-06 13:53:54 -04:00
Daniel Agar
04113b4d57 commander: changes when USB connected
- skip avionics rail voltage check when USB connected
 - skip forced reboot on USB disconnect if circuit breaker set
 - avionics voltage preflight check don't silently fail if system_power unavailble
     - explicitly set supply check circuit breaker (CBRK_SUPPLY_CHK)
2020-05-06 13:53:54 -04:00
Daniel Agar
746a8f5cf9 commander: reboot/shutdown usability fixes
- always check with state machine before reboot/shutdown
 - respect BOARD_HAS_POWER_CONTROL (shutdown from command, low battery, power button)
 - px4_shutdown_request add optional delay and always execute from HPWORK
 - px4_shutdown_request split out px4_reboot_request
2020-05-06 13:53:54 -04:00
Silvan Fuhrer
45ebbb895a Airspeed Selector: do not run it within the first 2s after system boot
This is to prevent a wrong (false positive) failure detection of the airspeed
shortly after system boot due to delays in driver and/or estimator startup (seen in SITL).

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2020-05-06 12:46:22 -04:00
Daniel Agar
b5e25c2218 sensors: checkFailover() remove verbose failure messages
- in certain circumstances this additional logging can actually cause
further timeouts and failure
2020-05-06 09:31:09 -04:00
Daniel Agar
29f4fca7bf sensors: failover don't print remaining disabled sensors 2020-05-06 09:31:09 -04:00
Daniel Agar
692aaada31 sensors: refresh parameters on sensor init 2020-05-06 09:31:09 -04:00
Daniel Agar
cb180427cd sensors: inconsistency checks explicitly skip disabled 2020-05-06 09:31:09 -04:00
Daniel Agar
2a2d9e9eba logger: keep typical log path within a single mavlink message 2020-05-06 08:31:40 +02:00
Daniel Agar
ca998c1822
IMU: parameterize IMU integration time (IMU_INTEG_RATE)
- default integration rate now 200 Hz (5000 us interval)
 - set update rate for all drivers and simulators using PX4Accelerometer/PX4Gyroscope
2020-05-05 20:34:09 -04:00
Matthias Grob
cdf37ca557 PositionControl: deconflict hover thrust estimator, acceleration control
- Avoid constantly adjusting the velocity gains with the HTE
- Make sure the hover thrust integral update doesn't break
  even though its unit is acceleration and not unit thrust anymore

We need to convert the velocity gains to not contain/depend on the
hover thrust. In horizontal direction it doesn't make sense to scale
them with the hover thrust and in vertical direction the adjustments are
already done in the acceleration to collective thrust conversion.
2020-05-04 22:17:56 +02:00