DIY AutoSteer with AgOpenGPS - Page 93 - The Combine Forum
 1215Likes
 
LinkBack Thread Tools
post #921 of 2024 (permalink) Old 05-21-2018, 03:18 AM Thread Starter
Senior Member
 
Join Date: Aug 2012
Location: Vermilion Alberta Canada
Posts: 5,759
Mentioned: 19 Post(s)
Quoted: 2509 Post(s)
Highlander, wow haven't thought about that in a while!

BrianTee is offline  
Sponsored Links
Advertisement
 
post #922 of 2024 (permalink) Old 05-21-2018, 06:25 AM
Junior Member
 
Join Date: Dec 2017
Location: Siberia
Posts: 12
Mentioned: 0 Post(s)
Quoted: 8 Post(s)
Quote:
Originally Posted by Jordan Rasmussen View Post
Ok it is recognized as u-blox virtual com port (COM3)
here is the issue

find "GNSS location sensor" in another subtree of device manager
right click -> update driver
click Browse
Pick from a list
Select "usb serial device"

now you should see you receiver in Com ports subtree (note what com port number it was assigned to use in agopengps)

d187 is offline  
post #923 of 2024 (permalink) Old 05-21-2018, 11:01 AM
Member
 
Join Date: Sep 2015
Location: Mayerthorpe, AB
Posts: 38
Mentioned: 0 Post(s)
Quoted: 22 Post(s)
Anyone have tractor settings on a 4WD available? I'm wondering if I have the pivot length right, I'm using the front axle as the pivot point as per the normal tractor diagram, perhaps I should be using the rear axle or the actual pivot pin in the middle. I'm having trouble getting u-turns working right and wondering if this is the issue, as it seems to drive straight fairly well now that I've upgraded my GPS to the Matey.
ikidd is offline  
Sponsored Links
Advertisement
 
post #924 of 2024 (permalink) Old 05-22-2018, 01:34 AM Thread Starter
Senior Member
 
Join Date: Aug 2012
Location: Vermilion Alberta Canada
Posts: 5,759
Mentioned: 19 Post(s)
Quoted: 2509 Post(s)
Quote:
Originally Posted by ikidd View Post
Anyone have tractor settings on a 4WD available? I'm wondering if I have the pivot length right, I'm using the front axle as the pivot point as per the normal tractor diagram, perhaps I should be using the rear axle or the actual pivot pin in the middle. I'm having trouble getting u-turns working right and wondering if this is the issue, as it seems to drive straight fairly well now that I've upgraded my GPS to the Matey.

A 4wd is a strange beast. Don't think anyone has done one - I was supposed to but we sold it and the new one has Trimble. I would suggest calling the front axle the pivot, and try putting the antenna ahead of the front wheels and set that distance as pivot distance.
When the silly thing turns back to going straight, the front end drives straight and the back comes in line, however Pure Pursuit sets a steer angle so it should work ok.

What is it doing in the UTurns that isn't right?
BrianTee is offline  
post #925 of 2024 (permalink) Old 05-22-2018, 10:48 AM
Member
 
Join Date: Sep 2015
Location: Mayerthorpe, AB
Posts: 38
Mentioned: 0 Post(s)
Quoted: 22 Post(s)
Quote:
Originally Posted by BrianTee View Post
A 4wd is a strange beast. Don't think anyone has done one - I was supposed to but we sold it and the new one has Trimble. I would suggest calling the front axle the pivot, and try putting the antenna ahead of the front wheels and set that distance as pivot distance.
When the silly thing turns back to going straight, the front end drives straight and the back comes in line, however Pure Pursuit sets a steer angle so it should work ok.

What is it doing in the UTurns that isn't right?
I'll try that. So do I treat it like a towbehind with an implement and measure the hitch length from the front axle to the pivot pin? I have the steering angle sensor at the pivot.

It seems like it tries to grab other lines during the turns, perhaps because my turn radius isn't between the line you leave and the next one over. It gets halfway through the turn and tries to steer outwards to catch the 2nd line over and head outwards, so if I wrestle it through that line and continue the turn inwards, it then catches that line again and heads inwards instead of continuing on to the proper line which would be the next one around. I've tried all the patterns and recorded my own. It seems like the recorded one takes a much wider circle than I would be able to do and doesn't do a jank to the outside as I start the turn like I normally would, not sure if I'm just not dialed in yet on PIDs to get it to turn fast enough.

