Commit Graph

581 Commits

Author SHA1 Message Date
Paul Riseborough 9028592c5f mc_pos_control: control height above ground when reliant on optical flow 2018-06-09 13:38:04 +02:00
Daniel Agar 222a91c6be mathlib delete Matrix, Quaternion, Vector 2018-05-23 17:27:09 -04:00
Daniel Agar 4e32cb17df clang-tidy modernize-use-equals-default 2018-05-18 22:48:55 +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
Daniel Agar 2e92484325 ecl update to latest master with separate libraries (#9406) 2018-05-03 23:48:09 -04:00
Daniel Agar ea3acb7121 cmake remove circular linking and reorganize
- px4_add_module now requires MAIN
 - px4_add_library doesn't automatically link
2018-04-29 21:48:54 -04:00
Beat Küng 12e967173d MC: set default MPC_THR_MAX & MPC_MANTHR_MAX to 1
With the updated mixer (#9062) it's safe to set maximum thrust to 1 (in
both cases, if MC_AIRMODE is set, or not set).
So I see no reason to limit the maximum thrust.
2018-04-26 14:37:48 +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
Daniel Agar 735c5544ae tests add ctlmath and use float FLT_EPSILON 2018-04-09 02:23:26 -04:00
Dennis Mannhart 48fa3fbca3 PositionControl: thrust setpoint check with fabsf 2018-04-05 07:30:12 +02:00
Dennis Mannhart 26ffda5079 PositionControl: replace matrix length() method with simple dot-product to safe compuation 2018-04-05 07:30:12 +02:00
Dennis Mannhart 0c6c771620 ControlMath: remove unused methods 2018-04-05 07:30:12 +02:00
Dennis Mannhart 81da94ff46 PositionControl: Anti-windup that uses max in NE based on tilt limit and remaining throttle
excess
2018-04-05 07:30:12 +02:00
Matthias Grob f99471f34c PositionControl: refactor remove Data define for Vector
This define results in super unreadable code.
2018-04-05 07:30:12 +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
Dennis Mannhart 88cf2aebc6 PositionControl: comment fix + unused parameter removal 2018-04-05 07:30:12 +02:00
Dennis Mannhart 03b3026e18 PositionControl: remove unused parameters 2018-04-05 07:30:12 +02:00
Dennis Mannhart 67900512ab PositionControl: remove legacy yaw logic 2018-04-05 07:30:12 +02:00
Dennis Mannhart ec79b2f8c8 ControlMath: don't consider sign when vector length is 0 2018-04-05 07:30:12 +02:00
Dennis Mannhart bd37c274c6 PositionControl: parameter naming fix 2018-04-05 07:30:12 +02:00
Dennis Mannhart fc62df856d ControlMath: reference to by value 2018-04-05 07:30:12 +02:00
Matthias Grob f135e6dda0 FlightTasks: switch field name from thr to thrust + some code spacing 2018-04-05 07:30:12 +02:00
Dennis Mannhart 6a639373ae PositionControl: set vel_dot to 0 if thrust setpoint is used 2018-04-05 07:30:12 +02:00
Dennis Mannhart 3d591f4f8c FlightTaskManualAltitude: thrust along xy depends on thrust along z direction 2018-04-05 07:30:12 +02:00
Dennis Mannhart 85a263c7bd vehicle local position setpoint: use array for thrust setpoint 2018-04-05 07:30:12 +02:00
Dennis Mannhart a74c1116ee mc_pos_control/PositionControl: enable thrust setpoint 2018-04-05 07:30:12 +02:00
Dennis Mannhart 0ca823eb30 PositionControl: remove thrust as state; add thrust setpoint support 2018-04-05 07:30:12 +02:00
Dennis Mannhart 7a4796a6e3 rename TranslationControl to PositionControl 2018-04-05 07:30:12 +02:00
Dennis Mannhart b4d56ed51a mc_pos_control: publish yaw_move_rate 2018-04-05 07:30:12 +02:00
Dennis Mannhart 1cad36efb9 ControlMath: use sign for direction 2018-04-05 07:30:12 +02:00
Dennis Mannhart b0b72e63e7 TranslationControl: remove throttle 2018-04-05 07:30:12 +02:00
Dennis Mannhart 6a4e3bb94e TranslationControl: update comments 2018-04-05 07:30:12 +02:00
Dennis Mannhart 8da2ff4d77 mc_pos_control: set local position setpoint message for idle; for logging purpose,
always send local position setpoint when in air
2018-04-05 07:30:12 +02:00
Dennis Mannhart ac4379d13f TranslationControl: initialize with default constructor 2018-04-05 07:30:12 +02:00
Dennis Mannhart e1ab31a5fc TranslationControl: replace matrix::Vector3f with Data 2018-04-05 07:30:12 +02:00
Dennis Mannhart ddecb4d3a4 teest_controlmath: incomplete set of thrust to attitude tests 2018-04-05 07:30:12 +02:00
Dennis Mannhart bcbd3dc527 ControlMath: thrust to attitude method (legacy method) 2018-04-05 07:30:12 +02:00
Dennis Mannhart adcb2b9ca8 TranslationControl: index fix 2018-04-05 07:30:12 +02:00
Dennis Mannhart 840247251d ControlMath: sign fix 2018-04-05 07:30:12 +02:00
Dennis Mannhart 09bf73945a ControlMath: rename namespace to file name 2018-04-05 07:30:12 +02:00
Dennis Mannhart 3b8c718971 TranslationControl: rename variable 2018-04-05 07:30:12 +02:00
Dennis Mannhart 2a544cee43 TranslationControl: use reference insteady of by value 2018-04-05 07:30:12 +02:00
Dennis Mannhart ded8675dae ControlMath: change description name 2018-04-05 07:30:12 +02:00