Gazebo | Ignition | Community
Ask Your Question

Creating a simple model

asked 2012-12-22 08:50:30 -0500

ChengXiang gravatar image

updated 2013-01-11 19:24:43 -0500

hsu gravatar image

Hi. I am trying to create a simple cylindrical shape model for Gazebo. To do so, I just copy and edit the existing cylindrical.model in /simulator_gazebo/gazebo/gazebo/share/gazebo-1.0.2/models to the dimensions I want. However, the model dissappear the moment i inserted them in Gazebo.

This is my model file

    <gazebo version="1.0">
    <model name="cylinder">
      <link name="link">
        <origin pose="0 0 0.5 0 0 0"/>
        <inertial mass="1.0">
          <inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/>

        <collision name="collision">
            <cylinder radius="0.127" length="1.245"/>

        <visual name="visual">
            <cylinder radius="0.127" length="1.245"/>
          <material script="Gazebo/Green"/>

After some reading up, it seems that my mistake is I did not create a mesh file for the new model I created. Is my guess correct?

If so, another question will be where should I place the mesh file at? The original cylinder.model did not seems to have a mesh file.

Thank you.

edit retag flag offensive close merge delete


the cylinder as it is defined in your sdf intersects with the ground plane with 0.1225m of overlap. This translates to an impulse of erp * 0.1225m / dt to be applied to the model upwards. Given the position of link is 0.5m from the ground plane, changing cylinder length to 1.0m should help.

hsu gravatar imagehsu ( 2013-01-11 19:28:25 -0500 )edit

Thank you. i will try that.

ChengXiang gravatar imageChengXiang ( 2013-01-19 06:54:09 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2013-01-11 19:06:31 -0500

nkoenig gravatar image

The version of Gazebo that you are referencing in deprecated. I'll post and answer for Gazebo 1.3.

  1. Start gazebo: gazebo
  2. Insert a Cylinder using the toolbar located about the render window
  3. Save the World using File->Save World As
  4. Open the saved world using your favorite editor.
edit flag offensive delete link more


Thanks nkoenig. I guess i should upgrade my version of gazebo.

ChengXiang gravatar imageChengXiang ( 2013-01-19 06:56:04 -0500 )edit

Question Tools


Asked: 2012-12-22 08:50:30 -0500

Seen: 637 times

Last updated: Jan 11 '13