How do I simulate falling dynamic objects?

Post Reply
hfarooq
Posts: 2
Joined: Wed Dec 07, 2022 1:22 am

How do I simulate falling dynamic objects?

Post by hfarooq »

Image

I have a dynamic (mass=1) box sitting on top of a static (mass = 0) fixed platform. If I move the box the edge of the platform, I expect the box to start falling once the simulation starts - however I observe that the box won't fall even if there is a single contact point between the two objects.

I am currently using pybullet API. Any help would be appreciated in trying to produce this sim. Thanks
hfarooq
Posts: 2
Joined: Wed Dec 07, 2022 1:22 am

Re: How do I simulate falling dynamic objects?

Post by hfarooq »

Any help?
User avatar
drleviathan
Posts: 849
Joined: Tue Sep 30, 2014 6:03 pm
Location: San Francisco

Re: How do I simulate falling dynamic objects?

Post by drleviathan »

You're using pybullet but are asking the forums focused on C++ and the core Bullet libraries. You might try asking in the pybullet section.

The only ideas I have are:

Is the object properly activated? You say you "move the box to the edge of the platform" before starting the simulation, but if the object is not "active" at start the then it won't be simulated. What does pybullet do about activation of dynamic objects at simulation start. Are they automatically active? I dunno.

What acceleration are you using for gravity? If your gravity it too low it is possible dynamic objects can take too long (> 2 seconds) to achieve velocities above the sleep thresholds and will be deactivated before they can fall. What are the sleep thresholds for pybullet simulations? I dunno.

What are the dimensions of your box? It has a mass of 1.0 but if your box is really small (~10cm or less) then the collision margin (0.04m is the default in C++) is so large that torque from an edge collision like that might be smaller than you think.

What is the inertia tensor of your box? If its inertia tensor is very large, or if you've used the "zero inverse inertia tensor" hack, then it won't rotate fast enough to clear the sleep thresholds (or won't rotate at all when using the hack) and would then effectively balance on the edge of the platform like that.

What damping are you using? Artificially high damping might also prevent the velocities to clear the sleep thresholds.
Post Reply