Model colours are ignored after an URDF to Collada conversion
ferrolho opened this issue · 2 comments
I am trying to load .dae
robot models using three.js, with their ColladaLoader2.js.
For example, I am trying to load the KUKA LBR IIWA robot model. The kuka_lbr_iiwa_support ROS package contains the .urdf
and the meshes required by it.
The first thing I did was to convert the .urdf
into a .dae
model, by running the following command:
rosrun collada_urdf urdf_to_collada lbr_iiwa_14_r820.urdf kuka_lbr_iiwa_14_r820.dae
This executes successfully, but once I load the resultant model the colours are all wrong. Here is the result:
However, if I load the partial .dae
meshes under kuka_lbr_iiwa_support/meshes/lbr_iiwa_14_r820/visual/
, they load just fine:
kuka_lbr_iiwa_support/meshes/lbr_iiwa_14_r820/visual/link_5.dae
kuka_lbr_iiwa_support/meshes/lbr_iiwa_14_r820/visual/link_6.dae
Hi @ferrolho thanks for clear issue! Currently exporting materials isn't supported, event when the source is also a collada file. There isn't any active work on this feature at the moment. If you happen to solve it a a pull request would be welcome.
Hey @sloretz ! Eventually, I'd like to come back to this issue...
A quick first analysis revealed that it doesn't seem to be a problem with collada_urdf.cpp
: in line 964, _robot.materials_
does not seem to contain any elements, thus making me believe the problem lies with the way the urdf::Model robot_model
gets initialized in urdf_to_collada.cpp#L59.
Do you have any past insights concerning this issue? Or is there anyone who might know?