Matthias Grob
02c0f08060
flashfs: fix alignment ambiguity
...
Instead of ignoring the warnings.
Thanks to @Ole2mail and @yuhaim for the suggestions.
2021-01-18 14:19:29 +01:00
Matthias Grob
031bbb7f3e
FlightModeManager: handle commands all the time
...
Moving the command handling to a separate function that gets called
whenever a vehicle command is available to always react on commands
and not just when already a task is running.
This solves e.g. commanding an Orbit when in Staibilized.
2021-01-17 15:46:30 +01:00
Matthias Grob
df54f938ef
FlightModeManager: correct setpoint struct initialization
...
It is important that setpoints get initialized with NAN and not overwritten
if specifically set by a successful flight task execution. It's then
clear if any setpoints were intentionally and successfully set.
Crucial for the position controller's emergency failsafe and the
seamless setpoint handover to the next flight task.
2021-01-17 15:46:30 +01:00
Matthias Grob
63db61a700
FlightModeManager: correct acceleration setpoint feedback naming
...
The variable was never renamed correctly in this in between layer when
we switched from normalized thrust to acceleration setpoints.
2021-01-17 15:46:30 +01:00
Matthias Grob
8a7878f65c
arch.sh: update zsh support, latest ARM GCC, gazebo AUR
2021-01-17 10:58:39 +01:00
Matthias Grob
3cc8e7a210
commander_params: Make multicopter only COM_RC_OVERRIDE more visible
2021-01-10 21:12:09 +01:00
Matthias Grob
2fc212e064
geofence_params: clarify EKF vs baro altitude source
2021-01-10 18:40:58 +01:00
Matthias Grob
537ee5b19b
FlightTaskOrbit: smooth yaw like in missions
2021-01-07 13:31:05 +01:00
Matthias Grob
44606ca872
FlightTaskOrbit: further simplify circling yaw setpoint calculation
...
The whole angle adding and pi wrap was just necessary because the
correct atan2 arguments were never completely thought through.
2021-01-07 13:31:05 +01:00
Matthias Grob
f435bea57c
state_machine_helper: orbit failsafe just with data link loss
...
RC is like the comment says not required.
2021-01-07 13:31:05 +01:00
Matthias Grob
6b8fa417e1
SlewRate: Add SlewRateYaw handling [-pi,pi] wraps
2021-01-07 13:31:05 +01:00
Matthias Grob
e92795b474
Temporary logging addition to debug CI
2020-12-30 10:25:08 -05:00
Matthias Grob
fafbb687d8
FlightModeManager: fix integral reset on ground
...
This information could also be used for yaw and integral
resets of the lower level controllers.
2020-12-30 10:25:08 -05:00
Matthias Grob
7de288877a
MulticoperPositionControl: 3rd pass get rid of zombie members
2020-12-30 10:25:08 -05:00
Matthias Grob
62ada2e2dc
FlightModeManager: restore weathervane calls
...
I had to do an extra subscription to the vehicle attitude.
I don't know how to test this.
2020-12-30 10:25:08 -05:00
Matthias Grob
aa888223f0
FlightModeManager: fix takeoff state in stabilized mode
2020-12-30 10:25:08 -05:00
Matthias Grob
8edb06e94f
FlightModeManager: make sure emergency failsafe works
2020-12-30 10:25:08 -05:00
Matthias Grob
8329208b84
FlightModeManager: fix takeoff ramp from zero
2020-12-30 10:25:08 -05:00
Matthias Grob
88c274b3cd
MulticopterPositionControl: 2nd pass to move to FlightModeManager
2020-12-30 10:25:08 -05:00
Matthias Grob
f52bad87e2
mc_pos_control: separate out flight_tasks (into FlightModeManager)
2020-12-30 10:25:08 -05:00
Matthias Grob
7545249215
Add flight_mode_manager to all targets with mc_pos_control
2020-12-30 10:25:08 -05:00
Matthias Grob
fa7170bc4f
Add FlightModeManager
...
to separate out setpoint generation from controllers
2020-12-30 10:25:08 -05:00
Matthias Grob
25c113a527
StickAccelerationXY: boost low speed brake
2020-12-03 18:19:42 +01:00
Matthias Grob
badaf1eae0
Functions: add squareroot linear function
2020-12-03 18:19:42 +01:00
Matthias Grob
3f3a82e034
FlightTaskManualAcceleration: reset position lock on reactivation
...
to prevent having a fixed position lock while moving the vehicle
on the ground before flying.
2020-12-03 18:19:42 +01:00
Matthias Grob
66f8fc08c0
FlightTasks: refactor to use isAnyTaskActive()
2020-12-03 18:19:42 +01:00
Matthias Grob
de66616341
MulticopterPositionControl: don't switch out of Orbit task
...
when it got started via vehicle_command
2020-12-01 10:00:46 -05:00
Matthias Grob
8f40558f41
MulticopterPositionControl: reset task when switching mode
...
to make sure the state is clean between auto mode switches.
2020-12-01 10:00:46 -05:00
Matthias Grob
ce8f4dece2
rc_update_params: clarify failsafe channel and threshold
2020-11-26 10:55:35 +01:00
Matthias Grob
65e1b702c9
GPS_GLOBAL_ORIGIN: simplify send logic
2020-11-19 19:00:37 +01:00
Matthias Grob
0ca63120eb
mavlink_messages: add GPS_GLOBAL_ORIGIN
...
sending out local position reference.
Only send as anser to a request message command or
when the origin was changed from externally to verify.
2020-11-19 19:00:37 +01:00
Matthias Grob
41b56f20b8
mavlink_messages: fix raw rpm message size
2020-11-19 19:00:37 +01:00
Matthias Grob
c845265b1b
mavlink_receiver: use SET_GPS_GLOBAL_ORIGIN to set the origin
...
The message GPS_GLOBAL_ORIGIN is meant as a telemtry information message
to send out the components reference and not to set it. I had to switch
to listen to SET_GPS_GLOBAL_ORIGIN such that I can implement sending out
GPS_GLOBAL_ORIGIN.
2020-11-19 19:00:37 +01:00
Matthias Grob
fabeb22ae4
mavlink_receiver: remove unused decode_switch_pos function
2020-11-17 19:48:01 -05:00
Matthias Grob
ff801fbc08
FlightTasks: remove FlightTaskManualPositionSmooth
...
alias first smooth position control version from 2017.
RIP it served well.
2020-11-11 21:16:18 +01:00
Matthias Grob
e6338d8a2f
MulticopterPositionControl: default cases with unsupported POS_MODE
2020-11-11 21:16:18 +01:00
Matthias Grob
0b8f092d2b
Add acceleration stick mapping for position mode
2020-11-11 21:16:18 +01:00
Matthias Grob
8e710294b3
FlightTaskManualAltitudeSmoothVel: fix parameter inheritance chain
2020-10-26 15:55:21 +01:00
Matthias Grob
7ba93d5452
FlightTasks: fix reActivate not calling the parent overrided method
2020-10-26 15:55:21 +01:00
Matthias Grob
1fb4f960cd
FlightTaskAuto: Lock down yaw when waypoint is reached
...
This is done to prevent yawing 180 degrees when switching
to hold mode with high velocity and the overshoot causing a 180°
yaw turn.
The yaw is unlocked on waypoint updates and the yaw
setpoint generation had to be put at the end because otherwise the
first yaw calculation is with the old waypoint and immediately
locks again.
2020-10-23 20:54:01 +02:00
Matthias Grob
4378254182
Fix NuttX build under Cygwin
...
after NuttX 9.1.0+ upgrade #15139
2020-10-23 06:56:31 -07:00
Matthias Grob
bcbc761bf6
Revert "Change defaults for MPC_LAND_ALT"
...
This reverts commit 59bd3e9f6e .
2020-09-24 19:18:58 +02:00
Matthias Grob
5d47a4c9e0
Commander: fix rc override threshold scaling ( #15807 )
...
Improve parameter description for threshold
and lower the threshold a bit.
2020-09-24 14:52:19 +02:00
Matthias Grob
bf248746ce
mavlink_messages: cast rotation types for assert
2020-09-23 09:08:23 -04:00
Matthias Grob
c6e2722b8f
param: remove reset_nostart
...
Since we have reset_excludes and SYS_AUTOSTART and SYS_AUTOCONFIG
can be excluded like every other parameter.
2020-09-08 12:03:41 +02:00
Matthias Grob
ce9954a919
param: enable reseting specific parameters from shell
...
Renaming previous "param reset" to "param reset_all".
2020-09-08 12:03:41 +02:00
Matthias Grob
f70dda12a6
failureDetectorCheck: remove string manipulation
2020-09-08 11:42:30 +02:00
Matthias Grob
5eba25d2b5
Commander: remove duplicate flag changes
2020-09-08 11:42:30 +02:00
Matthias Grob
ab17b6bad4
failureDetectorCheck: revise messageing
2020-09-08 11:42:30 +02:00
Matthias Grob
981e05c633
FailureDetector: move esc topic check into esc status update
2020-09-08 11:42:30 +02:00
Matthias Grob
c180e09b9a
FailureDetector: replace resetAttitudeStatus
2020-09-08 11:42:30 +02:00
Matthias Grob
390edb770d
Commander: separate failure detector cases
...
One case could lead to the action for the other!
2020-09-08 11:42:30 +02:00
Matthias Grob
f47bb95b26
FailureDetector: remove obsolete bit switch checks
2020-09-08 11:42:30 +02:00
Matthias Grob
c9b81eaf08
FailureDetector: simplify updated/changed check
2020-09-08 11:42:30 +02:00
Matthias Grob
2bb5917188
FailureDetector: refactor naming, member order
2020-09-08 11:42:30 +02:00
Matthias Grob
25cdb383c6
Commander: simplify main failure detector condition
2020-09-08 11:42:30 +02:00
Matthias Grob
1d562aaf4a
battery: switch to PublicationMulti for battery_status
2020-09-01 10:25:03 +02:00
Matthias Grob
d06425d131
analog_battery: fix missing stdio include
...
This was not a problem before because battery.h
included the adc driver and implicitly snprintf
was defined through there.
2020-09-01 10:25:03 +02:00
Matthias Grob
5bc1df60a2
commander_params: remove some double spaces
2020-09-01 10:25:03 +02:00
Matthias Grob
180c6faf4a
syslink_main: remove empty lines and struct keyword
2020-09-01 10:25:03 +02:00
Matthias Grob
d82f325f8d
ina226/voxlpm: make sure parameter sub is reset
...
The subscription to parameter updates has to get
copied otherwise the change detection will not get
reset for next time.
2020-09-01 10:25:03 +02:00
Matthias Grob
9c4e26c00c
battery: fix parameter migration and clarify
2020-09-01 10:25:03 +02:00
Matthias Grob
0db4881413
BatterySimulator: remove SimulatorBattery
...
It loads the battery parameters but then overwrites them
with hardcoded values and it breaks the ModuleParams
parent/child hierarchy. Both is undesired.
2020-09-01 10:25:03 +02:00
Matthias Grob
16776ff6fb
MultirotorMixer: hotfix [-1,1] scaling
...
After it was mistakenly rescaled in
26bac78eaf274cf58aacbc239cc8f2e865ba864c#diff-899d35a48340c6065702d4fa77b70f0d
#15563
2020-08-26 20:52:16 -04:00
Matthias Grob
d4296dbd3f
thoneflow: remove unsupported parameter from getopt optsting
2020-08-26 20:25:31 -04:00
Matthias Grob
a6777e2650
Subscription: correct doxygen comment
2020-07-30 09:56:01 -04:00
Matthias Grob
400d97e60c
math: add unit tests for everything in Functions.hpp
2020-07-24 11:31:15 +02:00
Matthias Grob
0b391fdcfc
mc_att_control: add gradual3 function to cover hover thrust rescaling
2020-07-24 11:31:15 +02:00
Matthias Grob
5c5005fa58
ROMFS: remove remaining RC_FLT_CUTOFF
...
The parameter was removed in #14896 and I forgot to remove it from
all the configurations.
2020-07-21 11:28:18 -04:00
Matthias Grob
aad7e88af2
setup scripts: install dmidecode before using it
...
On normal desktop distributions dmidecode is preinstalled
and I was assuming it's part of the core tools. Thanks to a hint
https://github.com/PX4/Firmware/pull/15241#issuecomment-659395458
I found out it's not and am installing the package before using it.
2020-07-21 10:22:52 -04:00
Matthias Grob
9ba2539e60
FlightTaskOrbit: reset approach if radius gets changed
2020-07-21 10:27:05 +02:00
Matthias Grob
e9498064ef
StraightLine: allow resetting reached flag
2020-07-21 10:27:05 +02:00
Matthias Grob
5823101f07
FlightTaskOrbit: reset reached when new parameters are set
...
such that they get applied to the straight line trajectory class
and the drone starts approaching the new orbit.
2020-07-21 10:27:05 +02:00
Matthias Grob
8e4509c0a9
FlightTaskOrbit: simplify tangential yaw_setpoint and pi wrap
2020-07-21 09:44:21 +02:00
Matthias Grob
4d0aadbcd0
FlightTaskOrbit: set initial heading for every new command
2020-07-21 09:44:21 +02:00
Matthias Grob
abf6f4fa0a
FlightTaskOrbit: move start_to_circle to more local scope & const reference parameters
2020-07-21 09:44:21 +02:00
Matthias Grob
b8b46f8493
FlightTaskOrbit: use yaw setpoint from Altitude task with RC yaw mode
2020-07-21 09:44:21 +02:00
Matthias Grob
1b7349339e
FlightTaskOrbit: move line break causing comments before
2020-07-21 09:44:21 +02:00
Matthias Grob
ed7732eaec
rc_loss_alarm: remove unimplemented declaration
2020-07-20 09:36:47 -04:00
Matthias Grob
987826f1d4
mixer_module/tap_esc: fix usage of constrain() on input
...
I changed the input constraint in #15349 but screwed up the usage
because I was convinced it's püass by reference. I'll double check
for sure next time.
2020-07-20 09:23:42 +02:00
Matthias Grob
413cf8b7c4
FlightTasks: Sticks methods naming refactor according to comments
2020-07-16 19:01:22 +02:00
Matthias Grob
0d56035a46
FlightTaskAutoMapper: clarify influence of sticks
2020-07-16 19:01:22 +02:00
Matthias Grob
079c5a11c2
FlightTaskAuto: allow rc assist to stop descend
...
Before the autohority was only enough to slow down the descend but not
stop to zero vertical velocity.
2020-07-16 19:01:22 +02:00
Matthias Grob
91c0f19121
FlightTaskAuto: use new Sticks class for assisted land speed
2020-07-16 19:01:22 +02:00
Matthias Grob
4366898f11
FlightTasks: make gear switch independent of sticks
2020-07-16 19:01:22 +02:00
Matthias Grob
4667693f37
mixer_module: use math:constrain
2020-07-16 16:55:33 +02:00
Matthias Grob
1e56eed2aa
Remove FlightTaskManual from the inheritance structure
2020-07-14 18:07:09 +02:00
Matthias Grob
9daff24e79
FlightTasks: move stick handling into library
2020-07-14 18:07:09 +02:00
Matthias Grob
ced91f135b
posix rcS: remove various SITL custom settings
...
because we need to have SITL simulation as realistic as possible
compared to a real flight with default settings such that we
either fix the problems or adjust the defaults already in SITL testing.
2020-07-14 09:58:46 -04:00
Matthias Grob
624d8a58e9
FlightTaskOrbit: correct acceleration feed-forward
...
The acceleration setpoint gets implicitly inherited from the altitude
flight task since #14212 . This feed-forward adds an unwanted
acceleration when the right stick is deflected. Instead I'm using it
to command the expected centripetal acceleration when flying
in a circle for better orbit tracking.
2020-07-14 09:02:38 +02:00
Matthias Grob
40883a06cf
Commader: save 53 unnecessary characters of output string
2020-07-13 10:34:17 -04:00
Matthias Grob
480cd5ed4e
mavsdk_tests: load all os environment variables for gazebo client
...
such that OpenGL options are also used for mavsdk_tests when the GUI
is enabled.
2020-07-09 16:43:34 +02:00
Matthias Grob
03735f12a2
FlightTask: correct activate() doxygen comment
2020-07-04 12:29:10 +02:00
Matthias Grob
547bd4c667
ubuntu.sh: add fix for gazebo's OpenGL problem in VMs
...
That makes gazebo crash in VMWare 3D graphics accelration.
2020-06-29 19:21:56 -04:00
Matthias Grob
9fed9f534e
ubuntu.sh: style, 20.04 comment and message wording
2020-06-29 19:21:56 -04:00
Matthias Grob
c9b82ad184
ubuntu.sh: source .profile before checking for ARM GCC
...
to avoid downloading and installing ARM GCC again if the script is
reran immediately after e.g. because it failed the first time.
2020-06-29 19:21:56 -04:00
Matthias Grob
c8d7027546
ubuntu.sh: don't upgrade pip outside of system package manager
...
This can lead to inconsistency with the installed package.
E.g. also if the package is remove the upgraded pip stays
but the symbolic links are gone.
2020-06-29 19:21:56 -04:00
Matthias Grob
47de2419a3
setup: don't require exact matplotlib version
...
Because this older version fails to install on Ubuntu 20.04
and makes the entire setup script fail.
2020-06-29 19:21:56 -04:00
Matthias Grob
e9eae1bd76
Refactor: Name manual_control_setpoint the same way everywhere
2020-06-22 12:06:27 -04:00
Matthias Grob
588d551098
mc_pos_control_params: set the ground slow down speed to the default maximum speed
...
This results in no change with defaults but a slow down to 10m/s if the maxiumum speed is set higher than that.
2020-06-17 11:47:41 -04:00