instagram

Wednesday, April 24, 2013

Rover testing fun

So thanks you Vassilis for writing a path planner module for testing ground control navigation.  For those that don't know, Vassilis was one of the main designers behind the architecture that powers Tau Labs: UAVTalk, UAVObjects and how we clearly separate the code between the Modules.

I was testing this the other day to drive in a 10m box:

Rover Navigation Testing from James Cotton on Vimeo.

and a few things stood out.  First, I was using an OpenPilot GPS, which it turns out does not like to work near the ground.  Despite reporting a high signal quality, it was easily drifting around 10m in airplane mode.  It's possible other settings would work different, but be wary.  I've got a CN-06 module that just arrived which I'll replace it with.

Despite that, I could look at the high speed logs from the Overo and see that it thought it was doing well given that noisy information:



It's quite overtuned as you can see from the oscillation around the desired path, but not bad for out of the box initial settings.  Also asking a car to drive in a box at a fixed velocity is an impossible task so I'll try later with mitered edges.

The more striking thing was the knack of the it to spin around 360 degrees while driving south.  I reproduced this in normal attitude mode (where the sticks just say head North/South) and noticed it only occurred when being told something near -180, never near +180 (which are physically identically). Finally digging through the logs I found a case where it happened and sure enough desired was -170 and the current heading was more like 170.  I mocked up all the values in matlab and everything seemed fine, but the acuator output had the wrong sign!

Finally it turned out fmodf produces negative values, which is different from Matlab, and this bug can be fixed with a simple four character tweak.

Anyway, I drove this around and it works well now.  Once I get the GPS replaced with something that works better, I'm looking forward to making it drive around the park or use tablet control to follow me around.

Thursday, April 18, 2013

TriBlivion and Sparky

Update2: Sparky2 is available here http://www.hobbiesfly.com/taulabs-sparky2-0.html

Sparky

I recently built a flight controller board for Tau Labs named Sparky.  It uses an MPU9150 for the main sensor, which combines a 3-axis gyro, mag, and accelerometer which allows tracking the attitude of the airframe.  In addition it has an MS5611 pressure sensor for altitude sensing and control.  One of the main goals for this board were to keep it small and single sided - so it could just be taped onto things.  I also kept three of the holes compatible with the same mounting pattern we have been using so it can easily be swapped out for CC or Freedom.



It has a micro-USB header and 12 PWM in/out pins.  The receiver header breaks out VCC in and 3.3V so it can directly power a spektrum satellite receiver (or in my case an OrangeRX) without an adapter.  There is also a JST-SH header for GPS.  I've already designed a revision with an additional serial port exposed for telemetry as I've become addicted to using my tablet in the field for tweaking.

The first flight tests were quite pleasing

Sparky First Flights from James Cotton on Vimeo.

The smaller frame (Silver Hornet) was using off-the-shelf ESCs so it can't be tuned as aggressively.  The larger one has my ESCs so tunes in really well.  Altitude hold worked quite well - the baro wasn't even covered.

Here is the schematic and code
pdf version: https://dl.dropboxusercontent.com/u/6645063/Sparky.pdf
code: https://github.com/peabody124/TauLabs/tree/sparky

TriBlivion

In addition, ever since I saw the trailer for the movie Oblivion, I really wanted to build something like the aircraft Tom Cruise' character flies.  It has two front motors that can rotate so it can basically behave like a tilt rotor.  I ordered some parts a while ago and they've been sitting around for a while and I finally decided to try and build something similar, which I call (for lack of a better name) TriBlivion.


The front two motors are mounted on servos (using an adapter from servocity to provide some strength).  The yaw channel is mapped to drive each servo in opposite directions to create a yaw torque.  In addition there is an accessory channel mapped to point them both forward to create forward thrust.  I'm really pleased that it stays extremely close to level in this condition with the motors pointed forward at about 30 degrees.  It did need the battery quite far backwards to balance the weight of the servo cages.

I know normal tricopters are meant to have a good yaw feel but I've generally been underwhelmed with my tail servo one.  In comparison this yaw feels EXTREMELY locked in - more than anything else I've flown.

This will hopefully make a really good FPV frame since the camera can be mounted on the front and have a forward view while flying forward.  Of course, it's going to be really important to not get confused since while in motors tilted mode full negative pitch will basically make it stop but you'll be looking at the sky.  This is also just stage one of my quest to build a tilt rotor aircraft and get the best of both fixed wing and quadcopter behaviors.

So here it is flying


TriBlivion from James Cotton on Vimeo.

Unfortunately flying into the fence at the end stripped both servo gears, so it will be a week or two before I get more gears and try it for FPV.

Build list:

  • 2x Servo blocks http://www.servocity.com/html/standard_hitec_servoblocks.html
  • 2x Hitec servo http://www.servocity.com/html/hs-6635hb_stan__hi-torque.html
  • 3x KEDA 20-22L http://hobbyking.com/hobbyking/store/__4700__hacker_Style_Brushless_Outrunner_20_22L.html
  • 3x ESC http://hobbyking.com/hobbyking/store/__6548__Hobbyking_SS_Series_18_20A_ESC_card_programmable_.html
  • 2x align 450 size tubes
  • 7x clamping blocks http://www.shop.aglhobbiesllc.com/Frame-Spare-Parts/Delrin-Clamping-Block.html
  • 3x motor mounts http://www.shop.aglhobbiesllc.com/Motor-Mounts/UAP1-Large-Universal-Slotted-X-Base-Mount.html
  • cut G10 plate to sandwich motor mounts at 90 degrees

Sunday, April 7, 2013

Tablet control testing

So I finally got some flight tests done with Tau Labs' tablet control feature, although it was a bit on the windy side. In this mode the flight mode switch is flipped to "TabletControl" and which point control is ceded to the tablet. This means you can use labeled buttons to control from a large number of flight modes instead of confusing switch positions, as well as seeing the performance from the tablet.

Tau Labs Tablet Control from James Cotton on Vimeo.

This mode allows Position Hold, Return to Home, Return to Tablet, Follow Me, Fly Path, Camera POI mode and Land. Most of these are demonstrated in the video. This follows up on some previous work here

AndroidGCS Transmitter - Navigation Control Demo from James Cotton on Vimeo.

but I found the OPLink wasn't reliable to use as the only link and had some fly-aways. This system keeps the regular transmitter in ultimate control in case anything goes wrong. Safety testing is demonstrated as well to show that the motors shut off when the transmitter is turned off. The new architecture makes it easy to define other failsafe behaviors like RTH on transmitter loss, but not until navigation is extremely robust and well tested. The results of enabling Fly Path mode were a little disappointing. It would hit the first few waypoints but the requested velocity and path follower settings weren't aggressive enough to fly upwind. More testing soon hopefully! You can get the tablet software here although the tablet control interface is disabled by default until it is a bit more tested.