You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way to specify a unique ID when creating objects in pybullet with loadURDF, createMultiBody, and so on? As far as I know these are internally created and returned from those functions. It would be nice to be able to specify this as an optional parameter, with an exception thrown if it is already used.
My use case is that object pose over time information is stored indexed by the object ID. This information is useful later when I want to "replay" a trajectory. When the objects are removed and recreated via removeBody, it seems that the IDs are reused in reverse order (i.e. if I created objects 1..4, removed them all, then recreated them, the objects would receive IDs 4, 3, 2, 1). In addition, I sometimes create test objects to query for the closest point on an object's surface (since there doesn't seem to be a direct way to query getClosestPoints with only 1 object and a query point). All these make storing information with object ID indexing difficult. Do you have any recommended solutions?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Is there a way to specify a unique ID when creating objects in pybullet with
loadURDF
,createMultiBody
, and so on? As far as I know these are internally created and returned from those functions. It would be nice to be able to specify this as an optional parameter, with an exception thrown if it is already used.My use case is that object pose over time information is stored indexed by the object ID. This information is useful later when I want to "replay" a trajectory. When the objects are removed and recreated via
removeBody
, it seems that the IDs are reused in reverse order (i.e. if I created objects 1..4, removed them all, then recreated them, the objects would receive IDs 4, 3, 2, 1). In addition, I sometimes create test objects to query for the closest point on an object's surface (since there doesn't seem to be a direct way to querygetClosestPoints
with only 1 object and a query point). All these make storing information with object ID indexing difficult. Do you have any recommended solutions?Beta Was this translation helpful? Give feedback.
All reactions