Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I managed to run it with this launch file:

<?xml version="1.0"?>
<launch>

  <param name="use_sim_time" value="true" />

  <node pkg="hector_mapping" type="hector_mapping" name="hector_mapping" output="screen">

    <!-- Topic names -->
    <param name="scan_topic" value="/laser_front/scan" />

    <!-- Frame names -->
    <param name="map_frame" value="map" />
    <param name="base_frame" value="base_link" />
    <param name="odom_frame" value="world" />
    <param name="output_timing" value="false"/>

    <!-- Tf use -->
    <param name="use_tf_scan_transformation" value="true"/>
    <param name="use_tf_pose_start_estimate" value="false"/>
    <param name="pub_map_odom_transform" value="true"/>
    <param name="advertise_map_service" value="true"/>

    <!-- Map size / start point -->
    <param name="map_resolution" value="0.025"/>
    <param name="map_size" value="512"/>
    <param name="map_start_x" value="0.5"/>
    <param name="map_start_y" value="0.5" />
    <param name="map_multi_res_levels" value="3" />

    <!-- Map update parameters -->
    <param name="update_factor_free" value="0.3"/>
    <param name="update_factor_occupied" value="0.9" />
    <param name="map_update_distance_thresh" value="0.1"/>
    <param name="map_update_angle_thresh" value="0.02" />

    <!-- laser scanner -->
    <param name="laser_min_dist" value="0.2"/>
    <param name="laser_max_dist" value="25.0"/>

    <!-- syscommand -->
    <param name="sys_msg_topic" value="/hector_slam/syscommand"/>

   <!-- pose estimation -->
   <param name="pose_update_topic" value="/hector_slam/pose_estimation"/>

   <!-- remap -->
   <remap from="/initialpose" to="/hector_slam/set_initial_pose"/>
   <remap from="/dynamic_map" to="/hector_slam/get_map"/>
   <remap from="/map" to="/map_slam"/>
   <remap from="/map_metadata" to="/map_slam_metadata"/>
   </node>

  <node pkg="rviz" type="rviz" name="rviz" args="-d /home/rosuser/slam.rviz"/>

  <node pkg="rosbag" type="play" name="player" output="screen" args="--clock /home/rosuser/laser.bag"/>

</launch>