fakelocalize.launch 2.73 KB
<launch>
  <!-- Show the fake localization (including the depthtolaser). -->

  <!-- URDF parameter. -->
  <arg name="urdf"  default="bot.urdf"/>
  <arg name="model" default="$(find bot_description)/urdf/$(arg urdf)"/>

  <!-- Rviz configuration file parameter. -->
  <arg name="cfg"   default="$(find shared_demo)/rviz/localize.rviz"/>

  <!-- Map Yaml File. -->
  <arg name="map"   default="$(find shared_demo)/maps/gazebohouse.yaml"/>


  <!-- Load the URDF file into the robot_description parameter. -->
  <param name="robot_description" textfile="$(arg model)"/>


  <!-- Start the low-level wheelcontrol node -->
  <node name="wheelcontrol"
	pkg="example"
	type="wheelcontrol.py"
	output="screen"
	required="true"/>

  <!-- Start the odometry node -->
  <node name="odometry"
	pkg="example"
	type="odometry.py"
	output="screen"
	required="true"/>

  <!-- Start the teleop node SEPARATELY -->
  <!--
  <node name="teleop"
	pkg="shared_demo"
	type="teleop.py"
	output="screen"/>
  -->

  <!-- Start the RealSense.  I'm not enabling the pointcloud. -->
  <!-- A resolution of (-1) implies using the default value.  -->
  <include file="$(find realsense2_camera)/launch/rs_camera.launch">
    <arg name="depth_width"       value="-1"/>
    <arg name="depth_height"      value="-1"/>
    <arg name="depth_fps"         value="30"/>

    <arg name="color_width"       value="-1"/>
    <arg name="color_height"      value="-1"/>
    <arg name="color_fps"         value="30"/>

    <arg name="enable_pointcloud"        value="false"/>
    <arg name="allow_no_texture_points"  value="true"/>
    <!-- Replace RS2_STREAM_COLOR with RS_STREAM_ANY to -->
    <!-- create the pointcloud without the RGB colors.  -->
    <arg name="pointcloud_texture_stream" default="RS2_STREAM_COLOR"/>
  </include>

  <!-- Start the depth image to laser scan conversion.  -->
  <!-- Note I'm *NOT* using python, it is a LOT slower. -->
  <node name="depthtolaserscan"
	pkg="depthtolaserscan"
  	type="depthtolaserscan"
	output="screen"/>

  <!-- Start the map server -->
  <node name="map_server"
	pkg ="map_server"
	type="map_server"
	args="$(arg map)"/>

  <!-- Finally start the fake localization. -->
  <node name="localizatoin"
	pkg="shared_demo"
  	type="fakelocalize.py"
	output="screen">
    <param name="update_fraction" value="0.3"/>
  </node>
  
  <!-- Publish all the robot frames. -->
  <node name="robot_state_publisher"
	pkg="robot_state_publisher"
  	type="robot_state_publisher"/>

  <!-- Run the rviz visualization, with the specified config file -->
  <!-- Kill everything if this stops. -->
  <node pkg="rviz"
  	type="rviz"
	name="rviz"
	args="-d $(arg cfg)"
	output="screen"
	required="true"/>
</launch>