Commit Graph

94 Commits

Author SHA1 Message Date
Randy Mackay e691b680ca AR_AttitudeControl: add speed-control-active method
allows caller check if speed controller if active
also consolidated other methods to use this check to reduce a little bit of duplicate code
2018-05-29 16:37:31 +09:00
Randy Mackay 3b71d0360a AR_AttitudeControl: const get_decel_max and get_stopping_distance 2018-05-29 16:37:31 +09:00
Randy Mackay a7fbfe7767 AR_AttitudeControl: caller provides dt instead of calculated internally
This allows the vehicle's main loop rate to be used instead of an internally calculated dt which suffers from jitter
2018-05-24 11:06:20 +09:00
Randy Mackay 856d592b1d AR_AttitudeControl: accel limit stops 2018-05-24 11:06:20 +09:00
Ammarf 832778e471 AR_AttitudeControl: add separate decel limit 2018-05-23 17:17:29 +09:00
Randy Mackay f6c06496e2 AR_AttitudeControl: fix accel limiting 2018-05-21 10:28:56 +09:00
Ammarf a9ee949c32 AR_AttitudeControl: limit desired steering rate 2018-05-21 09:48:43 +09:00
Randy Mackay 56672c1c28 AR_AttitudeControl: fix get_steering_out_rate use of max turn rate and acceleration 2018-05-10 20:37:28 +09:00
Randy Mackay 9feaf9cfdd AR_AttitudeControl: const some internal variables
non-functional change
2018-05-10 20:37:28 +09:00
Randy Mackay fa76a7c904 AR_AttitudeControl: get-steering-out-lat-accel uses negative speeds 2018-05-10 08:02:13 +09:00
Randy Mackay 5563691bd1 AR_AttitudeControl: assume positive steering output rotates vehicle clockwise
also remove steering scaling by speed which has been moved to AR_MotorsUGV
2018-05-10 08:02:13 +09:00
Randy Mackay ce44326ba8 AR_AttitudeControl: fix get_steering_out_heading while reversing 2018-05-06 16:58:00 +09:00
Randy Mackay 3f1f68b130 AR_AttitudeControl: support vectored thrust
steering output is not scaled for speed
steering integrator does not build up at low speed
2018-04-24 19:57:19 +09:00
Randy Mackay 9c2da896b9 AR_AttitudeControl: get_throttle_out_stop only stops once desired speed reaches zero
this reduces the final jerk to a when transitioning from forward to reverse and in cases where ATC_ACCEL_MAX is small
2018-04-24 12:24:53 +09:00
Randy Mackay 365e1030db AR_AttitudeControl: separate speed limiting to new method
This allows the desired speed limiting (by acceleration) to be done before the speed-to-throttle PID controller is run.
This is required so the avoidance calls (which work on the desired speed) can be run after limiting but before the PID controllers
2018-04-24 12:24:53 +09:00
Daniel Widmann 27234f78c6 AR_AttitudeControl: Allow using steer rate control for skid steer rovers without GPS 2018-04-13 09:12:03 +09:00
Randy Mackay a8857726d1 AR_AttitudeControl: replace get_steering_out_angle_error with heading
internally uses AHRS's heading to determine angle error so overally a non-functional change
2018-04-05 12:14:59 +09:00
Randy Mackay e6f8021519 AR_AttitudeControl: add angular accel and rate limits
This limits the change in desired turn rate to reduce impossible requests which should help avoid overshoot
Also add rotation rate limit to turn-rate controller
2018-04-05 12:14:59 +09:00
Randy Mackay d139f0e28e AR_AttitudeControl: add get_stopping_distance 2018-03-14 12:40:04 +09:00
Randy Mackay 5e90cdbf59 AR_AttitudeControl: parameter desc range increase
new steering controller can use higher FF and zero P
2018-01-12 08:15:34 +09:00
Randy Mackay 1bb18bc941 AR_AttitudeControl: get_throttle_out_speed uses timeout definition 2018-01-05 13:33:21 +09:00
Randy Mackay 4ac5ef3a13 AR_AttitudeControl: allow filter to be zero
Also increase default filter to 50hz
2018-01-05 13:33:21 +09:00
Randy Mackay 16d3e5c00d AR_AttitudeControl: add feed foward for speed and steering rate control 2018-01-05 13:33:21 +09:00
Randy Mackay 40bb2b0ad9 AR_AttitudeControl: set throttle speed pid dt 2018-01-05 13:33:21 +09:00
Randy Mackay a2b1807ca0 AR_AttitudeControl: fix turn-rate controller timeout 2018-01-05 13:33:21 +09:00
Peter Barker e0c586876b APM_Control: use GPS singleton 2017-12-27 00:58:02 +00:00
Randy Mackay cabced82f1 AR_AttitudeControl: fix parameter descriptions 2017-12-11 17:01:18 +09:00
Michael Oborne 78f732c380 AR_AttitudeControl: fix parameter docs 2017-12-11 08:35:33 +09:00
Randy Mackay 744f4baf22 AR_AttitudeControl: add parameter description increment 2017-12-09 16:23:25 +09:00
Randy Mackay f00f4ce79b AR_AttitudeControl: fix get_desired_speed timeout 2017-12-09 16:23:22 +09:00
Randy Mackay 36c5f057ae AR_AttitudeControl: add get_desired_turn_rate lat_accel and speed
for reporting use only
2017-12-09 12:18:49 +09:00
Grant Morphett f7db538220 APM_Control: Fixed the subparam indexs to start at 1
AFAIK there is still a bug in ArduPilot where subparams should not start at index 0.  This is due to the way the index math and bit shifing works as it incorrectly offsets all 0 index params to 0. We allow 2 levels of sub params - 3 levels in total.  So params, sub params and sub sub params.  The 0 parameter in all those is unfortunately always references param[0].  So param[0] and subparam[0] and subsubparam[0] will reference the same parameter value.  Its why we always say start the index from 1 as the math and bitshifting then works correctly.

