Vehicle is jumping around

Post Reply
Garfield83
Posts: 4
Joined: Tue Oct 31, 2017 12:40 am
Contact:

Vehicle is jumping around

Post by Garfield83 » Fri Apr 06, 2018 1:26 pm

Hello everybody,
I have a little problem with my vehicle.
When I activate the brake, the vehicle always jumps around.
Even if I put a force of more like 0.1, jump this around.
In the Bullet demo, isset the values with 1000.
What can this be?

I also have a video on this issue, just click on the link.
Vehicle-Test

Here is code from Chassis:

Code: Select all

//...
this->m_rigid_body = ks::CreateBox(this->m_node, 7.f);//, getTransform());
this->m_rigid_body->setDamping(-0.25f, 0.f);
this->m_rigid_body->setActivationState(DISABLE_DEACTIVATION);///never deactivate the vehicle
addRigidBody(this->m_rigid_body);
// create vehicle
this->m_vehicle_raycaster = new btDefaultVehicleRaycaster(this->m_dynamics_world);
this->m_vehicle = new btRaycastVehicle(this->m_tuning, this->m_rigid_body, this->m_vehicle_raycaster);
this->m_vehicle->setCoordinateSystem(0, 1, 2);
//... more code
The next is the code for the wheels:

Code: Select all

// wheel parameter 
(*wi).m_position.set( 0, 0, 0); // << the right value comes from an XML file.
(*wi).m_axle.set(-1.f, 0, 0);
(*wi).m_direction.set(0, -1.f, 0);
(*wi).m_suspension_rest_length = 0.65f; // default value
(*wi).m_suspension_stiffness = 20.f; // default value
(*wi).m_wheels_damping_relaxation = 4.5f; // default value
(*wi).m_wheels_damping_compression = 0.8f; // default value
(*wi).m_friction_slip = 80.f; // default value
(*wi).m_roll_influence = 0.1f; // default value
// ... other code ...
// add a wheel 
this->m_vehicle->addWheel(
	irrlichtToBulletVector((*wi).m_position),
	irrlichtToBulletVector((*wi).m_direction),
	irrlichtToBulletVector((*wi).m_axle),
	(*wi).m_suspension_rest_length,
	(*wi).m_radius,
	tuning,
	(ISSET_BIT((*wi).m_flags, ewpFrontWheel) ? true : false));
Sorry for my bad English and thanks for your help.

[EDIT]
Currently I have found a problem.
OK, it seems like I can only use two tires as a parking brake and nothing more.
Only when the vehicle is driving, I can decelerate all the tires to the stop.
The service brake also does not have as much power as the parking brake and the brake force value is set to zero when the service brake button is released.

And in the update method the call of btRaycastVehicle::updateWheelTransform(...) is probably superfluous.
The whol is not needed and called by BulletPhysics internally.

Post Reply