Commit Graph

668 Commits

Author SHA1 Message Date
Randy Mackay 9f914d9e7d AC_PosControl: add get_z_accel_cmss helper function 2021-02-09 19:33:52 +09:00
Iampete1 7d5e5f8dd7 AC_AttitudeControl: add SITL panic to remind us to implent the quarternion 2021-02-09 12:43:54 +09:00
Iampete1 791e68b4ef AC_AttitudeControl: add 6DoF support 2021-02-09 12:43:54 +09:00
Patrick José Pereira e3d018c401 AC_AttitudeControl: Add missing const in member functions
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2021-02-03 18:45:14 +11:00
Leonard Hall 25fff17e48 AC_AttitudeControl: constify some local variables 2021-01-22 14:22:18 +09:00
Randy Mackay 031be010ac AC_AttitudeControl: tailsitter sets target rates more efficiently 2021-01-20 18:21:12 +11:00
Randy Mackay 6320338771 AC_PosControl: use AP_Math control functions 2021-01-20 18:19:40 +11:00
Leonard Hall 1129a3fd59 AC_AttitudeControl: use AP_Math control functions 2021-01-20 18:19:40 +11:00
murata d7533843d5 AC_AttitudeControl: Set the gravitational acceleration value to the defined value 2021-01-05 09:11:14 +09:00
bnsgeyer 04e2cceaff AC_AttitudeControl: Tradheli support for integrator management and hover collective learning 2020-12-21 23:33:48 -05:00
Mark Whitehorn 7446a9c33c AC_AttitudeControl: make relax_attitude_controllers() non-virtual 2020-12-21 12:56:24 +11:00
Mark Whitehorn cc2c631d23 AC_AttitudeControl: add AC_AttitudeControl_TS
move tailsitter body-frame roll input method to new subclass
override relax_attitude_controllers in AttitudeControl_TS
2020-12-21 12:56:24 +11:00
Randy Mackay d6869b9234 AC_PosControl: fix typo in posxy_p param desc 2020-11-05 14:59:00 +09:00
Andrew Tridgell 0a7c628355 AC_AttitudeControl: added SMAX param docs 2020-10-25 10:32:48 +11:00
Randy Mackay 4ed486bb92 AC_AttitudeControl: revert Add PosControl PID logging 2020-09-12 08:10:33 +09:00
Iampete1 c109df3dd5 AC_AttitudeControl: Add PosControl PID logging 2020-09-11 10:12:08 +10:00
Iampete1 e955b431ef AC_PosControl: move to structure logging for PSC 2020-09-11 10:12:08 +10:00
Iampete1 c27bdafea4 AC_PosControl: correct VELXY_D_FILT Description 2020-06-23 11:40:12 +09:00
Leonard Hall edadbae240 AC_AttitudeControl: Handle zero accel value correctly in angle correction. 2020-06-23 08:21:47 +09:00
Randy Mackay 1498e4c037 AC_AttitudeControl: remove unused macro 2020-04-27 09:39:46 +09:00
Rishabh 6a98ab569e AC_PosControl: Replace update_vel_controller_xy() with update_xy_controller() 2020-04-21 09:22:45 +10:00
Peter Barker afc0fbc516 AC_AttitudeControl: add CTRL log message documentation 2020-04-12 08:36:48 +10:00
Peter Barker e477f6c840 AC_PosControl: add documentation for PSC log message 2020-04-06 10:46:45 +10:00
Randy Mackay 06b62107c7 AC_PosControl: move freeze_ff_z to be with other z-axis methods
Also minor comment fix to get_stopping_point_xy
2020-03-11 10:39:18 +09:00
Leonard Hall 29332ac112 AC_PosControl: add relax_velocity_controller_xy 2020-03-11 10:39:18 +09:00
Bill Geyer bf345b0dd4 AC_AttitudeControlHeli: update filter parameter desc mins 2020-02-26 08:02:27 +09:00
Randy Mackay aff854f485 AC_AttitudeControl: update param ranges 2020-02-26 08:02:27 +09:00
Randy Mackay fc2e15651e AC_PosControl: allow smaller changes in max speed and accel
also small changes in max speed for z-axis
2020-02-22 08:53:41 +09:00
Randy Mackay e36d4d19e2 AC_AttitudeControl_Heli: fix VFF and ILMI param descriptions 2020-02-14 09:20:17 +09:00
Randy Mackay 5e60ae8a26 AC_PosControl: add missing ACCZ param descriptions 2020-02-14 09:20:11 +09:00
Randy Mackay 84e6c59fdd AC_AttitudeControlHeli: fix update_althold_lean_angle_max use of throttle_in 2020-01-29 10:59:28 +09:00
Randy Mackay 3c8aa955d5 AC_AttitudeControlSub: fix update_althold_lean_angle_max use of throttle_in 2020-01-29 10:59:27 +09:00
Leonardo Felipe L. S. dos Santos 07f45e1ef9 AC_AttitudeControlMulti: fix update_althold_lean_angle_max use of
throttle_in
2020-01-29 10:58:56 +09:00
Randy Mackay b9ff846162 AC_AttitudeControl: remove old RAT_FILT param desc 2020-01-21 13:06:56 +09:00
Bill Geyer 7ee4054515 AC_AttitudeControl: tradheli-Remove Param descriptions
This remove the old filter param description from AC 3.6 and adds the new filter param descriptions.
2020-01-21 11:02:38 +09:00
Peter Barker d6dbdd58d3 AC_AttitudeControl: adjust for some methods on AP_AHRS become non-const 2020-01-21 11:53:18 +11:00
Mark Whitehorn 7e8aecac50 AC_AttitudeControl: simplify body-frame roll axis swapping 2019-12-18 08:33:29 +11:00
Mark Whitehorn bb9b116574 AC_AttitudeControl: fix argument order in tailsitter bodyframe roll input methods
increase allowed yaw error in tailsitter bodyframe roll modes
add combined bodyframe roll method
delete old versions of body-frame roll input methods
invert mc_controls
2019-12-18 08:33:29 +11:00
Willian Galvani 678fd8de1d AC_PosControl_Sub: do not reset accel_z integrator when relaxing
Doing so caused the ROV to dive and slowly go back to the altitude
setpoint
2019-12-02 13:26:27 -05:00
Luke.Qin c8ef863e6d AC_PosControl: fix minor bug for set_max_speed_z() 2019-11-26 19:28:38 +09:00
Leonard Hall 3ca713fdcb AC_AttitudeControl: limit ATC_MOT_MIX_MAX in case of a fly away 2019-10-31 12:23:48 +08:00
Leonard Hall 368a8028ae Heli: Prevent loss of yaw control during large angle recovery 2019-10-31 11:53:27 +08:00
Leonard Hall 5afb5b4956 AC_AttitudeControl: Prevent loss of yaw control during large angle recovery. 2019-10-31 11:53:27 +08:00
Leonard Hall e5f724bc3a AC_PosControl: add high vibration compensation 2019-10-18 11:15:25 +09:00
Leonard Hall 5acfc77a3c AC_AttitudeControl: Support for Standby functions 2019-10-17 14:57:18 +09:00
bnsgeyer d1a0635ec2 AC_AttitudeControl: incorporate SysID into tradheli 2019-10-16 08:17:09 +09:00
Leonard Hall 0834726b48 AC_AttitudeControl: Support System ID tests 2019-10-16 08:17:09 +09:00
Peter Barker 8bb51f4b7d AC_AttitudeControl: adjust for new vehicle base class 2019-10-08 11:26:04 +11:00
Leonard Hall 7f5d6662b3 AC_AttitudeControl: Support seperate roll and pitch limits 2019-08-03 12:06:32 +09:00
Leonard Hall 979b54b33e AC_PosControl: support update to PID object 2019-07-25 17:38:15 +09:00
Leonard Hall 30746267ec AC_AttitudeControl_Heli: support for updates to AC_PID library
includes rename get_leaky_i to update_leaky_i
2019-07-25 17:38:15 +09:00
Leonard Hall bbe33e38f3 AC_AttitudeControl: support for upgrade to PID object 2019-07-25 17:38:15 +09:00
Leonard Hall 78be1067a8 AC_AttitudeControl: Alt Hold init bug 2019-07-17 09:09:25 +09:00
Mark Whitehorn ce1a082956 Plane: limit yaw error in bodyframe roll control 2019-04-30 08:51:24 +10:00
Mark Whitehorn 732ed17f2f AC_AttitudeControl: bodyframe roll log target attitude bugfix 2019-04-23 09:15:55 +10:00
Mark Whitehorn d72f2feeb5 AC_AttitudeControl: constrain input euler roll and pitch in bodyframe roll controls
and limit integrated error in bf_roll_pitch_yaw_3
2019-04-23 09:15:55 +10:00
Leonard Hall 32cc642b2e AC_AttitudeControl: Formatting Changes 2019-04-20 09:31:56 +09:00
Randy Mackay 4e494d5a63 AC_PosControl: minor comment fix to pre-arm checks 2019-04-16 11:23:46 +09:00
Randy Mackay 0624f6b8c3 AC_PosControl: minor comment fix 2019-04-16 11:23:46 +09:00
Leonard Hall c00ee6aac5 AC_AttitudeControl: increase rate I gain to match P gain 2019-04-12 09:28:24 +09:00
Leonard Hall e170beaf8c AC_AttitudeControl: reduce throttle mix for manual modes 2019-04-12 09:28:22 +09:00
Peter Barker 9c9ebb908c AC_AttitudeControl: store integrators temps in correct type 2019-04-10 09:37:19 +09:00
Peter Barker 70aed0f29c AC_AttitudeControl: store acro passthrough values as float
The function which sets these has floats, and the function we send them
to uses floats... so store them as floats...
2019-04-10 09:37:19 +09:00
Leonard Hall 6e76dff930 AC_AttitudeControl: remove unused set_throttle_out_unstabilized 2019-04-08 09:42:21 +09:00
Mark Whitehorn b7957e820f AC_AttitudeControl: bodyframe roll log target attitude bugfix 2019-03-30 10:32:24 +11:00
Tom Pittenger ce872d83a4 AC_AttitudeControl: rename dataflash to logger 2019-03-28 16:40:57 +11:00
Patrick José Pereira 6152f31c1e AC_PosControl_Sub: Add new relax_alt_hold_controllers
When changing from manual to alt hold controller it's necessary to hold the I term
since this will help to fix the altitude with vehicles that are not neutral buoyancy

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2019-03-26 13:37:18 -04:00
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