bulletphysics / bullet3

Bullet Physics SDK: real-time collision detection and multi-physics simulation for VR, games, visual effects, robotics, machine learning etc.
http://bulletphysics.org
Other
12.47k stars 2.86k forks source link

Cannot load Universal Robot UR5 urdf #1109

Closed cpaxton closed 7 years ago

cpaxton commented 7 years ago

Hoping to use this with the UR5. Unfortunately I'm having trouble getting the robot to load, and to appear in a GUI.

b3Printf: /home/chris.paxton/: cannot extract anything useful from mesh '../ur_description/meshes/ur5/visual/wrist2.dae'

b3Printf: b3Warning[examples/SharedMemory/TinyRendererVisualShapeConverter.cpp,412]:

b3Printf: issue extracting mesh from COLLADA/STL file ../ur_description/meshes/ur5/visual/wrist2.dae

b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,957]:

b3Printf: /home/chris.paxton/: cannot extract anything useful from mesh '../ur_description/meshes/ur5/visual/wrist3.dae'

b3Printf: b3Warning[examples/SharedMemory/TinyRendererVisualShapeConverter.cpp,412]:

b3Printf: issue extracting mesh from COLLADA/STL file ../ur_description/meshes/ur5/visual/wrist3.dae
cpaxton commented 7 years ago

Correction: I can actually load the robot itself, but not the Collada DAE meshes. image

These are from: https://github.com/ros-industrial/universal_robot

erwincoumans commented 7 years ago

Collada DAE is an extremely complicated format and Bullet only supports a very simple subset of DAE. It would be best to convert it into Wavefront .obj or STL files. Do you have a pointer to the URDF+DAE files?

cpaxton commented 7 years ago

Here's an example mesh: https://github.com/ros-industrial/universal_robot/blob/kinetic-devel/ur_description/meshes/ur5/visual/wrist1.dae

The collision meshes -- STLs -- all seem to load just fine.

cpaxton commented 7 years ago

And here's an URDF loading these meshes: ur5_robot.urdf.txt

erwincoumans commented 7 years ago

If I find some time, I can check if we can fix the DAE importer to accept those meshes. Otherwise, we could just use Blender to convert those DAE to .obj, that should work fine.

ahundt commented 7 years ago

Is there a way to render joint locations easily such as with a triad? We are trying to add constraints for the gripper that goes with this arm and visualization would be helpful

erwincoumans commented 7 years ago

Assuming you use pybullet, and pybullet.connect(pybullet.GUI), you can press 'w' for wireframe and press 'k' and 'l' (lower case L) to render joint frames/limits. The COLLADA DAE file uses polylist, while Bullet only supports triangulated models (). You may be able to convert/triangulate it using Blender, or convert it from DAE to .OBJ using Blender or other tool.

cpaxton commented 7 years ago

Sounds good. OBJ conversion works for me.