Joint->GetVelocity() returns 0 while there is movement

asked 2018-12-06 08:15:35 -0500

Canberk Demirsoy gravatar image

Hi there,

I have a simple car model, which has steering joints and wheel joints.

So the problem is, I simply try to make the car move straight by setting steering angle to zero with Steering_Joints->SetPosition(0, 0). Then I apply force either to joints, or simply to chassis to make the car move, so it moves.

Then, while moving, for the wheel joints I print the following: joint->GetVelocity(0), but for the front wheels, which has steering joints that had already been set to be 0, I get 0 although they move as the rear wheels do.

If I do not set steering joints to 0, then I observe the non-zero velocity from each of wheel joints but this is not what we want because we have to control the steering joint angle.

Is this a bug? I think this should be fixed, this does not seem very realistic for a physics simulator.

Thanks for the time!

edit retag flag offensive close merge delete


Can you post your SDF model along with the code you are using and step to reproduce what you are seeing?

nkoenig gravatar imagenkoenig ( 2018-12-06 10:01:08 -0500 )edit