Matthias Grob
f90d3671c0
vehicle_attitude_setpoint: get rid of unused q_d_valid flag
2020-02-27 09:17:52 +01:00
Matthias Grob
46f76cb621
Commander: enable RC override in takeoff
...
and remaining auto modes which are used more rarely.
2020-02-26 10:22:33 +01:00
Matthias Grob
1d89351149
Commander: clarify the rc override message
...
Message says novice understanable what happened.
2020-02-20 17:25:53 +01:00
Matthias Grob
69af6386b3
mc_pos_control_main: remove obsolete input setpoint assignments
...
These assignments were temporary for correct logging of the input
setpoint which now properly also comes out of the controller again.
This is reverting the hotfix from:
dee8d200d8
2020-01-30 07:28:18 -05:00
Matthias Grob
b75c1308f9
PositionControl: replace interfacemapping checks
...
Removing the skip_controller and interfaceMapping
concept and replacing it with a single method checking
if the position control update was successful and
return the result in the PositionControl.update().
2020-01-30 07:28:18 -05:00
Matthias Grob
e06fff94bb
PositionControl: handle yaw NAN inputs
2020-01-30 07:28:18 -05:00
Matthias Grob
dcc0339773
PositionControl: calculate velocity integral once using Vector3f
2020-01-30 07:28:18 -05:00
Matthias Grob
9109d22c28
PositionControl: simplify horizontal thrust limiting
2020-01-30 07:28:18 -05:00
Matthias Grob
83653d6581
PositionControl: readd direct thrust setpoint support
...
This restores original horizontal thrust setpoint execution
that I intentionally broke three commits ago. It's necessary
for correct stick to tilt mapping of FlightTaskManualAltitude.
2020-01-30 07:28:18 -05:00
Matthias Grob
282d46efcb
PositionControl: add feed-forwards with addIfNotNan()
2020-01-30 07:28:18 -05:00
Matthias Grob
62fb06bd58
PositionControl: calculate velocity PID once using Vector3f
2020-01-30 07:28:18 -05:00
Matthias Grob
5bd8da2286
PositionControl: temporarily remove direct thrust setpoint support
...
This commit temporarily breaks direct horizontal thrust setpoint execution
which is used by FlightTaskManualAltitude. This is necessary to allow for
PositionControl cleanup namely calculating the whole velocity PID in one
Vector3f formula.
Having this in a separate commit is useful since it reduces indentation
of a bigger code block.
2020-01-30 07:28:18 -05:00
Matthias Grob
e53ae45188
ControlMath: add addIfNotNan helper functions
2020-01-30 07:28:18 -05:00
Matthias Grob
1e06f6bbd2
mc_pos_control: fix derivative spike when regaining velocity estimate
...
When having no velocity estimate the derivative was updated with zero.
When losing the velocity estimate this is fine since the resulting
derivative spike doesn't get used and acceleration is set to NAN.
But when regaining the velocity estimate the spike from zero to
the first estimated velocity gets used as acceleration in the position
controller and results in a twitch.
To solve this I use the derivative reset I introduced in pr #13522
commit b64abf48b2
2020-01-18 10:57:12 +01:00
Matthias Grob
a6cc972b5c
mc_pos_control: do not use invalid vz estimate
2020-01-18 10:57:12 +01:00
Matthias Grob
4d83170746
mc_pos_control: do not ignore EKF vz with terrain following
...
This caused bad altitude control performance when enabling
terrain following. It even leads to complete vertical control
instability in case dist_bottom is inaccurate.
Relying on the estimator states is the way to go instead of
silently using one altitude source as state.
2020-01-18 10:57:12 +01:00
Matthias Grob
322e773250
appveyor: switch to toolchain version 0.8
...
which has the python package pyros-genmsg
installed.
2020-01-13 21:48:35 +00:00
Matthias Grob
98a3910b06
mavlink battery_status: report actual cell voltages
2020-01-13 21:29:40 +01:00
Matthias Grob
6184f4691a
commander_params: remove duplicate rc override title
...
I merged the duplicate title because the pr was from
a private fork branch and already delayed.
2020-01-09 18:39:04 +01:00
Matthias Grob
1484dfed6a
FlightTasks: remove deprecated AutoLine mission task
2020-01-06 15:39:07 +01:00
Matthias Grob
ffff35a597
Unit tests: use EXPECT_FLOAT_EQ for float comparisons
...
as precaution to prevent failing tests because of small potential
rounding errors on certain platforms or compilares.
2019-12-26 12:53:07 +01:00
Matthias Grob
ee62d0296f
ControlMathTest: consistent short float literal notation
2019-12-26 12:53:07 +01:00
Matthias Grob
ad148fdfad
ControlMathTest: switch back to direct EXPECT_EQ calls for Vectors
...
Since the google test calls matrix::operator==()
which calls matrix::isEqual().
2019-12-26 12:53:07 +01:00
Matthias Grob
de95e3d274
commander: remove manual mode before geofence handling
2019-12-23 12:18:27 -05:00
Matthias Grob
a46add9a93
PositionControl: isolate skip controller, leave away unnecessary include
2019-12-18 15:57:48 +01:00
Matthias Grob
8441bdb9b5
PositionControl: remove complicated internal control flags
2019-12-18 15:57:48 +01:00
Matthias Grob
83e51ad192
PositionControl: remove speed_xy constraint since it's anyways unused
2019-12-18 15:57:48 +01:00
Matthias Grob
a4a9d50a97
ControlMath: refactor thrustToAttitude calculation
2019-12-18 15:57:48 +01:00
Matthias Grob
1a5b06d0cf
FlightTasks: refactor NAN initializations, spacing
2019-12-18 15:57:48 +01:00
Matthias Grob
ab4473319a
Takeoff: add proper unit test
2019-12-18 15:57:48 +01:00
Matthias Grob
42dbddb156
mc_pos_control: adopt to module internal include convention
2019-12-18 15:57:48 +01:00
Matthias Grob
2303071df4
PositionControl: simplify constraint conditions
2019-12-18 15:57:48 +01:00
Matthias Grob
121d743049
PositionControl: clear setter interface naming, order, description
2019-12-18 15:57:48 +01:00
Matthias Grob
a3d30fc970
mc_pos_control/FlightTask: apply nit-pick review findings
2019-12-11 14:03:16 +01:00
Matthias Grob
904ab16558
Fix trailing whitespace, EOF newline, indentation
2019-12-09 13:22:19 +01:00
Matthias Grob
633469dd8c
FixedWingPositionControl: ommit */ with ///< doxygen comments
2019-11-28 11:21:05 -05:00
Matthias Grob
4a28c8180b
FlightTaskManualAltitude: yawspeed filter remove line with no effect, comments
...
FlightTaskManualAltitude: declaration order
Addressing @bkueng's review comments.
2019-11-25 11:55:47 +01:00
Matthias Grob
28755d5bbf
att_control: remove resetting the attitude setpoint
...
since the position controller publishes them again already when disarmed.
2019-11-24 11:06:03 -05:00
Matthias Grob
d3bd251ffc
mc_pos_control: start flight task already when disarmed
...
such that the controller always publishes attitude setpoints and there are no initialization issues.
2019-11-24 11:06:03 -05:00
Matthias Grob
6589aa5f71
posix rcS: remove overwriting default altitude
2019-11-22 13:36:05 -05:00
Matthias Grob
ccb21e3c4b
navigator: remove double member initialization
2019-11-22 13:36:05 -05:00
Matthias Grob
06f667a8b3
vtol_att_control: convert angle in one line
2019-11-22 13:36:05 -05:00
Matthias Grob
9f545ae3cf
navigator: convert to radians in configuration getter
2019-11-22 13:36:05 -05:00
Matthias Grob
dee8d200d8
mc_pos_control: fix position setpoints being logged as zero when NAN ( #13557 )
...
This issue was found by @khabir and reported over slack.
It resulted from the split up of the big pr #12072 into #13262 .
I took over the interface while the internal states still stayed the
hard to understand internal ones. One of the follow up refactors will
fix this completely and the entire legacy setpoint restore block can
be removed.
2019-11-21 16:03:13 -05:00
Matthias Grob
b63044393e
PositionControl: remove unwanted debug printfs
2019-11-21 00:52:09 +01:00
Matthias Grob
1bef35d843
PositionControl: correct float initialization literals
...
according to @bresch's review
2019-11-20 11:42:09 +01:00
Matthias Grob
bd491c8511
PositionControl: add unit tests for directions and limits
2019-11-20 11:42:09 +01:00
Matthias Grob
25a445d5f8
PositionControl: remove parameter dependency
...
to make the class easier to understand,
more modular and easily unit testable
2019-11-20 11:42:09 +01:00
Matthias Grob
b64abf48b2
mc_pos_control: reset velocity derivatives
2019-11-19 22:18:01 +01:00
Matthias Grob
675af4f5f9
uavcan_kinetis: fix flexcan code style
...
* flexcan: fix code style
* flexcan: exclude from style check to avoid that a different version of astyle breaks indentation again
2019-11-12 20:50:54 -05:00
Matthias Grob
1a79f75f94
Commander: start pulling arming related parts into separate folder
...
* PreFlightCheck: remove unused reportFailures flag
* Commander: pull all pre flight checks together on the PreFlightCheck class
* PreFlightCheck: separate checks into their own files
2019-11-05 11:25:59 -05:00
Matthias Grob
b6de83117e
PositionControl: fix attitude setpoint timestamp
...
The plot of the attitude setpoint in the log did not show any values
because the message timestamp that the position control module sets
was overwritten by the PositionControl attitude generation.
2019-11-05 13:05:16 +01:00
Matthias Grob
c6cc9f0902
mc_pos_control: fix cutting thrust when landed
...
by applying it directly to the attitude setpoint which is the output of
the position controller.
The problem was that before the input to the attitude setpoint generation
was adjusted to generate a level attitude with zero thrust keeping the
heading. I refactored the PositionControl class in #13262 to directly
generate the attitude setpoint output. So here I'm adjusting the attitude
setpoint to do the exact same thing as before but without interleaving
with the PositionControl logic.
2019-11-05 13:05:16 +01:00
Matthias Grob
2416d0fc63
mc_pos_control: remove unused function declarations
2019-11-04 15:07:06 -05:00
Matthias Grob
cc06009932
pre-commit: fix indentation style
2019-11-02 09:49:46 -04:00
Matthias Grob
5c0692e59e
pre-commit: add error messages for style issues
2019-11-02 09:49:46 -04:00
Matthias Grob
933ff8d480
Remove duplicate EOF trailing newlines
...
because they can screw up git when merging branches.
2019-11-02 09:49:46 -04:00
Matthias Grob
be545db44f
mc_pos_control: reuse timestamp to reduce hrt calls
2019-10-26 06:11:18 +02:00
Matthias Grob
d0084766ff
PositionControl: make getters const functions
2019-10-26 06:11:18 +02:00
Matthias Grob
f70d4d21a1
PositionControl: add getter for output attitude setpoint
2019-10-26 06:11:18 +02:00
Matthias Grob
198605d258
PositionControl: add getter for output position setpoint
2019-10-26 06:11:18 +02:00
Matthias Grob
40edd33078
mc_pos_control: reduce scope of attitude setpoint
...
No need for a gloabl state since it gets produced freshly
by the controller and then published.
2019-10-24 14:58:57 +02:00
Matthias Grob
79334958a9
WeatherVane: only update with last row of rotation matrix
2019-10-24 14:58:57 +02:00
Matthias Grob
9c25b987bc
vehicle_local_position_setpoint: make acceleration and jerk arrays
2019-10-24 14:58:57 +02:00
Matthias Grob
f317d227ef
arch.sh: get rid of ignition-cmake workaround
...
The AUR repository got fixed upstream after
I reported the issue. I tested on a fresh machine
so we can get rid of the workaround that was necessary. See
https://aur.archlinux.org/packages/ignition-cmake/#comment-712301
2019-10-24 08:50:18 +02:00
Matthias Grob
38651ceee1
mc_pos_control: address @bresch's review comments
2019-10-23 17:33:47 +02:00
Matthias Grob
d60e1e2774
ControlMath: switch to gtest for unit tessting
2019-10-23 17:33:47 +02:00
Matthias Grob
ad60f6d786
PositionControl: make it self contained library
2019-10-23 17:33:47 +02:00
Matthias Grob
08ec6a28f0
mc_att_control: remove TPA
...
because it's mostly unused and we have thrust curve correction
see parameter THR_MDL_FAC
2019-10-18 15:54:09 -04:00
Matthias Grob
22c4bb498c
FlightTaskDescend: set no vertical thrust when commanding velocity
2019-10-18 16:18:19 +02:00
Matthias Grob
5f53ae1253
mc_pos_control: execute failsafe with invalid setpoints
2019-10-18 16:18:19 +02:00
Matthias Grob
cefa7ec5dc
arch.sh: use nproc instead of grepping /proc/cpuinfo
2019-10-17 12:48:04 -04:00
Matthias Grob
a053b7f69b
vtol_att_control_main: only reset thrust when disarmed
...
to see flaps moving according to attitude control before arming
and not have tailsitter elevons move to follow north heading.
2019-10-16 16:30:38 +02:00
Matthias Grob
45a53726d6
LandDetector: switch to uORB::Publication
2019-10-16 00:47:01 -04:00
Matthias Grob
679e4fedf5
LandDetector: switch land flags to properies instead of one state
2019-10-16 00:47:01 -04:00
Matthias Grob
e843090383
Replace a lot of memset with {} initializers
2019-10-15 10:01:03 -04:00
Matthias Grob
b8f70e865c
voted_senors_update: remove memset 0 initializations because of zero initializer in header
2019-10-15 10:01:03 -04:00
Matthias Grob
185e2811dc
gyro_calibration: use constexpr instead of const
2019-10-15 10:01:03 -04:00
Matthias Grob
09faa4647b
ekf2_params: correct typo
2019-10-15 10:01:03 -04:00
Matthias Grob
9f639d1f3b
mc_att_control: move rate control to RateControl class
...
This makes the controller more modular, more readable and hence
better maintainable.
2019-10-15 07:46:47 +02:00
Matthias Grob
bb91db2057
AttitudeControlTest: fix adaptAntipodal() function
2019-10-14 18:23:22 +02:00
Matthias Grob
83dfa227a7
AttitudeControlTest: include all corner case combinations
...
Which revealed antipodal quaternion corner cases when
the first element is zero.
2019-10-14 18:23:22 +02:00
Matthias Grob
511828bfd2
AttitudeControlTest: add first controller convergence test
2019-10-14 18:23:22 +02:00
Matthias Grob
7e2fb6b4da
arch.sh: switch permissions of pip install (again)
...
after testing the right solution on a fresh installation
2019-10-14 10:54:09 -04:00
Matthias Grob
001da78089
mc_pos_control: improve failsafe handling
...
See issue #12307
Since commander should still handle all failsafes we should only run
into this case as last resort to not crash.
If all failsafe actions are disabled but data is missing
e.g. RC loss action disabled but flying in manual and no RC
this can be tested.
2019-10-14 15:07:09 +02:00
Matthias Grob
068f56d66f
FlightTasks: fix switchTask() comment typo
2019-10-14 15:07:09 +02:00
Matthias Grob
093d3b76d9
PULL_REQUEST_TEMPLATE: change order of titles ( #13174 )
2019-10-14 13:11:44 +02:00
Matthias Grob
c09ea2a9b0
arch.sh: don't execute pip as root
...
otherwise packages get installed in
/root/.local/lib/python3.7/site-packages
2019-10-12 08:38:39 +02:00
Matthias Grob
50c5150471
arch.sh: work around gazebo AUR build error and correct comments
2019-10-12 08:38:39 +02:00
Matthias Grob
bba464d722
arch.sh: enable multicore gazebo compilation
2019-10-12 08:38:39 +02:00
Matthias Grob
7dd1be65ca
arch.sh: add gazebo installation
2019-10-12 08:38:39 +02:00
Matthias Grob
7f63ed8202
Arch setup script ( #13111 )
...
* ubuntu.sh: fix space and capitalization
* Add setup script for Arch Linux
* arch.sh: remove numerous confirmations, added some base packages
* setup scripts: adjust messages according to review
2019-10-10 08:59:11 +02:00
Matthias Grob
ca711fecc7
Commander: improve message for RC override event
2019-10-09 15:34:46 +02:00
Matthias Grob
c1faea8d32
Commander: add const qualifiers for clarity
2019-10-09 08:03:07 +02:00
Matthias Grob
63f2c009c7
PreflightCheck: refactor failureDetectorCheck return value
2019-10-09 08:03:07 +02:00
Matthias Grob
8e0ee88e0a
PreflightCheck: add const qualifiers to parameters
...
to help readability
2019-10-09 08:03:07 +02:00
Matthias Grob
c570dc9315
PreflightCheck: remove goto from imu consistency check
2019-10-09 08:03:07 +02:00
Matthias Grob
05446c0875
ubuntu.sh: correct output during ccache installation ( #13106 )
2019-10-07 09:14:00 +02:00
Matthias Grob
c8f3f07ff7
matrix: pull explicit constructors
2019-10-05 11:46:07 -04:00
Matthias Grob
bc8781d130
Appveyor: update to Windows Toolchain v0.6 ( #13016 )
2019-09-25 10:43:04 +02:00