Developer

Arducopter 2.0 Beta first release!

3689405696?profile=originalMark Grennan


We're finally comfortable enough with Arducopter 2.0 to release it as a beta!

AC2 is a complete system for a range of Multi-Copters. It started out as a side project for me and turned into an obsession. Oh Well! Copters turned out to be even more addicting than I ever thought. 

AC2 doesn't bring over any code from NG, but I tried to make the transition fairly easy. It should fly virtually the same and the default PID values are equivalent. 

I think it's pretty close and fairly bug free, but I know there are a few left and that's why we need the community to help us find them and submit patches that improve performance. If you have an issue or something to contribute, please use the Google Code Issues list for prompt responses. I won't be tracking bug related comments in this thread. If you can, please include a log file from you flight with an indication how many seconds in you had a problem.

 

Google Code issues list

 

And one last note before we talk features: Safety first! Don't load this and expect it to work exactly like NG or that it will work out of the box with no issues. Don't calibrate your ESCs with the props on. Don't turn off your radio while it is armed. Test in your hand before adding props. Test in your hand after adding props. Always be prepared to put it back into stabilize in case an Auto mission behaves unpredictably. etc... Simple stuff, but you are in control and take the responsibility of flying when you load this code. 

 

Now that's out of the way: Download here [UPDATE: The Mission Planner now supports direct AC2 firmware uploading, so please use it to get the code instead. No need for Arduino or compile source code anymore! That said, if you want to fiddle with the code, you can always get it here and use Arduino as usual.]

 

The full ArduCopter 2 Manual is here. Please read it before using the code!

 

What's New:

Simple mode allows the user to save the orientation of the copter while arming the motors. This means the copter can yaw in any direction and the sticks will reference the original orientation. Great for learning or  - emergencies in the air.

Position Hold is now called Loiter to be compliant with Mavlink Ground control stations.

RTL will fly the copter home and hold the position

Auto will fly a mission stored in EEPROM.

 

Copters supported:

+, x, tri, hexa+, hexax, y6

 

AutoPilot commands supported:

MAV_CMD_NAV_TAKEOFF   - Copter will takeoff and rise to a defined altitude.

MAV_CMD_NAV_WAYPOINT - Copter will navigate towards a waypoint. (Beta 1 disabled options: altitude minimum, time delay)

MAV_CMD_NAV_LAND - Copter will immediately go into Loiter (position_hold) and begin a controlled decent.  Mission scripting ends after this command.

MAV_CMD_NAV_LOITER_UNLIM - Copter will Loiter at current location.  Mission scripting ends after this command.

MAV_CMD_NAV_LOITER_TIME - Copter will Loiter for N seconds. (disabled for this version)

MAV_CMD_NAV_RETURN_TO_LAUNCH - Copter will return to Launch (home position) 

 

MAV_CMD_CONDITION_DELAY - will delay the execution of next conditional command

MAV_CMD_CONDITION_DISTANCE - will delay the execution of next conditional command until the copter is within a minimum distance to next waypoint

MAV_CMD_CONDITION_CHANGE_ALT - will send copter to desired altitude, overrides next waypoint altitude.

MAV_CMD_CONDITION_YAW - controls how the copter will yaw. Angle (relative or absolute), speed, and direction are inputs. 

 

MAV_CMD_DO_JUMP - sets the next waypoint to the desired index - for conditional loops

MAV_CMD_DO_SET_HOME - changes the home location

MAV_CMD_DO_SET_SERVO - outputs servo channel number to desired PWM

MAV_CMD_DO_SET_RELAY - sets the relay to postion 1 or 2

MAV_CMD_DO_REPEAT_SERVO  - toggles servos

MAV_CMD_DO_REPEAT_RELAY - toggles the relay

 

In flight tuning:

 

You can tune aspects of flight with your channel 6 flaps knob. To enable this, you need to compile and update AC2 directly with Arduino.

 

See AP_Config for options.

 

How to setup your radio:

ch1 = roll

ch2 = pitch

ch3 = throttle

ch4 = yaw

ch5 = mode switch - use your 3 position switch

ch6 = used for in-air tuning - not currently active, see AP_config.h for options

ch7 = use to set throttle hold value while hovering (quick toggle) - default position should be a low PWM value!

ch8 = NOT used!!! - this is the hardware manual - it's dangerous to use for quads BEWARE!!!

 

How to use the CLI:

You must go through each item and set the values to match your hardware

 

"setup" menu:

erase - when installing AC2 for the first time, run this to erases bad values from EEPROMS – just in case

reset - Performs factory reset and initialization of EEPROM values

radio - records the limits of ALL radio channels - very important!!!

pid - restores default PID values - only needed if you have changed them in flight with CGS, not for setup.

frame - sets your frame config: [x, +, tri, hexax, hexa+, y6]

motors - interactive setup of your motors, (X, +, or tri supported) Point your stick towards the motor to make it spin, throttle is passthough.

level - sets initial value of accelerometers - hold copter level, don't move it.

modes - sets the flight modes assigned to each switch position (you have 6 available), toggle roll to change, enter to save.

current - enables an Attopilot current sensor: [on, off, milliamp hours]

compass - enables the compass [on, off]

declination - sets your local declination value – lookup online for accuracy [decimal degrees!]

sonar - Sonar hooks to the "pitot" port which is an analog input [on, off]

show - a formatted output of all the settings

 

"test" menu:

pwm - outputs the pwm values of all 8 radio channels

radio - outputs the control values of all 8 radio channels in degrees * 100 or other value (see radio.pde)

gps - outputs GPS data

rawgps - outputs raw, unparsed GPS data

adc - outputs raw adc values

imu - outputs euler angles

battery - outputs voltage readings to analog in 0-3

