0

I have written a custom launch file for my custom gazebo world. When I roslaunch the .launch file, only an empty world opens. Could you tell me where am I wrong?

This is my launch file

<launch>
  <arg name="x_pos" default="-1.0"/>
  <arg name="y_pos" default="-1.0"/>
  <arg name="z_pos" default="-1.0"/>
  <!-- We resume the logic in empty_world.launch, changing only the name of the world to be launched -->
  <arg name="model" value="burger" doc="model type [burger, waffle, waffle_pi]"/>
  <include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="world_name" value="~/catkin_ws/src/cse340a3_gazebo/worlds/cse340a3.world"/>
    <!-- more default parameters can be changed here -->
  </include>
  
  <!-- <param name="robot_description" value="~/catkin_ws/src/cse340a3_description/urdf/turtlebot3_burger.urdf.xacro" /> -->
  <!--  <node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" args="-urdf -model turtlebot3 -x $(arg x_pos) -y $(arg y_pos) -z $(arg z_pos) -param robot_description" /> -->
</launch>
Vishwad
  • 251
  • 3
  • 18

1 Answers1

1

This works for some reason (I put in the full path)

<launch>
  <arg name="x_pos" default="-1.0"/>
  <arg name="y_pos" default="-1.0"/>
  <arg name="z_pos" default="-1.0"/>
  <!-- We resume the logic in empty_world.launch, changing only the name of the world to be launched -->
  <arg name="model" value="burger" doc="model type [burger, waffle, waffle_pi]"/>
  <include file="/home/vishwad/catkin_ws/src/cse340a3_gazebo/launch/empty_world.launch">
    <arg name="world_name" value="/home/vishwad/catkin_ws/src/cse340a3_gazebo/worlds/cse340a3.world"/>
    <!-- more default parameters can be changed here -->
  </include>
  
  <!-- <param name="robot_description" value="~/catkin_ws/src/cse340a3_description/urdf/turtlebot3_burger.urdf.xacro" /> -->
  <!--  <node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" args="-urdf -model turtlebot3 -x $(arg x_pos) -y $(arg y_pos) -z $(arg z_pos) -param robot_description" /> -->
</launch>
Vishwad
  • 251
  • 3
  • 18