3D Robotics

APM 2.0 beta released!

3689393223?profile=originalI'm delighted to announce the release of the first public beta of ArduPilot Mega 2.0. This is a significant upgrade to APM 1.02, and now delivers on full 2-way in-air communications, including real-time mission planning and autopilot control.

 

[UPDATE:Arduino-free code uploading added to features]

 

New features/changes include:

  • --Full support for the MAVlink protocol, which is now APM's default communications method.
  • --Auto-detection of GPS modules. No more requirement to tell APM what GPS module you're using--it will figure it out and configure the module appropriately!
  • 3689393150?profile=original--2-way telemetry.  Dozens of commands can now be sent from the Ground Station to the UAV while it's in the air. (see example from HK GCS at right)
  • --2-way Mission Planning. You can script and change missions in real time while the UAV is flying!
  • --Supports APM boards with the ATMega2560 chip, which has twice as much memory as the current board. The DIY Drones store will begin selling these new boards when the final version of APM 2.0 is released.
  • --Mission Planner now uploads firmware and checks for new versions online. No need for Arduino (unless you want it)!
  • --Magnetometer fully supported.
  • --Current sensor fully supported
  • --Support for the latest HK Ground Control Station and QGroundControl ground stations.
  • --Mission Planning and configuration can now be done wirelessly. No need to use USB if you don't want to.
  • --No more fiddling with a configuration file in Arduino! The software comes ready to go, right out of the box
  • --New command-line tests allow you to check failsafe operation, Xbees, radio inputs and more.
  • --New versions of HK GCS and the Mission Planner operate in MAVLink mode, allowing for wireless operation and compatibility with other MAVLink devices, including those running the Robot Operating System (ROS)

---------------------------------------------------------------------------------------------

Huge props to the whole development team: Doug Weibel (project leader), Michael Smith, Jason Short, James Goppert, Michael Oborne (mission planner), Paul Mather (GCS), Lorenz Meier (MAVLink integration), Randy Mackay, Ryan Beall, Darren Corley, Joe Holdsworth, and countless others who have contributed with flight testing and bug catching!

 

Remember that this is an initial beta release, so there may be bugs and undocumented bits. After the beta-testing period (usually about six weeks) we'll release APM 2.0 final version, and retire APM 1.02.

 

Loading the code automatically:

 

Just download the Mission Planner and select "Upload Firmware" from the Tools section of the menu. Make sure APM is plugged into your USB port and you've selected the right port from the Mission Planner menu. Click on "Update Check" and the program will search online for the latest version of the code and load it to APM.

 

If you want to do a simulation with Xplane, follow the instructions below. That will soon be a firmware option with the Mission Planner, too.

 

Loading manually (Optional)

[UPDATE: Ignore this section if you don't want to fiddle with the code. Arduino is no longer required to load the code!]

 

Download the zip file, unzip it to your desktop. You will have two folders inside your APM 2.0 folder, as shown:

 

3689393014?profile=original

Make sure you're using the latest Arduino (0022). Set your Arduino Sketchbook location to the APM 2.0 folder, as shown below. You must exit Arduino and restart it for this to take effect. Within Arduino, open up the ArduPilotMega.pde file within the ArduPilotMega folder, and that will open all the other files. Before you compile, don't forget to select the right board (Arduino Mega 1280 or Arduino Mega 2560)

 

3689393238?profile=original3689393027?profile=original

(Note: in the final version of APM 2.0, you will not have to use the Arduino IDE at all: the Mission Planner will load the firmware for you and check for more recent versions. The Arduino IDE will just be available in case you want to modify or inspect the code. UPDATE: this is now live)

--------------------------------------

 

Additional instructions:

--If you're doing flight simulation with Xplane, instructions for doing it with APM 2.0 are here.

--Make sure you're using the latest Mission Planner and HK GCS. In the Mission Planner, make sure you select APM 2.x modes (MAVLink), shown at right.

 

Known issues:

1) Mission Planner won't write waypoints on Port 0 in HIL mode. Instead, write the waypoints via your Xbee (port 3); remember to change the Mission Planner baud rate to 57k when using the Xbee port.
2) Uploading mission commands is still not fully documented. We'll get to that this week
3) There may be some issues with datalogs not recording. We're looking into it.

4) The manual still describes the 1.02 software. We'll change that to 2.0 during the beta test period, so by the time we release the final of 2.0 the manual is fully updated.

