Gazebo | Ignition | Community
Ask Your Question
0

Hi, I need to make 3 cubes, each one with a different color (red, blue and green) and I cant find how to do so. Can anyone help me? Thanks.

asked 2016-12-13 08:31:34 -0600

eyal.erez gravatar image

Hi, I need to make 3 cubes, each one with a different color (red, blue and green) and I cant find how to do so. Can anyone help me? Thanks.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-12-13 10:26:51 -0600

chapulina gravatar image

You could use the model editor to create it graphically.

Or you could write SDF directly. Something like this:

<model name="box">
  <pose>0 0 0.5 0 0 0</pose>
  <link name="link">
    <collision name="collision">
      <geometry>
        <box>
          <size>1 1 1</size>
        </box>
      </geometry>
    </collision>
    <visual name="visual">
      <geometry>
        <box>
          <size>1 1 1</size>
        </box>
      </geometry>
      <material>
        <script>Gazebo/Red</script> <!-- Green / Blue -->
      </material>
    </visual>
  </link>
</model>

If you're new to making Gazebo models, this tutorial has a nice introduction.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-12-13 08:31:34 -0600

Seen: 159 times

Last updated: Dec 13 '16