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

asked 2016-10-01 12:58:37 -0600

keter gravatar image

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>
edit retag flag offensive close merge delete

Comments

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

chapulina gravatar imagechapulina ( 2016-10-02 10:20:03 -0600 )edit

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

jbga gravatar imagejbga ( 2016-10-03 12:45:07 -0600 )edit

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

keter gravatar imageketer ( 2016-10-03 13:32:21 -0600 )edit

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

keter gravatar imageketer ( 2016-10-03 14:07:30 -0600 )edit