Vehicle jump hight before falling on the floor

jams

04-09-2007 09:58:12

Hi, I have two issues :
+ When I start NxOgre simulation my vehicle jump quite high before falling back on the floor
+ My vehicle react quite well but I can see a high frequency vibration between the vehicle body and wheels. It may be due to bad mass/damping settings but I've left everything to default except mass: 1000 and wheel radius: 0.25

luis

05-09-2007 17:33:28

those are one of the values i use:

mass = 2150
mass_center = 0.0 -1.25 0.0
spring = 17.5e3
damper = 800.0
suspension_travel = 0.4
motor_torque = 4000.0
brake_torque = 5000.0


to avoid jittering with vehicles be sure to use VSync ON + NX_TIMESTEP_VARIABLE (search in this forum)

jams

05-09-2007 21:21:09

Hi, thanks for your help, but when I use your settings, my vehicle becomes completely mad :shock:
I use WheelSet::createFourWheelSet to create my wheels, the wheel radius I use is 0.8, and the vehicle body's size is (2, 2, 4).

Also, I use Motor class to give some acceleration and break to the vehicle, but I don't know how it actually mix with wheels properties ...

Do see anything wrong ? Or maybe the vehicle body is to small ?

luis

06-09-2007 08:42:21

I use WheelSet::createFourWheelSet to create my wheels, the wheel radius I use is 0.8, and the vehicle body's size is (2, 2, 4).

(2,2,4)... i dont remember what system coord but i thing it's right-hand, so it is 2mts tall, 2mts wide and 4mts long. That's ok.

but a 0.8 radius means that the wheels have 1.6mts diameter... that is too much....
see this link:
http://www.kouki.co.uk/Utilities/tyresizer.asp

I dont use WheelSet::createFourWheelSet but the default paremeters should be ok, and i suggest you to change only one parameter at a time and see the results you have....

jams

06-09-2007 10:48:54

Ok, I use default settings now, and i've reduced wheel radius to 0.5 (my vehicle should represent a Tank) and it works quite well despite my vehicle keep chattering. This does not seem to come from collision but rather from suspensions settings. Actually, I'd like almost solid suspension so I can increase body weight (preventing body to touch the ground).

Also when I use this param : "time-step-method: variable" on world creation my vehicle desapear (like if it was going high very fast). I'm updating NxOgre each rendering frame (my own loop) giving elapsed time in milliseconds.

betajaen

06-09-2007 11:00:25

Increase the mass then, that should make everything a bit more solid, and since it's a tank, it should be heavy. ;)

Manually stepping the time with variable time step should be fine. Silly question though, when you mean milliseconds, you inject the time as "0.001" second and not "1" millisecond.

jams

06-09-2007 14:33:19

Increase mass is ok, but then, the body is too heavy and touch the ground. I suppose that's because suspensions cannot support it.

You're right about stepping, since I manually change timestep, I guess I do not need to set the world with a variable timestep.

I'm doing a small gui to fine tune more easily my vehicle properties during run time.

jams

06-09-2007 18:23:40

I can now get my vehicle to keep calm, but there are two weird things :
+ when I increase damper value front and rear are not at the same high, causing rear part to touch the ground
+ in some case, when the vehicle is completely still, I cannot make it move any more until I throw it in the air by adding a vertical force to the body.

@Betajaen : my timestep value for 1 second is 1000 and for one milisecond it is 1.

betajaen

06-09-2007 18:53:25

Then that would certainly explain the instability; Your injecting 16 minutes for every second there.

∆Time is measured in seconds.

jams

06-09-2007 19:24:34

Good, one issue fixed ! You were right, giving timestep in second works well.
I do not use wheelset anymore, creating my wheels manually, so I can make four wheel drive. I can change damper, spring, target and travel in real time, but I still dont understand why my vehicle is not horizontal in some configuration :(. Here is how I setup spring for exemple :void Vehicle::setSpring(float s)
{
NxWheelShape* ws;
NxSpringDesc sd;
for(NxOgre::Wheels::Iterator i = mWheels.items.begin();i != mWheels.items.end();++i)
{
ws = (*i)->getNxWheelShape();
sd = ws->getSuspension();
sd.spring = s;
ws->setSuspension(sd);
}
}

Toby

08-09-2007 09:34:25

To make my car behaviour more realistic I decrease mass to 150, but I set density to 9 else my car through wall.
Spring restitution = 450.

If it can help you.