ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A answers.ros.org
Ask Your Question
0

hector slam does not work! [closed]

asked 2015-05-05 09:55:36 -0500

Zargol gravatar image

updated 2015-05-06 02:50:49 -0500

bvbdort gravatar image

I received below error after running

"roslaunch hector_slam_launch tutorial.launch"

"rosbag play Team_Hector_MappingBox_RoboCup_2011_Rescue_Arena.bag --clock"

I could see the tf in rviz , but there is no map! how could I define transform between frames /map and scanmatcher? and why does it call terminate? Any idea?

terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::lock_error> >'
  what():  boost: mutex lock failed in pthread_mutex_lock: Invalid argument
[hector_mapping-2] process has died [pid 9809, exit code -6, cmd /home/zargol/catkin_workspace/devel/lib/hector_mapping/hector_mapping __name:=hector_mapping __log:=/home/zargol/.ros/log/644b3e9a-f334-11e4-adf6-0025649a63d3/hector_mapping-2.log].
log file: /home/zargol/.ros/log/644b3e9a-f334-11e4-adf6-0025649a63d3/hector_mapping-2*.log
[ WARN] [1430837517.680715839, 1310298004.093839447]: No transform between frames /map and scanmatcher_frame available after 20.001973 seconds of waiting. This warning only prints once.
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Zargol
close date 2015-05-06 04:21:44.861022

Comments

can you post complete log of error.

bvbdort gravatar imagebvbdort ( 2015-05-06 03:30:28 -0500 )edit

that was the complete log of error

Zargol gravatar imageZargol ( 2015-05-06 04:19:26 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
2

answered 2015-05-06 03:34:10 -0500

AlexR gravatar image

To know how the tf works see the following tutorials :

tf

Hector SLAM tf setup

An easy solution would be to manually starting a tf publisher that publishes the needed transform from the base_link (localized) to the laser scanner frame. See the example launch file below:

 <node pkg="tf" type="static_transform_publisher" name="base_to_laser_broadcaster" args="0 0 0 0 0 0 base_link laser 100" />

and you should have your hector_mapping parameters like this :

  <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" />
edit flag offensive delete link more
0

answered 2015-05-06 04:18:39 -0500

Zargol gravatar image

Thank you AlexR, I changed my computer and I used my personal laptop which has more powerful graphic card, and I run the launch file with the bag file and it worked perfectly. I used the parameters below which give me a reasonable map.

 <arg name="base_frame" default="base_link"/>
 <arg name="odom_frame" default="nav"/>
edit flag offensive delete link more

Comments

Glad it helped. Please accept the response as an answer by clicking on the "check" symbol.

AlexR gravatar imageAlexR ( 2015-05-11 22:29:10 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2015-05-05 09:55:36 -0500

Seen: 1,135 times

Last updated: May 06 '15