Yeah this is worded badly - hard to explain.
2017-11-29 09:43:10 +09:00
Randy Mackay b9a1621d38 AR_AttitudeControl: minor comment fix
non-functional change
2017-11-27 10:35:26 +09:00
khancyr 2a25011b14 AR_AttitudeControl: const local variables 2017-11-09 09:53:12 +09:00
khancyr e9e1dac188 AR_AttitudeControl: remove unused skid_steering arg from get_throttle_out 2017-11-08 15:45:35 +09:00
khancyr d226ffeeb2 AP_AttitudeControl: remove tabs
non-functional change
2017-11-08 15:06:25 +09:00
Daniel Widmann 49887235df AR_AttitudeControl: get_steering_out methods accept reverse argument 2017-11-08 14:36:23 +09:00
Randy Mackay ce73d724c8 AR_AttitudeControl: rate-control for skid-steering uses I term even at low speeds 2017-10-26 19:45:04 +09:00
Randy Mackay ee3daaa7c9 AR_AttitudeControl: reset input filter for steering and throttle controllers
Also only set dt to non-zero value
2017-10-26 19:44:54 +09:00
Randy Mackay 2986d3eb7d AR_AttitudeControl: fix braking
this fix ensures the output throttle is never in the opposite direction from the desired-speed
there is a possibility that this could lead to rougher throttle response when the vehicle is transitioning from forward to backwards motion because the throttle response will immediately go to zero when the desired speed cross over zero
2017-10-26 19:44:38 +09:00
Randy Mackay 49cbbf4d76 AR_AttitudeControl: minor comment fix 2017-10-26 19:44:32 +09:00
Randy Mackay 8daa8cba1f AR_AttitudeControl: record desired turn rate and speed for logging 2017-10-26 19:44:26 +09:00
Randy Mackay 7e5f98b535 APM_Control: fix throttle and steering integrator calc 2017-10-07 14:55:16 +09:00
Randy Mackay 9f876dc7a0 AR_AttitudeControl: throttle and steering control library
Throttle controller has these advantages over existing controller:
based on velocity in vehicle's forward-back axis rather than ground-speed
straight-forward PID controller using speed error as input
speed control acceleration limts
stop control slows vehicle smoothly
configurable filtering

Steer controller has these advantages over existing controller:
output scaled properly for skid-steering vehicles
layered P and PID controller for angular error and rate control
configurable filtering
2017-08-15 20:47:19 +09:00