[This home page has moved. It's now here]

Views: 143128

Comments are closed for this blog post

Comment by Peter Meister on July 28, 2009 at 8:59pm
Flight Report - July 28th, 2009

Here is the deal...

Flight 1:

Setup for a 2 waypoint flight, using new "Peter" code from Jordi. Uploaded fresh, set reverse for roll and pitch for my specific servos. Setup for switch 1 for waypoint.

Took off, flew to 150 ft - pointed opposite of waypoint 180 degrees. Turned on autopilot, plane turns slightly left and flys nearly a perfect 45 degree line forever. Plane was porposing like a dolphin. But not unstable - just rapid up and downs in small roller coaster type fashion. Turned AP off. Flew back landed.

Flight #2:

Verified code again, verified waypoints. Took off went up to 150ft. This time over the launch point I turned on the autopilot with the plane pointed directly at the 1st waypoint. Plane immediately banked right and started turning towards 45 degrees. Hit 45 degrees and flew that path forever. Turned AP off, came back. Tried the same thing again, turned back towards 45 degrees. Looked at telemetry, plane was flying away from waypoint 1 which was at a 270 degree westerly direction. Turned AP off, landed.

Flight #3:

Changed code, figured ok Ill try RTL. Change easystar.h to switch 0. Burned it to ardupilot and launched the plane. Flew away towards waypoint 1, turned on the autopilot. Plane flew to 45 degrees and flew that direction forever. Turned AP off, said hmmm...that is freaking weird. Ok, lets try again. So this time I flew the plane up to 150 ft, turned it around pointing straight towards me standing at launch point. When it was about 100 ft from me, I switched on the AP. Plane flew towards me, right above me it started a right turn and flew a 180 degree and continue to try to circle above me. Nice, could RTL be working. So I let it do this, but the plane kept circling flying slowly and slowly away from me. It could not keep itself over me. Winds less then 5mph. So I turned AP off, tried the same thing again. And it came back to me, turned over my head, tried to maintain a circling pattern over me, but started to drift, I watched it intensely and I noticed it couldn't quite turn all the way left so once in the right bank, it couldn't really use left turning much to correct and come back to me. Interesting, like it kind of stuck itself in short circles, which kind of increased in radius every time in completed a full revolution. Once it was sufficiently away from me I turned AP off and returned and landed.

Flight 4,5,6:

Went into the ardupilot, switched back to waypoint mode. Changed radius value from 100 for the arduconfig to 20. Burned, took off and flew up to 150ft. Pointed plane away opposite waypoint, turned AP on and plane flew directly 45 degrees north-east. Tried this over an over again, kept going north-east. So I said hmm, Interesting.

Came back landed. Looked at code, everything looks ok, Flight # 5-6 went up, pointed at me, turned on AP. Plane made 180 degree turn and a beeline to 45 degrees. So I said, I know fake bearing is set to 45 degrees. Could this be what its fixating around. So I landed, went into the code, changed the fake bearing direction to 270 degrees. Re-launched, got to 150 ft. Turned on AP, plane flew directly north-east. Oh well, atleast I tried my theory. Landed - that ended flight # 6.

Flight #7:

This time I was hell bent on showing the Autopilot each waypoint manually and then turning on the AP when I was only 100ft from Waypoint, flying directly towards it. Well this got interesting. First attempt I flew towards the 1st waypoint, at a little under 100 ft from hitting it I enabled the AP. The plane flew towards the waypoint, once it hit it, it turned around came back and circled. Over and over again, however again it could not maintain location trying to circle they got bigger and bigger until at some point the plane no longer circled. Got so far away I almost lost the plane behind some huge planes, my heart raced as I blindly flew it back assuming its position. Lucky recovery there. So I said to myself - "SELF" that was interesting, if I guided the plane close to the waypoint it seemed to kind of recognize it and try to get to it. Interesting, so I looked at the telemetry and guess what, it switched to waypoint 2. Hmmm, interesting, but still weird since I flew most of that leg manually. So I watched the plane as it turned south to attempt waypoint 2. It flew past waypoint 2, started a right turn and tried to circle over 2. Then like the other flights the circle got bigger and bigger until eventually plane was flying straight 45 degree path.

So I turned of AP, flew back to RTL. Flew away from RTL, and turned around and pointed the plane right @ waypoint 2. Less then 100 ft from it I turned on the AP, plane flew straight over waypoint 2 and commenced a right turn to come back, circled like before, circles got really big and you know the rest of the story :) - Turned off AP, landed.

Flight 8: Decided to disconnect the GPS and attempt the fly-by-wire mode. Turned on - did not touch the radio. Took off, no stabilization control, turned switch on to see if anything happened, it flipped the plane upside down, turned switch off landed.

