Page 1 of 1

Can I get the position of multiple objects at once

Posted: Mon Feb 07, 2022 6:05 am
by xyjbaal
I'm using pybullet to simulate some object stacking, there be about 1000 objects.
I need to constantly monitor the position of each object,
but getBasePositionAndOrientation() can only get the position of one object, and if I use a for() loop, it will be very slow.
It takes about 5 minutes each time to get the current position of all the objects.

I would like to ask if there is a good solution for this? :?:

Re: Can I get the position of multiple objects at once

Posted: Mon Feb 07, 2022 4:04 pm
by drleviathan
This forum is focused mostly on the C++ core Bullet libs. Try asking this question in the forum focused on the python API.

I don't know about your project requirements but... if you're simulating 5k objects and are concerned about speed you might consider running it on a C++ executable.

Re: Can I get the position of multiple objects at once

Posted: Mon Feb 07, 2022 4:11 pm
by xyjbaal
Sorry, I put the question in the wrong place.
Thanks for the suggestion, maybe I'll have to use c++