## Improve grip feeling on hinge vehicle

Killpippo
Posts: 3
Joined: Sat Feb 01, 2020 10:40 am

### Improve grip feeling on hinge vehicle

Hello,
I recently started to implement vehicle (tank) simple simulation starting from HingeVehicle demo.
While I'm generally satisfied of the result, I still see, during turns, the movement is pretty inefficient.
Here's a video to demonstrate:

I believe I should improve wheels' steer angles for a better result, but any advise is appreciated.

As souce code, I just modified HingeVehicle.cpp sample to add another pair of wheels and steer logic. Parameters are pretty much the same.

Thank you

drleviathan
Posts: 639
Joined: Tue Sep 30, 2014 6:03 pm
Location: San Francisco

### Re: Improve grip feeling on hinge vehicle

The video looks good. As a viewer of the video is hard to "feel" the inefficiencies you are talking about. Perhaps they are more apparent to the driver of the real-time simulation. In any case I will mention the ideas I had after watching the video:

(1) During a turn the radius of the two tracks (inner and outer) are different. To minimize wheel slippage you would want to angle the outer steering wheels differently to agree with the angle of their circle's pie section to which they correspond.

The way I would do this would be to provide as steering input the radius of the the arc you want the center of the vehicle to take. If you know the radius and the dimensions of your vehicle, then you can compute the radiuses of the inner and outer tracks and also the length of the arcs between the front and back wheels of each track. From this you can compute the angles the wheels should have from geometry: the angle of each wheel, relative to its vehicle's rotation, should be half the value of the arc of those wheels along the circle of their motion. Since the inner and outer wheels will portend a different arc on their circle you'll end up with different angles for each set.

(2) To minimize wheel slippage: you would also want to change the rotation speeds. Spin the outer wheels faster according to their linear speed along the arc of their circle. The angular_velocity would be the same in each case, but their linear velocity along the arc of motion would be different.

That ^^^ formula is true when angular_velocity is in units of radians/second.

(3) Your wheels are wide, which means there is a fair amount of speed variation between their inner and outer edges. There would be no way to reduce slippage from that without either (a) making your wheels thinner, or maybe (b) using multiple sets of thin wheels stacked up, each with its own angular velocity according to its radius of motion.

Killpippo
Posts: 3
Joined: Sat Feb 01, 2020 10:40 am

### Re: Improve grip feeling on hinge vehicle

Hi @drleviathan,
thank you so much for the response, indeed you exactly pointed all the issues.

1) Corrected the differential steer angle calculation
Before: