btRaycastVehicle: vibration (braking while vehicle stopped)

gjaegy
Posts: 178
Joined: Fri Apr 18, 2008 2:20 pm

btRaycastVehicle: vibration (braking while vehicle stopped)

Post by gjaegy »

Hi,

I am encountering an issue, which is easily reproducible with the vehicle demo.
Simply apply brake to each of the 4 wheels (instead of applying them to the rear wheels only), so simply add these two lines in VehicleDemo.cpp, in clientMoveAndDisplay():

Code: Select all

m_vehicle->setBrake(gBreakingForce,0);
m_vehicle->setBrake(gBreakingForce,1);
The effect can be magnified by increasing the "maxBreakingForce" constant value to 1000.0. Attached the modified "VehicleDemo.cpp" file.

Now simply press the up arrow key (accelerate) for a few second, then release the key, then press the down arrow key (brake) until the vehicle stops. You will see the vibration effect quite noticeably.

[*]first question: am I supposed to apply braking to two wheels only ?
[*]second question: I guess the issue comes from the calcRollingFriction() function, which returns a non-zero friction, which oscilates each frame. Any idea how I can fix this ?

Thanks,
Greg
You do not have the required permissions to view the files attached to this post.
gjaegy
Posts: 178
Joined: Fri Apr 18, 2008 2:20 pm

Re: btRaycastVehicle: vibration (braking while vehicle stopp

Post by gjaegy »

nobody ?
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: btRaycastVehicle: vibration (braking while vehicle stopp

Post by Erwin Coumans »

I have a lot of other things to care about right now, but I'll deal with the issue.

Thanks for reporting it in the issue tracker!
Erwin
gjaegy
Posts: 178
Joined: Fri Apr 18, 2008 2:20 pm

Re: btRaycastVehicle: vibration (braking while vehicle stopp

Post by gjaegy »

Thanks to you, Erwin :)
Empire-Phoenix
Posts: 24
Joined: Sat Nov 07, 2009 7:57 pm

Re: btRaycastVehicle: vibration (braking while vehicle stopp

Post by Empire-Phoenix »

So, after a little more than a year, might I try to bump this?

In reference to this:
http://hub.jmonkeyengine.org/forum/topi ... ost-261882
where a possible solution and a more detailed explanation is provided.
gjaegy
Posts: 178
Joined: Fri Apr 18, 2008 2:20 pm

Re: btRaycastVehicle: vibration (braking while vehicle stopp

Post by gjaegy »

it's never too late :)
I will have a look at your suggestion, once I get some time. Thanks for sharing it here !