Possible Determinism Between Executables

Post Reply
zlittlefield
Posts: 1
Joined: Fri Oct 14, 2016 8:17 pm

Possible Determinism Between Executables

Post by zlittlefield »

Hello everyone,

I have been using Bullet for several years, mainly for robotics research as I pursue a Ph.D. My research usually involves motion planning, where I have an executable that is doing future predictions (similar to Rapidly-exploring Random Tree methods) and a second executable that is my "ground truth" simulator, both using a Bullet simulation. Previously, I had problems maintaining a deterministic series of executions between these two executables. My solution for the previous years involved deleting and rebuilding the dynamics world every simulation step (I was using 0.001 seconds). As you would imagine, this is expensive and likely unnecessary.

I have recently found some changes to Bullet physics that enable determinism between my two executables (see attached patch for 2.82 revision 2704) without rebuilding the world. I am doing the footwork of storing the rigid body state information myself, but these changes cause all of my test cases to be deterministic. I am worried however that I have inadvertently broken some other test case that I am unaware of. My changes for determinism involve sorting collision manifolds in the island manager and using a different overlapping pair cache.

So, my question for you all is: Does anybody know of any cases where my changes are undesirable? I have looked into determinism issues in the past and other students I have talked to have had similar problems. If these changes are able to fix this problem, I would like to make them available, but only if I am not causing more harm than good.

I appreciate any and all feedback. If I have missed some relevant details, please ask me and I will do my best to provide the information.

Thanks!
Attachments
bullet.patch
(2.56 KiB) Downloaded 195 times
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: Possible Determinism Between Executables

Post by Erwin Coumans »

Restart without full rebuild, and saving a snapshot, reloading the snapshot and continue while keeping determinism is a high-priotity issue for robotics and machine learning, and I will be working on this very soon. This will all be part of the new shared memory C-API and pybullet.
Post Reply