xiaoping900310 / ardupilot-mega

Automatically exported from code.google.com/p/ardupilot-mega
0 stars 0 forks source link

Add motor arming for ArduPlane like ArduCopter #472

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Feature that you'd like us to add or change you'd like us to make:
Don't allow motors to start after APM bootup until explicitly enabled by some 
means.

If the THR_MIN setting is not 0 then motors will start if the mode isn't 
MANUAL. 

This might happen if the RC transmitter isn't on, so the Rx is not emitting any 
PWM on the control channel. The assumed control channel input is then taken 
from RC_8_TRIM. Unless this is in the MANUAL range (e.g. the default 1500) then 
the APM won't be in manual mode until it receives an explicit MANUAL signal 
when the RC link comes up and the Tx emits the MANUAL signal on the control 
channel.

Original issue reported on code.google.com by philcole...@gmail.com on 1 Jan 2012 at 8:42

GoogleCodeExporter commented 8 years ago
Absolutely perfect requirement.

Original comment by vu2...@gmail.com on 2 Jan 2012 at 6:39

GoogleCodeExporter commented 8 years ago
We will consider this further.  However, the user has to take some 
responsibility for following proper procedures, as just locking down the 
throttle till some user interaction happens is in direct conflict with the 
in-air restart capability of the system which is also an important feature.

There is an existing feature that suppresses the throttle if the system 
believes it is on the ground and the mode is FBW-B or higher.  See attitude.pde 
around line 340.

Leaving the issue open for consideration of improvements....

Original comment by dewei...@gmail.com on 3 Jan 2012 at 4:45

GoogleCodeExporter commented 8 years ago
This is a difference between ArduPlane and ArduCopter by the way.  ArduPlane 
has in-air restart capability.  ArduCopter does not.  ArduPlane can recover 
from an in air reboot (due to power brown-out or other issues) while ArduCopter 
will crash.

Original comment by dewei...@gmail.com on 3 Jan 2012 at 4:47

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
OK, I didn't realize you had something in there already, and it works as you 
describe.
However, starting from everything powered down, but with THR_MIN previously set 
to a non-zero value.

1. Turn on the RC Tx, set the control channel to something that is non-manual 
and non-auto (e.g. STABILIZE or FBW_A), but with throttle set to 0% (1100 us in 
my case).

2. Plug in the battery to the aircraft.

The motor will start and run at speed that is controlled by the THR_MIN value.

