Developer

Ardupilot 2.5 Release Candidate

I was finally able to test 2.5 over the weekend and added a few tweaks to the code.
Here's what I hope is the final release.

As the new Manual gets formatted, you can view it at: http://code.google.com/p/ardupilot/wiki/ArduPilot25
Until the content is finally moved over the 2.4 manual is still a great resource.

Ardupilot_25_RC2.zip

Bonus - If you look check out the Waypoint_writer_25.pde file in the test suite, you can upload relative waypoints. This isn't supported in the config tool yet.

Jason


UPDATE -
A lot of people were having trouble with the GPS code and LEDs. I reworked the GPS parsers today to iron out some things. They were nothing that would interfere with flight, but I highly recommend using this new version. I've also added the ability to scale down your plane's roll based on airspeed. This should help planes that turn faster when they go slower. We may tweak this a bit in the future, so I'm looking for feedback on it. Note you can always turn it off in your header file with this line:
//6-4
#define AIRSPEED_TURN_P 1
see the header file for more instructions


E-mail me when people leave their comments –

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

Join diydrones

Comments

  • Developer
    Actually I did just that to get the best of both worlds.

    case 1: // First position
    set_mode(POSITION_1);
    break;

    case 2: // middle position
    //set_mode(RTL);
    set_mode(POSITION_2);
    break;

    case 3: // last position
    set_mode(POSITION_3);
    break;

    As you can see in the latests events.pde file I pull the defines in from the header. You could completely edit the events.pde file yourself if you wanted to get tricky. You can also add all sorts of control code in there too.
  • Developer
    You need to assign which mode you would like to enter in the header file.
    Manual is reserved for switch position 1 - the mux prevents any other mode.
    positions 2 and 3 are up to the user.

    I left position 1 editable in case someone wanted to create a new mode that output different telemetry or some other thing I cant think of.

    Here is the relevant part of the header:

    // Flight Modes
    // these Flight modes can be changed to either here or directly in events.pde
    // options are MANUAL, STABILIZE, FLY_BY_WIRE, AUTO, RTL, LOITER
    #define POSITION_1 MANUAL
    #define POSITION_2 AUTO
    #define POSITION_3 STABILIZE


    If the radio isn't setup correctly, you won't output the right PWM values for the board to read position 2. I know the Futaba 7C that I have doesn't work out of the box.

    #3 and #4 are reserved for future modes. In the code I basically do "> AUTO" to see if the plane is flying itself or the user is in control.

    Jason
  • 3D Robotics
    Got it. It's in the "Events" tab. I presume you replace the text in the parens with what you want. Any reason why we can't move this to the config file?

    void switch_event(byte switchPosition)
    {
    switch(switchPosition)
    {
    case 1: // First position
    set_mode(MANUAL);
    break;

    case 2: // middle position
    //set_mode(RTL);
    set_mode(AUTO);
    break;

    case 3: // last position
    set_mode(STABILIZE);
    break;
    }
    }
  • Developer
    #3 and #4 were skipped in case someone invents a new mode which would logicaly fit there in the heirarchy
  • Developer
    Chris - only three modes are supported. You can choose which of the three you get if you dig in the code a bit and change which three are Assigned to the three switch positions. In Mege we will be able to choose between more modes by mixing switches on the tx and looking at the value of the mux channel
  • 3D Robotics
    Jason, could you elaborate a bit on how you achieve those six settings with a three-position switch?

    And what happened to ##3 and ##4?
  • Developer
    Scott,

    You can also turn on debug mode to see the plane fly your waypoints as a check to make sure the WP are loaded correctly. Telemetry will output to the ground station. You can also turn off throttle output or disconnect your motor if you do that indoors.

    Jason
  • Developer
    Hi Scott,
    Can you make sure your switch registers all three positions? You can do this with the Airframe tester or the full version. When the switch changes you should see a message output in the telemetry or Serial window of Arduino.

    ##0| MANUAL
    ##1| STABILIZE
    ##2| FLY BY WIRE
    ##5| AUTOPILOT
    ##6| RTL
    ##7| LOITER

    To adjust your radio, you need to adjust the endpoints of channel 5 (or whatever channel you use for the three position switch.) Do that until you see the modes change.
  • Jason I got to fly the 2.5 code today looks great. Good work to all involved is a major improvement to the continuing development of Ardupilot. With not changes to any gains it work OK with my supacub.
    The stabilized mode works I will need to tune the gains to make this work better but first try all seems very good.
    I had 4 waypoints loaded and when I flipped to Auto or RTL nothing happens. Looking at the Telemetry
    there is never a bearing or dist to any waypoints regardless of wich mode i are in?

    I used the configuration tool to up load the waypoints.
  • Developer
    NMEA is implemented but not fully tested. Anyone want to help? PM me.
This reply was deleted.