12822 Commits

Author SHA1 Message Date
RomanBapst
47b5d51369 vtol_type: added explicit control over deceleration during backtransition
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2020-04-02 13:45:52 +03:00
RomanBapst
b6a80253d7 run l1 during transition 2020-04-02 13:45:52 +03:00
Beat Küng
1f60a86d32 fix commander: need to copy all battery states in a cycle
Previously if in a cycle only a disconnected battery status updated, the
battery health state would switch to unhealthy during that time.

Fixes intermittent 'Arming denied! Check battery' preflight failures on
v5x with 1 power module connected.
2020-04-02 12:42:00 +02:00
Matthias Grob
70c28c7274 mc_pos_control_params: update MPC_POS_MODE description
- remove deprecated sport mode
- clarify wording
2020-04-02 11:52:44 +02:00
Daniel Agar
aa2f3a6624 sensors: complete move to uORB::Subscription 2020-04-01 16:17:14 -04:00
kamilritz
a70aa6349a ECL interface: output vector quantities by return-by-value 2020-04-01 11:47:39 +02:00
Hyon Lim
3bcd8c63f8
SMBus battery (a.k.a. smart battery) enhancement. (#14496)
* Enhancement: State of health, and max_error value is added. Both shows battery health of SMBUS smart battery.
 * Enhancement: BAT_C_MULT parameter is introduced. This is for high-current capable SMBUS-based battery.
As SMBUS only provides 16-bit for current, it could only be +-32768mA which is about +-32A.
But with proper treatment, it could be extended with little accuracy loss.
This factor can be set for individual battery system with available information.
    * Relative SOC introduced. Proper SMBUS battery should provide percentage of remaining battery
directly. Therefore it does not have to be computed like before.
    * State of Health introduced. Proper SMBUS battery should provide SOH value.
    * Max error: this shows estimation error of BMS.
 * Enhancement: With smart battery, precise estimation of time remaining is provided
with impedance track. It is unit of minute, so 60 seconds multiplied.
Update rate of this is not fast, but very useful.

Co-authored-by: Hyon Lim <lim@uvify.com>
2020-03-31 17:28:22 -04:00
Silvan Fuhrer
477092fa24 Fw pos control move to local pos: minimal changes to make it compile
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2020-03-31 15:03:23 +03:00
Daniel Agar
59a7262c31 FW use lpos 2020-03-31 15:03:23 +03:00
David Jablonski
d303b73bc3 respected reviewer comments 2020-03-31 09:23:52 +02:00
David Jablonski
12687f7d8f use memcpy instead of strncpy 2020-03-31 09:23:52 +02:00
David Jablonski
a0bf7425ae Implemented multipart status message 2020-03-31 09:23:52 +02:00
mohammad
531efc2d53
mavlink: add ACTUATOR_CONTROL_TARGET1 to stream list
- closes https://github.com/PX4/Firmware/issues/14369
2020-03-30 18:33:34 -04:00
TSC21
1f90a65265 update submodule micro-CDR 2020-03-30 20:02:35 +01:00
David Jablonski
536cd6cb1a allow DO_CONTROL_VIDEO in missions 2020-03-30 17:10:36 +02:00
David Jablonski
6bd191a24e Mavlink: Implemented SET_CAMERA_ZOOM 2020-03-30 17:10:36 +02:00
Matthias Grob
58fd3e2ddc PositionControl: fix horizontal integral anti-windup 2020-03-30 09:58:39 +02:00
Matthias Grob
91057fe024 FlighTasks: remove FlightTaskSport
This mode was just kept as an example after
its usage in a single case. It's basically untested
and doesn't make much sense anymore since it's
incompatible with the jerk limited trajectory
implementations. It's implementation only switched
hte configuration parameter of the velocity resulting
from maximum stick deflection to be
MPC_XY_VEL_MAX instead of MPC_VEL_MANUAL.
This is according to todays understanding undesired
because when hitting that limit the position
controller has no room for corrections anymore.

Also it saves some flash space on omnibus to remove
the task at this point and makes romm for the
acceleration feed-forward.
2020-03-30 09:58:39 +02:00
Matthias Grob
bc2579f3be mc_pos_control_params: lower jerk configuration
because of tighter tracking with acceleration feed-forward.
2020-03-30 09:58:39 +02:00
Matthias Grob
b3d7445059 PositionControl: acceleration based control strategy 2020-03-30 09:58:39 +02:00
Matthias Grob
1d2ac41edc ControlMath: adding limitTilt() helper function
which takes care of limiting the lilt angle of a "body" vector with
respect to a "world" vector. Both vectors have to be unit length!
2020-03-30 09:58:39 +02:00
Matthias Grob
aa53cabaa4 PositionControl: remove confusing uMin uMax alias 2020-03-30 09:58:39 +02:00
Matthias Grob
b8576cccc8 AttitudeControlTest: add scale testing for yaw weight 2020-03-28 17:51:59 +01:00
Matthias Grob
96bbc63eb1 AttitudeControl: let the user set yaw weight directly via parameter
instead of infering the yaw weight from the gains which can lead to
unexpected results depending on the particular vehicle tuning.
2020-03-28 17:51:59 +01:00
baumanta
22ceeccc26 add library for current- or thrust-based mag compensation 2020-03-26 08:00:30 +01:00
Hamish Willee
1288db9314 ekf2_params.c: EKF2_MAG_TYPE: Info about yaw without mag 2020-03-25 09:41:54 +01:00
bresch
1f4b2d1d53 Commander: replace deprecated warnx by PX4_WARN 2020-03-23 13:45:00 +01:00
bresch
c23ef0af4b Flight termination: lockdown if failure is detected on takeoff
During the first few seconds after takeoff, the failure detector is allowed to
trigger motor lockdown.
This is done for safety reasons to detect tipping-over or unstable
tuning gains
2020-03-23 13:45:00 +01:00
bresch
5babf644f0 MPC: limit tilt to maximum safe value of 89 degrees
The algorithm fails at 90 degrees due to tanf being INF
2020-03-23 13:36:23 +01:00
Daniel Agar
b73ec18abb
boards: add px4_fmu-v4 and px4_fmu-v5 optimized (-O3) build variants 2020-03-22 17:50:17 -04:00
bazooka joe
ad2d65df8d return with error from _log_request_list() in case of failed allocation 2020-03-21 16:50:46 +01:00
Nico van Duijn
240aad1aef mavlink_mission: beautify mission download error
This commit makes the IGN REQUEST LIST: Busy message more user-oriented
and actionable.
2020-03-20 12:54:00 +01:00
Nico van Duijn
849d3a1b54 mavlink_mission: robustify against dropped ack
This commit handles incoming MISSION_REQUEST_LIST messages such that
they are no longer ignored if the previously requested mission has
sent all mission items but the ack has never been received.

This was the cause for frequent "IGN REQUEST LIST: Busy" warnings
2020-03-20 12:54:00 +01:00
SalimTerryLi
dc8e775d8f
ADC: replace ioctl with uorb message (#14087) 2020-03-20 11:23:32 +01:00
Beat Küng
40af5b0fbe logger: fix initial subscribing to topics
write_all_add_logged_msg() requires at least some subscriptions to be added
initially, as this message is used to separate ULog header from data.
2020-03-20 11:21:32 +01:00
bresch
0f2f72a757 Ekf2: Add bitmask to select terrain estimator aiding sources 2020-03-19 20:27:39 +03:00
Daniel Agar
e5d30c4413
Mavlink: split ESTIMATOR_STATUS and VIBRATION streams 2020-03-19 11:17:31 -04:00
Matthias Grob
d0349fcf07 mc_pos_control: allow zero thrust during takeoff and landing
Otherwise the takeoff ramp doesn't start with zero thrust and
the land thrust cut cannot cut to zero.
2020-03-18 20:36:05 +01:00
Matthias Grob
5027c68c0a mc_pos_control: handle takeoff and landing thrust limit the same way
The landing thrust limit was after the position controller and
could be inconsistent with what the takeoff limit did. This
resulted in different thrust values sequentially getting applied
during landing.
2020-03-18 20:36:05 +01:00
Matthias Grob
3049a3d14d mc_pos_control: prevent takeoff with thrust setpoint
This was only necessary for stabilized mode before #10805.
The  unit length thrust setpoint will anyways not be available
anymore soon because it gets replaced with the acceleration
setpoint in m/s².
2020-03-18 20:36:05 +01:00
Matthias Grob
1f98ebdb47 mc_pos_control: switch order of setpoint amendment
to make sure the takeoff limitation is always done last.
2020-03-18 20:36:05 +01:00
bresch
a8063ac948 HTE: enable by default 2020-03-18 19:47:30 +01:00
Julian Oes
795e000c2b simulator: remove redundant semicolon 2020-03-18 17:57:41 +00:00
Julian Oes
3233e0794d navigator: fix edge case with valid idle setpoint
This is an attempt to fix an edge case in the triplet publication which
can lead to crashes on autopilots with slow SD cards.

The sequence of events before this patch is:
1. Switch to POSCTL when disarmed. At this point current valid with
   setpoint idle is published.
2. Arm, takeoff, and fly using joystick/RC.
3. Switch to RTL (or trigger RTL using RC loss). At this point the
   setpoint is valid but still idle and the motors will shut off.
4. Once navigator has published the new setpoint (which can take up to
   1.5 seconds on slow SD cards) we will hopefully recover.

With this patch we omit this edge case, so we never publish this idle
setpoint when landed. The assumption is that this idle setpoint is no
longer required with the current flight task code, however, that needs
to be further verified.
2020-03-18 10:50:03 -04:00
CarlOlsson
58ded8d4c0 ekf2: remove unused function declatation 2020-03-18 14:33:11 +01:00
Matthias Grob
fb1b6a0ab9 mc_pos_control: hotfix for takeoff ramp stuck with NAN
Reported by @dusan19 in #13973.
2020-03-17 16:19:35 +01:00
Matthias Grob
eb3b0f6b55 mathlib: get rid of now duplicate sign() function
Instead use the one that was copied to the matrix library in
https://github.com/PX4/Matrix/pull/116/
2020-03-17 10:01:42 +01:00
Matthias Grob
d313b0417a AttitudeControl: Take advantage of Quaternion.canonical()
Introduced by @kamilritz in
https://github.com/PX4/Matrix/pull/116/
2020-03-17 10:01:42 +01:00
Lorenz Meier
9275937b44 Commander: Exclude shell commands for constrained flash
These are convenience commands for developers and are not required for flash constrained targets.
2020-03-17 00:17:11 +01:00
Lorenz Meier
9119f13ff7 Commander: Do not print health flags on constrained flash
Boards with constrained flash are not classic development targets and do not need this.
2020-03-17 00:17:11 +01:00