0
$\begingroup$

Gazebo Answers logo

I have been trying to get a CAD *.step file converted to collada *.dae and to get shown in Gazebo with correct colors. I all cases it seems that I only get the grey uncolored version, when Gazebo loads the dae file. I am current using ROS indigo with the standard Gazebo distribution that is part of this release.

In MeshLab I am able to see the colors correctly in the exported *.dae models: image description

I have also been attempting to convert using FreeCad, Rhinoceros, Blender, Solidworks. But I still ended up unable to display the colors from the step file.

The way I include into gazebo the *.dae is the following:

<?xml version='1.0'?>
<sdf version='1.4'>
  <model name="robot_v3_solid">
    <static>true</static>
    <link name="body">
      <pose>0 0 0 0 0 0</pose>
      <collision name="collision">
        <geometry>
          <mesh>
            <uri>model://robotti_v3_solid/model/meshes/robot_body.dae</uri>
          </mesh>
        </geometry>
      </collision>
      <visual name="visual">
        <geometry>
          <mesh>
            <uri>model://robotti_v3_solid/model/meshes/robot_body.dae</uri>
          </mesh>
        </geometry>
      </visual>
    </link>
  </model>
</sdf>

Is there some method or program I can use, to convert my *step files into *.dae, to ensure gazebo is able to read the colors and display them correctly ? I have been looking trough the guides but have not bee able to find an answer to this problem. Re-coloring all components individually via sdf files, with just to much trouble, so I am looking for a better option.


Originally posted by mpc on Gazebo Answers with karma: 76 on 2016-08-02

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Gazebo Answers logo

I found a solution to my problem. basicly I converted my *.step files into *.obj files using solidworks or CAD exchanger. I am not sure if any other program is able to do this first step. Then I loaded the obj file into blender 2.7 and made the correction in terms of scale and export to *.dae. The result can be seen below: image description.

So the trick to get from *.step to *.dae with colors was the obj trick:

xx.step -> (xx.obj, xx.mtl) -> xx.dae.


Originally posted by mpc with karma: 76 on 2016-08-03

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.