Went into the code, changed switch from waypoint to RTL. Re-launched with no GPS hooked up, got to 100 ft, let go, no stabilization support. Turned switched on, and plane pushed down elevator diving down towards mother earth and actually flipped inverted, that was the funniest thing I have ever seen the easystar flying upside down. Turned AP off and landed.

8 flights in total in 2 hrs. Tested every scenario I knew. Nothing seemed to work, the only constant was its desire to go NORTH-EAST. It loves to go that direction, funny thing, that take the plane directly to a GOLF Course and a food store. Plane must love Golf and must be quite hungary, I guess lipos aren't enough for her, she needs more food then lipos. LOL....

Anyways, the analysis from this test run. The plane only seemed to recognize a waypoint if i flew it almost dead over it, then suddenly the AP was able to turn and circle over it, if I went sufficiently away say 300ft or more, then the plane had no clue how to get to any waypoints. Its definately something I didn't try before, but Is it a new behavior, probably not. I bet it would have done this with the other code versions, I hope this flags something to jordi though. Maybe its a sign of something that he would understand, simply driving the plane to close to the waypoint seemed to wake it up if it was close enough.

This was a marathon flight run today, my poor EZ is losing its bottom. I land on a rocky road - if you knew where I was flying out of you would say ARE YOU NUTS! Its a small field with trees 360 degrees around it up to 100 ft. Then open sky. Love the field, and just wish it had a nice grass landing strip. Tonight I will need to breakout the micro-balloons and 30 minute epoxy and recreate some bottom layers, as I took about a 1/4 inch of elapor off tonight with the 15 + landings I made on this gravel strip :)



Comment by Jordi Muñoz on July 28, 2009 at 9:16pm
I do believe that you have a mess in the gains values of everything. May i see you header?

By the way i disabled the fake bearing in your code so you can not fake bearing, at least we know thats not the problem.

3D Robotics
Comment by Chris Anderson on July 28, 2009 at 9:24pm

Many thanks for the really thorough test report--I'm sure that will give Jordi plenty to work with as he diagnoses your problem. I'm not sure what changes he made to your code, but there are clearly several things going wrong here. It's particularly odd that fly-by-wire isn't stabilizing for you--indeed, that it's doing just the opposite! That works great for me on the same setup, which suggests a more systematic problem with your configuration.

Just to confirm, you've got:
--EasyStar, set up just like the one in the manual (XY in diagonal position, cable facing forwards)
--Z sensor
--Airspeed sensor & shield
--You're always doing the jumper/bindplug configuration process when you arrive that the field


Comment by Jordi Muñoz on July 28, 2009 at 9:40pm

Can you post a hi-res picture of your airplane, please? Looks like you placed the ir sensor upside down (in your profile picture).
Comment by Peter Meister on July 28, 2009 at 11:37pm
Chris, correct on all points. Cable facing forward, jordi the FMA is not upside down. I took off the label is all.

IR sensor is upright, if it wasn't the plane would not stabilize itself in autopilot mode. Remember it does fly itself north-east, so the IR is working just fine as its stabilizing the plane and providing information properly in the GCS.... GCS reports proper telemetry and artificial horizon reports proper up-down-right and left.

XY in diagonol position, cable is facing forward. Z sensor on right side of plane with clearview.

Shield is connected, airspeed sensor is enabled pitot coming out front right side of fuselage.

EM406 on right side wing, facing up towards sky.

Posting my Header file in the next post...
Comment by Peter Meister on July 28, 2009 at 11:39pm
Here is my header, one from jordi's peter code...

/*ArduPilot Header file, good luck!*/

// Airframe settings

#define SENSOR_Z 1 //Thermopiles Sensor Z, 1 = Enabled, NOT WORKING
#define REVERSE_X_SENSOR 0 //Thermopiles Sensor Z, 1 = cable behind, 0 = cable front
#define MIXING_MODE 0 //Servo mixing mode 0 = Normal, 1 = V-tail(v tail not testet yet).
#define REVERSE_ROLL 1 //To reverse servo roll.
#define REVERSE_PITCH 1 //To reverse servo pitch.
#define RADIO_SWITCH_ACTION 1 // 0: TX Switch centered = waypoint mode & full = RTL mode. 1: TX Switch centered = RTL & full = waypoing mode.
#define GPS_PROTOCOL 1 //0 = NMEA, 1=SIRF, 2=uBlox, Choose protocol, uBlox only for PRO's please.
#define ATITUDE_RATE_OUTPUT 250 //the output rate of atitude data.
#define POSITION_RATE_OUTPUT 4 //This number will be multiplied by ATTITUDE_RATE_OUTPUT, the result is the refresh rate in milliseconds.
#define REMEMBER_LAST_WAYPOINT_MODE 0 //If set 1 = will remember the last waypoint even if you restart the autopilot. 0 = Will start from zero everytime you restart the system.
#define INTPUT_VOLTAGE 5200.0 //voltage in millis your power regulator is feeding your ardupilot to have an accurate pressure and battery level readings. (you need a multimeter of course)

