stepSimulation freezes for large number of multi body objects.

Post Reply
kangd
Posts: 9
Joined: Tue Oct 24, 2017 11:51 am

stepSimulation freezes for large number of multi body objects.

Post 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?
User avatar
drleviathan
Posts: 849
Joined: Tue Sep 30, 2014 6:03 pm
Location: San Francisco

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

Post 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.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

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

Post 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
Post Reply