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

  • 3D Robotics
    Jani, that's no longer necessary: MAVLink is the default
  • Developer

    So people go and start flying it, report to us if there are any problems.

     

    HappyKillmores and APM Mission planner GCS works great but remember to activate them from APM_Config.h file by

     

    #define GCS_PROTOCOL        GCS_PROTOCOL_MAVLINK
    #define GCS_PORT                  3
    #define SERIAL3_BAUD           57600  (or 115200 depending on your telemetry modems)

  • Great job Jason, will try the code soon!

    By the way I'm spanish spoken and I can contribute with wiki translation if you're interested in adding more languages.

  • Developer

    No it's different. For some reason, Jack has not been able to fly past the first WP. He's had plenty of successful missions in the past. It's odd, but I'm sure if I can get a log I can fix it quickly.

     

     

  • Moderator
    Jason, is this the same bug Doug's working through w/ Christoph? The one where left bank angle is causing seemingly bad mag. readings?
  • Developer

    I have not played much with ground stations. Now that I can take a breather, I will try them this week.

    Oh and note there seems to be a waypoint bug. It goes to the first waypoint and doesn't seem to want to go to WP2. That's bug #1 to find! 

    If you run a Mission and this happens, please post your Log file as a Zip to this thread.

     

  • Awesome!!!!   Good Work Jason and the rest of the TEAM!!!!!!!    Sweet!!
  • 3D Robotics
    YAYYYYYYYYYYYYYY! well done!
  • Well done guys. Am looking forward to trying this out. Many thanks for all your hard work.
  • w00t! Great job guys! Gonna test this out in 4 days when finals for this semester are over.

    -John

This reply was deleted.