// Fly by wire settings or not GPS plugged
//(Note: If you disconnect the GPS you will fly by wire.)
//ALWAYS leave you stick's centered when you ArduPilot is booting up.

#define FLY_BY_WIRE_GAIN_ROLL .5 //Increase the value to increase the //response of the sticks. DESIRED_ROLL = //STICK_POSITION*FLY_BY_WIRE_GAIN_ROLL

#define FLY_BY_WIRE_GAIN_PITCH .5 //The same as roll.
#define GPS_ERROR_SPEED_SETPOINT 3 //in m/s, in case of GPS failure the airplane will enter in stabilization mode only and will try to maintain the airspeed set here.

//Autopilot PID gains.
//(Note: All the PID control loop gains and limits...)
#define SERVO_MAX 2000 //Range of servos pitch and roll
#define SERVO_MIN 900

#define head_P .7 //Heading error proportional (same used to move the rudder)... DO not add to much or you will oscillate left and right. (drunk driver effect)
#define head_I .1 //heading error integrator. Do not add to much or you will overshoot.
#define head_D 0 //Not used, but someday....
#define head_error_max 35 //The maximun output in degrees to control the roll setpoint
#define head_error_min -35 //The min output in degrees to control the roll setpoint

#define roll_abs .4 //Set point absolute...(Not Used)
#define roll_P .7 //roll PID proportional
#define roll_I .7 //roll PID integrator
#define roll_min -50 //PID output limit in servo degrees
#define roll_max 50 //PID output limit in servo degrees
#define roll_Integrator_max 20 //Limit the integrator, to void overshoots
#define roll_Integrator_min -20

#define pitch_P 1.3 //Pitch Proportional
#define pitch_I .9 //Pitch integrator
#define pitch_min -50 //Pitch limits
#define pitch_max 50
#define pitch_Integrator_max 20 //Pitch integrator limits
#define pitch_Integrator_min -20
#define PITCH_COMP .30 //<------Very important, Pitch compensation vs. Roll bank angle.

#define throttle_max 1800 //Servo range In us seconds.
#define throttle_min 1200 //
#define throttle_dead_zone 20 //In porcent %
#define throttle_absolute 3 //Absolute
#define throttle_kp 3 //Porportional
#define throttle_ki 1 //Integrator
#define throttle_max 85 //Limits
#define throttle_Integrator_max 70 //Integrator limit.

//Another PID gains for altitude and speed.
#define ALTITUDE_ERROR_MIN -10 //
#define ALTITUDE_ERROR_PITCH_PROPORTIONAL 1.5 //Altitude error proportional, pitch setpoint
#define ALTITUDE_ERROR_PITCH_MAX 0 //Limits, EasyStar climb by itself, you don't need to up the elevator (you may stall)...
#define AIRSPEED_CENTRAL 22 //Airspeed central point in meters/second, normal flight... This value must the the airspeed that make your plane flight stedy.

/*Debugging Stuff*/

#define FAKE_BEARING 0 //If set to 1, will fake the bearing and will try to go always head to the defined DESIRED_FAKE_BEARING
#define DESIRED_FAKE_BEARING 45 //Will try to go NorthEast, you can change that to 0 = NORTH, 90 = EAST, 180 = SOUTH, 270 = WEST or whatever!
#define FAKE_GPS_LOCK 0 //If is set to one will jump the GPS lock process to set home position. FOR TESTING ONLY!
#define PRINT_WAYPOINTS 1 //If set 1, at bootup will print all the waypoints set in the eeprom!
#define TEST_THROTTLE 0 // If set 1 will test the throttle increasing the speed slowly.

3D Robotics
Comment by Chris Anderson on July 28, 2009 at 11:44pm
For starters, I can tell you that your Fly By Wire gains are way too low. They should be around 8. Your are at 0.5
Comment by Peter Meister on July 28, 2009 at 11:51pm
Jordi set those, i did not modify them for those flights. Will change to 8.0 and try them tomorrow. This is jordis straight header file, only things I modified were the reversing and the switch. But those do not affect the enablement of the the stabilize mode correct ? Shouldn't I be able to notice its in stabilize mode while still on the ground ? Like the FMA does standalone. It doesn't just magically turn on in the air, so I should see sensor response on the ground, right ? I do not see any sensor response, now also - my prior flights attempts with the code before this were set to 8 for both and still not stabilize. This was the code prior to the new one, the I_Can_Fly.zip...

Comment by Jordi Muñoz on July 29, 2009 at 12:15am
Chris is a new code I'm working on, i have changed that.

Peter, leave them as .5, you can increase it a little bit to have more response. I changed the formula (instead dividing now is multiplication).

Comment by Jordi Muñoz on July 29, 2009 at 12:15am
No pictures of you aircraft?

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service