rdeits / MeshCat.jl

WebGL-based 3D visualizer in Julia
MIT License
233 stars 42 forks source link

PR2 URDF - missing textures #199

Closed dhruvms closed 3 years ago

dhruvms commented 3 years ago

This is a duplicate of an issue I created in MeshCatMechanisms.

I am trying to work with the PR2 URDF in MeshCat + RigidBodyDynamics. The URDF is from this ROS package, which has a .xacro file that I first converted to a singular .urdf file via rosrun xacro xacro pr2.urdf.xacro --inorder KINECT1:=false KINECT2:=false > pr2_0.urdf.

When I use the Visualizer in my browser window, the textures are missing. Except for the caster wheels (which have texture PNGs), everything uses a solid RGBA colour as the material, but none seem to show up.

This is what I see in the visualizer: image

This is what I expect to see (from PyBullet; ignore the "table"): image (1)

The URDFVisuals structure seems to contain the right information (mesh paths, material colours etc.) but they are obviously not getting visualised correctly. Is there a good way to debug this? Here's an example of a VisualElement in the URDFVisuals struct: VisualElement{MechanismGeometries.MeshFile, CoordinateTransformations.AffineMap{StaticArrays.SMatrix{3, 3, Float64, 9}, StaticArrays.SVector{3, Float64}}}(CartesianFrame3D: "after_head_pan_joint" (id = 66), MechanismGeometries.MeshFile("/opt/ros/kinetic/share/pr2_description/meshes/head_v0/head_pan.dae"), RGBA{Float32}(0.0f0,0.0f0,0.8f0,1.0f0), AffineMap([1.0 0.0 0.0; 0.0 1.0 0.0; -0.0 0.0 1.0], [0.0, 0.0, 0.0]))

The URDF I am using is at this Github gist.

dhruvms commented 3 years ago

Switching all .dae files to corresponding .stl files loaded material colours properly.