I have increase P a lot playing with it on straightaways (which it does well, though I had to give it a pretend 18" offset to get it to track the line properly and not gap/overlap, maybe that's because my IMU is offset in the cab?) I haven't had a chance to run it today yet, I have another guy on it that's just using it on straights as it's easy to flip the motor ahead on the mount during hand-turns and drop it back as you come in, it tracks on to the lines beautifully.

Dubins turns are comical as it tries to grab lines all over the ****. I've done it out in the middle of the field and it will zigzag all over hells half acre.
apm likes this.
ikidd is offline  
post #926 of 2024 (permalink) Old 05-23-2018, 02:25 AM Thread Starter
Senior Member
 
Join Date: Aug 2012
Location: Vermilion Alberta Canada
Posts: 5,759
Mentioned: 19 Post(s)
Quoted: 2509 Post(s)
I honestly do not know, since the "hitch" isn't rigid with the articulation joint in between, which goes sideways when you correct.

I was watching closely today in the TJ how it steers, and it actually does things pretty slowly. AgOpen generates the correct steering angle - and it really should work based on the front part of the tractor and the distance from the line and the heading of it vs the heading of the desired line.

the other thing you could try is set the look ahead fairly high like 4 or 5 seconds or so, fairly low gain for "P", and 2 or 3 meters for how far back for fix to calc heading, and also disable the IMU. Also set your max steer angle to like 25 degrees. Basically start out really slow to correct. It should steer back to the line - albeit slowly, but it should be quite smooth. Increase settings one at a time and see what does what.

After seeding I would love to try it on the TJ - as soon as figure out how to tie into the CanBus to read the turn angle sensor, and control the steering valves.


I'm going to have to fix Dubins, that'll take some fancy coding for sure! Haven't used them at all - but I know the problem.Odd you have an offset, that really should not be required at all if everything is in the middle

Last edited by BrianTee; 05-23-2018 at 02:28 AM.
BrianTee is offline  
post #927 of 2024 (permalink) Old 05-24-2018, 03:04 AM Thread Starter
Senior Member
 
Join Date: Aug 2012
Location: Vermilion Alberta Canada
Posts: 5,759
Mentioned: 19 Post(s)
Quoted: 2509 Post(s)
The problem with pure pursuit is that if there is a sidehill or the like, the vehicle won;t get to the line. So..... an integral accumulating value needs to keep turning sharper to get to the line. So while the tractor was driving i wrote this and tried a few versions, but this one seemed to work eerily well. It uses the "I" from the auto steer settings and then delete the integral stuff from the PID code. Integral wasn't much use anyways.



Code:
  //close enough to center, remove any correction
    if (distanceFromLine <= 20 && distanceFromLine >= -20) corr = 0;
    else
    {
      //use the integal value to adjust how much per cycle it increases
      corr +=Ki;

      //provide a limit - the old max integral value
      if (corr > maxIntegralValue) corr = maxIntegralValue;

      //now add the correction times counts per degree to fool steering position
      if (distanceFromLine > 20) 
      {
        steeringPosition -= steerSensorCounts*corr;
      }
      else
      {
        steeringPosition += steerSensorCounts*corr;
      }
    }

So all it does is if the distance from the line is > then 20 mm, start accumulating additional steer angle up to a maximum set in the settings. Without accumulating too quickly it actually worked quite well, bringing it close to the line. I'll try it some more tomorrow, have an absolutely wild field with hills and lots of slopes in all sorts of directions - and steep.



It's a very different arduino sketch since it uses the pins designated for ethernet use, but the code is there only for usb.


Pretty sure that is what you were after Andreas!
Attached Files
File Type: zip AutoSteer.zip (35.1 KB, 23 views)
BrianTee is offline  
post #928 of 2024 (permalink) Old 05-24-2018, 06:18 AM
Senior Member
 
Join Date: Nov 2016
Location: Austria
Posts: 788
Mentioned: 3 Post(s)
Quoted: 320 Post(s)
Quote:
Originally Posted by BrianTee View Post
The problem with pure pursuit is that if there is a sidehill or the like, the vehicle won;t get to the line. So..... an integral accumulating value needs to keep turning sharper to get to the line. So while the tractor was driving i wrote this and tried a few versions, but this one seemed to work eerily well. It uses the "I" from the auto steer settings and then delete the integral stuff from the PID code. Integral wasn't much use anyways.



Code:
  //close enough to center, remove any correction
    if (distanceFromLine <= 20 && distanceFromLine >= -20) corr = 0;
    else
    {
      //use the integal value to adjust how much per cycle it increases
      corr +=Ki;

      //provide a limit - the old max integral value
      if (corr > maxIntegralValue) corr = maxIntegralValue;

      //now add the correction times counts per degree to fool steering position
      if (distanceFromLine > 20) 
      {
        steeringPosition -= steerSensorCounts*corr;
      }
      else
      {
        steeringPosition += steerSensorCounts*corr;
      }
    }

So all it does is if the distance from the line is > then 20 mm, start accumulating additional steer angle up to a maximum set in the settings. Without accumulating too quickly it actually worked quite well, bringing it close to the line. I'll try it some more tomorrow, have an absolutely wild field with hills and lots of slopes in all sorts of directions - and steep.



It's a very different arduino sketch since it uses the pins designated for ethernet use, but the code is there only for usb.


Pretty sure that is what you were after Andreas!
! since thecombineforum did goes offline yesterday for a time i am not able to download anything...
Andreas Ortner is offline  
post #929 of 2024 (permalink) Old 05-24-2018, 10:35 AM
Member
 
Join Date: Sep 2015
Location: Mayerthorpe, AB
Posts: 38
Mentioned: 0 Post(s)
Quoted: 22 Post(s)
Quote:
Originally Posted by BrianTee View Post
I honestly do not know, since the "hitch" isn't rigid with the articulation joint in between, which goes sideways when you correct.

I was watching closely today in the TJ how it steers, and it actually does things pretty slowly. AgOpen generates the correct steering angle - and it really should work based on the front part of the tractor and the distance from the line and the heading of it vs the heading of the desired line.

the other thing you could try is set the look ahead fairly high like 4 or 5 seconds or so, fairly low gain for "P", and 2 or 3 meters for how far back for fix to calc heading, and also disable the IMU. Also set your max steer angle to like 25 degrees. Basically start out really slow to correct. It should steer back to the line - albeit slowly, but it should be quite smooth. Increase settings one at a time and see what does what.

After seeding I would love to try it on the TJ - as soon as figure out how to tie into the CanBus to read the turn angle sensor, and control the steering valves.


I'm going to have to fix Dubins, that'll take some fancy coding for sure! Haven't used them at all - but I know the problem.Odd you have an offset, that really should not be required at all if everything is in the middle
By disable IMU, you mean just uncheck it in the config page or do I have to comment something out in the Autosteer sketch? I have been taking fixes off DGPS since it sounds like faith in the IMU was waning.
ikidd is offline  
post #930 of 2024 (permalink) Old 05-25-2018, 03:01 AM Thread Starter
Senior Member
 
Join Date: Aug 2012
Location: Vermilion Alberta Canada
Posts: 5,759
Mentioned: 19 Post(s)
Quoted: 2509 Post(s)
Quote:
Originally Posted by ikidd View Post
By disable IMU, you mean just uncheck it in the config page or do I have to comment something out in the Autosteer sketch? I have been taking fixes off DGPS since it sounds like faith in the IMU was waning.

No just uncheck. Basically the simpler the setup, the easier to figure out where the problems are.

BrianTee is offline  
Sponsored Links
Advertisement
 
Reply

Quick Reply
Message:
Options

Register Now



In order to be able to post messages on the The Combine Forum forums, you must first register.
Please enter your desired user name, your email address and other required details in the form below.

User Name:
Password
Please enter a password for your user account. Note that passwords are case-sensitive.

Password:


Confirm Password:
Email Address
Please enter a valid email address for yourself.

Email Address:
OR

Log-in










Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page



Posting Rules  
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

 
For the best viewing experience please update your browser to Google Chrome