Simulation with multiple multibodies

Post Reply
nash169
Posts: 1
Joined: Mon Aug 30, 2021 9:21 am

Simulation with multiple multibodies

Post by nash169 »

Hi,
I'm trying to use the C++ API to create a simple simulation with two kuka iiwa arms collaborating in holding a box. I basically followed the "InverseDynamics.cpp" example in order to create two multibodies based on the iiwa urdf. As long as I add to the world just one multibody everything works fine, with the gravity compensation holding properly the robot in the upright position. When I add two multibodies to the world (with the relative collision objects and multibody constraints) the simulation goes crazy with both arms moving abruptly at the beginning and then stabilizing in a (random) configuration. I was afraid to have made some mistake in loading the Urdf and/or creating the various objects but I tried to slightly modify the original "InverseDynamics.cpp" to load another multibody and I get the same behavior. At this point I think that the setup of the btMultiBodyDynamicsWorld object is not correct and something has to be modified if you want to handle multiple multibodies in the same world. Am I correct? Can somebody give me some help about it?

Thanks a lot in advance.

P.S.
In "InverseDynamics.cpp" btMultiBodyConstraintSolver is used. I tried the different btMultiBodyMLCPConstraintSolver solvers following the example "MultiDofDemo.cpp" but the situation did not improve.
Post Reply