I am experiencing an error regarding to pb.createCollisionShape. I am using this function to load an .obj file to create a collision_shape. Here's a short version of my code:
Code: Select all
client_id = pb.connect(pb.DIRECT)
...
for _ in range(1250):
pb.resetSimulation(cliend_id)
...
for _ in range(number_of_objects):
collision_shape_id = pb.createCollisionShape(shapeType=pb.GEOM_MESH, meshScale=np.full(3, 1.0), fileName=path_to_obj)
visual_shape_id = pb.createVisualShape(shapeType=pb.GEOM_MESH, meshScale=np.full(3, 1.0), fileName=path_to_obj)
bullet_body_id = pb.createMultiBody(
basePosition=position, baseOrientation=quat,
baseCollisionShapeIndex=collision_shape_id, baseVisualShapeIndex=visual_shape_id,
)
...
img_arr = pb.getCameraImage(
W, H, pb_V, pb_P,
shadow=1, lightDirection=light_src, renderer=pb.ER_TINY_RENDERER,
)
Code: Select all
b3Warning[examples/SharedMemory/../Importers/ImportURDFDemo/UrdfFindMeshFile.h,108]
cannot find '<PATH_TO_OBJ_FILE>' in any directory in urdf path
It is always the same .obj file being loaded in all iterations in all 80 processes. I checked UrdfFindMeshFile.h, but couldn't figure out why this suddenly fails in the middle of iterations. Can somebody help me on this?