Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

gazebo not opening when using model://

ROS Noetic Gazebo doesnt open when I use the sdf:

<?xml version="1.0"?>
<sdf version="1.4">
    <world name="myworld">
        <include>
            <uri> model://sun </uri>
        </include>

        <include>
            <uri> model://ground_plane </uri>
        </include>


        <include>
            <uri> model://cabinet </uri>
            <pose>12 13 0 0 0 0</pose>
            <static>true</static>
        </include>

        <include>
            <uri> model://postbox </uri>
            <pose>15 -10 0 0 0 0 </pose>
            <static>true</static>
        </include>

    </world>
</sdf>

It works when I comment the cabinet and postbox model

<?xml version="1.0"?>
<sdf version="1.4">
    <world name="myworld">
        <include>
            <uri> model://sun </uri>
        </include>

        <include>
            <uri> model://ground_plane </uri>
        </include>

    <!--
        <include>
            <uri> model://cabinet </uri>
            <pose>12 13 0 0 0 0</pose>
            <static>true</static>
        </include>

        <include>
            <uri> model://postbox </uri>
            <pose>15 -10 0 0 0 0 </pose>
            <static>true</static>
        </include>
    -->
    </world>
</sdf>

Launch file:

<launch>

    <arg name="world" default="empty" />
    <arg name="paused" default="false" />
    <arg name="use_sim_time" default="true" />
    <arg name="gui" default="true" />
    <arg name="headless" default="false" />
    <arg name="debug" default="false" />

    <include file="$(find gazebo_ros)/launch/empty_world.launch">
        <arg name="world_name" value="$(find obot_gazebo)/worlds/obot.world"/>
        <arg name="paused" value="$(arg paused)" />
        <arg name="use_sim_time" value="$(arg use_sim_time)" />
        <arg name="gui" value="$(arg gui)" />
        <arg name="headless" value="$(arg headless)" />
        <arg name="debug" value="$(arg debug)" />
    </include>

    <param name="robot_description" command="$(find xacro)/xacro '$(find obot_description)/urdf/obot.xacro'" />

    <node name="obot_spawn" pkg="gazebo_ros" type="spawn_model" output="screen" args="-urdf -param robot_description -model obot" />

    <include file="$(find obot_control)/launch/obot_control.launch" />

</launch>

gazebo not opening when using model://

ROS Noetic Gazebo doesnt open when I use the sdf:

<?xml version="1.0"?>
<sdf version="1.4">
    <world name="myworld">
        <include>
            <uri> model://sun </uri>
        </include>

        <include>
            <uri> model://ground_plane </uri>
        </include>


        <include>
            <uri> model://cabinet </uri>
            <pose>12 13 0 0 0 0</pose>
            <static>true</static>
        </include>

        <include>
            <uri> model://postbox </uri>
            <pose>15 -10 0 0 0 0 </pose>
            <static>true</static>
        </include>

    </world>
</sdf>

It works when I comment the cabinet and postbox model

<?xml version="1.0"?>
<sdf version="1.4">
    <world name="myworld">
        <include>
            <uri> model://sun </uri>
        </include>

        <include>
            <uri> model://ground_plane </uri>
        </include>

    <!--
        <include>
            <uri> model://cabinet </uri>
            <pose>12 13 0 0 0 0</pose>
            <static>true</static>
        </include>

        <include>
            <uri> model://postbox </uri>
            <pose>15 -10 0 0 0 0 </pose>
            <static>true</static>
        </include>
    -->
    </world>
</sdf>

Launch file:

<launch>

    <arg name="world" default="empty" />
    <arg name="paused" default="false" />
    <arg name="use_sim_time" default="true" />
    <arg name="gui" default="true" />
    <arg name="headless" default="false" />
    <arg name="debug" default="false" />

    <include file="$(find gazebo_ros)/launch/empty_world.launch">
        <arg name="world_name" value="$(find obot_gazebo)/worlds/obot.world"/>
        <arg name="paused" value="$(arg paused)" />
        <arg name="use_sim_time" value="$(arg use_sim_time)" />
        <arg name="gui" value="$(arg gui)" />
        <arg name="headless" value="$(arg headless)" />
        <arg name="debug" value="$(arg debug)" />
    </include>

    <param name="robot_description" command="$(find xacro)/xacro '$(find obot_description)/urdf/obot.xacro'" />

    <node name="obot_spawn" pkg="gazebo_ros" type="spawn_model" output="screen" args="-urdf -param robot_description -model obot" />

    <include file="$(find obot_control)/launch/obot_control.launch" />

</launch>

Command line output:

[ WARN] [1621663016.642603789]: link 'caster_wheel' material 'red' undefined.
[ WARN] [1621663016.643914257]: link 'caster_wheel' material 'red' undefined.
[ WARN] [1621663016.644428765]: The root link chassis has an inertia specified in the URDF, but KDL does not support a root link with an inertia.  As a workaround, you can add an extra dummy link to your URDF.
[INFO] [1621663016.927299, 0.000000]: Controller Spawner: Waiting for service controller_manager/load_controller
[INFO] [1621663016.950044, 0.000000]: Loading model XML from ros parameter robot_description
[INFO] [1621663016.954453, 0.000000]: Waiting for service /gazebo/spawn_urdf_model
[ INFO] [1621663017.083933641]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1621663017.086121922]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
[ INFO] [1621663017.188760220]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1621663017.190537705]: waitForService: Service [/gazebo_gui/set_physics_properties] has not been advertised, waiting...
^C[robot_state_publisher-6] killing on exit
[obot/controller_spawner-5] killing on exit
[obot_spawn-4] killing on exit
[gazebo_gui-3] killing on exit
[gazebo-2] killing on exit
[WARN] [1621663045.381504, 0.000000]: Controller Spawner couldn't find the expected controller_manager ROS interface.
Traceback (most recent call last):
  File "/opt/ros/noetic/lib/gazebo_ros/spawn_model", line 239, in <module>
    exit_code = sm.run()
  File "/opt/ros/noetic/lib/gazebo_ros/spawn_model", line 183, in run
    success = gazebo_interface.spawn_urdf_model_client(self.args.model, model_xml, self.args.robot_namespace,
  File "/opt/ros/noetic/lib/python3/dist-packages/gazebo_ros/gazebo_interface.py", line 28, in spawn_urdf_model_client
    rospy.wait_for_service(gazebo_namespace+'/spawn_urdf_model')
  File "/opt/ros/noetic/lib/python3/dist-packages/rospy/impl/tcpros_service.py", line 166, in wait_for_service
    raise ROSInterruptException("rospy shutdown")
rospy.exceptions.ROSInterruptException: rospy shutdown
[rosout-1] killing on exit
[master] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done

gazebo not opening when using model://

ROS Noetic Gazebo doesnt open when I use the sdf:

<?xml version="1.0"?>
<sdf version="1.4">
    <world name="myworld">
        <include>
            <uri> model://sun </uri>
        </include>

        <include>
            <uri> model://ground_plane </uri>
        </include>


        <include>
            <uri> model://cabinet </uri>
            <pose>12 13 0 0 0 0</pose>
            <static>true</static>
        </include>

        <include>
            <uri> model://postbox </uri>
            <pose>15 -10 0 0 0 0 </pose>
            <static>true</static>
        </include>

    </world>
</sdf>

It works when I comment the cabinet and postbox model

<?xml version="1.0"?>
<sdf version="1.4">
    <world name="myworld">
        <include>
            <uri> model://sun </uri>
        </include>

        <include>
            <uri> model://ground_plane </uri>
        </include>

    <!--
        <include>
            <uri> model://cabinet </uri>
            <pose>12 13 0 0 0 0</pose>
            <static>true</static>
        </include>

        <include>
            <uri> model://postbox </uri>
            <pose>15 -10 0 0 0 0 </pose>
            <static>true</static>
        </include>
    -->
    </world>
</sdf>

Launch file:

<launch>

    <arg name="world" default="empty" />
    <arg name="paused" default="false" />
    <arg name="use_sim_time" default="true" />
    <arg name="gui" default="true" />
    <arg name="headless" default="false" />
    <arg name="debug" default="false" />

    <include file="$(find gazebo_ros)/launch/empty_world.launch">
        <arg name="world_name" value="$(find obot_gazebo)/worlds/obot.world"/>
        <arg name="paused" value="$(arg paused)" />
        <arg name="use_sim_time" value="$(arg use_sim_time)" />
        <arg name="gui" value="$(arg gui)" />
        <arg name="headless" value="$(arg headless)" />
        <arg name="debug" value="$(arg debug)" />
    </include>

    <param name="robot_description" command="$(find xacro)/xacro '$(find obot_description)/urdf/obot.xacro'" />

    <node name="obot_spawn" pkg="gazebo_ros" type="spawn_model" output="screen" args="-urdf -param robot_description -model obot" />

    <include file="$(find obot_control)/launch/obot_control.launch" />

</launch>

Command line output:

[ WARN] [1621663016.642603789]: link 'caster_wheel' material 'red' undefined.
[ WARN] [1621663016.643914257]: link 'caster_wheel' material 'red' undefined.
[ WARN] [1621663016.644428765]: The root link chassis has an inertia specified in the URDF, but KDL does not support a root link with an inertia.  As a workaround, you can add an extra dummy link to your URDF.
[INFO] [1621663016.927299, 0.000000]: Controller Spawner: Waiting for service controller_manager/load_controller
[INFO] [1621663016.950044, 0.000000]: Loading model XML from ros parameter robot_description
[INFO] [1621663016.954453, 0.000000]: Waiting for service /gazebo/spawn_urdf_model
[ INFO] [1621663017.083933641]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1621663017.086121922]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
[ INFO] [1621663017.188760220]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1621663017.190537705]: waitForService: Service [/gazebo_gui/set_physics_properties] has not been advertised, waiting...
^C[robot_state_publisher-6] killing on exit
[obot/controller_spawner-5] killing on exit
[obot_spawn-4] killing on exit
[gazebo_gui-3] killing on exit
[gazebo-2] killing on exit
[WARN] [1621663045.381504, 0.000000]: Controller Spawner couldn't find the expected controller_manager ROS interface.
Traceback (most recent call last):
  File "/opt/ros/noetic/lib/gazebo_ros/spawn_model", line 239, in <module>
    exit_code = sm.run()
  File "/opt/ros/noetic/lib/gazebo_ros/spawn_model", line 183, in run
    success = gazebo_interface.spawn_urdf_model_client(self.args.model, model_xml, self.args.robot_namespace,
  File "/opt/ros/noetic/lib/python3/dist-packages/gazebo_ros/gazebo_interface.py", line 28, in spawn_urdf_model_client
    rospy.wait_for_service(gazebo_namespace+'/spawn_urdf_model')
  File "/opt/ros/noetic/lib/python3/dist-packages/rospy/impl/tcpros_service.py", line 166, in wait_for_service
    raise ROSInterruptException("rospy shutdown")
rospy.exceptions.ROSInterruptException: rospy shutdown
[rosout-1] killing on exit
[master] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done

command line output of: gazebo --verbose obot.world

Gazebo multi-robot simulator, version 11.5.1
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

[Msg] Waiting for master.
Gazebo multi-robot simulator, version 11.5.1
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

[Msg] Waiting for master.
[Msg] Connected to gazebo master @ http://127.0.0.1:11345
[Msg] Publicized address: 192.168.29.67
[Wrn] [ModelDatabase.cc:340] Getting models from[http://models.gazebosim.org/]. This may take a few seconds.
[Msg] Connected to gazebo master @ http://127.0.0.1:11345
[Msg] Publicized address: 192.168.29.67