Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Gazebo does not load sdf model in .world file

Hello everyone. Happy new year!

I was working on building a small gazebo simulation, which aims a LiDAR mounted robot moving figure-eight track.

I have built the robot(no LiDAR yet) by following the gazebo tutorial, and I can load it in fine when I do it manually in gazebo. However, when I try to load the model via world file or launch file, model does not show up.

I am using latest version of gazebo.

Followings are my .world, .launch file.

<?xml version="1.0" ?>
<sdf version="1.6">
  <world name="default">
    <include>
      <uri>model://sun</uri>
    </include>
    <include>
      <uri>model://ground_plane</uri>
    </include>
    <include>
      <uri>model://my_robot</uri>
      <name>vehicle</name>
      <pose>0.3 0.5 0.9 0 0 0</pose>
    </include>
  </world>
</sdf>

<launch>
  <include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="world_name" value="$(find naviti)/worlds/indoor.world"/>
    <param name="robot_description_sdf" textfile="$(find navifi)/models/my_robot.sdf"/>
    <node name="spawn_model" pkg="gazebo_ros" type="spawn_model" output="screen"
    args="-sdf -param robot_description_sdf -model model -x 0.0 -y 0.0 -z 0.0"/>
  </include>
</launch>

Gazebo does not load sdf model in .world file

Hello everyone. Happy new year!

I was working on building a small gazebo simulation, which aims a LiDAR mounted robot moving figure-eight track.

I have built the robot(no LiDAR yet) by following the gazebo tutorial, and I can load it in fine when I do it manually in gazebo. However, when I try to load the model via world file or launch file, model does not show up.

I am using latest version of gazebo.

Followings are my .world, .launch file.

<?xml version="1.0" ?>
<sdf version="1.6">
  <world name="default">
    <include>
      <uri>model://sun</uri>
    </include>
    <include>
      <uri>model://ground_plane</uri>
    </include>
    <include>
      <uri>model://my_robot</uri>
      <name>vehicle</name>
      <pose>0.3 0.5 0.9 0 0 0</pose>
    </include>
  </world>
</sdf>

<launch>
  <include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="world_name" value="$(find naviti)/worlds/indoor.world"/>
    <param name="robot_description_sdf" textfile="$(find navifi)/models/my_robot.sdf"/>
    <node name="spawn_model" pkg="gazebo_ros" type="spawn_model" output="screen"
    args="-sdf -param robot_description_sdf -model model -x 0.0 -y 0.0 -z 0.0"/>
  </include>
</launch>