Dennis Mannhart
260284571d
mc_pos_control: move failsafe logic into method
2018-07-20 09:26:18 +02:00
Dennis Mannhart
ac2c49218d
mc_pos_control: remove mavlink_log_info
2018-07-20 09:26:18 +02:00
Dennis Mannhart
f11a65a74f
mc_pos_control: fix overwrite for state velocity
2018-07-20 09:26:18 +02:00
Dennis Mannhart
f2d559a4c2
mc_pos_control: minor refactor
2018-07-20 09:26:18 +02:00
Dennis Mannhart
b5731e0ccd
FlightTaskOffboard: only start task if control mode flags are met
2018-07-20 09:26:18 +02:00
Dennis Mannhart
bf4ac7a9d6
mc_pos_control: for terrain following use range sensor climbrate for velocity estimate
2018-07-20 09:26:18 +02:00
Dennis Mannhart
e51e1bbe74
mc_pos_control: replace legacy refactor
...
Until now we replaced legacy position controller functionality inside
the flight task architecture to split up the huge position control
module into the different tasks and have a modular setup with a clear
setpoint interface. This commit removes all the legacy code and hard
switches to using the flight task architecture for multicopter.
This is done because maintaining and testing everything in parallel is
not sustainable. The architecture is by now tested to cover all basic
legacy functionality and missing corner cases can be fixed a lot easier
with the new architecture.
2018-07-20 09:26:18 +02:00
Martina
064a6dd2fd
mc_pos_control: fix rebase mistake
2018-07-12 16:36:11 -04:00
Martina
d6ea735b18
make format
2018-07-12 16:36:11 -04:00
Martina
492e40a139
mc_pos_control: enable obstacle avoidance only in mission and rtl
2018-07-12 16:36:11 -04:00
Martina
da2df5708b
mc_pos_control: refactor to use vehicle_trajectory_waypoint
2018-07-12 16:36:11 -04:00
Martina
33b1b13432
mc_pos_control: replace define with parameter to enable/disable obstacle
...
avoidance
2018-07-12 16:36:11 -04:00
Martina
1144b66a70
mc_pos_control: temporary solution to enable and disable the execution of
...
obstacle avoidance waypoints
2018-07-12 16:36:11 -04:00
Martina
c5d62b5524
mc_pos_control: use local frame position setpoint from triplets calculated
...
in the pos_control and not coming from navigator. Refactor method
update_avoidance_waypoint_desired since all waypoints have the same type
2018-07-12 16:36:11 -04:00
Martina
26ca09f824
mc_pos_control: fix typo
2018-07-12 16:36:11 -04:00
Martina
59c7fc5d96
mc_pos_control: use one method to wrap yaw speed instead of triplicate
...
code
2018-07-12 16:36:11 -04:00
Martina
8b20c66cfc
mc_pos_control: use desired velocity to calculate vel_sp_along_track_prev
...
if obstacle avoidance is running
2018-07-12 16:36:11 -04:00
Martina
d39b969e72
mc_pos_control: refactor the update of the desired waypoints for avoidance
...
to eliminate duplicated code
2018-07-12 16:36:11 -04:00
Martina
9bdc9aada2
mc_pos_control: use defines for point size and number of points in
...
trajectory_waypoint
2018-07-12 16:36:11 -04:00
Martina
a11c6235fe
mc_pos_control: uses consistent naming for desired waypoints
2018-07-12 16:36:11 -04:00
Martina
272d7ca4cd
mc_pos_control: use consistent naming for position waypoints
2018-07-12 16:36:11 -04:00
Martina
3fa094cb6b
mc_pos_control: use same notation for velocity waypoints
2018-07-12 16:36:11 -04:00
Martina
31d675fd95
mc_pos_control: add interface to send desired position and velocity
...
waypoint to the obstacle avoidance module
2018-07-12 16:36:11 -04:00
Martina
b33a708215
mc_pos_control: add vel_sp_desired to send desired velocity to the
...
obstacle avoidance
2018-07-12 16:36:11 -04:00
Martina
47f2db67b6
mc_pos_control: execute yaw or yaw speed of the obstacle avoidance
...
waypoint
2018-07-12 16:36:11 -04:00
Martina
df19610e69
mc_pos_control: add execution of position waypoint coming from the
...
obstacle avoidance
2018-07-12 16:36:11 -04:00
Martina
5d6771753d
mc_pos_control: add execution of velocity waypoint coming from the
...
obstacle avoidance module
2018-07-12 16:36:11 -04:00
Martina
f511d3a399
mc_pos_control: add method to constrain velocity setpoint
2018-07-12 16:36:11 -04:00
Martina
14444af38c
mc_pos_control: subscribe to trajectory_waypoint message
2018-07-12 16:36:11 -04:00
Hamish Willee
7402d8223b
Fix up references to pixhawk.org
2018-07-02 13:11:15 +02:00
Daniel Agar
d0bde9ab2a
replace geo _wrap_pi with matrix::wrap_pi
2018-06-12 09:00:52 +02:00
Paul Riseborough
c84d35e3d7
mc_pos_control: rework height limiter to stay in velocity mode
2018-06-09 13:38:04 +02:00
Paul Riseborough
d26da5fa3b
mc_pos_control: Improve maximum height limiter
...
Implements a better method of determining when to switch from velocity to altitude control to keep height limit from being exceeded.
This method removes the overshoot and transients in height caused by the switching of the previous algorithm.
2018-06-09 13:38:04 +02:00
Paul Riseborough
f0a1cd197e
mc_pos_control: formatting fixes
2018-06-09 13:38:04 +02:00
Paul Riseborough
b77845a3c0
mc_pos_control: Fix bug in calculation of altitude limit
...
The correction for stopping distance applied to the maximum altitude limiter uses the vertical velocity estimate and gives the same offset for both positive (down) and negative (up) velocity.
This calculation has been corrected and simplified and variable names changes to make the functionality clearer.
2018-06-09 13:38:04 +02:00
Mohammed Kabir
c1169eb38b
mc_pos_control : update to use new navigation limits architechture
2018-06-09 13:38:04 +02:00
Mohammed Kabir
b3c5e53333
Unify optical flow height limiting
2018-06-09 13:38:04 +02:00
Paul Riseborough
0dc2377c2f
mc_pos_control: format fixes
2018-06-09 13:38:04 +02:00
Paul Riseborough
2c325414f9
mc_pos_control: limit maximum height when reliant on optical flow data
2018-06-09 13:38:04 +02:00
Paul Riseborough
9028592c5f
mc_pos_control: control height above ground when reliant on optical flow
2018-06-09 13:38:04 +02:00
Beat Küng
13ab5ed0d0
px4_main_t: fix method declaration throughout the code base
...
px4_main_t is defined as:
typedef int (*px4_main_t)(int argc, char *argv[]);
which matches with the definition in NuttX, given to task_create
2018-05-09 07:59:46 +02:00
Beat Küng
90513e719e
ASSERT: remove some inappropriate asserts
...
Since assertions lead to crashes, we need better failure handling. In all
the cases in this patch, the assert is not required.
All the ones with the task id should be replaced with the module base
class.
Ah yes, and this reduces flash space, since the ASSERT macro will expand to
a printf that contains the source file name.
2018-04-11 07:47:06 +02:00
Beat Küng
0eaa6222a2
flight tasks: refactor BlockParam -> Param and handle param updates
2018-04-11 07:47:06 +02:00
Beat Küng
2e620cf1d4
mc_pos_control: refactor BlockParam -> Param
2018-04-11 07:47:06 +02:00
Matthias Grob
2405baa2c9
FlightTasks: fix manual mode takeoff
...
With the new position control architercture manual mode and
potition mode run through the same logic and as a result
it had a throttle thershold for smooth takeoff also in
manual mode. This is fixed by by ignoring the threshold for
any mode which doesn't control the climb rate.
2018-04-05 07:30:12 +02:00
Dennis Mannhart
e15240d3ad
FlightTask: only allow for position and alitude control without smoothing.
...
This commit is only done to enable incremental testing of Flighttask.
2018-04-05 07:30:12 +02:00
Matthias Grob
dc60bc8766
mc_pos_control: enable flight tasks
...
instantiate flight tasks and the refactored position controller class
only use the new functionality if a temporary parameter is set for testing
2018-04-05 07:30:12 +02:00
Matthias Grob
0dcad42f57
mc_pos_control: refactor, indent control block
...
individual commit for the indentation because otherwise
the diff gets unreadable. this indentation is made because
afterwards the entire legacy position control functionality
is in an else case.
2018-04-05 07:30:12 +02:00
Matthias Grob
5ee136fe10
mc_pos_control: refactor, move landed thrust reduction into function
...
and make it use matrix library for flight task compatibility
# Conflicts:
# src/modules/mc_pos_control/mc_pos_control_main.cpp
2018-04-05 07:30:12 +02:00
Matthias Grob
fabf214bca
mc_pos_control: refactor, move smooth takeoff velocity into a function
...
# Conflicts:
# src/modules/mc_pos_control/mc_pos_control_main.cpp
2018-04-05 07:30:12 +02:00