Commit Graph

551 Commits

Author SHA1 Message Date
Mark Whitehorn 55047324ac AC_AttitudeControl: add new tailsitter bodyframe roll option 2019-03-26 14:50:37 +11:00
Mark Whitehorn 4e9b6d1919 AC_AttitudeControl: improve tailsitter bodyframe roll control 2019-03-26 14:50:37 +11:00
Peter Barker eb1fc3107c AC_PosControl: log PSC data in metres in place of centimetres 2019-03-26 10:18:05 +11:00
Mark Whitehorn 1c52458d72 AC_AttitudeControl: use new method get_quat_body_to_ned() 2019-03-19 10:46:25 +11:00
Mark Whitehorn 20bbf99b28 AC_AttitudeControl: add body-frame yaw mode for tailsitters 2019-03-06 15:48:51 +11:00
Peter Barker 50d95943e3 AC_AttitudeControl: add pre-arm checks 2019-03-06 10:36:32 +09:00
Randy Mackay 8710526894 AC_PosControl: constify dt calcs 2019-01-30 15:58:34 +09:00
Randy Mackay b14be4e8ae AC_PosControl: increase accuracy of dt calcs 2019-01-30 15:58:34 +09:00
Peter Barker 6fc76a32af GLOBAL: use AP::logger() and strip redundant Log_ from methods 2019-01-18 18:08:20 +11:00
Peter Barker b47733142f GLOBAL: rename DataFlash_Class to AP_Logger 2019-01-18 18:08:20 +11:00
Pierre Kancir 96e629d83e AC_AttitudeControl: pass vector by const reference 2018-12-22 08:31:32 +09:00
Leonard Hall 8d572e8565 AC_AttitudeControl: Fix Autotune high hover throttle based limits 2018-12-21 22:17:52 +11:00
Randy Mackay ba3303dc61 AC_PosControl: set-alt-target-with-slew sets desired to 0 once at target
This resolves and issue with the set-alt-target-with-slew method leaving the z-axis desired velocity at the max speed-up or speed-down
this causes a jump in throttle if the user switches to Loiter after the vehicle has reached its target
2018-11-26 09:30:32 +09:00
Peter Barker 7e3ca19308 AC_AttitudeControl: add override keyword in many places 2018-11-08 11:30:12 +11:00
murata 6db54bd65e AC_AttitudeControl: Change from sqrt to safe_sqrt 2018-11-03 15:23:15 +09:00
Peter Barker dcd930497a AC_AttitudeControl: AC_PosControl: avoid calling norm()
The result of this won't be used as often as this loop is called
2018-10-30 09:00:23 +09:00
Michael du Breuil 5846a54c17 AC_AttitudeControl: Fix copy paste param doc error 2018-10-25 09:50:00 +11:00
Peter Barker 04e4484d96 AC_AttitudeControl: correct old and misleading comments 2018-10-23 09:40:21 +11:00
Leonard Hall 96a8bcf641 AC_AttitudeControl: limit gyro correction to 45 degrees error 2018-10-16 00:44:50 +09:00
Leonard Hall acaefe9316 AC_AttitudeControl: remove output limits 2018-10-16 00:44:50 +09:00
Peter Barker dabe8a13f7 AC_AttitudeControl: use EKF singleton to get ekfNavVelGainScaler 2018-10-09 10:47:38 +11:00
Michael du Breuil 1d13aff711 AC_AttitudeControl: Rename several set_speed and set_accel functions 2018-09-20 15:15:45 -07:00
Leonard Hall 34c0656675 AC_AttitudeControl: Add missing variable initalisations 2018-09-15 11:00:29 +10:00
Michael du Breuil eb1f3b205f AC_AttitudeControl: Use reset_rate_controller_I_terms() helper 2018-09-14 12:16:58 +09:00
Leonard Hall b15b5516cb AC_PosControl: Fix divide by zero check in limit_vector_length 2018-09-12 15:51:30 +09:00
Leonard Hall 706ff85be7 AC_AttitudeControl: Add minimum angle limit for get_althold_lean_angle_max 2018-09-12 15:51:30 +09:00
Leonard Hall 5863b84c35 AC_PosControl: reduce glitch on init 2018-09-04 13:37:28 +09:00
Andrew Tridgell 9766c4ed26 AC_AttitudeControl: fixed use of double precision maths 2018-05-07 11:43:23 +10:00
Jacob Walser 6ae1bf4cf4 AC_AttitudeControl: Allow zero gains for Sub
Close bluerobotics/ardusub#70
2018-04-25 17:18:26 +09:00
Michael du Breuil 334ff0fb66 AC_AttitudeControl: Prevent DCM fallback from triggering a flyaway 2018-03-31 13:40:52 +09:00
Randy Mackay 33f437a72c AC_AttitudeControl: use multiply instead of divide 2018-03-16 13:50:57 +09:00
Leonard Hall c53ba22daa AC_AttitudeControl: add new rate only attitude control 2018-03-16 13:50:57 +09:00
Randy Mackay ac82a37728 AC_PosControl: run horiz control at main loop rate 2018-03-16 13:50:57 +09:00
Randy Mackay 13007e2a07 AC_PosControl: dataflash logging of PSC message 2018-03-16 13:50:57 +09:00
Randy Mackay 69cfea4057 AC_PosControl: use float for local consts 2018-03-16 13:50:57 +09:00
Randy Mackay b988a6ca08 AC_AttitudeControl: add units to INPUT_TC param desc 2018-03-16 13:50:57 +09:00
Leonard Hall dadc6a63c4 AC_PosControl: add set_leash_length_xy 2018-03-16 13:50:57 +09:00
Leonard Hall e5bc2b26fe AC_PosControl: add lean angle max 2018-03-16 13:50:57 +09:00
Leonard Hall 0f3645b061 AC_PosControl: increase velocity gains 2018-03-16 13:50:57 +09:00
Leonard Hall 7ec043502f AC_PosControl: add accel limit to xy controller 2018-03-16 13:50:57 +09:00
Leonard Hall bd13704f6f AC_PosControl: update init for guided 2018-03-16 13:50:57 +09:00
Leonard Hall 85b7f06554 AC_PosControl: combine z position control into single method 2018-03-16 13:50:57 +09:00
Leonard Hall 993e638752 AC_PosControl: combine xy position control into single method
Also always limit lean angle to maintain altitude
2018-03-16 13:50:57 +09:00
Leonard Hall 74bb7616a7 AC_PosControl: add accel feedforward
also add limit_vector_length and sqrt_controller helper functions
enforce angle limits
rename accel-feedforward to accel-desired
remove freeze_ff_xy
remove unused VEL_XY_MAX_FROM_POS_ERR
remove xy mode
remove jerk limiting code including setters
limit_vector_length uses is_positive
Also modify formatting
2018-03-16 13:50:57 +09:00
Randy Mackay 9aa6415e1c AC_AttitudeControl: use is_positive and is_negative 2018-03-16 13:50:57 +09:00
Randy Mackay b3de52dc59 AC_AttitudeControl: minor comment fix 2018-03-16 13:50:57 +09:00
Leonard Hall 05418d3d29 AC_AttitudeControl: add EKF reset handling 2018-03-16 13:50:57 +09:00
Leonard Hall 8c45345863 AC_AttitudeControl: rename use_ff_and_input_shaping to use_sqrt_controller
Also rate controllers only use _rate_bb_ff_enabled flag to decide whether
to use ff for now
2018-03-16 13:50:57 +09:00
Leonard Hall 1e9e12e866 AC_AttitudeControl: rename heading_quad to yaw_vec_correction_quat
also rename flip_scalart local variable to feedforward_scalar
also add comments
non-functional change
2018-03-16 13:50:57 +09:00
Randy Mackay 59a2445ad3 AC_AttitudeControl: replace smoothing gain with INPUT_TC 2018-03-16 13:50:57 +09:00
Leonard Hall e1e224b68b AC_AttitudeControl: add angular velocity limit 2018-03-16 13:50:57 +09:00
Leonard Hall ee82943f85 AC_AttitudeControl: add input_shaping_rate_predictor 2018-03-16 13:50:57 +09:00
Leonard Hall 6175a896ee AC_AttitudeControl: add set smoothing gain
Smoothing gain value should be set once when entering a mode
2018-03-16 13:50:57 +09:00
Leonard Hall 213f7a4061 AC_AttitudeControl: add get_accel_roll/pitch/yaw_max_radss methods
Also constify existing get_accel_roll/pitch/yaw_max methods
2018-03-16 13:50:57 +09:00
Randy Mackay 3badcdcfba AC_PosControl: default gains for sub 2018-01-31 08:48:21 +09:00
Randy Mackay 61933c6f1c AC_PosControl: shorten PSC_ACCELZ param to PSC_ACCZ 2018-01-31 08:48:21 +09:00
Leonard Hall 692e6518cc AC_AttitudeControl: update param desc values for large copters 2018-01-27 11:54:04 +09:00
Leonard Hall 691abab95e AC_AttitudeControl: Update parameter ranges 2018-01-27 11:38:09 +09:00
Randy Mackay 9c00eb3d5f AC_PosControl_Sub: move pids to be local 2018-01-23 12:00:43 +09:00
Randy Mackay c70d3e0ab8 AC_PosControl: move pids to be local 2018-01-23 12:00:43 +09:00
Randy Mackay 00037fd50e AC_PosControl_Sub: replace velocity pi with local pid 2018-01-23 12:00:43 +09:00
Randy Mackay 3a73ff1e2e AC_PosControl: replace velocity control with local 2-axis PID 2018-01-23 12:00:43 +09:00
Leonard Hall e249e06714 AC_PosControl: minor enhancement to lean_angles_to_accel 2018-01-20 09:49:58 +09:00
Leonard Hall d5976442f8 AC_PosControl: minor comment change
non-functional change
2018-01-19 15:40:32 +09:00
Leonard Hall 3ada0f32b0 AC_AttitudeControl: minor comment update
Non-functional change
2018-01-19 15:40:24 +09:00
Leonard Hall b9ed8b292a AC_PosControl: pass dt to att control sqrt_controller 2018-01-16 12:13:48 +09:00
Leonard Hall 62cc25022c AC_AttitudeControl: protect against overshoot in sqrt controller 2018-01-16 12:13:48 +09:00
Leonard Hall 75de0cb4ef AC_AttitudeControl: sqrt_controller accepts dt 2018-01-16 12:13:48 +09:00
Leonard Hall cddd815a75 AC_AttitudeControl: comment thrust_heading_rotation_angles
non-functional change
2018-01-12 15:20:47 +09:00
Leonard Hall 3e0c24adf9 AC_PosControl: remove out-of-date comments 2018-01-11 21:18:34 +09:00
ChristopherOlson 569f55f5c6 AC_AttitudeControl:TradHeli - fix for alt_hold angle limiter active at hover collective in Traditional Helicopters
add definition for max collective/throttle for helicopters that compensates for negative collective pitch range
and sets proper collective overhead before alt_hold angle limiter becomes effective
2017-12-14 20:46:13 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas fa4427fbce AC_AttitudeControl: Add AC_PosControl::get_bearing_to_target() method 2017-12-05 09:17:15 +09:00
Leonard Hall bd284d9fd7 AC_PosControl: correct lean-angle-to-accel formula
Thanks to @luweikxy for finding this issue!
2017-11-24 09:12:00 +09:00
Leonard Hall ebd864d2d2 AC_PosControl: minor update to comments 2017-11-16 09:46:28 +09:00
Randy Mackay 6315e6eb45 AC_AttitudeControl: remove unused get_tilt_limit_rad 2017-11-15 20:22:02 +09:00
bnsgeyer e8173f27df AC_AttitudeControl: reset target attitude
added method to reset current vehicle attitude to support swash
behaviors in Trad Heli
2017-10-28 12:31:06 +11:00
Dr.-Ing. Amilcar Do Carmo Lucas c7c2c4ff2c AC_AttitudeControl: use floating-point multiplication instead of a more expensive floating-point division 2017-10-23 09:20:17 -07:00
Andrew Tridgell f2efea4e1d AC_AttitudeControl: added inverted flight support
for helis
2017-10-03 10:16:41 +11:00
Andrew Tridgell 99aad41955 AC_AttitudeControl: added a update_vel_controller_xy() API
this allows for just XY control of velocity for quadplanes
2017-09-09 08:14:09 +10:00
Andrew Tridgell 1a25087dd5 AC_AttitudeControl: fixed PIRO_COMP index
this is a new conflict due to stricter checking in AP_Param
2017-08-14 09:28:57 +09:00
Leonard Hall ed0063d10d AC_AttControl: save accel max using shorter set_and_save
no functional change
2017-06-22 15:20:16 +09:00
Leonard Hall 0544cf1d82 AC_AttControl: add step input for autotune 2017-06-22 15:18:04 +09:00
Peter Barker d56eca036d AC_AttitudeControl: correct parameter markup 2017-06-05 21:02:30 +10:00
Leonard Hall ad74769fb7 AC_AttControl: adjust default rate IMAX and Yaw Filt
Increase Roll, Pitch and Yaw IMAX from 0.444 or 0.222 to 0.5
Decrease Yaw Filter from 5hz to 2.5hz based on the results of autotunes on many vehicles which always seems to produce values between 2 and 3hz
2017-06-01 10:08:41 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas 188dfb6936 AC_AttitudeControl: Use SI units conventions in parameter units
Follow the rules from:
http://physics.nist.gov/cuu/Units/units.html
http://physics.nist.gov/cuu/Units/outside.html
and
http://physics.nist.gov/cuu/Units/checklist.html
one further constrain is that only printable (7bit) ASCII characters are allowed
2017-05-17 18:07:25 +10:00
Randy Mackay 3a397584a1 AC_PosControl: z-axis stopping point up to 3m above vehicle
Stopping point while descending remains at 2m for safety
2017-04-28 09:10:02 +09:00
Leonard Hall 6e92f74ca0 AC_PosControl: add clear_desired_velocity_ff_z method 2017-04-28 09:10:02 +09:00
Andrew Tridgell fe3e7e8153 AC_AttitudeControl: added get_throttle_mix()
and when we use set_throttle_mix_value(), set both desired and actual

