The map in hector_slam blinks.
Hi, I use a laser Hokuyo UTM-30LX with hector-slam in ROS hydro. I create a .bag used rosbag record -O name -a When run hokuyo_node and hector_slam. The problem is that when I play this .bag in hector_slam, the map created by hector_mapping in rviz blinks, the LaserScan and the Path are ok. And when the reproduction goes to the end, the map disappears. Someone knows why is this? Thank you very much.
EDIT:
If I play my file .bag when I used rosrun rviz rviz
. The map is OK but is not ok when I executed hector_slam.
I want execute hector_slam and play my file .bag because I search rebuild a map and follow scan the room.
This is the launch file that I use for launch hector_slam:
<launch>
<param name="/use_sim_time" value="false"/>ros
<node pkg="rviz" type="rviz" name="rviz"
args="-d $(find hector_slam_launch)/rviz_cfg/mapping_demo.rviz"/>
<include file="$(find slam_launch)/launch/hector_mapping.launch"/>
<include file="$(find slam_launch)/launch/geotiff_mapper.launch">
<arg name="trajectory_source_frame_name" value="scanmatcher_frame"/>
</include>
</launch>
This is the hector_mapping:
<launch>
<node pkg="hector_mapping" type="hector_mapping" name="hector_mapping" output="screen">
<param name="pub_map_odom_transform" value="true"/>
<param name="map_frame" value="map" />
<param name="base_frame" value="base_link" />
<param name="odom_frame" value="base_link" />
<param name="map_resolution" value="0.025"/>
<param name="map_start_x" value="0.5"/>
<param name="map_start_y" value="0.5" />
<param name="laser_z_min_value" value="-2.5" />
<param name="laser_z_max_value" value="7.5" />
<param name="laser_max_dist" value="10" />
<param name="map_size" value="5000"/>
<param name="map_pub_period" value="1.0"/>
<param name="output_timing" value="false"/>
<param name="update_factor_free" value="0.4"/>
<param name="update_factor_occupied" value="0.7" />
<param name="map_update_distance_thresh" value="0.2"/>
<param name="map_update_angle_thresh" value="0.06" />
</node>
<node pkg="tf" type="static_transform_publisher" name="base_to_laser_broadcaster" args="0 0 0 0 0 0 /base_link /laser 100" />
</launch>
I can´t put links with my .bag but this is the output of rosbag info probatopics-7.bag
:
path: probatopics-7.bag
version: 2.0
duration: 13.2s
start: Jan 30 2014 14:56:21.36 (1391090181.36)
end: Jan 30 2014 14:56:34.54 (1391090194.54)
size: 317.4 MB
messages: 3236
compression: none [14/14 chunks]
types: diagnostic_msgs/DiagnosticArray [3cfbeff055e708a24c3d946a5c8139cd]
dynamic_reconfigure/Config [958f16a05573709014982821e6822580]
dynamic_reconfigure/ConfigDescription [757ce9d44ba8ddd801bb30bc456f946f]
geometry_msgs/PoseStamped [d3812c3cbc69362b77dc0b19b345f8f5]
geometry_msgs/PoseWithCovarianceStamped [953b798c0f514ff060a53a3498ce6246]
nav_msgs/MapMetaData [10cfc8a2818024d3248802c00c95f11b]
nav_msgs/OccupancyGrid [3381f2d731d4076ec5c71b0759edbe4e]
nav_msgs/Path [6227e2b7e9cce15051f669a5e197bbf7]
rosgraph_msgs/Log [acffd30cd6b6de30f120938c17c593fb]
sensor_msgs/LaserScan [90c7ef2dc6895d81024acba2ac42f369]
sensor_msgs/PointCloud [d8e9c3f5afbdd8a130fd1d2763945fca]
tf2_msgs/TFMessage [94810edda583a504dfda3829e70d7eec]
topics: /diagnostics 13 msgs : diagnostic_msgs/DiagnosticArray
/hokuyo_node/parameter_descriptions 1 msg : dynamic_reconfigure/ConfigDescription
/hokuyo_node/parameter_updates 1 msg : dynamic_reconfigure/Config
/map 13 msgs : nav_msgs/OccupancyGrid
/map_metadata 1 msg : nav_msgs/MapMetaData
/poseupdate 483 msgs : geometry_msgs/PoseWithCovarianceStamped
/rosout 37 msgs : rosgraph_msgs/Log (6 connections)
/rosout_agg 25 msgs : rosgraph_msgs/Log
/scan 522 msgs : sensor_msgs/LaserScan
/slam_cloud 486 msgs : sensor_msgs/PointCloud
/slam_out_pose 481 msgs : geometry_msgs/PoseStamped
/tf 1169 msgs : tf2_msgs/TFMessage (2 connections)
/trajectory 4 msgs : nav_msgs/Path
EDIT2: This photo is when I make my field .bag: And this is when I execute my .bag and I run hector_slam:
Did you run SLAM while recording the bag file and run it again while playing the bag file?
No, I only run SLAM while recording the bag file. When I playing the bag file I turn off the hokuyo_node.