5) This has been mostly tested with 900 Mhz Xbee modules and the XstreamBee adapter, which work great. However, there is an issue with the 2.4 Ghz Xbee modules, which have a slightly different hardware configuration that conflicts with that adapter when sending data upstream. A short term workaround is to solder a jumper from the adapter's CTS to V+ pin. The next version of these adapter boards will include a more graceful fix.

 

If you find any bugs, please file a report in the Issue Tracker. The dev team will not be responding to bug reports filed in blog comments

E-mail me when people leave their comments –

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

Join diydrones

Comments

  • Thanks guys.  I guess I need to do some reading on mission scripting.
  • Developer
    Please see the videos on mission scripting in the wiki for a better understanding of how to use the jump command, "dummy waypoints", etc....
  • 3D Robotics

    Artem: it's fully scriptable. If you want to start again, use a jump command back to the first waypoint. 

     

    All MAVLink commands are here.

  • I agree, with HK, I have the do jump command after the last command which is Land.

    Ive used this to create a touch and go pattern flying, then after x itterations, it finally lands.

     

    #define WP_RADIUS 30 // What is the minimum distance to reach a waypoint?
    #define LOITER_RADIUS 60 // How close to Loiter?
    #define HOLD_CURRENT_ALT 0 // 1 = hold the current altitude, 0 = use the defined altitude to for RTL
    #define ALT_TO_HOLD 100

    float mission[][5] = {
    {NAV_TAKEOFF,0,260,0,0},
    {NAV_WAYPOINT,0,270,41.884468,-91.7227172},
    {NAV_WAYPOINT,0,280,41.8844108,-91.7198333},
    {NAV_WAYPOINT,0,300,41.8844261,-91.7165603},
    {NAV_WAYPOINT,0,300,41.8836593,-91.7154464},
    {NAV_WAYPOINT,0,300,41.882534,-91.7155226},
    {NAV_WAYPOINT,0,300,41.8817901,-91.7167816},
    {NAV_WAYPOINT,0,290,41.881977,-91.7292022},
    {NAV_WAYPOINT,0,280,41.8828201,-91.7301635},
    {NAV_WAYPOINT,0,270,41.8842048,-91.7301025},
    {NAV_WAYPOINT,0,265,41.8845558,-91.7289428},
    {NAV_WAYPOINT,0,260,41.8845062,-91.7263031},
    {NAV_WAYPOINT,0,251,41.8844909,-91.7242965},
    {NAV_LAND,0,249,41.8844184,-91.7206039},
    {DO_JUMP,0,0,10,0},
    };  

    
  • I also believe he needs an additional "dummy" waypoint before the jump command as we're using some kind of reverse polish notation on the command structure. In case this hasn't been discussed before, let'say you want to perform a loop on 4 waypoints. You'll add a 5th waypoint set to anything and then add a Jump to 1 command....because the APM reads goto WP #4, then sits and waits before continuing on WP#5 until it reaches #4. Then it starts heading towards WP#5 and then immediately jumps to WP#1.... but I can't say for sure if it will start going to WP#1 or will have to finish going to WP#5.... So it might actually need the jump command between WP#3 and WP#4....
  • use include the do_jump command in your mission.

    do_jump 3 10 0 0

    is repeat sequence starting at wp3 10 times.

     

     

    edit: but please note, the 10 decrements each pass, and is stored in eeprom so once 10 times has ended, a new upload must be sent to put it back to 10 or what ever you want.

  • Can anybody comment on the repeating flight plan after it is completed once?  I'm dealing with the same issue here.  Is it really a "one loop only" autopilot?  If so, that really should be mentioned in the list of "features" when you go to buy the unit
  • I used a pre-compiled version from Apm planner. I can try with self-compiled firmware uploaded via Arduino. But what's the differences? I think, I will make the same config file as it is in Apm planner.
    Yes, in the serial tab I can see all types of messages as it was in previous versions.
  • Yes, I am working on this problem right now. Are you by chance using a pre-compiled version of the firmware from the APM planner or did you compile your own? On the serial tab are you seeing all sorts of unknown messages?
  • Good news, Paul! Thanks!

    I have tested new version and faced with a problem. As soon as I press "Connect" button I get messages such as "signal lost". GPS position doesn't lock and so it doesn't zoom at home location. It seems to be that GCS doesn't have connection with Xbee on the ground side. I checked Xbees, they are ok. Moreover, I tested your previous version of GCS (which worked after changing GPS frequency manually) and it works now. It's very weird for me... Do you have any ideas?

This reply was deleted.