Merry Christmas all!
Just wanted to update you on my own application of AOG. I am not a farmer, but have always wanted to build an autonomous vehicle which could be put to many uses.
As a basic first project, I’m trying to apply AOG to an electric scooter; if I can get it working, then I will start adding things to it and put it to some tasks.
Thanks to your support, I now have a working circuit based on an arduino Uno, running a Cytron MC, magnetometer, GPS and WAS. All are detected fine in AOG, the WAS detects the slightest movement in the wheels, MC is driving the motor, GPS is surprisingly accurate (to around a foot, I’m seeing up to 12 satellites) and compass also seems accurate.
I’m currently struggling to calibrate the steering; when I fire up AOG the motor immediately starts whirring to the left and if I try to use the manual slider, it has to be about 75% to the right to “centre” it. Am playing with SteerPos values to try to correct this.
Ran my first live test tonight in my garden which was a laughable failure. It went left/right/left/right… RIGHT! swerved off and crashed into the septic tank before I could stop it (note to self: create a remote kill switch).
My garden really is too small to test in, so I’m taking it to a football field tomorrow for further testing. Ideally I want it to drive from one goalpost to the other, u-turn and return.
Struggling with the software a bit. As far as understand this, I need to geofence the football field (or a narrow strip between the goalposts in this instance) by creating a new field and then importing a KML border (polygon) from google earth, then create an AB Line between the goalposts.
Does that sound about right?
Initially, you need to set up SteerPosZero in the Arduino.ino so that AOG gets almost zero reading from your WAS sensor. Fine-tuning can be performed in the AOG Auto Steer configuration.
After programming the Arduino, you will see in the Serialmonitor (type Ctrl + Shift + M) numbers.
The first number is the WAS sensor reading. And it should be zero when the Wheels are pointing straight ahead.
If not. Then adjust your SteerPoszero number and try again … and again
Brian has made some good videos ofthis topic.
Arduino INO settings:
AutoSteer Settings From Default Config:
I’ve actually got a lot further with things. learned how to create KML boundaries and load them into AOG, set up an A-B line and get it autosteering into the sim. Calibrated the SteerPos to pretty close to 0 (-0.1) and took the whole thing out to test in a football field and got mixed results.
AOG tracking from a simple USB GPS was very accurate, both speed and location. Steering went haywire, all seemed really random as it snaked and circled around a lot. Stopped it and noticed the WAS wasn’t secure, so this may have been the problem. Whatever the case, AOG was trying to control the motor so that’s good.
Ran out of daylight, so will refine things tonight and retest tomorrow.
Thanks for the links. I have already seen these, but will rewatch and check a few things I am vague on.
“The first number is the WAS sensor reading. And it should be zero when the Wheels are pointing straight ahead.”
Didn’t know that, good tip.
Oh and Happy New Year everyone, hope 2020 is a good year for you all
And armed with that little snippet about the SM, I have calibrated the steering and it’s following an AB line accurately. Now working out how to do return paths and it will be ready for a field test tomorrow. I’ll upload a video of the results.
Edit: Any idea how to create tramlines in V3.0?
It would be better if you get the latest version 4.xx as tramline was done much easier after v 3.0.8. Also watch the video for v3. 0.8 where tramline is shown about 3 quarter in.
Why should you use tramlines?
I think AB lines will make the job you are looking for. Make Field, AB-line and klick U-turn buttom.
And have fun.
Hmmm, by the sound of your question, I have misunderstood something.
I thought “tramlines” referred to multiple parallel A-B paths, is that wrong?
What I am trying to do is create multiple parallel paths with automatic u-turns at each end so that a whole field is covered automatically. If I create an AB line and get the vehicle to follow this (in the sim), it reliably follows this line until it breaches the geofence, then it continues merrily on its path from Britain to Australia (or battery failure, whichever comes first).
I’m sure that this is all laughably simple to you guys, but I am totally new to GPS navigation and the learning curve has been pretty steep so far.
So, “tramlines” are not the lines I am looking for?
The Tram lines are intended for use as a spray gun line. ie a wide boom injects the width of several seed drills at a time. This time the magic happens when you klick the Uturn buttom.
Set first you tool width
That simple, eh?
Think I have it now. Will take it for a live test tomorrow if I don’t get called into work and let you know how it goes.
A few.months ago, I used Brian’s Self function to draw a recorded path. Worked well but it was random on the tight turns. I would draw the points on the screen and then process the line into a recorded path with a set speed. I went as far as importing the uturn boundary so that it would make one or two passes around the field that did not rely on contour. The self function was morphed into the ABDraw and dropped from development at this time. Easy, would be to import a kml as a recorded path, just not accurate coming from Google Earth. It would have to start in a decent mapping software. Drawing it in AOG is dead on accurate in relation with the boundaries. But you need to start with accurate boundaries.
This is getting embarrassing.
Had this all working fine in simulator mode, the vehicle was following the AB Line correctly and, if I steered it off the line, it would autocorrect. All motors reflected this, the autosteer worked perfectly.
Took it for a live test and it acted almost randomly again, it looked very much like it was trying to find the AB Line.
Now, regardless of what I try, the autosteer works correctly for a couple of seconds, then just flips back to manual (the autosteer and uturn buttons grey out). If I toggle it back on, the vehicle starts to move toward the AB Line, then toggles autosteer off again a second or two later.
I’m evidently missing something, but cannot work out what.
Any tips greatly appreciated.
EDIT: And 30 seconds after posting this (after hours of fighting), I see the problem: autosteer / manual option in vehicle / guidance was on.
Good job. You did find the ball. The game can start soon.
I won’t pop any corks yet…
Please can you tell me where I am going wrong here as, if I turn on autosteer and U-turn, it will U-turn once (if I am lucky) and then just follow the AB Line back until it goes out of the boundary?
And half the time the screen is just spinning out of control.
Is this the correct process?
- Edit vehicle (or load existing vehicle)
- Start new Field, give it a name
- Create boundary (import KML of a path created in Google Earth (is a path OK, or should this be a polygon? I’ll test this in a minute as it just occurred to me)).
- Edit Tool Width.
- Create AB Line
- Enable Autosteer and U-turn.
Watch the magic
Because that is what I am trying. It invariably follows the AB Line and sometimes it will U-turn once. Quite often the whole map just starts spinning out of control.
Is there something obvious that I am missing here?
How wide is your tool?
Edit: I’ve seen really narrow tools drive through the boundaries. And it becomes erratic trying to find the ABLine.
Width could be an issue, does the same width work in SIM? Perhaps you must let it skip one or two lines when it turns.
Have you set the SIM cords to your place? otherwise I have seen it spin.
Use field or GPS option!
Edit: But only use field that is made when sim cords is set correct!
It is also possible to notice a higher frametime eg. over 20 (number after 5Hz at top of screen) when sim is set far away from actual GPS place, and field loaded is your place.(be aware if resuming last field!)
Just did test in sim and my AOG did exactly the same searching from side as you describe when trying to follow A B line, when sim was set to Canada and loaded field originated with simcords of Denmark.
I tested narrow working widths. The 1.5 m working width seemed to be the minimum at which Automatic U-Turn operates. In the test Vehicle settings were Tractor level ie. Wheelbase 2.3m etc. .
AOG was the latest release of Version 4 on Telegram.
@Brian Tee_Admin can definitely tell you what can be done as long as you give the vehicle details and working width
It’s been awhile since I have looked at the boundary fix function that divides the kml file into smaller points, but I seem to remember that the cuts are based on tool width or wheelbase. @BrianTee_Admin would know. But if that’s the case might set up your tool before importing kml. And by all means make sure your import and field is built with the Sim GPS set as close to actual field cords as you can get. I’ve seen the boundary lines come in all wiggly.
Definitely turn on uturn button
Super narrow widths are tricky along with widths at 50m. This has come up before, we pretty much need a mini-Mario sized version as well as a field version. Like yard mode vs field mode.
You guys are good
I just wanted to test with the vehicle only, so set tool width to 30CM. Thinking about it, that’s when the problems started.
Will check shortly, reset it to something wider and get back to you.
One suggestion here; might it be worth adding a “Reset to Defaults” button for troubleshooting? Might be a lot of work, just a suggestion.
Oh and yes, I have set the GPS simulator settings to within the boundary I’m testing.
There is one on the top menu, resets the settings to default