Generate a S-curve between two points

854 Views Asked by At

I am working to generate a path for an autonomous vehicle. I have to generate a S-curve between two points A(11 20.88) and B(0.80 27.5). The vehicle orientation at point A being 0 degrees and at end point orientation should be 75 degrees. By generating the curvature, i can generate the steering angle required for the vehicle to move from start to end point using radius of curvature. My problem is i can generate a single curve using tangent at both the points but not able to generate S-curve. As i have to match the orientation as well, using S-curve will be optimal in my case. I do know it will be a fifth order equation y=f(x), that there will be two curvatures, two slopes and two positions(six unknowns) and the x-axis limit lies between x0enter image description here

1

There are 1 best solutions below

3
On

You have to
- exit from $A$ along a given direction;
- reach $B$ entering along a given direction;
- proceed at (presumably) constant speed;
- (also presumably) keep the curve radius over a given minimum (i.e. curvature below a max);
- and (again presumably) reach to B in the shortest time (minimum path).

Then the path to follow is the one depicted in this sketch.

S_Curve_1

From point $A$ draw the normal to the exit direction and same in $B$ to the entering direction.
Along those lines place circles of min. allowed bending radius. Assuming that the two circles do not overlap, draw the tangent as shown.
If the circles overlap, then bring them to touch while remaining tangent to the in / out directions
with the points $C$ and $D$ close to $A$ and $B$, in the appropriate direction.

Wish you are going to exclude "pathological" cases in which the radius allowed is so large that you have to shift the circle leading to $B$ on the other side of the direction line.
In this case the path will take the shape of an inverted $C$.

--- addendum ---

In order to demonstrate that the S shape curve is the minimal length path obeying to the restrictions given by the problem, and in any case as allowed by driving a real vehicle from A to B, or better in designing a path leaving the motorway passing through A to enter the motorway that passes through B.

The shortest path would clearly be the segment $AB$.
But in entering and in exiting from it, the vehicle should be able to change its direction by a finite angle in $dt$, a bending with a null radius.
The vehicle is instead capable of steering with a given minimum radius, which is the circle traced at A.
A larger circle would mean a longer path. After entering the circle, it can only exit through a tangential same or larger radius circle heading to B.
Inverting the direction of motion, the same considerations applies to the circle in B.

Conclusion: two circular arcs at minimum radius, plus a straight line tangent to them.
The smaller is the possible bending radius, the closer will be the S shape to the straight segment AB.