3D Robotics

ArduPilot flight testing--success!

Great day of flight testing ArduPilot today. Jordi and I were joined by Jack Poller, and we spent the whole day debugging code, tweaking gains and otherwise building towards the aim of the day, fully autonomous flight. Good news: ArduPilot works great in the air, we now have an officially flight-tested autopilot! Here's how the day went: --Arrived at the BARCS field and set up all the equipment. Beautiful day in the Bay Area--warm, sunny and no wind. Today we were going to test ArduPilot with the Superstar EP as the main platform, with the EasyGlider and EastStar with EasyGlider wings as secondary platform. --First hitch: we realized that in the last code rev we introduced a bug. Although the ArduPilot board is working fine, the navigation isn't working at all. Lots of debugging and looking at variables on the Arduino serial monitor. Eventually Jordi finds the bug (two variables got reversed). --While he's debugging, I get the EasyStar with Easy Glider wings ready to fly. I get it up a few times but it's really a dog. The ailerons generate as much inverse drag as they do tilt and it's just a struggle to keep it in the air. I crash land once, then again, then after some repairs, a catastrophic nose dive under power. Bye-bye FrankenStarGlider!

--Second hitch: FMA Co-pilot (the version with the built in Rx) is acting flakey. Lots of wiggling of wires before we realize that the crystal is falling out! Scary. Put it back in and tape it for safety. --Lots of flying and watching ArduPilot data and GPS telemetry on the ground via the Xbee wireless module on the FTDI pins of the autopilot board. FMA working great, but when the autopilot is on we're getting inexplicable behavior. This isn't the way it worked in the sim! Keep landing and tweaking gains but it still isn't going in the direction it's supposed to go. Switch to "sneaker sim". Jack walks around with the plane and we watch the rudder and telemetry. --We've been flying in RTL mode but to make the debugging easier decide to switch to "NE mode"--when the autopilot is switched on the plane should always fly NE (that just happened to be the way the wind was coming and wasn't into the sun). --Eventually we figure out what's wrong. The way I've got the Superstar set up, both Channel 3 and 4 are reversed at the Tx to suit the servo configuration. D'oh! Reverse the sign of the servo commands in the code, and now it seems to be working right in sneaker sim. Realize that we need to write a checklist for people using ArduPilot with basics like watching out for reversed channels and remembering to disconnect the GPS before uploading new code.

(Jordi and Chris. All photos by Jack Poller. Full gallery of the day here). --Back to the air. Better, but still not there. It's losing too much altitude in turns. Land, reduce the gains so full rudder is just 15 degrees. Switch from a 7.4V battery to an 11.1v battery to give the plane more power (it's really struggling to climb). --While Jordi is tweaking gains and charging up laptops, Jack and I fly the EasyGlider Pro with FMA stabalization. It's a lovely plane and flies so well. Jack, who's never flown before, gets about ten minutes of air time and proves a natural. Jordi takes it a few times and achieves his best landing ever. Yay EasyGlider Pro! --Laptops recharged and new code loaded. Now we're getting there! The plane flies much better with the extra power. The FMA is dialed in just right. And ArduPilot is rock solid. Tight turns, tracks straight and good altitude hold. Success!

It's the end of the day and we're delighted--mission accomplished. Videos coming later but in the meantime, here's the new code. Also check out Jack's photo gallery of the day.
E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • Hi guys, nice work...i´ve been using the RCAP3 on my trainer along with FMA-copilot and i´m look for a new setup, i´m thinkingt of an IMU unit but this one looks promising for a less expensive unit, thanks for all the info.
  • 3D Robotics
    Just a note to everyone that the ArduPilot.zip code currently in the Google repository is now the current version back in RTL mode. There is also another version that is North East only for testing. It's called ArduPilotTest.
  • I just wanted to say thanks to Chris and Jordi for allowing me to play with them on a beautiful Friday afternoon.

    A couple of other thoughts - as is usual with most engineering endeavors, especially when prototyping, everything takes more time than you originally thought or allocated. Bring extra batteries or chargers - not only for the birds, but for the laptops as well.

    Hopefully, I'll get to play again in the near future. Best of luck to everyone!

    Jack
  • 3D Robotics
    Jhon: Yes, that normal. Just say yes.

    (also note that this code is set for single direction (45 degrees). Edit the line in the comment above if you want to return to RTL/waypoint mode)
  • the new code is showing the msg "the file xyx needs to be inside a folder named xyx, create and move?"

    thats normal ?
  • 3D Robotics
    @Michal: Correct. 45 = NorthEast (see description above).

    For usual waypoint following that would be:

    test=middle_yaw+PID_heading(compass_error(wp_bearing, course));

    We'll comment the code this weekend to make all these things clear. I.e. how to configure it for single-direction test mode, etc. It will of course default to RTL mode.
  • Congratulations! Great photos. Looking forward to video.
  • Congratulations!
    In latest code, function yaw_control:
    test=middle_yaw+PID_heading(compass_error(45, course));

    Those 45 constant is for testing? I suppose it won't follow waypoints this way, just fly in one direction.
  • Naa its not a shame about the big wing, pile of crap, well done Chris
  • Good news... Congrats...
This reply was deleted.