baro/sonar automatic landing failsafe
baro/sonar automatic landing failsafe
hello,
is there an autolanding feature ? is this planned ?
also using baro/sonar , we can deduce the rpm to achieve hovering and feed the dynThrPID range accordingl,kind of inflight motor range calibration , could also provide a smother range near the deduced hovering rpm ...
is there an autolanding feature ? is this planned ?
also using baro/sonar , we can deduce the rpm to achieve hovering and feed the dynThrPID range accordingl,kind of inflight motor range calibration , could also provide a smother range near the deduced hovering rpm ...
Last edited by kos on Tue Apr 17, 2012 8:40 am, edited 1 time in total.
Re: baro/sonar automatic landing failover motor calibration
hi
Please do not take it seriously
activate failsafe in sketch and modify the value in the formula.
go flying
switch off your tx
wait
the copter should descent now (maybe it could be a more or less hard landing)
/Please do not take it seriously
Please do not take it seriously
activate failsafe in sketch and modify the value in the formula.
go flying
switch off your tx
wait
the copter should descent now (maybe it could be a more or less hard landing)
/Please do not take it seriously
Re: baro/sonar automatic landing failover motor calibration
... i bet we can deduce the value
no more change in the code upon battery size or payload changes
no more change in the code upon battery size or payload changes
Re: baro/sonar automatic landing failover motor calibration
mbrak wrote:go flying
switch off your tx
.. the only issue when you tx is off is drift control
dr.tom wrote:and by managing it in the code, the system is 'cleaner', no switches & wires going down the frame and landing gears...
true
copterrichie wrote:One idea would be to read the Z Axis of the Accelerometer, it should return to 1G on touchdown.
I change the failsafe routine to have autolanding using baro only,
with baro only we do not have the ground reference (we could land below initial BAROaltStart / BaroAltGround )
this should work better with a sonar
no need to read acc ?
Code: Select all
// baro only
# define GROUND_CONTACT 1
// sonar
//#landingGearMounOffsett 15
//# define GROUND_CONTACT (0>=(sonarAlt - landingGearMounOffsett))
#if defined(FAILSAFE)
if ( failsafeCnt > (5*FAILSAVE_DELAY) && armed==1) {
if (BaroPID>0){
// under target altitude and moving up
AltHold -= 35; // set target altitude down
failsafeCnt=5*FAILSAVE_DELAY; // until we reach target altitude again
}else{
//over target altitude
if ((failsafeCnt > (5*FAILSAVE_OFF_DELAY) ) || GROUND_CONTACT ){
//if we cannot reach target altitude , or landed
// maybe initial throttle was too high, time to stop anyway
armed = 0; // This will prevent the copter to automatically rearm if failsafe shuts it down and prevents
okToArm = 0; // to restart accidentely by just reconnect to the tx - you will have to switch off first to rearm
}
}
failsafeEvents++;
}
failsafeCnt++;
#endif
Code: Select all
if(setfailsafe==0){
for(i=0; i<3; i++) rcData[i] = MIDRC;
// if we are near hovering speed or in baro mode , do not change throttle
// else ensure to engage failsafe with safe throttle
if( (10>=(rcCommand[THROTTLE]-FAILSAVE_THR0TTLE)) && (baroMode==0)){
rcCommand[THROTTLE]=FAILSAVE_THR0TTLE;
}
rcData[THROTTLE] = rcCommand[THROTTLE];
setfailsafe=1;
baroMode = 1;
}
-
- Posts: 2261
- Joined: Sat Feb 19, 2011 8:30 pm
Re: baro/sonar automatic landing failsafe
Landing with baro is not good because it gives wrong data under 30cm altitude (pumping effect). I was tryed to landing in alt hold mode - very hard to do this. Only sonar works well near ground, but it is not installed for everyone. I think current failsafe routine is the best due to it's simplicity (and therefore good error-protection).
Only thing that will really helps - automatic finding hover throttle value on-the-fly. Because it is hard to set precise filesafe throttle level in config (and hard to re-configure after changing hardware configuration). It is not so hard if we have baro.
Only thing that will really helps - automatic finding hover throttle value on-the-fly. Because it is hard to set precise filesafe throttle level in config (and hard to re-configure after changing hardware configuration). It is not so hard if we have baro.
-
- Posts: 2261
- Joined: Sat Feb 19, 2011 8:30 pm
Re: baro/sonar automatic landing failsafe
The simple fact of entertaining the idea of auto-landing is a major advancement in my opinion. I agree that the usage of sonar and the Z Axis of the Accelerometer for the final approach is the best solution at present.
Re: baro/sonar automatic landing failover motor calibration
with default settings the copter must lose 35cm in less of 20 second .. or shit happens
outdoor, high altitude and full initial throttle ..not ready yet
so, here is the indoor testing video : https://vimeo.com/40542705
outdoor, high altitude and full initial throttle ..not ready yet
so, here is the indoor testing video : https://vimeo.com/40542705
Code: Select all
#define FAILSAVE_BARO_OFF_DELAY (FAILSAVE_OFF_DELAY+20)
#define FAILSAVE_PID_STEP 0
#define FAILSAVE_ALT_STEP 35
//#define FAILSAVE_PID_STEP 15
//#define FAILSAVE_ALT_STEP 25
if ((BaroPID-FAILSAVE_PID_STEP)>0){
// under target altitude and moving up
AltHold -= FAILSAVE_ALT_STEP; // set target altitude down
failsafeCnt=5*FAILSAVE_DELAY; // until we reach target altitude again
}else{
//over target altitude
if ((failsafeCnt > (5*FAILSAVE_BARO_OFF_DELAY) ) || GROUND_CONTACT ){
armed = 0; // This will prevent the copter to automatically rearm if failsafe shuts it down and prevents
okToArm = 0; // to restart accidentely by just reconnect to the tx - you will have to switch off first to rearm
}
}
Re: baro/sonar automatic landing failsafe
alexmos wrote:Only thing that will really helps - automatic finding hover throttle value on-the-fly. Because it is hard to set precise filesafe throttle level in config (and hard to re-configure after changing hardware configuration). It is not so hard if we have baro.
I would realy like to have this working with any initial throttle value, without initial calibrating loop
- flying acro at full throttle , or fast descending with almost zero throttle
- failsafe, rx/tx down
- multiwii engage safe autolanding
what would the code look like ? your are using estVelocity ?
Last edited by kos on Thu Apr 19, 2012 2:56 pm, edited 1 time in total.
-
- Posts: 2261
- Joined: Sat Feb 19, 2011 8:30 pm
Re: baro/sonar automatic landing failsafe
Watching in total Awe!
Re: baro/sonar automatic landing failsafe
I saw your video like yesterday or so - well done!
I hope this gets implemented into the current dev asap.
//UndCon
I hope this gets implemented into the current dev asap.
//UndCon
Re: baro/sonar automatic landing failsafe
it only work if initialThrottle is near hovering throttle ( lets says +/- 100 to be safe) .. the clamp in the baroPID will not allow automatic baro/sonar landing if a full initial trohttle is applied .
this could be use for autlanding but not for every failsafe condition, unless there is an initial calibration loop
this could be use for autlanding but not for every failsafe condition, unless there is an initial calibration loop
alexmos wrote:Only thing that will really helps - automatic finding hover throttle value on-the-fly.
-
- Posts: 2261
- Joined: Sat Feb 19, 2011 8:30 pm
Re: baro/sonar automatic landing failsafe
I personally believe this Failsafe should be taken very seriously. Read this please.
http://multikopter.co.uk/forum/index.ph ... msearch__1
when one of these copters serious harm someone, we will wish we had.
http://multikopter.co.uk/forum/index.ph ... msearch__1
when one of these copters serious harm someone, we will wish we had.
Re: baro/sonar automatic landing failsafe
the main issue is "HowTo safely test the failsafe" ?
i think it is time for HIL
i think it is time for HIL
-
- Posts: 2261
- Joined: Sat Feb 19, 2011 8:30 pm
Re: baro/sonar automatic landing failsafe
to me this altitude hold and position hold , then return to home , then autolanding .. cool but :
remove the gps , will it still work .. ?
set initial input to full throttle , will it still work ?
for those who know about workflow pattern [1], what do you think about describing Flight Process Management in multiwii [2] ... that could be integrated in the wiki documentation page
1 : http://www.workflowpatterns.com/patterns/control/
2: https://pixhawk.ethz.ch/_media/software ... iagram.png
remove the gps , will it still work .. ?
set initial input to full throttle , will it still work ?
for those who know about workflow pattern [1], what do you think about describing Flight Process Management in multiwii [2] ... that could be integrated in the wiki documentation page
1 : http://www.workflowpatterns.com/patterns/control/
2: https://pixhawk.ethz.ch/_media/software ... iagram.png