Page 1 of 1

stepSimulation freezes for large number of multi body objects.

Posted: Sat May 05, 2018 3:19 pm
by kangd
Hello, I am testing multibody object simulation.

I loaded 25 number of 18-DOF robots (13 links) from URDF and put them on the air with no gravity and stepSimulation freezes.

Do you have any suggestion for fixing the problem?

Re: stepSimulation freezes for large number of multi body objects.

Posted: Sun May 06, 2018 1:21 pm
by drleviathan
Does it freeze and never recover? Or does it just take a very long time to execute the stepSimulation()?

I don't have any experience with multi-body, but there is a way to get detailed timing stats for the stepSimulation() like so:

Code: Select all

if (dumpStatsConditionIsTrue) {
    CProfileManager::reset();
}

world->stepSimulation(timeStep);

if (dumpStatsConditionIsTrue) {
    // don't print stats every frame, else you'll be flooded with output
    CProfileManager::dumpAll();
}
The CProfileManager will take detailed measurements of the various contexts within the step and dumpAll() will print them out in a verbose but readable way. By examining the stats you should be able to identify where the CPU cycles are being spent.

Re: stepSimulation freezes for large number of multi body objects.

Posted: Wed May 09, 2018 12:54 am
by Erwin Coumans
Is this C++ or PyBullet? You should be able to profile timings and gradually increase the number of robots.

We are not clearvoyant: try to file an issue in the tracker and provide a simple reproduction case.

https://github.com/bulletphysics/bullet3/issues