Guest User

gazebo_world.launch

a guest
Nov 2nd, 2020
90
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?xml version="1.0"?>
  2. <launch>
  3.  
  4.   <!-- these are the arguments you can pass this launch file, for example paused:=true -->
  5.   <arg name="paused" default="true"/>
  6.   <arg name="use_sim_time" default="true"/>
  7.   <arg name="extra_gazebo_args" default=""/>
  8.   <arg name="gui" default="false"/>
  9.   <arg name="recording" default="false"/>
  10.   <!-- Note that 'headless' is currently non-functional.  See gazebo_ros_pkgs issue #491 (-r arg does not disable
  11.       rendering, but instead enables recording). The arg definition has been left here to prevent breaking downstream
  12.       launch files, but it does nothing. -->
  13.   <arg name="headless" default="true"/>
  14.   <arg name="debug" default="false"/>
  15.   <arg name="physics" default="ode"/>
  16.   <arg name="verbose" default="false"/>
  17.   <arg name="output" default="screen"/>
  18.   <!-- <arg name="world_name" default="$(find ped_sim)/worlds/$(arg world).world"/> --> <!-- Note: the world_name is with respect to GAZEBO_RESOURCE_PATH environmental variable -->
  19.   <arg name="world_name" default="/mnt/bucket/world_files/$(arg world).world"/>
  20.   <arg name="respawn_gazebo" default="false"/>
  21.   <arg name="use_clock_frequency" default="false"/>
  22.   <arg name="pub_clock_frequency" default="100"/>
  23.   <arg name="enable_ros_network" default="true" />
  24.  
  25.   <!-- set use_sim_time flag -->
  26.   <param name="/use_sim_time" value="$(arg use_sim_time)"/>
  27.  
  28.   <!-- set command arguments -->
  29.   <arg unless="$(arg paused)" name="command_arg1" value=""/>
  30.   <arg     if="$(arg paused)" name="command_arg1" value="-u"/>
  31.   <arg unless="$(arg recording)" name="command_arg2" value=""/>
  32.   <arg     if="$(arg recording)" name="command_arg2" value="-r"/>
  33.   <arg unless="$(arg verbose)" name="command_arg3" value=""/>
  34.   <arg     if="$(arg verbose)" name="command_arg3" value="--verbose"/>
  35.   <arg unless="$(arg debug)" name="script_type" value="gzserver"/>
  36.   <arg     if="$(arg debug)" name="script_type" value="debug"/>
  37.  
  38.   <env name="GAZEBO_MODEL_PATH" value="/mnt/bucket/obj_files:$(find ped_sim)/models:$(optenv GAZEBO_MODEL_PATH)"/>
  39.   <env name="GAZEBO_PLUGIN_PATH" value="$(find ped_sim)/../../../build/ped_sim:$(optenv GAZEBO_PLUGIN_PATH)"/>
  40.  
  41.   <!-- start gazebo server-->
  42.   <group if="$(arg use_clock_frequency)">
  43.     <param name="gazebo/pub_clock_frequency" value="$(arg pub_clock_frequency)" />
  44.   </group>
  45.   <group>
  46.     <param name="gazebo/enable_ros_network" value="$(arg enable_ros_network)" />
  47.   </group>
  48.   <node name="gazebo" pkg="gazebo_ros" type="$(arg script_type)" respawn="$(arg respawn_gazebo)" output="$(arg output)"
  49.     args="$(arg command_arg1) $(arg command_arg2) $(arg command_arg3) -e $(arg physics) $(arg extra_gazebo_args) $(arg world_name)" />
  50.  
  51.   <!-- start gazebo client -->
  52.   <group if="$(arg gui)">
  53.     <node name="gazebo_gui" pkg="gazebo_ros" type="gzclient" respawn="false" output="$(arg output)" args="$(arg command_arg3)"/>
  54.   </group>
  55.  
  56. </launch>
  57.  
RAW Paste Data