I can also start the APM with the control channel set to MANUAL and the 
throttle set to 0% (the motor won't run), then select STABILIZE or FBW_A and 
the motor will start and run at the speed selected by the THR_MIN setting.

I suspect the above would might happen in manual, except that the mux routes 
the RC3 input directly to the RC3 output.

Here are the settings I have that result in the behaviour described, as dumped 
from the CLI setup|show command:
Raw Values
----------------------------------------
130:IMU_SENSOR_CAL                  : ??
013:FLAP_2_SPEED                    : -1
012:FLAP_2_PERCNT                   : 0
011:FLAP_1_SPEED                    : -1
010:FLAP_1_PERCNT                   : 0
144:ARSPD_ENABLE                    : 0
143:SONAR_ENABLE                    : 0
157:INVERTEDFLT_CH                  : 0
141:BATT_CAPACITY                   : 1760
140:INPUT_VOLTS                     : 4.680000
139:AMP_PER_VOLT                    : 27.320000
138:VOLT_DIVIDER                    : 3.856212
137:BATT_MONITOR                    : 3
135:MAG_ENABLE                      : 0
134:GND_ABS_PRESS                   : 102366
133:GND_TEMP                        : 29
156:ALT_HOLD_RTL                    : 8000
005:TRIM_PITCH_CD                   : 0
158:MIN_GNDSPD_CM                   : 0
155:TRIM_ARSPD_CM                   : 3000
016:RST_SWITCH_CH                   : 0
015:LOG_LASTFILE                    : 49
004:LOG_BITMASK                     : 334
014:SYS_NUM_RESETS                  : 213
009:ELEVON_CH2_REV                  : 0
008:ELEVON_CH1_REV                  : 1
007:ELEVON_REVERSE                  : 0
006:ELEVON_MIXING                   : 1
003:SWITCH_ENABLE                   : 0
002:TRIM_AUTO                       : 1
154:LIM_PITCH_MIN                   : -2500
153:LIM_PITCH_MAX                   : 1500
152:LIM_ROLL_CD                     : 8000
216:FLTMODE6                        : 0
215:FLTMODE5                        : 0
214:FLTMODE4                        : 2
213:FLTMODE3                        : 5
212:FLTMODE2                        : 11
211:FLTMODE1                        : 10
210:FLTMODE_CH                      : 8
185:FS_GCS_ENABL                    : 0
184:FS_LONG_ACTN                    : 0
183:FS_SHORT_ACTN                   : 0
182:TRIM_THROTTLE                   : 55
181:THR_FS_VALUE                    : 950
180:THR_FAILSAFE                    : 1
186:THR_SLEWRATE                    : 0
179:THR_MAX                         : 75
178:THR_MIN                         : 12
122:ALT_HOLD_FBWCM                  : 0
121:ARSPD_FBW_MAX                   : 38
120:ARSPD_FBW_MIN                   : 13
229:FENCE_MAXALT                    : 0
228:FENCE_MINALT                    : 0
227:FENCE_CHANNEL                   : 0
226:FENCE_TOTAL                     : 0
225:FENCE_ACTION                    : 0
224:WP_LOITER_RAD                   : 60
223:WP_RADIUS                       : 20
222:CMD_INDEX                       : 0
221:CMD_TOTAL                       : 7
142:ARSPD_OFFSET                    : 3445
132:ARSPD_RATIO                     : 1.994000
131:ALT_MIX                         : 1.000000
151:XTRK_ANGLE_CD                   : 3000
150:XTRK_GAIN_SC                    : 10.000000
203:KFF_THR2PTCH                    : 0.000000
202:KFF_PTCH2THR                    : 0.000000
201:KFF_RDDRMIX                     : 0.500000
200:KFF_PTCHCOMP                    : 0.227000
114:SERIAL3_BAUD                    : 57
113:SYSID_MYGCS                     : 255
112:SYSID_THISMAV                   : 1
001:SYSID_SW_TYPE                   : 0
000:SYSID_SW_MREV                   : 12
65535:SR3_RAW_SENS                    : 3
65535:SR0_RAW_SENS                    : 3
65535:ALT2PTCH_P                      : 0.650000
65535:ENRGY2THR_P                     : 0.500000
65535:YW2SRV_P                        : 0.500000
65535:ARSP2PTCH_P                     : 0.650000
65535:PTCH2SRV_P                      : 0.250000
65535:RLL2SRV_P                       : 0.199219
65535:HDNG2RLL_P                      : 0.700000
65535:RC8_MIN                         : 1192
65535:RC7_MIN                         : 1099
65535:RC6_MIN                         : 1100
65535:RC5_MIN                         : 1498
65535:RC4_MIN                         : 1216
65535:RC3_MIN                         : 1099
65535:RC2_MIN                         : 1350
65535:RC1_MIN                         : 1350
65535:SR3_EXT_STAT                    : 1
65535:SR0_EXT_STAT                    : 1
65535:ALT2PTCH_I                      : 0.000000
65535:ENRGY2THR_I                     : 0.000000
65535:YW2SRV_I                        : 0.000000
65535:ARSP2PTCH_I                     : 0.000000
65535:PTCH2SRV_I                      : 0.000000
65535:RLL2SRV_I                       : 0.000000
65535:HDNG2RLL_I                      : 0.000000
65535:RC8_TRIM                        : 1500
65535:RC7_TRIM                        : 1500
65535:RC6_TRIM                        : 1500
65535:RC5_TRIM                        : 1500
65535:RC4_TRIM                        : 1511
65535:RC3_TRIM                        : 1500
65535:RC2_TRIM                        : 1500
65535:RC1_TRIM                        : 1500
65535:SR3_RC_CHAN                     : 3
65535:SR0_RC_CHAN                     : 3
65535:COMPASS_DEC                     : 0.000000
65535:ALT2PTCH_D                      : 0.000000
65535:ENRGY2THR_D                     : 0.000000
65535:YW2SRV_D                        : 0.000000
65535:ARSP2PTCH_D                     : 0.000000
65535:PTCH2SRV_D                      : 0.000000
65535:RLL2SRV_D                       : 0.000000
65535:HDNG2RLL_D                      : 0.020000
65535:RC8_MAX                         : 1850
65535:RC7_MAX                         : 1940
65535:RC6_MAX                         : 1941
65535:RC5_MAX                         : 1499
65535:RC4_MAX                         : 1804
65535:RC3_MAX                         : 1941
65535:RC2_MAX                         : 1650
65535:RC1_MAX                         : 1650
65535:SR3_RAW_CTRL                    : 0
65535:SR0_RAW_CTRL                    : 0
65535:ALT2PTCH_IMAX                   : 500
65535:ENRGY2THR_IMAX                  : 20
65535:YW2SRV_IMAX                     : 500
65535:ARSP2PTCH_IMAX                  : 500
65535:PTCH2SRV_IMAX                   : 500
65535:RLL2SRV_IMAX                    : 500
65535:HDNG2RLL_IMAX                   : 500
65535:RC8_REV                         : 1
65535:RC7_REV                         : 1
65535:RC6_REV                         : 1
65535:RC5_REV                         : 1
65535:RC4_REV                         : -1
65535:RC3_REV                         : 1
65535:RC2_REV                         : 1
65535:RC1_REV                         : 1
65535:SR3_POSITION                    : 3
65535:SR0_POSITION                    : 3
65535:RC8_FUNCTION                    : 0
65535:RC8_DZ                          : 0
65535:RC7_FUNCTION                    : 0
65535:RC7_DZ                          : 0
65535:RC6_FUNCTION                    : 0
65535:RC6_DZ                          : 0
65535:RC5_FUNCTION                    : 0
65535:RC5_DZ                          : 0
65535:RC4_DZ                          : 30
65535:RC3_DZ                          : 3
65535:RC2_DZ                          : 30
65535:RC1_DZ                          : 30
65535:SR3_EXTRA1                      : 10
65535:SR0_EXTRA1                      : 10
65535:RC8_ANGLE_MIN                   : -4500
65535:RC7_ANGLE_MIN                   : -4500
65535:RC6_ANGLE_MIN                   : -4500
65535:RC5_ANGLE_MIN                   : -4500
65535:SR3_EXTRA2                      : 10
65535:SR0_EXTRA2                      : 10
65535:RC8_ANGLE_MAX                   : 4500
65535:RC7_ANGLE_MAX                   : 4500
65535:RC6_ANGLE_MAX                   : 4500
65535:RC5_ANGLE_MAX                   : 4500
65535:SR3_EXTRA3                      : 0
65535:SR0_EXTRA3                      : 0

Original comment by philcole...@gmail.com on 4 Jan 2012 at 8:53

GoogleCodeExporter commented 8 years ago
I'd like to suggest that a specific 'kill switch' be added in to the system. 
Not a software setting but an actual physical jumper for the arduplane that 
when connected will prevent the motors from firing up. 

I'm fairly new to the arduplane, but having worked with multi-rotors and having 
read horror stories of lost fingers (or worse) some form of safety feature is a 
must. To me it seems like a physical jumper is the best option to provide 
99.95% certainty of motors being disarmed while still preserving the ability to 
reboot in flight.

Original comment by Ouds...@gmail.com on 13 Aug 2012 at 7:05