Page 1 of 1

Many objects in scene

Posted: 02 Mar 2017, 16:28
by rpinsler
Hi all,

For a grasping task I'd like to add about 100 objects to a scene (simple shapes, respondable, dynamic). Will this impact performance?

My preferred solution is to dynamically add and remove objects when needed but the API functionality isn't exactly the same as in the GUI. In particular, when I import an object it always has the "wrong orientation" (z axis up in the GUI I suppose). When I manually adjust the orientation, the object won't be aligned with the floor (usually slightly below ground level). Of course, I could compensate for this as well but I'd like to minimize the manual effort. Is there a better way to import shapes with y axis up?

Re: Many objects in scene

Posted: 05 Mar 2017, 18:32
by coppelia

if you programmatically import a mesh, then you can adjust the orientation also programmatically, e.g. by calling simRotateAroundAxis for instance. You can also use a combination of simReorientShapeBoundingBox, simSetObjectOrientationand simSetObjectPosition.

Or of course, you can manually import your mesh, prepare it, then, during simulation, simply duplicate it with simCopyPastObjects