Jason Short's Posts (62)

Sort by
Developer

Latest AC2 update



This is to let you know that AC2 beta has been updated based on everyone's feedback. I think we're getting closer to a full release.

Things to concentrate on:

Logging - Logs are the most helpful thing you can post. If you have an issue, please post the log and let me know where to look.

Altitude hold: The Dterm was a bit too aggressive preventing the copter from changing altitudes. It's been lowered by default to 0.03. If you have trouble changing alt, try adjusting this value down a bit.

Mission scripting was a bit broken - fixed now.

Frames have now moved out of the CLI and into defines. This means you'll use the download tool to grab the frame config you need from the start. This makes the code a lot simpler internally and saves a lot of code space.

There is a newer rate based navigation algorithm (above in Flash) to try it, set this parameter in APM_Config.h and upload with Arduino:

#define NAV_TEST 1 // 0 = traditional, 1 = rate controlled

The sim above in Flash now addresses the steady state error with the I-term. PID's are great ;)

It's set to hold 4.5 M/S right now. It may not beat the wind yet, it's still limited to Pitch Max of 18° That will change for the release to full 45° pitch. This will let the copter fight high winds in WP mode.

Lot's of other minor tweaks to improve performance.

Please post all issue to the issues list:

http://code.google.com/p/arducopter/issues/list

Thanks!

Jason

Read more…
Developer

google-io-2011-day-10238.jpg

 

google-io-2011-day-10245-1305045748.jpg

 

While iPhone remains closed to HW developers who aren't iHome or Belkin, Google is courting DIY innovation with Arduino and open hardware connectivity standards.

 

I'm sure there aren't lousy encryption chips or other obstacles in the way of hackers who want to hook up custom hardware to their Android device. I just wish Apple would get with it and give open access to their USB ports! 

 

Bravo Google!

 

 

 

Read more…
Developer

Arducopter Beta update.

3689405810?profile=original

Found some good bugs already. An issue with auto trimming being activated due to unusual Radio configurations fixed. Mavlink support is now up to par with APM. and A compass bug in the library squashed.

 

I revved the firmware's EERPOM fingerprint. You must redo the setup completely. (except ESC calibration.)

 

Thanks for the feedback!

Jason

Read more…
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

 

Read more…
Developer

Ardupilot Lives

3689405155?profile=original

 

I'm currently copter-less and waiting on new motors to arrive from China, so I had some spare time this weekend to do a quick side project. It's a ground up re-write of the original Ardupilot using the latest Libraries for APM. The only difference is I had to use some tweaks to avoid filling up all the flash ram. With the Ardupilot GCS code, it's less than 1k from full. But it's all in there.

 

I could use some help testing because I can't get away to fly anymore. All of the systems seem to work correctly. The only trick is that the AP_config.h file needs your exact radio pwm values.

 

 

/***************************************/
// RADIO
#define CH1_MIN 1112  // (Microseconds) Range of Ailerons/ Rudder
#define CH1_MAX 1938  // (Microseconds)
#define CH2_MIN 1102  // (Microseconds) Range of Elevator
#define CH2_MAX 1936  // (Microseconds)
#define CH3_MIN 1101  // (Microseconds) Range of Throttle
#define CH3_MAX 1931  // (Microseconds)
#define CH4_MIN 936  // (Microseconds) Range of Rudder
#define CH4_MAX 2101  // (Microseconds)

 

 

You can use the AP_RC_Channel example sketch in the Library to get those values.

Otherwise it works with HappyKillmore's GCS and the latest GPS modules.

RAM is totally freed up using the PSTR macro so no more code crashes...

 

For know you can leave a comment here for bugs and fixes. Then I'll do a Beta and start using the issues list.

Code is on the Ardupilot Trunk and called Ardupilot_2_8

http://code.google.com/p/ardupilot/source/checkout

Use the latest Libraries from Ardupilot Mega.

 

If none of this post makes any sense, I wouldn't bother downloading. Just wait for a Beta.

Jason

 

 

Read more…
Developer

ACM Position Hold

This is my first successful flight with a good alt hold and good GPS hold. As soon as I can demonstrate a fully autonomous flight (codes already done, just not flight tested enough), I'll release the Alpha. 

 

BTW, the wind was about 5mph West which was causing the forward and back oscillation. I had the I term disabled, so it never accounted for the wind. 

 

Jason

Read more…
Developer

ArduCopterMega FBW mode

It still needs some work, but I thought I'd share this new flight mode. It's intended to simulate position hold using the stick input to generate a GPS offset from home. The really fun side affect is you don't need to be pointing a certain way to fly in that direction. You just point north and it flies north. To demonstrate that here is a video of ACM flying around with full right yaw. I was able to fully control it in a 5-10 mph wind even though it was spinning. The wind got the best of it for a moment there, but it recovered well. Still a little more work to do before alpha.

Jason

Read more…
Developer

What's up with original Ardupilot? (not APM)

