Some guidance on guidance

That is the huge benefit for it, says that in documentation a lot. If the path is lost, then the steering doesn’t go wild. Been thinking, i should be able to just move over the pivot point in PP exactly the same as Stan.

If you “move over the pivot point in PP exactly the same as Stan”, then there should no need for integral algorithm? Or what is the benefit in this?

Well, that is essentially the definition of an integral, adding the error over time. You are slowly adding some correction allowing the vehicle to eliminate the error. Otherwise you zig zag back and forth and fix nothing.

Also, how do you distinguish between getting to the line and offset because you aren’t getting to the line steady state?

@BrianTee_Admin thanks to you and the team for the work put in, in makeing AgOpenGPS what it is today. I’d like to make some suggestions to help improve the end turn steering response, perhaps this has been considered or maybe not?

I noticed the steering wheel motor seems to be agressive going into and out of turns. I liken this to a new nervous dirve who is erradic on the streeing wheel as he guides the tractor around the end and into the next row. I’d like to make the AgOpenGPS steering more like an old man who turned that tractor around 10000 times before, he comes to the end and with a few smooth even moves of the steering wheel and places that machine right where he wants it.

1st I note that a MOVING Tractor can’t follow from straight line into a sharp radius turn, unless it stops on the end of the straight line, then turns then goes. This is because it takes time for the streering to turn most machines. (perhaps track machines can do this).

2nd If our control system tries to follow from a straight to constant radius turn WHILE MOVING we are asking it to do someting it can’t phyically do, and so from the start it has to play catch up causing the control system to behave like a new driver.

3rd The Solution would be to have a turn path that allows for 1. the maximun streening rate (ie deg/sec) of the steering system, and 2. to less extent the the times the steeing system takes to get to this rate (ie with an electric steering motor on the steering wheel, we would allow for the time that streeing motor takes to accelerate from stop to max rpm).

Hope you can follow this reasoning. Here below is a suggested steeing profile (Blue) vs an arc (Red) with curvature (1/radius) indications.
One drawback is the turn will takes ~30% more distance than the sharpest turn the vehicle can do by stopping and then turning. But this is more natural and how a real driver drives most of the time.

image

4 Likes

The problem is the abrupt transfer from a straight line to a curve or back again. Picture the keyhole. Straight line then bam you are turning left at the radius of the next circle the very next point rather then going from gradual to smooth corner. As you hit the next radius, the loop in blue in your picture, now in one single point you are turning fully the other direction. Then again a circle completely the other direction.

Have wondered if maybe just a simple smoothing (like is done with ab curve) would help a lot.

The other problem is, as in the green points, the segments cause the issue. as you go from point to point the heading changes and the steering tries to catch up to those headings constantly. That causes the nervousness also going around the corner. The solution is to either have a formula to generate a constant function where the heading changes not in line segments, but smoothly.

Moving from red to blue will unfortunately not solve the underlying problem of using straight line segments to go around a sharp corner :frowning:

Can add more points so the segments approach the “ideal” curve along with smoothing. But the problem is the segmentation of a curve - not really the shape of it that is the problem.

I was going to make a video on v4 integral progress, so will explain exactly why it is jumpy.

1 Like

If we distinguish between following a line and following a uturn, could the first problem (straight line to curve) be addressed by adding a trapezoidal ramping or s-curve ramping profile between whatever speed the motor was turning at when you enter the turn and the maximum motor speed? Time period of ramping would limit the angular acceleration/jerk of the tractor and you would get roughly the curve profile described by tnpik1? It seems like it could be simple but I am sure the devil is in the detail…
Edit: doesn’t do much for smoothing the exit of the corner. Alternate strategy required!

And pure pursuit makes it even worse as your reference isn’t where you are driving. With stanley at least the steer point is reading where the steer wheels should go.

Turn rate could be factored in by adding time/speed to the equations. Standard rate 1 turn, is 3 deg/sec, 180 deg/minute.
Steering mechanism turn rate for each machine can be measured from the WAS readings and would output the time required to attain a machine turn rate, maximum machine turn rate should be a user setting, benefit is it outputs a variable minimum turn radius that is safe & attainable at any speed to be used in steering calc. And gives the data required on where to initialise a turn rather than a fixed lookahead. Once established in a turn its just a matter of adjusting turn rate to stay on/aquire the line.

