Hi there,
I'm considering two spheres falling on the ground, with the same size, but with different masses (1 and 10 kg).
I use jBullet (the Java version of Bullet):
colShape.calculateLocalInertia(Mass, localInertia);
body.setMassProps(Mass, localInertia);
I would expect both of them to reach the ground at the same time, but the lightest is faster.
How come?
TIA,
PhilB
localInertia
-
- Posts: 47
- Joined: Tue Dec 09, 2008 10:12 am
Re: localInertia
I think that is impossible ; because in the reality the heavy sphere is faster.
rule :
speed = mass x gravity
sphere which has 1kg : 1 x 9.81 = 9.81
sphere which has 10kg : 10 x 9.81 = 98.1
Realy i have never used bullet , i have already used Newton.
I whould like to use bullet. But when i have downloaded it ; I didn't find the lib files ".a"
Can you help me te find him .
rule :
speed = mass x gravity
sphere which has 1kg : 1 x 9.81 = 9.81
sphere which has 10kg : 10 x 9.81 = 98.1
Realy i have never used bullet , i have already used Newton.
I whould like to use bullet. But when i have downloaded it ; I didn't find the lib files ".a"
Can you help me te find him .
-
- Posts: 26
- Joined: Sat Dec 15, 2007 12:03 am
Re: localInertia
Actually this is wrong.I think that is impossible ; because in the reality the heavy sphere is faster.
rule :
speed = mass x gravity
sphere which has 1kg : 1 x 9.81 = 9.81
sphere which has 10kg : 10 x 9.81 = 98.1
rule:
F = m * a
Force = mass * acceleration
and
G = g * m
Gravity = Gravitationconstant * mass
->
m * a = g * m
a = g
So the mass is irrelevant for the time that a body needs to fall down. (ignoring airfriction, which you basically do)
Can't help with the problem, just wanted to correct this thing...
Excuse my english...
-
- Posts: 11
- Joined: Thu Aug 28, 2008 3:01 pm
Re: localInertia
well, assuming SI units areOSasuke wrote:I think that is impossible ; because in the reality the heavy sphere is faster.
rule :
speed = mass x gravity
sphere which has 1kg : 1 x 9.81 = 9.81
sphere which has 10kg : 10 x 9.81 = 98.1
Realy i have never used bullet , i have already used Newton.
I whould like to use bullet. But when i have downloaded it ; I didn't find the lib files ".a"
Can you help me te find him .
for speed : m/s
for mass x gravity : kg.m/s/s
how could speed=mass x gravity be correct ?
The relationship of interest here is (assuming initial speed is 0):
v = g x t
where v is the speed (in m/s)
g=9.81 m/s/s
t is the time in s
This tells me that the speed of any falling object (w/o air friction) is independent of the mass of the object.
So my question is : why in my case two objects of different masses do not fall at the same speed?
Regarding the lib file (.a): aren't they created at compilation time?
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: localInertia
We recently fixed an issue, that shows up when calling the 'setMassProps' after the body has been inserted in the dynamics world. Obviously the mass of objects shouldn't impact their falling speed.
This has been fixed in most recent C++ trunk, but probably not yet in the Java port.
Could you please try and see if calling the 'setMassProps' before adding the rigid body to the dynamics world, fixes the issue?
Hope this helps,
Erwin
This has been fixed in most recent C++ trunk, but probably not yet in the Java port.
Could you please try and see if calling the 'setMassProps' before adding the rigid body to the dynamics world, fixes the issue?
Hope this helps,
Erwin
-
- Posts: 11
- Joined: Thu Aug 28, 2008 3:01 pm
Re: localInertia
Hello Erwin,
thank you for your helpful reply. I've performed a quick test (using jBullet version 20080917) :
1) I create two spheres with mass 1 and 2 kg, then I call calculateLocalInertia(mass, localInertia)
and add these two bodies to my world (using addRigidBody()). The two spheres do fall down at the same speed.
2) I dynamically change the mass of the second sphere (from 2 to 4 kg): it now falls down slower than the other sphere.
Thank you for pointing out the problem. Is there anything I can do (apart kindly reporting the problem to the author of jbullet) ? I want to allow the user of my program to set the objects mass dynamically.
PhilB
thank you for your helpful reply. I've performed a quick test (using jBullet version 20080917) :
1) I create two spheres with mass 1 and 2 kg, then I call calculateLocalInertia(mass, localInertia)
and add these two bodies to my world (using addRigidBody()). The two spheres do fall down at the same speed.
2) I dynamically change the mass of the second sphere (from 2 to 4 kg): it now falls down slower than the other sphere.
Thank you for pointing out the problem. Is there anything I can do (apart kindly reporting the problem to the author of jbullet) ? I want to allow the user of my program to set the objects mass dynamically.
PhilB