Vehicle turning radius and path projection

AI Thread Summary
The discussion focuses on calculating the turning radius and center of a vehicle's circular path in a game development context. The user successfully calculates the turning radius using the formula r = wheelbase / sin(steeringAngle) but struggles with accurately determining the circle's center. They propose using the vehicle's direction vector and offsetting it by the radius, but find discrepancies in the Z position when accelerating from a stationary state. Suggestions include adjusting the circle's center based on the after-turn direction vector rather than the current direction. The conversation emphasizes the importance of accurately modeling the vehicle's movement dynamics in a 3D environment.
shipiz
Messages
5
Reaction score
0
Hi everyone, i hope this is the right place to post this.

Anyway, I'm creating a game, and I'm trying to calculate and project future car movement path based on steering angle of the wheels. By using equation:

r = wheelbase / sin(steeringAngle)

I'm able to calculate turning radius. But the problem is finding the center of the circle where vehicle will turn.
I can calculate approximate circle center by getting current direction vector and offset by radius. But it still misses by some part. Also note that vehicle is not moving when calculations are executed. Disregard all basic physics laws for this. :)

Thanks in advance
 
Last edited:
Physics news on Phys.org
When you say:
shipiz said:
I can calculate approximate circle center by getting current direction vector and offset by radius.
What do you mean by current direction vector? Is this before or after the change of steering angle?
In general, if you are measuring your steering angle +/- theta degrees from 0, assuming an initial direction of +x, vehicle located at the origin, and the effect of this steering is to induce a circular path with radius r, then you should be able to center your circle at y = +/- r.
The important thing to note is that a line drawn from the center to the car should be perpendicular to the line drawn at theta = 0.
 
I have a direction where vehicle is facing and current vehicle position. Everything is in 3D just to note.
Vehicle is static while wheels are turning between max steering angle (+/- theta) where theta=0 is forward direction.

So here is what i basically do:

find a turning radius as described in formula above
because i know where vehicle is facing, i can get right/left direction vector and multiply it by radius and add to current vehicle position to get center of circle

But the thing is that when i accelerate from stationary position it seems that circle is a bit off in Z position ( Y-up coordinate system).

Here is a picture that illustrates, white is projected circle, and red is real vehicle movement circle
 

Attachments

  • Screen Shot 2016-02-12 at 8.55.51 PM.png
    Screen Shot 2016-02-12 at 8.55.51 PM.png
    103.8 KB · Views: 939
After some consideration, and looking at your picture seems to encourage my thinking, you might want to offset the center of the circle from the after-turn direction vector.
This makes sense if you think that as soon as the wheel is turned, it's direction will be in the right/left theta direction.
What do you think?
 
RUber said:
After some consideration, and looking at your picture seems to encourage my thinking, you might want to offset the center of the circle from the after-turn direction vector.
This makes sense if you think that as soon as the wheel is turned, it's direction will be in the right/left theta direction.
What do you think?

If i understand you correctly, instead of using vehicle right/left direction, i should use wheel after-turn(by theta) left/right direction to calculate center offset ?
 
That's what I am thinking.
 

Similar threads

Replies
102
Views
7K
Replies
49
Views
5K
Replies
8
Views
5K
Replies
4
Views
3K
Replies
13
Views
7K
Back
Top