## Getting reactionforce between wheel and ground

Typically: "How do I... ", "How can I... " questions
vrepUser94
Posts: 9
Joined: 08 Jan 2018, 08:41

### Getting reactionforce between wheel and ground

Dear Community,

is there a possibility to get information about forces acting on my vehicles wheel?

I know that there is the possibility to read contact forces, but when I'm trying it that way I can only get the normal force, which actually represents the weight distribution of my vehicle.
What I would like to know is the force which comes up due to friction between my vehicles wheels and the ground.

My approach:

I actually accelerate my vehicle by setting the target velocity and the max torque of my car programatically. This works fine.

Is it possible to add a force sensor somehow between the wheels axles and the rest of the car and read its value and calculate the difference between the actual max torque (set by my control algorithm) and the sensor value and interpret this value as torque which comes from the friction reaction force???
Or is there a way to read out the tangential force from the contact forces which represent the friction force???

My setup: I use VRep 3.5.0 with the Vortex engine

I hope that someone has experience with such a problem and could help me!

Thank you all!

coppelia
Posts: 7396
Joined: 14 Dec 2012, 00:25

### Re: Getting reactionforce between wheel and ground

Hello,

using the API function sim.getContactInfo, you should be able to get the contact forces with the ground (using the Bullet engine, you will only be able to get the tangential forces unfortunately). You can also try to mount the wheel axes onto a force/torque sensor, maybe like:

chassis --> forceSensor --> auxiliaryMass --> revoluteJoint --> WheelAxis

But above introduces an auxiliary mass that needs to be carefully adjusted (mass and inertia), in order not to introduce to large foreign factors.

Cheers

vrepUser94
Posts: 9
Joined: 08 Jan 2018, 08:41

### Re: Getting reactionforce between wheel and ground

Hello,

thanks for the information.
I have tested the API function you mentioned with some primitive shapes.
Actually the values I receive are correct (like the normal force and the friction force corresponding to the friction coefficient I have set).

There is only one thing, though. The shapes have several contact points (like a cuboid has 4 at each edge) and the sum of the forces at these multiple contacts are the correct value which I need (like the sum of the 4 z-components of the contact forces at each edge of the cuboid are equal to mass*gravity which is nothing else than the weightforce of the object).

I tried the same with a cylinder, first with "static" contact (without moving) afterwards with some torque to let it roll and generate some friction force. This actually happens, but then some curious thing happened.
In "static" situation there was only some relevant force in z-direction, which is actually what I was expecting. When taking this value times 2, it was the correct value for the expected normal force.
When I added some torque to move the cylinder I recognized, that there also occurred some force in x-direction, which again is what I expected.
But when calculating the resulting normal force, the factor was again 2 (so as if there were two contact points).
The factor which I had to multiply the force in x-direction with was 4, though. In simulation you could even see the 4 contacts.

My question now is:
How can I calculate the resulting forces in all three directions when there is this inconsistency of contact points???

Edit:
I have recognized something else. When using primitive shapes offered by V-Rep, contacts are pretty stable. When using imported meshes though, contacts are trembling. I know that in general those meshes are triangulated and therefore there could arise some contact problems, but when I import a simple Cuboid f.e. there are not that many triangles (actually only 2 on each side) so I wonder why the contact between a rolling cylinder and this imported cuboid is that bad???

coppelia