Hey Everyone,

 

Our goal is to eventually get Ardupilot 2.4 up and running in our Easystar... here is our equipment:

 

Ardupilot Arduino ATMega328 Board (red board)

Shield V2 kit (blue board)

EM-406A USGlobalSat GPS

Spektrum Dx6i transmitter, Spektrum AR6110e reciever

Attopilot XYZ sensors (from DIYdrones)

Electrifly C-55 Mini ESC

 

We decided to first test the GPS vs servo reaction. I programmed the board into Walk_Around mode to disable the sensors and isolate the variables. Then, I set home to 1000km directly West of our test area with the config tool. We want to figure out exactly what the effect of different "P" values (heading gain 4-1) have on servo reaction.

 

To test the servo reaction, we put the GPS reciever on the dash of our truck with a clear view of the sky and drove a test route of straight North, South, East, and West for 5 blocks in each direction. the Test was performed with the autopilot turned on and the desired waypoint, as said before, was 1000km directly to the West. A four-direction test run was completed for different "P" values (0.05 to 2) and the results were recorded. We repeated the test for each "P" value by driving the route from different start and finish points (see attached graphs). The "I" term in the heading gain was set to zero. Head_error_max and min values were set to +/- 40.

 

To measure the servo reaction (in degrees), we mounted a protractor to the servo so that neutral was at zero degrees. We then observed the servo arm as we travelled in each direction.

 

The results are not what we expected, and hopefully some of you can help explain the data.

 

For example, how come when heading West the servo was not in neutral position at zero degrees? Also, the proportional setting in the PID control did not react proportional as different values were tested!

 

Any help on figuring this out would be greatly appreciated!

 

Thanks,

Jeff

Tags: GPS, PID, ardupilot, servo, test, testing

Views: 53

Attachments:

Reply to This

Replies to This Discussion

I know what your problem is. Your way point and or GPS is a little off and your plane is trying to correct
but,it can't cause you have to follow the road. Take it to a field and actually walk around with it and fallow the rudder commands. Turn right a little if the rudder"says to". When you change the proportional you are just changing the gain of the course error. Notice how on leg one there is a error one way. On leg four the error is opposite cause you are tuned around. And it is greater because your in the other lane. Google maps near my house is off 60 ft. to the west.
Hey Greg,

First off, thanks for taking a look at our problem. I figured by putting the waypoint at 1000km directly west of our test area, that would eliminate the effect of slight errors in google maps (even a 60 ft. errror). 10 to 20 degrees over a distance of 1000km is a HUGE error.

Why would the servo want to compensate 10-20 degrees when we were heading directly west toward the target?
Would there be that much error?

Thanks!
Hey Jeff,

I'm new here, so I'm basing this on my reading and looking at the Ardupilot code so far (mine's still in the mail :) )

Anyways... one thing to be mindful of: I think that the ArduPilot code uses a simplified calculation of bearing. Basically it stretches the latitude/longitude in your area into a square grid (like mercator projection) rather than a real world curved earth. It does this to simplify the math that the processor has to do.

While this works fine over the distances our UAVs usually fly (a couple of miles) I bet it might break down over long distances like 1000kms.

I'd suggest you try to manually run your numbers through the get_bearing function, or maybe print the bearing value out the serial port to try and see what number the Ardupilot is getting for the bearing. It might not be what you're expecting.

Just a thought,

Tom
Hi Tom,

Thanks for the input, I definitely think your points are valid... I am not familiar with the get_bearing function, but I will look into it for sure!
Jeff, I'd suggest that you upgrade to 2.5, which has more refined nav routines.
Hi Chris,

I downloaded the 2.5... but I am not sure exactly how to get it up and running. Are there some instructions about how to install the 2.5? I followed the Ardupilot manual step by step to get the 2.4 installed, but the folders look to be sorted differently in the 2.5 package. Sorry for all the trivial questions, and thanks for the input and help!

Jeff.
The new manual is here. We're retiring 2.4.

RSS

Groups

© 2012   Created by Chris Anderson.

Badges  |  Report an Issue  |  Terms of Service