Gravitational acceleration is decreasing

Post Reply
harwiltz
Posts: 2
Joined: Fri Mar 20, 2020 11:12 pm
Location: Montreal, Canada
Contact:

Gravitational acceleration is decreasing

Post by harwiltz »

Hello,
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():
https://imgur.com/a/ifyCQGz

Does anyone know what could be causing this?
User avatar
drleviathan
Posts: 849
Joined: Tue Sep 30, 2014 6:03 pm
Location: San Francisco

Re: Gravitational acceleration is decreasing

Post by drleviathan »

Read this thread. TL;DR zero your rocket's damping.
harwiltz
Posts: 2
Joined: Fri Mar 20, 2020 11:12 pm
Location: Montreal, Canada
Contact:

Re: Gravitational acceleration is decreasing

Post 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!
Post Reply