1 Like

As long as wheels never slip

2 Likes

Tu drive mostly with twin wheels , and there’s a lot of slip during uturn.

1 Like

Thanks guys for reading the post and the responses. I feel the problem is quite well understood, but maybe the solution is not so well perceived and how it benefits the whole system.

First let me clarify I’m only talking here about the planned path, not how we follow it yet. I really hope to get to that later but for now just the planned path. Because with a well-planned path the control system will follow it much easier.

I’m using the simple U turn to illustrate the problem/(fix or improvement I hope). A simple 180deg turn coming up the blue straight and make a, U turn to the other blue straight.

This can be extended naturally to more complicated turns, eg adding a left right left to get a narrow U turn etc.

The diagram from last post was not fully explained by me,
the blue path is the proposed solution (very close but not 100% to what I want)
the red arc is (as I understand it correct me if I’m wrong) the current solution which follows an arc of the end of the straight lines.
the black indicates curvature of the lines ie (1/R) at that point of the line.
the yellow and dotes are simply construction lines and points used to draw the above.

The blue “arc” is actually not an arc but a spline, as can be seen from the curvature (black lines) coming off of it. The red arc has the same curvature ie radius as the yellow dashed construction circle so the curve of the red and blue can be compared.

The red arc path poses the exact problem described by @BrianTee_Admin
“The problem is the abrupt transfer from a straight line to a curve or back again. Picture the keyhole. Straight line then bam you are turning left at the radius of the next circle the very next point rather then going from gradual to smooth corner”

Even if this path were physically possible with a moving vehicle (it’s not) it poses secondary issues with comfort and abrupt force changes that would spill your coffee with enough speed. Eg F = ma and on the corners a = v^2/r. As we go in and out of arcs we get the a from the arc. One sec it is there and the next its not and the next it is coming from the opposite side etc splash there goes the coffee.

This red path gives the steering control system a “step input” (in control theory terms) for which it has to chase the path from off the line soon as it enters an arc, causing a lot of active control steering corrections.

Hence the solution is as @woody_matt hinted at, an increasing curvature path, from 0 curvature to the arc curvature, then exiting the arc reducing curvature to zero slowly until 0 when the vehicle meets the straight line which has 0 curvature.

Please consider the new improved diagram below. The blue is straight the green is the increasing curvature spline and the red is the constant curvature arc. The diagram is scaled to an arc of r = 1.

