Link::GetRelativeTorque shows wrong values
Hello,
I've written a small plugin that sets torque to a sphere for a certain time. It works with the link element of the sphere. I don't want to have any slipping. Therefore I've set the values for µ really high.
Using gazebo7, ODE and a model of a sphere implemented in sdf.
I my opinion I should get the same values from the GetRelativeTorque function as I set in the SetTorque function. Nevertheless there is a factor of 3.5 between these two values.
I tried to find out what the reason for this behavior was.
First I was guessing that actually there is some force appearing due to friction which leads to torque in the opposite direction making the difference. Therefore I changed different values of my model like the mass an the inertial tensor, because to my mind this should lead to a higher friction force and so a higher "counter-torque". To my surprise the values didn't change (still factor of 3.5).
I then changed the values of µ in the sdf-model of the sphere and surprisingly the torque value from the getRelativeTorque function. Actually when I set µ to 0 the values of torque are the same.
To sum up I can see that friction has some effect on how an applied torque manipulates the simulation.
The question is now, why does only the value of µ have an effect and for example changing the mass of the object doesn't???
I hope I can get some information bout this issue!
Thanks a lot!
P.S. the relevant Code-Snippet
void sphere_torque::OnUpdate(const common::UpdateInfo) {
this->sphere->SetTorque(math::Vector3(-10000,0,0));
std::cerr << this->sphere->GetRelativeTorque() << std::endl;
}
in sdf-model:
µ = 100000: GetRelativeTorque function says: 2857.14 (which is obviously a factor of 3.5)
µ = 0: GetRelativeTorque function says: 10000
changing mass or inertial tensor has no effect on the values