Hey everyone, I just wanted to catch everyone up with the state of the original Ardupilot (not APM!). I'm the only developer currently working on it and could use some help. I recently had a baby boy and between him, work and a small copter side project I've not been able to keep up with the code.

What needs to get done:
  • Maintain compatibility with the config tool. - don't mess too much with the EEPROM.
  • Move from our old GPS parsers to the newer and well maintained Libraries.
  • Add printf and <avr/pgmspace.h> to move Serial.print strings to ROM from RAM.
  • If possible add in CLI from Mega. (We're running low on ROM!)
  • Do anything to reduce, clean up code to free up ROM.
  • Anything else we can do to align, where possible, with Mega.
In the end these should be minor updates. I just can't get to them and flight test them.
Jason





Read more…
Developer

Ardupilot Alpha/Beta Testing

Since we have a few major pieces of software being developed at the same time I wanted to make a few points about how you can help.

1. Even though the dev team provides excellent support, Doug, myself and the Arducopter team do this on the side and are only paid in the satisfaction of seeing Ardupilot code in the air on your planes. I really mean that. We like to hear about successful integration and flights, not just bugs.

2. We are moving to the Issues list on Google code. Only issues listed will be addressed. This is simply the best way to track everything and it's open to to view by everyone. Please only put bugs in there and keep questions for the Forum posts.

3. If you are using Beta software, please understand there will be bugs. That's the point. What we really need to solve a problem is

- your header file
- pics of your HW setup if applicable
- DETAILED steps to reproduce the issue
- Example Code Fix to fix the issue - we really love getting code.

4. It's great to discuss issues in the forums, but please don't assume the dev team will read every post. Please use the issue tracker to ensure it is dealt with. Again, if you have a fix, please post the code to the issues list and not just the thread.

5. Alpha code will no longer be posted as a Zip archive. Get an SVN client such as Tortoise SVN. Changes happen daily/hourly.

6. We will be Tagging major updates so you can easily access older builds - as soon as we figure out how to do that ;) Michael is a pro at this and will be setting us up.

We are aiming for flyable Mega code to be Alpha by the 20th.








Read more…
Developer

ArduPilot Auto Launch Testing

Auto Launch in 2.7 from Jason Short on Vimeo.


This is always a cross your finger moment. Chris offered to flight test the new auto-launch code which has never been flown before outside of Xplane. I think I heard him say something like 'well this is an old plane and I've landed it in the bay a few times so I guess we should try...'


The winds were pretty heavy, but the auto heading hold worked nicely.

Read more…
Developer

Anti-crash mode in AUTO



This was a really simple addition to the code; maybe 6 lines. But the effect was quite dramatic. AUTO, RTL, and LOITER now sense if the plane is in a dive and enter a simple stability mode for 4 seconds. Enough time to recover from the worst dive.

I fly an EZ Star and this has always been my biggest safety concern and need to flip to manual control. Now I don't need to.

In the video you can see me put the plane into a dive. This can happen when the plane turns too hard and the GPS refresh can't keep up. Once the plane begins to stall, it drops like a rock.

Update is on the SVN in Ardupilot 2.7 for Beta testers.
Read more…
Developer

Ardupilot 2.7 Beta

I was going to call it 2.6.3, but so many changes have been made, updates added, I think it requires a full point. Also, the header file has been streamlined a bit and some defines have changed. The PID gains have not, so if your plane flew well with 2.6 it will fly well, or even better with 2.7. BTW, this is the first release that has only been tested via HIL. I've never flown it for real because of the strong winds in the bay area right now. We'll see, but I think this will be the most stable release yet.

What's changed:

I've included a folder for connecting your ardupilot hardware to X-Plane. There are PNG files showing the configurations to make in the menus.

X-Plane supplies IMU data and airspeed data to Ardupilot so you must select the GPS_IMU option to connect.

New altitude estimation - Thanks to Ryan Beall for this one. This smooths out noisy altitude readings from GPS.

Takeoff and landing are now full features. Their use has been simplified and are assigned full flight modes which can be seen with a ground station.

New Fly by wire throttle command by Christof Schimd.

Updates altitude hold for those with airspeed sensors. Airspeed is now recorded in m/s instead of air pressure value. Since calibration for your particular pitot tube setup could be needed there is now a calibration value in the header file.

Improved stick mixing response for all modes.

Waypoints will be skipped if you miss them after one loop around. The number of degrees can be changed in the code so let me know how many is good.

Loiter hold has been improved.

Cross track gain now on by default.

Numerous bugs are gone.
Old, unused code and vars have been removed. Code has been reformatted and commented.
If you have any issues, please comment here and I'll get them fixed in the final release.

Jason




Read more…
Developer


I've finally perfected the X-Plane HIL for Ardupilot. This will be a feature on 2.6.3 which will be in beta today.


Flying Waypoints:



Here is missed waypoint detection: (I nudged the plane at the last second with the radio to miss the WPs.)


Here is fully auto take off and landing:



Here is the video of auto takeoff and landing:


