krishauser / Klampt

Kris' Locomotion and Manipulation Planning Toolkit
BSD 3-Clause "New" or "Revised" License
378 stars 96 forks source link

Displaying geometry of franka emika's panda robot URDF throws segfault #95

Closed smeng9 closed 3 years ago

smeng9 commented 3 years ago

I have tried to load and visualize the robot model with klampt. However I get into a segmentation fault below.

Screenshot from 2021-03-29 21-48-18

I first cloned the git repo of https://github.com/frankaemika/franka_ros Then I converted panda_arm_hand.urdf.xacro file to urdf in ./franka_description/robots/ using $ xacro --inorder panda_arm_hand.urdf.xacro > panda_arm_hand.urdf in http://wiki.ros.org/urdf/Tutorials/Using%20Xacro%20to%20Clean%20Up%20a%20URDF%20File Finally I followed the tutorial of https://github.com/krishauser/Klampt/blob/master/Cpp/docs/Tutorials/Import-and-calibrate-urdf.md to add <klampt package_root="../.." use_vis_geom="1" />

However during visualization the Meshing::MergeVertices from KrisLibrary somehow crashes.

I will also attach a minimal example in the zip file. franka_description.zip To reproduce the issue we need to extract then run display_urdf in ./robots folder.

krishauser commented 3 years ago

This is a problem with KrisLibrary, and the most recent update should fix it. Make sure to rebuild KrisLibrary and the Python API (you may need to clear the Python/build folder)

Briefly, the mesh has some 2-element faces. Why? Beats me...

You will need to add the Klampt tag flip_yz="1", too.