Developer

Arducopter 2.0.40 preview

3689422502?profile=originalI've been away on vacation for the last week and a half, but I was able to port Arducopter to Flash and do some simulations. This has helped me rewrite the navigation control laws, simple mode, and Loiter to all use a streamlined set of control loops. This not only has saved code space, but the end result is a quad that flies like it's on rails. 

 

Loiter and WP navigation are now the same code and use a rate based solution from the GPS. The heading and ground speed values are parsed into X(long) and Y(lat) components. This gives me a far more accurate estimation of position than just using the Mediatek's lat and long outputs. The controller takes the position error, desired speed, and minimum speed and outputs pitch and roll commands. I've noticed a marked improvement in Loiter hold. Basically it's glued to one spot. I'll need to do more testing in windy conditions, so stay tuned.

 

Altitude hold uses the same controller design and manages the speed of altitude change. Landing and altitude changes are much more controlled and I've not seen the quad loose altitude on RTL like it did in the past.

 

The  Throttle, Roll/Pitch, and Yaw control loops have all be separated to give you the option of redefining any of the modes. In the zip file below, Alt hold has been redefined (in APM_Config,h) to use SIMPLE mode for Roll/Pitch. Loiter has been redefined to use Manual throttle. 

 

The Flash based simulator uses nearly identical code to Arducopter. Here's the work in progress of the sim:

 

 

The code itself is available for download here and is considered alpha to me. WP's are being tested tomorrow. Only RTL, SIMPLE, ALT HOLD have been tested so far. Crosstrack correction is currently disabled. Everything should work, but be careful. Anything could happen. I've only crashed 4 times today ;)

Jason

 

Updated:

latest code

E-mail me when people leave their comments –

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

Join diydrones

Comments

  • Chris: Hehe... You guys are like Father Christmas and his North Pole staff.

    I make a wish and what do I see when I open my favorite site?  The little elf's hard at work to make my wish come true!! :D

  • @chris nice info..  thank's

  • That is fantastic news

     

  • 3D Robotics

    mc_don: The DIY Drones camera team is hard at work on a really sophisticated set of camera and gimbal commands via MAVLink that will make setup and tracking easy. You'll be able to do all setup via the Mission Planner. Look for that in a few weeks

  • how about camera gimbal setting?

    g.rc_camera_pitch.set_angle(4500);
        g.rc_camera_pitch.radio_min     = 1000;
        g.rc_camera_pitch.radio_trim     = 1500;
        g.rc_camera_pitch.radio_max     = 2000;
        //g.rc_camera_pitch.set_reverse(1);

        g.rc_camera_roll.set_angle(4500);
        g.rc_camera_roll.radio_min         = 1000;
        g.rc_camera_roll.radio_trim     = 1500;
        g.rc_camera_roll.radio_max         = 2000;

    can wee set from AMP on new ver?

  • V 40 is was tested today. It flew good. The altitude hold acts different.

    I will revert back to V 38 because the sonar alt hold worked better.

    https://www.youtube.com/watch?v=LBD83ogwzuE

     

  • Developer

    Sorry, that copter is navigating between two hidden waypoints. Click the light grey area to toggle it between the WP. It was really just for me to play, but I thought i'd share.

  • I only tested Loiter mode with the altitude on manual. No problems for me at all. i have another video, you can see how stable it was.

  • I got caught on mode issues with v40 today and my radio set "simple" mode was mapped to Rtl or Auto ( not sure) and my stock quad wound up unexpectantly chasing me at 10 ft. No crash but a very fast heart rate. Alt hold sort of worked but was difficult to engage at sonar altitudes. I realize I needed to really examine the source particularly the configuration setup before flying. I went back to v38 and v36 and stuck at v36 since alt hold and loiter work so well on this version on my quad.
  • I tested the RTL and Loiter modes today on V 38 to get a comparison.

    The RTL went up ~50 Ft and held with a altitude hold of 3 ft of variance. There was a NW 9 Mph breeze.

    It turned in and out of the wind direction about 3 times then started a interesting head holding circle that was around a 100 Ft diameter going around 20 Mph. I let it fly around about 4 times watching in amazement and ready to grab it in stabilization mode at any time.  The Loiter mode worked well at lower altitudes. After switching from loiter to simple the copter took off upward and to the south at a great rate of speed. Putting it in stabilization mode gave back the sticks and it was brought in.  I am tempted to try the V 40. I just wish the grasses were a little higher like in spring time.

This reply was deleted.