ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I think there is an issue with Rviz because of which colors in the Collada (.dae) mesh file are ignored. Here's what I did to solve the problem:

1) For each part of the 3D object, I added a different texture from image. Eg. for a red part, I used plain red colored image and added that as a texture to the object. I used Blender software for this.

2) Added this lines to the node that published the visualization marker:

  marker.mesh_resource = "package://rl_car/visual_models/car/car.dae";
  marker.mesh_use_embedded_materials = true;

It takes a few seconds for the marker to be visualized for the first time when I start Rviz, maybe because Rviz needs the time to load the textures. After that the marker position gets updated in real time. I hope it's helpful for you.

I think there is an issue with Rviz because of which colors in the Collada (.dae) mesh file are ignored. Here's what I did to solve the problem:

1) For each part of the 3D object, I added a different texture from image. Eg. for a red part, I used plain red colored image and added that as a texture to the object. I used Blender software for this.

2) Added this these lines to the node that published the visualization marker:

  marker.mesh_resource = "package://rl_car/visual_models/car/car.dae";
  marker.mesh_use_embedded_materials = true;

It takes a few seconds for the marker to be visualized for the first time when I start Rviz, maybe because Rviz needs the time to load the textures. After that the marker position gets updated in real time. I hope it's helpful for you.