current - outputs voltage and current from an AttoPilot current sensor

relay - toggles the relay

sonar - outputs sonar data in cm

waypoints - dumps stored waypoint commands

airpressure - raw output of absolute presure sensor

compass - outputs compass angles in degrees (0 = north)

xbee - outputs an XBEE sequence used for range testing

mission - writes a default mission to EEPROM [null, 'wp']

- choosing 'wp' option will send the copter 15 meters North and back again.

eedump - raw output of bytes in eeprom

 

"logs" Menu:

See the APM wiki to better understand how to dump logs and how to set the types of data you want to record.

 

AC2 Flight modes:

All of the modes allow the user to control the copter with the normal controls. You can get yourself out of a jam sometimes by simply nudging the copter while in AUTO or LOITER modes.

 

Options include:

ACRO - rate control only. not for beginners

STABILIZE - copter will hold -45 to 45° angle, throttle is manual.

SIMPLE - Remembers the orientation of the copter when arming, allowing the user to fly more intuitivey. Manual Throttle.

ALT_HOLD - Altitude is controlled by the throttle lever. Middle is hold, high = rise, low = fall.

LOITER  - When selected, it will hold the current altitude, position and yaw. Yaw is user controllable. roll and pitch can be overridden temporarily with the radio. Altitude is controlled by the throttle lever. Middle is hold, high = rise, low = fall.

RTL  - Will try and fly back to home at the current altitude.

AUTO  - Will fly the mission loaded by the Waypoint writer

GCS_AUTO - Not implemented

 

 

Special notes:

The props will NOT spin in stabilize when throttle is in the off position, even when armed.

Arming is Yaw right for 1 sec, disarm is yaw left for 1 sec. Just give it some juice to confirm arming.

 

Auto modes will NOT engage until the throttle is above neutral. So if you put the control switch to positio hold while it's on the ground, it will no spin up. Or at leat it shouldn't ;)

 

Good luck,

Jason

 

E-mail me when people leave their comments –

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

Join diydrones

Comments

  • @Magellan

    @John

    yesterday i lost my copter due to a decrease of control authority.

    i was unable to keep up with the wind.

    i notice the problem on the pirate and acm code base.

    therefore i assume it is a dcm problem.

    we need to get better control on the gyro drift.

  • 3D Robotics

    "What everyone seems to want is that it should be possible to get a 'standard' system working properly using the ready compiled hex files.  Users who want something different or unusual will be able to tweak the code themselves."

    Nigel: Well put. That's correct.

     

  • 3D Robotics

    Mees: please check out the manual. Much has changed. 

     

    --Only MAVlink GCSs are supported (HK GCS, Mission Planner, QGroundControl). 

    --If you don't have the standard mag orientation, you can specify your orientation in the config file (and you must use Arduino to compile and load the code). This is covered in the manual here

    --The APM board must face forward in all configurations.

     

    We are really focused on easy of use and reliability, which means encouraging most people to use the standard configurations. We can't test every possible hardware/software combination, so for the sake of improving the experience for all users we're going to focus on the most common ones.  Those who want to do something different are welcome to, but they'll have to use Arduino to compile/upload the code (rather than use the Mission Planner) and the support will have to come from the community, not the dev team.

  • On log files and control authority:
    I tried to view the file but when I connected, I found no files available for download. I looked at the log configuration and it says the several of the logs are enabled. I decided to clear the log memory and will fly again later today to see if it produces a log file.

    Is there something I was supposed to do to enable logs?
  • So, at the current moment I can't use the mission planner setup because of my current setup which flies with RC1, RC2 and NG.
    Or I have to manualy add paramaters in the APM config using Arduino.
    If its the latter, can some explain to me which specific lines I have to add?
    Just the define lines corresponding HW or a lot more. Maybe an example to get us underway.
    Like for example, which protocol to use with which GCS?
    Also in the config ref the mag orientation isen't mentioned.
  • Developer
    That is correct and that is our goal in whole ArduCopter team and its development. ArduCopter 2 beta 1 is our first release of the ArduCopter software under our ArduPilot Mega code bases. Yes there are many things still to do and it will take some time until everything is done in as easy way as possible.
  • I suspect Mees and Jani (see above) are in fact agreeing.  What everyone seems to want is that it should be possible to get a 'standard' system working properly using the ready compiled hex files.  Users who want something different or unusual will be able to tweak the code themselves.

     

    Is that correct?

  • Ok,

    my mag orientation is comp up and pins back
    I want to use xbee at 115200
    ...

    If I use the planner none of these can be set.
    So I have to use arduino.
  • Developer

    Mees, the thing is that we are trying to get rid of all hardware configurations and just provide ready compiled HEX file to users. Users who want to tweak can still compile their own programs.

     

    You can use these ready made HEX files already in Mission planner and upload it from there.

  • The planner is very good and the software loads without a problem. Great Job.
    However, there are a lot of setting like mag orientation, telemetry, ... that can't be changed. To someone without any previous knowledge its like looking for a needle in .....

    In this topic a lot of people say, "oh, just add this line to the APM config and it will work." But I think its not that simple. I managed to open the config reference and ther are a lot of parameters to be changed. But a warning says, "don't copy/paste this into a new config, just add he lines you need". Thats the big problem. What line should be added? Just the "define" lines or more??

    I propose that if you want to keep it simple, a lot more setting should be integrated into the planner. This way, arduino should be obslete thus no problems compiling.
    An other solution is working with a config generator like the ardupirates one
    http://ardupirates.net/config/APNG_Config.php

    Don't get me wrong, these are not remarks saying that its all bad. Just some constats that could inprove the "dummy proofness" of the software.

    Thanks to everyone you is making this possible. Great job.
This reply was deleted.