Hard Suspension

I am having trouble with creating a vehicle with a hard suspension. IN fact I don’t want any suspension at all. The issues are that the vehicle sinks to the floor or into the floor and won’t move correctly. Other values give me errors with my acceleration values. I want a fast acceleration so that when I tell my vehicle to move it immediately reaches top speed. These are the values I have found that get as close as possible.

//setting suspension values for wheels, this can be a bit tricky //see also https://docs.google.com/Doc?docid=0AXVUZ5xw6XpKZGNuZG56a3FfMzU0Z2NyZnF4Zmo&hl=en float stiffness = 60.0f;//200=f1 car float compValue = .3f; //(should be lower than damp) float dampValue = .4f; vehicle.setSuspensionCompression(compValue * 2.0f * FastMath.sqrt(stiffness)); vehicle.setSuspensionDamping(dampValue * 2.0f * FastMath.sqrt(stiffness)); vehicle.setSuspensionStiffness(stiffness); vehicle.setMaxSuspensionForce(10000.0f);

My vehicleControl current has a mass of 400, but I would like to get that down to a more realistic value like 5 (mimicking a robot that weighs 5kg)…
My current acceleration value is 100 (m/s^2?)

can anyone help me make heads or tails of the suspension numbers? Bullet physics engine uses base metric units (ie. 1 world unit = 1 meter) so I would very much like to be able to use realistic values for suspension. I know Bullet can handle this, I just can’t figure out how the suspension works and what the numbers actually represent. (And before you put me down for not RTFM, I have read all I can find on this issue, including the bullet physicsVehicle document listed in my code above. I have been having similar questions since I joined this forum and I haven’t found any solution on my own.)

I have comparable suspension values for a (crappy) car of mine that weighted 500. Divided the mass by 100 and same for the “acceleration force” and went fine. Guess that makes the suspension hard or did I miss something (very probable)?

On the other hand, is it really important to have no suspension?

Other ideas:

  • use a CharacterControl
  • do your own; check PhysicsHoverControl to see how to

I’d just ramp the acceleration value over a few frames?
The content of this post is meant to be read as a straight information or question without an implicit dismissive stance or interest in having the other party feel offended unless theres emotes that hint otherwise or there’s an increased use of exclamation marks and all-capital words.

Thanks for the disclaimer Norman :amused:
I am trying to simulate an actual hardware, a robot. The robot has no suspension. So when the robot starts moving, the suspension is solid and the body of the robot stays parallel to the ground. Similarly, when the robot slows down, it doesn’t lurch forward.

In my simulation, when I begin accelerating, the robot kicks back due to the torque of the motors. Similarly, stopping the robot causes a forward lurch. If the robot was tall, enough, this would help simulate a high COG (which is actually what I am counting on for future simulations) however, this particular robot is very low to the ground and the COG is so low that rapid accelerations (or deceleration) do not affect the actual hardware. I assumed making a super stiff suspension would stop this.

The vehicleControlis nearly perfect for my needs so I don’t think changing to a character control would work.

That being said, the real robot nearly instantly reaches maximum speed (though it is quite slow, around 1 meter every couple of seconds). Similarly, when stopped, the robot completely stops (depending on the mode, it can stop immediately using a brake, or it can rapidly decelerate over the course of about 1 second). I am using the method you mentioned here for vehicle max speed. Wouldn’t ramping up or down the acceleration over a few frames affect my maximum velocity settings?