bullet3
bullet3 copied to clipboard
getAABB results in segmentation fault in a relatively complicated urdf
While developing a project, I found out that calling p.getAABB(bodyId) will cause a segmentation fault. The urdf I loaded can be found in this google drive link . Below is a reproducible code I elaborated.
OS: Ubuntu 20.04.6 LTS Python: 3.8.10 Bullet Version: 3.2.6 Bullet API Version: 202010061
import pybullet as p
robot_urdf = f"robot/simplified_movo_leap.urdf"
p.connect(p.GUI)
robot = p.loadURDF(robot_urdf, useFixedBase=True)
print(f'robot: {robot}, numJoints: {p.getNumJoints(robot)}') # 0, 130
# This alone will cause seg fault - Part 1
aabb = p.getAABB(robot)
print(aabb)
# This alone also causes seg fault - Part 2
aabbs = [p.getAABB(robot, i) for i in range(p.getNumJoints(robot))]
print(aabbs)
# Dummy code to test functioning of bullet
for i in range(100):
info = p.getJointInfo(robot, 0)
print(info)
print('done')
p.disconnect()
Result commenting out Part 1 and Part 2: All done.
Result commenting out Part 1 and only have Part 2: Only robot id and number of joints are printed out.
Result commentring out Part 2 and only have Part 1: aabb is printed but still segmentation fault. No joint info is printed