Things to note:

    • There is not sudden change in curvature at any point. So no sudden change in forces, or sudden expectation on the steering angle to be in another position.
    • The steering rate ie deg/sec of the tractor steering angle is not infinite and therefore achievable with an electric steering control system.
    • If this is controlled well or even made adjustable wip in a wide sprayer boom will be a thing of past.
    • Ideally ( and yes other factors will make it not so ) but once the vehicle has transitioned from the blue straight through the green and onto the red arc the steering motor will remain still until the end of the red arc, making a smooth consistent turn.
    • The straighten out from the Red, through the green, to the blue straight will be just as effective at eliminating jerk and forces as the path going into the turn.
    • Turns take longer. The smoother you want them the longer they take to get into the full arc. In the new diagram 1 below the turn will take 10% longer than a pure arc.(note the turn stars 0.1 before the centre of the arc. In Diagram 2 its 20% longer turn but the steering wheels angle (ie curvature) rate is lower and take more distance (same speed more time) to get to the red arc wheel lock steering angle. So this turn can be take faster.

How fast, well I did a quick calculation on a Ford TW 25 FWA to find its max rate of wheel turn. It has a 15.9lpm steering pump at 2200 rpm engine. Its ZF front axle steering cylinder having a rod both ends may have a bore of 70mm stroke 208mm and rod 26mm, not certain but lets use these figures for now.

That means at 2200 rpm this vehicle can turn lock to lock in x(minutes) = Volume of steering cylinder less rod/pump rate in min.
ie pi/4(70^2-26^2)*208/1e6/15.9 =0.043 min or 2.6 sec.
So half lock is 1.3 sec or 2.6sec at 1100 rpm.

Lets say the Min turn R is 8m in case 1 below the diagram 1 shows 0 curvature ie straight to full curvature take about 0.25 of the R ie in our case this would be 8 * 0.25 = 2 m.

At 1100 engine rpm we have 2.6 sec to achieve this straight to full lock. So we must be doing less than 2m/2.6s = 0.77m/s or <2.76km/hr to make this smooth turn.

If we take curve 2 below about 4m to make the straight to full left lock and so can enter at 5.5 km /h at 1100 rpm engine. Or 11km/hr at 2200 rpm engine. Are approximation maximum speeds.

I’m sure you get the picture. The point is we can do quite fast and smooth turns a bit like a good driver.

Diagram 3 would be the smoothest high speed turn path taking 40% more depth to the turn.

Yes I agree the next challenge is following the curve smoothly with the control system (not an easy task indeed!) but having a curve that physically can be followed smoothly I feel is the first step in achieving that.

These diagrams have approximate the correct shape I’m looking for but I’m not 100% satisfied this spline is the best. It’s a G2 connecting spline.

Hope this helps and one day makes AgOpenGPS the smoothest turning GPS guidance in the industry :grinning:

Diagram 1
image

Diagram 2
image

Diagram 3
image

3 Likes

I like your thinking, but fear you may end up with the need for a planned path developed for every machine using AdOpenGPS.
Personally I think the path needs to be just the points needed to create a line, Better to modify the steering algorithm and lookahead to dynamically smooth the path according to each machines turn rate capabilities.

The aggressiveness of the steer would be based on how far you are into the turn. It would need to be a hyperbolic function (y = x^2 or y =x^4.) Like @Apm said some machines can handle that, some cannot. My grandad would just lift, press the left brake with little to no steering and sling the old Oliver around, drop the lift and never miss the return trip. Swap peddles on the other end and do it again. Now it takes an acre to turn around one of these units. Progress, I think?

Trouble is, that is just one curve, Dubins has the ability to adapt to any shape curve, even going the opposite way and making a circle to get there.

I guess the easy answer for me is show that it works or is better. Write the code, have it generate the turn spline, and take it for a drive comparing the 2 in different types and situations. It would be a great project.

I’m sure you have already looked at the code - it is not simple just to make the thing go the other way - but… there is the recorded uTurn paths in text files. Perhaps generating those curves from excel using your formula ideas may be a much easier way to test. The pattern auto sizes based on tool width, so you only need 1 pattern.

The patterns start on the left side and make a right turn, use as many points as you want. I always thought the pattern turns turn much better then dubins since you can physically drive the ideal curve. I do this with the air seeder with tow between tank - its a complicated turn to generate but easy to drive and record.

1 Like

Was kicked out of the office to the laptop so i thought i would try an idea i have had for a while now - smoothing. It’s done on boundaries and curves and and so why not on uTurn as well.

unsmoothed - note the abrupt changes in direction

Screenshot_10

And smoothed. Pretty simple function. Dramatic difference in terms of path tangents and the point headings are recalculated. You would have to increase the turn radius to compensate for the lost diameter from smoothing.

Screenshot_9

6 Likes

Bonjour, j’ai une question, serais ce possible de faire que le tracteur suis l’antenne seulement au lieu de prendre le point arriere de la machine et l’antenne. Cela serais pour moi plus juste en petite vitesse (0.7km/h) et en ligne ab.

Hello, I have a question, would it be possible to make the tractor follow the antenna only instead of taking the tail of the machine and the antenna. It would be fairer for me at low speed (0.7km / h) and in line ab.

Well only if you put the antenna exactly over the pivot point. Otherwise you need to calculate how the antenna will swing back and forth because it is ahead of the pivot

looks good, but increases turning area. I understand that you cannot have everything.

By having the pivot follow the line vs the steering?

Easy answer is to make the circle smaller

Bonjour, j’ai fait des essais avec l’outils frontal donc point de pivot avant l’antenne et en conduite stanley il garde 2-3 cm . J’ai une question comment agopengps défini le pourcentage entre le point de pivot de la machine et le point de l’antenne est ce 50 % ou point de pivot 70% voir plus ? Merci