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?
Gravitational acceleration is decreasing
-
- Posts: 2
- Joined: Fri Mar 20, 2020 11:12 pm
- Location: Montreal, Canada
-
- Posts: 849
- Joined: Tue Sep 30, 2014 6:03 pm
- Location: San Francisco
Re: Gravitational acceleration is decreasing
Read this thread. TL;DR zero your rocket's damping.
-
- Posts: 2
- Joined: Fri Mar 20, 2020 11:12 pm
- Location: Montreal, Canada
Re: Gravitational acceleration is decreasing
Ah, that did the trick! To be clear, I used
which stopped the rocket from decelerating.
Thanks @drleviathan!
Code: Select all
p.changeDynamics(rocket_id, -1, linearDynamics=0)
Thanks @drleviathan!