thanks to Leonard for the suggestions
2017-04-19 09:08:43 +10:00
Randy Mackay 132979b12f AC_PosControl: protect against POS_Z_P, ACCEL_Z_P divide-by-zero 2017-03-15 09:22:23 +09:00
Randy Mackay 67097c8d59 AC_AttitudeControl: use gyro_latest
This allows moving the attitude control before the ahrs/ekf update

We continue to use ahrs.get_gyro for the non-time-critical heli
passthrough functions.  We should avoid using get_gyro_latest() unless we know there is a direct benefit because it could lead to inconsistent gyro values vs what the EKF is using.
2017-03-03 13:14:28 +11:00
Randy Mackay d79403707b AC_AttControl: add feed forward param descriptions
No functional change
2017-03-01 14:59:44 +09:00
Andrew Tridgell e5ed20d6f7 AC_AttitudeControl: added set_throttle_mix_value()
used by quadplane
2017-02-26 09:20:51 +11:00
Jacob Walser 0e124d0be5 AC_PosControl: Add AC_PosControl_Sub class 2017-02-21 11:26:14 +11:00
Jacob Walser 925fa5d214 AC_AttitudeControl: Add AC_AttitudeControl_Sub class 2017-02-21 11:26:14 +11:00
Andrew Tridgell 1345bf8737 AC_AttitudeControl: added support for AP_AHRS_View
this allows for tailsitters with a different attitude view
2017-02-18 17:26:43 +11:00
Andrew Tridgell 5acbf5d16e AC_AttitudeControl: use FF from AC_PID 2017-02-18 17:26:43 +11:00
Randy Mackay ff042528fe AC_PosControl: remove alt_max
AC_Avoidance enforces the altitude limit
2017-01-18 09:35:47 +09:00
Randy Mackay 127404acea AC_PosControl: add get_pos_z_kP accessor 2017-01-18 09:35:47 +09:00
Randy Mackay 189b766f2b AC_AttControl: remove redundant parameter set 2017-01-17 14:56:07 +09:00
Leonard Hall c6d2fc3d5d AC_AttitudeControl: add rpy mix manual
This allows adjusting the attitude control vs throttle level in manual
flight modes (Stabilize, ACRO)
2017-01-17 14:19:09 +09:00