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
Describe the bug
A segmentation fault occurs when using sapien.Pose.from_transformation_matrix() with certain transformation matrices, while no explicit error message is shown. The issue disappears when using quaternion representation instead.
Below are the codes to reproduce.
To Reproduce
importnumpyasnpimportsapien.coreassapienfromenvimportEnvfromcameraimportCamerafromscipy.spatial.transformimportRotationasRotfromrobots.panda_robotimportRobotenv=Env(show_gui=True)
cam=Camera(env, image_size=720, random_position=False, fixed_position=True, dist=4)
robot_urdf_fn='./robots/panda_gripper.urdf'robot_material=env.get_material(4, 4, 0.01)
robot=Robot(env, robot_urdf_fn, robot_material, open_gripper=True)
rotmat=np.array([
[0,0,1,0],
[0,-1,0,0.],
[1,0,0,0],
[0,0,0,1]
])
start_pose=sapien.Pose.from_transformation_matrix(rotmat)
# uncomment the following lines fix the bug# quat = Rot.from_matrix(rotmat[:3,:3]).as_quat()[[1,2,3,0]]# start_pose = sapien.Pose(p=np.array([0, 0, 0]),q=np.array(quat))robot.robot.set_root_pose(start_pose)
whileTrue:
env.render()
env.step() # once the simulation is started, segmentation fault occurs
The text was updated successfully, but these errors were encountered:
Support for SAPIEN version 0.8 has long been halted. There have been 3 major version releases at this point. Please use SAPIEN 3 and see if the problem still exists.
Thank you very much for your patient reply! Actually, my intention is not to resolve this bug; rather, it is to provide a reference for those who might encounter similar issues and need assistance. There are some excellent open-source projects that are using older versions of Sapien(0.8), such as Where2Act, which could benefit from the insights discussed in this issue.
We have actually provided support to where2act back then. However it is a research project and the code is no longer maintained, and we cannot continue to support such projects. If anyone is happy to maintain an abandoned repo, we can provide support for issues encountered in upgrading.
System:
Describe the bug
A segmentation fault occurs when using sapien.Pose.from_transformation_matrix() with certain transformation matrices, while no explicit error message is shown. The issue disappears when using quaternion representation instead.
Below are the codes to reproduce.
To Reproduce
The text was updated successfully, but these errors were encountered: