1
$\begingroup$

I am new to ROS and Gazebo.

I am trying to open gazebo with 3 models using ROS launch.

My launch file:

<?xml version="0.6.0" encoding="UTF-8"?>

<launch>

  <arg name="debug" default="false"/>
  <arg name="gui" default="true"/>
  <arg name="pause" default="true"/>
  <arg name="world" default="$(find gz_simulations)/worlds/demo.world"/>

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

</launch>

World file:

<?xml version="0.6.0" ?>

<sdf>
  <world name="default">
    <include>
      <uri>model://sun</uri>
    </include>
    
    <include>
      <uri>model://ground_plane</uri>
    </include>

    <include>
      <uri>model://ambulance</uri>
      <pose>0 0 0 0 0 0 </pose>
    </include>
  </world>
</sdf>

I exported the following path:

export GAZEBO_MODEL_PATH=$HOME/catkin_ws/src/gz_simulations/models:$GAZEBO_MODEL_PATH

My ROS workspace: catkin_ws package: gz_simulations models stored in folder: models

Launch command: roslaunch gz_simulations demo.launch

Launch file opens up gazebo with empty world and can not open the ambulance part. Any suggestion will be appreciated.

$\endgroup$
2
  • $\begingroup$ Please edit your question to show us the content of your launch file and format it as code. Also show us the exact command line you are using to start the simulation. $\endgroup$
    – Mike973
    Nov 7, 2023 at 0:37
  • $\begingroup$ @Mike973 I have updated the question. Please have a look. $\endgroup$
    – Mahmud8248
    Nov 7, 2023 at 5:57

1 Answer 1

2
$\begingroup$

Just needed to add version to sdf tag and it works!

<sdf version="1.7">
$\endgroup$
1
  • $\begingroup$ I'm glad you figured it out. $\endgroup$
    – Mike973
    Nov 8, 2023 at 13:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.