Page 1 of 1

Gravitational acceleration is decreasing

Posted: Fri Mar 20, 2020 11:27 pm
by harwiltz
I'm using PyBullet to simulate a rocket landing. I noticed that in free fall my rocket doesn't attain such high speeds, and got suspicious. I plotted the speed of the rocket in free fall (from a perfectly upright orientation), and found that indeed the acceleration was not constant -- rather, it looks like it decays to zero. My first instinct was that the rocket hit its terminal velocity, however I never specified drag of any kind, so unless Bullet sets some drag coefficient by default, terminal velocity shouldn't be a concern. Moreover, the rocket only hits a velocity of about 14m/s before the acceleration vanishes, which is way too slow for terminal velocity (the rocket weighs thousands of tonnes). Here's the plot of the velocity, the x-axis measures timesteps (60 per second) and the y-axis is the speed from getBaseVelocity():

Does anyone know what could be causing this?

Re: Gravitational acceleration is decreasing

Posted: Sun Mar 22, 2020 4:39 pm
by drleviathan
Read this thread. TL;DR zero your rocket's damping.

Re: Gravitational acceleration is decreasing

Posted: Wed Mar 25, 2020 7:55 pm
by harwiltz
Ah, that did the trick! To be clear, I used

Code: Select all

p.changeDynamics(rocket_id, -1, linearDynamics=0)
which stopped the rocket from decelerating.

Thanks @drleviathan!