Robotics StackExchange | Archived questions

My Model won't show up on the Insert tab in Gazebo

I tried doing the tutorial for making a simple two wheeled robot with caster, and the model won't show up on my insert tab. I checked the directory, and it shows all the other models, but not the one I created. I tried trying SDF version 1.4 and 1.6. My code is as follows:

    <?xml version="1.0"?>
<model>
   <name>My Robot</name>
   <version>1.0</version>
   <sdf version='1.4'>model.sdf</sdf>

   <author>
        <name>My Name</name>
        <email>me@my.email</email>
   </author>

   <description>
        My awesome robot.
   </description>
</model>

And my actual model.sdf is as follows:

<?xml version="1.0" ?>
<sdf version='1.6'>
        <model name='my_robot">
        <static>true</static>

        <link name='chassis'>
                <pose>0 0 0.1 0 0 0</pose>
                <collision name='collision'>
                        <geometry>
                                <box>
                                        <size>.4 .2 .1</size>
                                </box>
                        </geometry>
                </collision>

        <visual name='visual'>
                <geometry>
                        <box>
                                <size>.4 .2 .1</size>
                        </box>
                </geometry>
        </visual>

        <collision name='caster_collision'>
                <pose>-0.15 0 -0.05 0 0 0</pose>
                <geometry>
                        <sphere>
                                <radius>0.5</radius>
                        </sphere>
                </geometry>

        <surface>
                <friction>
                        <ode>
                                <mu>0</mu>
                                <mu2>0</mu2>
                                <slip1>1.0</slip1>
                                <slip2>1.0</slip2>
                        </ode>
                </friction
        </surface>
        </collision>

        <visual name='caster_visual'>
                <pose>-0.15 0 -0.05 0 0 0</pose>
                <geometry>
                        <sphere>
                                <radius>0.05</radius>
                        </sphere>
                </geometry>
        </visual>

        </link>

        <link name='left_wheel'>
                <pose>0.1 0.13 0.1 0 1.5707 1.5707</pose>
                <collision name='collision'>
                        <geometry>
                                <cylinder>
                                        <radius>0.1</radius>
                                        <length>0.05</length>
                                </cylinder>
                        </geometry>
                </collision>

                <visual name='visual'>
                        <geometry>
                                <cylinder>
                                        <radius>.1</radius>
                                        <length>0.05</length>
                                </cylinder>
                        </geometry>
                </visual>
                </link>

        <link name='right_wheel'>
                <pose>0.1 -0.13 0.1 0 1.5707 1.5707</pose>
                <collision name='collision'>
                        <geometry>
                                <cylinder>
                                        <radius>0.1</radius>
                                        <length>0.05</length>
                                </cylinder>
                        </geometry>
                </collision>

                <visual name='visual'>
                        <geometry>
                                <cylinder>
                                        <radius>.1</radius>
                                        <length>0.05</length>
                                </cylinder>
                        </geometry>
                </visual>
        </link>


        <joint type='revolute' name='left_wheel_hinge'>
                <pose>0 0 -0.03 0 0 0</pose>
                <child>left_wheel</child>
                <parent>chassis</parent>
                <axis>
                        <xyz> 0 1 0</xyz
                </axis>
        </joint>

        <joint type='revolute' name='right_wheel_hinge'>
                <pose>0 0 0.03 0 0 0</pose>
                <child>right_wheel</child>
                <parent>chassis</parent>
                <axis>
                        <xyz> 0 1 0</xyz
                </axis>
        </joint>



        </model>
<sdf>

Asked by keter on 2016-10-01 12:58:37 UTC

Comments

Do you see any error messages when running Gazebo in verbose mode? gazebo --verbose

Asked by chapulina on 2016-10-02 10:20:03 UTC

Did you put the two files inside the same folder like the other models? If you could show the output of the tree command in the folders where all Gazebo models are stored i think it is more easy to help

Asked by jbga on 2016-10-03 12:45:07 UTC

X Error of failed request: BadDrawable (invalid Pixmap or Window parameter) Major opcode of failed request: 154 (DRI2) Minor opcode of failed request: 3 (DRI2CreateDrawable) Resource id in failed request: 0x3a00002 Serial number of failed request: 29 Current serial number in output stream: 30

Asked by keter on 2016-10-03 13:32:21 UTC

It says missing model.config, but I have those files in there.

Asked by keter on 2016-10-03 14:07:30 UTC

found a link that may be helpful : http://answers.gazebosim.org/question/3703/baddrawable-error-on-first-run-of-gzserver-after-install/

Asked by jbga on 2016-10-03 16:17:00 UTC

Answers