Dennis Mannhart
453b6a39e4
TrajMath: move from FlightTasks/Utility into mathlib library because the function is also used by other libraries
2019-09-19 14:09:44 +02:00
Dennis Mannhart
3b92d49b64
replace + with &&
2018-11-05 21:54:19 +01:00
Dennis Mannhart
6a0a9c92fb
PositionControl:
...
- set integral states and setpoint of reference state to 0
- set thrust to NAN if it will be computed from position and velocity control
2018-11-05 21:54:19 +01:00
Dennis Mannhart
e7e49d5b3c
FlightTask don't require vehicle-local-positiion topic
2018-10-16 17:06:12 +02:00
Dennis Mannhart
16ca0be4e5
FlightTaskAuto: set reference to 0 if auto is requested but no global position available
2018-08-30 09:44:54 +02:00
Dennis Mannhart
3222f583c8
use matrix .zero
2018-08-30 09:27:48 +02:00
Dennis Mannhart
e2e8d6d135
mc_pos_control_main: fix comment and remove line that is not used
2018-08-30 09:27:48 +02:00
Dennis Mannhart
a24fdb93c3
FlightTaskManual: increase rc timeout to 1.5 x COM_RC_LOSS_T
2018-08-30 09:27:48 +02:00
Dennis Mannhart
1f1c9fde01
FlightTaskAuto: lock yaw once within acceptance radius
2018-08-30 09:27:48 +02:00
Dennis Mannhart
72f1fca55c
mc_pos_control: lower LOITER_TIME_BEFORE_DESCEND from 1 second to 0.2
2018-08-30 09:27:48 +02:00
Dennis Mannhart
8714b216b0
FlightTaskFailsafe: comments and land with land speed if velocity in z is valid but altitude not
2018-08-30 09:27:48 +02:00
Dennis Mannhart
3d250b3b83
FlightTaskAutoLine: don't update yaw if waypoints are too close together
2018-08-30 09:27:48 +02:00
Dennis Mannhart
81c5025ad8
mc_pos_control: enter FlighttaskFailsafe if Flighttask wants to be started, but all of
...
the Flighttask fail. A failure of the Flighttask can occur if the demanded Flighttask does
not have the required data.
2018-08-30 09:27:48 +02:00
Dennis Mannhart
06c10f61c1
mc_pos_control: go into Failsafe only after 1 second flighttask.update() continous to fail
2018-08-30 09:27:48 +02:00
Dennis Mannhart
4d9f96bfbd
FlightTaskFailure: will hover if position available, will land if velocity valid and
...
will land with 0.3 of hover thurst if position nor velocity is valid
2018-08-30 09:27:48 +02:00
Dennis Mannhart
9a23295a40
heading update: do not update heading within NAV_ACC_RAD
2018-08-10 15:52:10 +02:00
Dennis Mannhart
4a91074aaa
FlightTaskAuto: add comment
2018-08-03 08:24:34 +02:00
Dennis Mannhart
a24b614dec
FlightTaskAutoLine: generate heading along track if yaw setpoint is not valid
2018-08-03 08:24:34 +02:00
Dennis Mannhart
e0f505ec57
mc_pos_control_param: MPC_YAW_MODE remove option "set by waypoint" because that
...
is executed at any time if triplet as valid yaw waypoint
2018-08-03 08:24:34 +02:00
Dennis Mannhart
02feb10865
FlightTaskAuto: triplet yaw-setpoint has priority over MPC_YAW_MODE.
...
Add MPC_YAW_MODE option for heading along trajectory, which will be the same as
option 0 (heading towards target) if trajectory is straight line
2018-08-03 08:24:34 +02:00
Dennis Mannhart
694f49c80a
FlightTaskAuto: method for computing heading from 2D vector
2018-08-03 08:24:34 +02:00
Dennis Mannhart
6cd16f345e
FlightTaskAuto: set heading based on yaw mode
2018-08-03 08:24:34 +02:00
Dennis Mannhart
f0282bcd8f
FlightTaskAuto/Line: make params protected and add NAC_ACC_RAD and MPC_YAW_MODE
2018-08-03 08:24:34 +02:00
Dennis Mannhart
27812ad7ac
mc_pos_control_params: add MPC_YAW_MODE for heading during auto
2018-08-03 08:24:34 +02:00
Dennis Mannhart
d704a2d675
mission_param: remove MIS_YAWMODE
2018-08-03 08:24:34 +02:00
Dennis Mannhart
7723860f37
remove unused constant
2018-08-02 09:23:17 +02:00
Dennis Mannhart
a06ff4a2ce
FlightTaskAuto/Mapper/Line: move landing gear to mapper; fix comments
2018-08-02 09:23:17 +02:00
Dennis Mannhart
338ca3104c
FlightTaskAutoLine: remove activate method bc uses same impl as FlightTaskAutoMapper
2018-08-02 09:23:17 +02:00
Dennis Mannhart
00e09524f7
SearchMin and BezierQuad: replace define with static constexpr ( #10050 )
2018-07-30 12:28:27 -04:00
Dennis Mannhart
fc8a05f636
estimataor reset counter: set Flighttaskcounter equal reset-counter during activation ( #10035 )
...
- fixes #10033
2018-07-28 10:08:58 -04:00
Dennis Mannhart
9c0a6eb87a
clang modernize: remove void argument
2018-07-25 08:50:10 +02:00
Dennis Mannhart
40f2388295
test_search_min: remove printf
2018-07-25 08:50:10 +02:00
Dennis Mannhart
609d412217
BezierQuad: use template type Tp for default
2018-07-25 08:50:10 +02:00
Dennis Mannhart
7559610a7b
BezierQuad: update description, replace Data with Vector3_t
2018-07-25 08:50:10 +02:00
Dennis Mannhart
6ddf214bbd
BezierQuad: set cached_arc_length once computed
2018-07-25 08:50:10 +02:00
Dennis Mannhart
fe48e06f9d
add tests for Bezier and Golden Section Search libraries
2018-07-25 08:50:10 +02:00
Dennis Mannhart
c8842665da
mathlib: add golden section search
2018-07-25 08:50:10 +02:00
Dennis Mannhart
90f95bca0e
add Bezier library
2018-07-25 08:50:10 +02:00
Dennis Mannhart
18a3c08659
mc_pos_control: idle to armed state delay controlled by parameter MPC_IDLE_TKF
2018-07-20 09:26:18 +02:00
Dennis Mannhart
ab1ae1fb4e
mc_pos_control_main: trigger failsafe if no setpoint along D-direction is valid
2018-07-20 09:26:18 +02:00
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
eb7139bc56
FlightTaskManualAltitude: respect maximum altitude if there is a valid distance sensor
2018-07-20 09:26:18 +02:00
Dennis Mannhart
c907e7a9dc
FlighttaskManualAlititude: replace SENS_FLOW_MINRNG with hagl_min
2018-07-20 09:26:18 +02:00
Dennis Mannhart
4af9d79986
FlighttaskManualPosition: check if estimator velocity maximum is finite
...
before applying limits
2018-07-20 09:26:18 +02:00
Dennis Mannhart
29fb5089bd
FlightTasks: construct all tasks in constructor
2018-07-20 09:26:18 +02:00
Dennis Mannhart
b1530d1a81
FlightTasks: create struct that contains FlightTask and FlightTaskIndex
2018-07-20 09:26:18 +02:00
Dennis Mannhart
83cc2b0e72
FlightTaskAuto: reset lock position to NAN
2018-07-20 09:26:18 +02:00
Dennis Mannhart
c12dcb4eed
FlightTaskAuto: take care of case when triplet.lat/lon are invalid, which corresponds
...
to position lock.
2018-07-20 09:26:18 +02:00
Dennis Mannhart
65ad6edaf0
ManualSmoothingXY: remove empty lines
2018-07-20 09:26:18 +02:00
Dennis Mannhart
b9d5189fe5
ManualSmoothing: direction change with maximum acceleration
2018-07-20 09:26:18 +02:00
Dennis Mannhart
a5e8eb23ad
PositionControl: saturate thrust integral
2018-07-20 09:26:18 +02:00
Dennis Mannhart
5ffcb6af01
PositionControl: set vel_dot to 0 if NAN
2018-07-20 09:26:18 +02:00
Dennis Mannhart
33d0a4e8ed
FlightTaskAuto: replace target with destination for checks
2018-07-20 09:26:18 +02:00
Dennis Mannhart
92e93639d3
FlightTaskAuto: require valid position in 3D
2018-07-20 09:26:18 +02:00
Dennis Mannhart
c4c01358b9
FlightTaskManualAltitude: do terrain following when distance sensor active and
...
below minimum distance to ground.
2018-07-20 09:26:18 +02:00
Dennis Mannhart
bd85f5f993
FlightTask: set min_distance_to_ground to NAN as default and when
...
distance sensor is used to SENS_FLOW_MINRNG
2018-07-20 09:26:18 +02:00
Dennis Mannhart
80775d588b
vehicle constraints: minimum distance to ground. currently used when distance sensor
...
is available
2018-07-20 09:26:18 +02:00
Dennis Mannhart
ee7d5c3f38
FlightTaskAuto: remove unused member variable
2018-07-20 09:26:18 +02:00
Dennis Mannhart
7b13803e2c
PositionControl: for thrust setpoints only use MPC_MANTHR_MIN for minimum thrust
2018-07-20 09:26:18 +02:00
Dennis Mannhart
f30bf215db
MulticopterLanddetector: adjust minimum throttle if climb-reate is not enabled
2018-07-20 09:26:18 +02:00
Dennis Mannhart
e408870857
FlightTaskManual: remove unused override
2018-07-20 09:26:18 +02:00
Dennis Mannhart
be6f3a5b48
FlightTaskOffboard: valid position and velocity is required
2018-07-20 09:26:18 +02:00
Dennis Mannhart
bd2de0e585
FlightTaskAuto: valid target is required and valid reference
2018-07-20 09:26:18 +02:00
Dennis Mannhart
4713f47668
FlightTaskManualPosition: valid position/velocity in xy required
2018-07-20 09:26:18 +02:00
Dennis Mannhart
72a213aff7
FlightTaskManualAltitude: valid altitude/climb-rate is required
2018-07-20 09:26:18 +02:00
Dennis Mannhart
fc4fa169df
FlightTaskManualStabilized: valid yaw is required
2018-07-20 09:26:18 +02:00
Dennis Mannhart
2af253fa9f
FlightTaskManual: sticks not to be finite
...
activation method not needed
2018-07-20 09:26:18 +02:00
Dennis Mannhart
6a7a7d7ff7
FlightTask: check if states are valid. if not valid, set them to NAN
2018-07-20 09:26:18 +02:00
Dennis Mannhart
e8620708b3
PositionControl: set states to zero if not valid
2018-07-20 09:26:18 +02:00
Dennis Mannhart
b2af9c3f58
FlightTasks: error to char string message
2018-07-20 09:26:18 +02:00
Dennis Mannhart
f62c3c3b8a
FlightTaskAutoLine: simplify logic by setting setpoints directly
2018-07-20 09:26:18 +02:00
Dennis Mannhart
338130a9b4
FlightTaskAuto: simplify logic by just updating waypoints if anything has changed
2018-07-20 09:26:18 +02:00
Dennis Mannhart
171c19c3ca
FlightTaskAutoLine: override _reset method
2018-07-20 09:26:18 +02:00
Dennis Mannhart
e2347c30f6
FlightTaskAuto: comment fix
2018-07-20 09:26:18 +02:00
Dennis Mannhart
69ea4df45c
FlightTaskAuto: pure virtual reset method
2018-07-20 09:26:18 +02:00
Dennis Mannhart
2c385e6967
FlightTaskAuto: remove unused include
2018-07-20 09:26:18 +02:00
Dennis Mannhart
3ae07843e9
position control: remove empty space
2018-07-20 09:26:18 +02:00
Dennis Mannhart
9ff4d13c2c
mc_pos_control: remove unused method
2018-07-20 09:26:18 +02:00
Dennis Mannhart
75fb1b28b9
mc_pos_control: set thrust to zero if in idle
2018-07-20 09:26:18 +02:00
Dennis Mannhart
1fb8eaf6c6
mavlink_messages: add yawspeed to local position setpoint sent over mavlink
2018-07-20 09:26:18 +02:00
Dennis Mannhart
816f2d12d5
FlightTaskAuto minor clean up
2018-07-20 09:26:18 +02:00
Dennis Mannhart
ae0f02f67d
ControlMath: by value to reference
2018-07-20 09:26:18 +02:00
Dennis Mannhart
3c40aa0d9c
PositionControl: if valid velocity and position setpoint available, always prioritize
...
velocity setpoint generated from position error over velocity feedforward
2018-07-20 09:26:18 +02:00
Dennis Mannhart
5551021d23
FlightTaskAutoLine: check if yaw_wp is finite
2018-07-20 09:26:18 +02:00
Dennis Mannhart
558a0f892c
PositionControl: auto takeoff with constant speed
...
PositionControl: remove takeoff logic
mc_pos_control: takeoff logic for flighttask
mc_pos_control: smooth takeoff throttle start at 0
2018-07-20 09:26:18 +02:00
Dennis Mannhart
6e62beb560
FlightTaskAuto: abstract class for mapping triplets to quadruple
...
FlightTaskAuto: add type that corresponds to triplet type
FligthTaskAuto: set all setpoints if invalid in xy
FlightTaskAuto: cast triplet type to WaypointType
FlightTaskAutoLine: class for px4 legacy auto
FlightTaskAutoLine: methods prototype
FlightTaskAuto: change sp to wp (=Waypoint)
add params
FlightTaskAutoLine: follow waypoints along line based on flight state
2018-07-20 09:26:18 +02:00
Dennis Mannhart
25c33d18b0
FlightTaskSport: just scale velocity septoint
2018-04-05 07:30:12 +02:00
Dennis Mannhart
fc62df856d
ControlMath: reference to by value
2018-04-05 07:30:12 +02:00
Dennis Mannhart
16d6ac6ad1
FlightTaskManualStabilized: check for 0 maximum tilt and scale throttle linearly
2018-04-05 07:30:12 +02:00
Dennis Mannhart
7f406aa251
FlightTaskManualSmoothingZ: remove empty space
2018-04-05 07:30:12 +02:00
Dennis Mannhart
6538a7e88c
FlightTaskSport: replace rotation by axis angle
2018-04-05 07:30:12 +02:00
Dennis Mannhart
5bd2afa7be
FlightTaskManualPositionSmooth: remove unused mehthods and member variables
2018-04-05 07:30:12 +02:00
Dennis Mannhart
d6fe2159ae
FlightTaskManualPosition: remove update method and old member variable setpoints
2018-04-05 07:30:12 +02:00
Dennis Mannhart
a7f4859698
FlightTaskManualAltitudeSmooth: remove unused member methods/variables
2018-04-05 07:30:12 +02:00
Dennis Mannhart
c15b114cad
FlightTaskManualAltitude: remove member setpoints and update method
2018-04-05 07:30:12 +02:00