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

  • Developer

    We've got a lot of ways to keep the 1280 running. Basically you'll need to disable a feature here or there. Nothing big.

    Jason

  • http://store.diydrones.com/ArduPilot_Mega_kit_p/kt-apm-01.htm

    i hope to get a good price on my next cpu module. :O

    but i earn nothing from telling you my view.

    in the end i spend money ;-)

  • 3D Robotics
    marcelo: I answered you on the wiki, where you asked the same question, but I'll repeat here: "Yes, the APM1280 is supported by AC2. But you'll be more future proof if you get the APM2560. They essentially work the same, the the 2560 has twice the memory."
  • robert bouwens how do you know i will get 2560, i want the 599 kit, so will it? are you sales man?
  • @marcelo

    buy the kit, then you get the 2560.

  • Moderator
    1280 does support AC2. However, if you want to run it on helicopters buy the 2560 (from a recent announcement in the trad. heli wiki).
  • sorry this question !! i still did not buy, but: will 1280 CPU ArduPilot Mega support AC2 or i should buy 2560

  • I think the I is the Acc/Gyro offset, as you play with I then P and D also change and need to be adjusted again.

    It is good to see that you are getting somewhere as I find this is a worrying issue at the moment. The motor prop. combination and the length of the arms do make quite a difference to stability. But I feel that using less efficient props. to dampen the response is a bit negative.

  • re: Oscillations

    I have a quad that worked well with the Pirates code and I loaded up AC2.0.5 to give it a try.  I had very fast oscillations with the default settings.  These were small tight oscillations.  Just passing on what worked for me.  I reduced "P" to .18 and set the S. Dampening to .17.  "D" = 0.0

     

    The stability is great and control is very good.  Better descent characteristics and wind control then Pirates.  Anyone have any input on the effect of "I" in tuning?

  • @magellan,

    i have flown two batteries before and after the rain in windy conditions.

    ok, a few times i needed full throttle to steer against the wind.

    i noticed no loss of control behaviour or nullpoint movement..

    i notice the problem on gusty wind conditions.

    with no wind it was mostly the pilot which caused the problems.

This reply was deleted.