0

我为我的自定义凉亭世界编写了一个自定义启动文件。当我roslaunch打开 .launch 文件时,只会打开一个空的世界。你能告诉我我哪里错了吗?

这是我的启动文件

<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>
4

1 回答 1

0

这出于某种原因(我输入了完整路径)

<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>
于 2021-04-03T07:32:40.803 回答