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 » Sat May 05, 2018 3:19 pm

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: 550
Joined: Tue Sep 30, 2014 6:03 pm
Location: San Francisco

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

Post by drleviathan » Sun May 06, 2018 1:21 pm

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: 4189
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 » Wed May 09, 2018 12:54 am

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