Xplane and Ardupilot from Jason Short on Vimeo.




If you want to try this out you have to use some software to glue this all together.


Serproxy - used to talk serial to Ardupilot

Perl - to link Serproxy and X-Plane using "X-Plane.pl"

X-Plane 9 (the free version works fine, but it time limited)


I've only tested this on a Mac, so if anyone can try this on a PC, please let me know of changes to make, if any.


In the config header you will see a new ground station called GCS_Xplane (3). You must also use GPS_protocol 3 for ArduIMU.


Here is the Perl file:X-Plane.pl

Here is Windows Serproxy - Windows

Here is Mac Serproxy - Mac


in the config set:

newlines_to_nils=true

comm_baud=38400

Then set the com port accordingly



Go ahead and download 2.6.3 from the SVN. I'll post a beta soon as a download.


Moving forward I'd like to replace the Perl/Serproxy combination with a single C or Python based solution. If anyone can help, that would make it so much easier to set up!



Bonus:



Read more…
Developer

X Plane Integration



I wanted to get a hardware in the loop sim running in X plane and I wanted to document my first attempt. I've been able to connect the ardupilot using a binary protocol and a custom Perl socket server based on the work of Jeffery Goff http://www.perl.com/pub/a/2004/07/09/xplane.html

I have everything in place, but a lot of tweaking to do. The really nice part is that there is no extra hardware or soldering to do. The IMU parser will read in the X plane output. The GCS_Xplane.pde when finished will output binary to Xplane. I'll have it working hopefully in the next rev.

If you want to try it and help make it better, I could really use the help. If you've never heard of Perl or Serproxy or Sockets, I don't think I'll be able to help you get it running.

Here is the flow of information
Ardupilot <-> Serial Port <-> Serproxy <-> Perl_AP_glue <-> Xplane

Here are the files to make it run on 2.6.2.


GCS_None.pde - I modded GCS_None.pde to output binary control surface data.

Read more…
Developer

Ardupilot 2.6.2 Beta

3689358476?profile=original


This beta brings support for the new MediaTek GPS unit. The MTK works great and it's very light.

I've also added some bug fixes including:


  • Auto Trim - (on by default) When you enter any flight mode from Manual, you'll save your current trim values. Great for trimming your plane in the air.
  • FBW issues (turning too much in one direction) caused by incorrect or unset radio limit - fixed with new algorithm
  • Radio Mixing - lowered the mix value for more responsive sticks
Let me know if you have issues, and I'll update the release version.
Jason


Read more…
Developer

Ardupilot 2.6 MediaTek Parser

3689357938?profile=original

I have a quick beta of the MediaTek GPS parser for Ardupilot 2.6. Quick caveat - I don't actually have this module in my hands yet! I just modified Jose Julio's parser to match what 2.6 needs and read the data sheet on the new protocol. So, if someone who has the new modules could try this out and let me know if you are getting the right values, I'd appreciate it!

Set your GCS_PROTOCOL to 4 in your header file.

Read more…
Developer

2.6 updates

I made some updates to the SVN for 2.6 and if anyone runs into trouble, please post it here.

I added more code comments as well as brought back the GPS simulator. If you set GPS_PROTOCOL to 5 in your header the simulator will kick in while the plane is in AUTO.

Your throttle adjusts the speed of the plane in the sim while it attempts to hit waypoints. The telemetry will output to the Ardupilot GCS. If you connect Google maps, you'll see that update in real-time as well.

Please note, the throttle still controls the engine, so be careful to disconnect your ESC.

Jason

Read more…
Developer

Flight testing 2.5.03

Hi All,
I just uploaded the last version of 2.5.0(3) I wanted this one to be rock solid before 2.5.1 came out.

I got a few hours today to tweak code and gains for my EZ Star. I implemented the derivative term in the heading/navigation loop and all the other loops used just the p term. The derivative term helped reduce overshoot by about 50%. I'm not kidding about the wind. The plane was flying at a 30° angle to fight the wind.

Altitude hold was working very well. Pitch_comp reduced to .1 was about all I needed. The airspeed control needs work, but Doug is tackling that.

I have my own personal ground station in Flash and I added uploading of all of the major variables in order to tune the aircraft in flight. This worked great so I'll leave the code included for the GCS team to check out. I didn't use error checking, I had the plane echo back the values so I could see if the uploaded values worked correctly before re-entering AP. It was far less complicated to do it that way than to try and implement errror-checking through code.

I've also implemented a simple dampening system for flying into the wind based on ground speed. Doug has a much more complex version, but this one worked remarkably well. Here you can see the loiter pattern. Please note that I was flying into a terrific headwind. The plane was moving 12 mph upwind and over 40MPH downwind. Sometimes the wind would pick up and the plane would virtually stand still, hence the strange patterns. Overall the snaking was minimal and far better than before. I was able to hold the 45m radius no problem. I could have cut that down to 30.







Altitude hold with 15 loops around home, then a landing.


Read more…