Ask Your Question

hector_slam demo for ROS newbie [closed]

asked 2015-05-22 05:47:31 -0500

jondo gravatar image

updated 2015-06-12 03:59:41 -0500

I am new to ROS and I need to get acquainted with hector_slam for a project.

I have installed ROS Indigo and ros-indigo-hector-slam.

Provided I have got a bag file of offline laserscan data (sensor_msgs/LaserScan), how would I let hector-slam run with that for testing?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Procópio
close date 2015-09-04 09:27:51.139174

1 Answer

Sort by » oldest newest most voted

answered 2015-06-12 05:23:45 -0500

jondo gravatar image

I managed to run it with this launch file:

<?xml version="1.0"?>

  <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 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"/>

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2015-05-22 05:47:31 -0500

Seen: 219 times

Last updated: Jun 12 '15