run hector_slam with LaserScan topic only
Hello, I am trying to get work with hector_slam using SICK Laser. I want to map a room with SICK laser only. I will carry my notebook with the SICK Laser.
What I have tried : 1. Record the /scan topic with rosbag record. 2. Play it again with rosbag play <filename.bag> --clock 3. Launch this file :
<launch>
<node pkg="hector_mapping" type="hector_mapping" name="hector_mapping" output="screen">
<param name="base_frame" value="base_link"/>
<param name="odom_frame" value="base_link"/>
<param name="pub_map_odom_transform" value="true"/>
<param name="scan_subscriber_queue_size" value="25"/>
<!-- Map size / start point -->
<param name="map_resolution" value="0.050"/>
<param name="map_size" value="2048"/>
<param name="map_start_x" value="0.5"/>
<param name="map_start_y" value="0.5" />
<param name="map_multi_res_levels" value="2" />
</node>
<include file="$(find hector_geotiff)/launch/geotiff_mapper.launch"> </include>
<node pkg="tf" type="static_transform_publisher" name="map_nav_broadcaster" args="0 0 0 0 0 0 base_link laser 100"/>
</launch>
But, I got this error :
[ INFO] [1372396116.210768520, 1372324835.547738080]: lookupTransform base_link to laser timed out. Could not transform laser scan into base_frame.
[ERROR] [1372396116.373757080, 1372324835.710765040]: Trajectory Server: Transform from /map to /base_link failed: Frame id /map does not exist! Frames (3): Frame /laser exists with parent /base_link.
Frame /base_link exists with parent NO_PARENT.
I am afraid that my launch file is wrong. Do anyone has .launch for hector_slam that can be use for handheld mapping only. Thank you :)
Update :
Here,it is my result from rosrun tf view_frames :
https_://dl.dropboxusercontent.com/u/32191086/Public%20Media/Selection_001.png
remove the _ for link
And my .bag file :
https_://dl.dropboxusercontent.com/u/32191086/Public%20Media/pioneer_laser_1.bag
Sorry my karma isn't enough to post the picture & link.
please, post the output of the command "rosrun tf view_frames", so we can see how your frames are configured.
Here it is : https://dl.dropboxusercontent.com/u/32191086/Public%20Media/Selection_001.png
try putting <param name="map_frame" value="base_link"/> into your launch file
when you start hector_slam it prints a bunch of stuff in the initialization phase, can you also post that, please? If your bag file is not too big I can try to process it here and tell you what you are missing.
@goetz.marc I have try that but still error :(
@Procopio : here it is my bag file, it contains LaserScan /scan topic only : https://dl.dropboxusercontent.com/u/32191086/Public%20Media/pioneer_laser_1.bag