125 Commits

Author SHA1 Message Date
Thomas Stastny
b0dc3a4f51 add option to disable use of wind estimates with npfg 2021-10-01 10:43:50 +02:00
Thomas Stastny
dd89665cd6 multiply track error boundary by scale factor in calculation of waypoint switch distance 2021-10-01 10:43:50 +02:00
Thomas Stastny
4dce637ab7 new bearing feasibility for handling zero airspeed
- simpler bearing feasibility function
- get rid of wind ratio
- replace wind ratio buffer with airspeed buffer
2021-10-01 10:43:50 +02:00
Thomas Stastny
0b705c6c6d mavlink: add npfg_status, regenerate headers 2021-10-01 10:43:50 +02:00
Thomas Stastny
d240ee9448 fw_pos_control_l1: integrate optional use of npfg
uorb: npfg_status msg
2021-10-01 10:43:50 +02:00
Daniel Agar
29d4ad1848
fw_pos_control_l1: OFFBOARD fully populate position_setpoint_triplet 2021-03-16 00:58:04 -04:00
RomanBapst
82a2126f97 TECS: add feedforward gain for total energy balance rate
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-03-15 11:47:07 -04:00
Daniel Agar
d0c9a5fc93
OFFBOARD mode architecture overhaul (#16739)
- handle SET_POSITION_TARGET_LOCAL_NED and SET_POSITION_TARGET_GLOBAL_INT with ORB_ID(trajectory_setpoint)
 - FlightTaskOffboard not needed at all
 - bypass position_setpoint_triplet entirely (start removing extraneous fields)
 - simplify offboard_control_mode to map to supported control modes
2021-03-05 09:39:46 -05:00
Lorenz Meier
548e070b91 FW pos control: Robustify for throttle scaling
PX4 can support negative (reverse) throttle and the fixed wing controller is not expecting this input range. This hardens it against it.
2021-02-14 11:17:28 +01:00
Daniel Agar
1981519aad L1 position controller: use double precision floating point for all lat/lon 2021-02-12 21:59:56 +01:00
Silvan Fuhrer
31a6edff07 Fixed-wing: remove roll offset param (FW_RSP_OFF)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-02-12 13:57:15 -05:00
Silvan Fuhrer
a70cf950f4 fw_pos_control_l1: apply pitch setpoint offset centrally
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-02-12 13:57:15 -05:00
Daniel Agar
f61d8539cb fw_pos_control_l1: add takeoff minimum pitch parameter
- remove mavlink mechanism for setting minimum pitch
2021-02-12 13:57:15 -05:00
Daniel Agar
cb7aabf932 fw_pos_control_l1: cleanup body velocity and acceleration usage
- minimize storing unnecessary state (msg copies)
2021-02-12 00:41:39 +01:00
Daniel Agar
d1dfa26903 consume all available queued vehicle_commands 2021-01-26 12:00:18 -05:00
Silvan Fuhrer
92f2043d8b TECS: add EAS_sp to tecs_status.msg and rename other airspeeds to TAS
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-23 09:34:34 -05:00
Silvan Fuhrer
5e32e9be5a TECS: rename variables and methods to make clear which are EAS and which TAS
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-23 09:34:34 -05:00
RomanBapst
f05599caff tecs: use speed derivative provided by local position
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-13 21:21:07 +03:00
Silvan Fuhrer
dca89763b3 TECS: apply FW_LND_THRTC_SC to altitude error time constant
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-13 21:21:07 +03:00
Silvan Fuhrer
2ca4269464 TECS: separate integral gains for throttle and pitch loops
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-13 21:21:07 +03:00
RomanBapst
01f891618b TECS: move to new control loop architecture
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-13 21:21:07 +03:00
RomanBapst
447e14906c TECS: log more TECS states to enable better analysis
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-13 21:21:07 +03:00
RomanBapst
d0e8b882a2 TECS: added alpha filter classes to energy rate and tas derivative
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-01-13 21:21:07 +03:00
Silvan Fuhrer
0b86c11c66 FW POS: remove setting of curr_sp to LOITER if next wp invalid
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-01-04 11:58:16 +01:00
Silvan Fuhrer
edaf9f2bb6 FW Position Controller: consolidate mission throttle adaptions for position and loiter waypoints
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2020-12-08 12:08:36 -05:00
Silvan Fuhrer
b58e270fd4 FW Position Control: remove manual climbout mode trigger via pitch stick
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2020-11-16 14:41:01 +01:00
Silvan Fuhrer
5dd14dfd54 FW Position Control: re-add wrongly removed airspeed_poll()
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2020-11-11 19:20:03 -05:00
Silvan Fuhrer
99833eb001 FW Position Control: remove duplicated position_sp_triplet update
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2020-11-03 15:47:57 +01:00
Silvan Fuhrer
67a0e1993a FW Position controller: add option to swap throttle and pitch stick
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2020-11-02 22:49:05 +01:00
Daniel Agar
c01fabaf11
FW move altitude first order hold (FOH) and loiter to position special cases from navigator to position controller
Co-authored-by: RomanBapst <bapstroman@gmail.com>
2020-10-06 16:57:12 -04:00
Silvan Fuhrer
8f858d95e6 Rename equivalent airspeed (EAS) to calibrated airspeed (CAS)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2020-10-06 09:31:58 +02:00
JaeyoungLim
0592f6ba6e
Support gliding setpoints for autonomous soaring (#14643)
* Enable offboard gliding position setpoints

Adds a capability to make the vehicle glide when given position setpoints.

Gliding setpoints are enabled by setting POSITION_TARGET_TYPEMASK_Z_IGNORE, POSITION_TARGET_TYPEMASK_VZ_IGNORE,  POSITION_TARGET_TYPEMASK_AZ_IGNORE on the typemask of position setpoints.
Include zero cruising throttle
Invalid setpoints with nan

* Handle nans for curise_throttle
2020-09-14 10:56:29 +02:00
Jonathan Hahn
7e5e8259f3
fw_pos_control_l1: fix swapped TECS time parameters (#15685)
Co-authored-by: Jonathan Hahn <hahn@wingcopter.com>
2020-09-04 15:11:31 -04:00
Daniel Agar
560c22e612 fw_pos_control_l1: pass time through from run 2020-08-10 10:51:52 -04:00
Daniel Agar
bdb4251fa4
fw_pos_control_l1: if using air data (baro) copy every cycle
- vehicle_air_data won't necessary have an update every iteration and these adjusted throttle values aren't stored
 - this only would have worked in the past because the vast majority of systems were using the ms5611 barometer with a publication rate that's faster than the controller
2020-07-17 17:14:45 -04:00
Daniel Agar
9a1ca00285 fw_pos_control_l1: replace sensor_baro with vehicle_air_data
- controllers shouldn't be accessing raw sensor data directly
2020-07-17 09:42:19 -04:00
Daniel Agar
fa44cd5cd5 px4_work_queue: rename navigation_and_controllers -> nav_and_controllers
- keep the thread within the current NuttX max length
2020-07-14 09:48:47 -04:00
Matthias Grob
e9eae1bd76 Refactor: Name manual_control_setpoint the same way everywhere 2020-06-22 12:06:27 -04:00
Daniel Agar
326d8efc16 move attitude controllers to new wq:attitude_ctrl 2020-04-27 21:34:35 -04:00
RomanBapst
2b276a3ad8 FixedWingPositionControl: set waypoint straight ahead for front transition
- this fixes the case where the navigator publishes a loiter waypoint or any
waypoint which is too close to the vehicle.

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2020-04-26 22:59:07 -04:00
RomanBapst
b6a80253d7 run l1 during transition 2020-04-02 13:45:52 +03:00
Silvan Fuhrer
477092fa24 Fw pos control move to local pos: minimal changes to make it compile
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2020-03-31 15:03:23 +03:00
Daniel Agar
59a7262c31 FW use lpos 2020-03-31 15:03:23 +03:00
Daniel Agar
a89b69b0ea
vehicle_global_position: remove velocity fields (duplicates of local vx, vy, vz)
* attitude_estimator_q: get velocity from local position (if available)
2020-03-11 23:57:43 -04:00
Matthias Grob
f90d3671c0 vehicle_attitude_setpoint: get rid of unused q_d_valid flag 2020-02-27 09:17:52 +01:00
Daniel Agar
3dc23afb3e fw_pos_control_l1: move to px4::params 2020-02-02 21:04:21 -05:00
Daniel Agar
6630087654 TECS: remove height rate complementary filter 2020-01-16 11:04:28 -05:00
David Jablonski
3d60ef9383 FW: Allow counterclockwise loiter
Before, this check was always true, thus always falling back to
NAV_LOITER_RAD, which can't be negative.
2020-01-08 12:30:50 -05:00
Daniel Agar
22a005c9f4
delete module's redundant print_status()
- we can already get the running status from ModuleBase and the other misc information is already available through perf or uORB
2019-11-30 18:22:19 -05:00
Daniel Agar
0cc250194d
VTOL: explicitly start all FW & MC controllers in VTOL mode 2019-11-30 12:58:36 -05:00