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!
Getting reactionforce between wheel and ground
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
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

 Posts: 8
 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 zcomponents 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 zdirection, 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 xdirection, 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 xdirection 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 VRep, 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???
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 zcomponents 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 zdirection, 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 xdirection, 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 xdirection 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 VRep, 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???
Re: Getting reactionforce between wheel and ground
Make sure to understand how sim.getContactInfo works: it will basically return the generated contact forces for each of the individual dynamics simulation steps (by default, a simulation step in VREP is 50ms, but a dynamics simulation step is 5ms (larger steps usually lead to instabilities). This means that for each simulation step, there are 10 dynamics steps (by default).
Primitive shapes are much more stable, because completely other contact calculation routines are used. Take two primitive spheres contacting: this is basically a simple distance calculation between both. Now replace one of those primitive spheres with a mesh sphere: you now need to perform more complicated trianglepoint distances. The results will also vary depending on the number of triangles in your sphere.
The same holds true with the other primitive shapes.
Cheers
Primitive shapes are much more stable, because completely other contact calculation routines are used. Take two primitive spheres contacting: this is basically a simple distance calculation between both. Now replace one of those primitive spheres with a mesh sphere: you now need to perform more complicated trianglepoint distances. The results will also vary depending on the number of triangles in your sphere.
The same holds true with the other primitive shapes.
Cheers