0
$\begingroup$

Rosanswers logo

Hi, I record laser scanner data by "rosbag record" option. When I want to run hector_slam with the bag file I faced some errors. I use these commands to run:

rosmake hector_slam
roslaunch hector_slam_launch tutorial.launch
rosbag play test.bag --clock

and in the tab that tutorial.launch run, this error appear repeatedly:

Trajectory Server: Transform from /map to scanmatcher_frame failed: "map" passed to lookupTransform argument target_frame does not exist.

And also the output of "rosbag info filename.bag" was:

path:        2014-04-02-19-53-59.bag
version:     2.0
duration:    9:40s (580s)
start:       Apr 02 2014 19:54:00.22 (1396452240.22)
end:         Apr 02 2014 20:03:40.50 (1396452820.50)
size:        12.8 MB
messages:    6412
compression: none [17/17 chunks]
types:       diagnostic_msgs/DiagnosticArray       [3cfbeff055e708a24c3d946a5c8139cd]
             dynamic_reconfigure/Config            [958f16a05573709014982821e6822580]
             dynamic_reconfigure/ConfigDescription [757ce9d44ba8ddd801bb30bc456f946f]
             rosgraph_msgs/Log                     [acffd30cd6b6de30f120938c17c593fb]
             sensor_msgs/LaserScan                 [90c7ef2dc6895d81024acba2ac42f369]
topics:      /diagnostics                           579 msgs    : diagnostic_msgs/DiagnosticArray 
             /hokuyo_node/parameter_descriptions      1 msg     : dynamic_reconfigure/ConfigDescription
             /hokuyo_node/parameter_updates           1 msg     : dynamic_reconfigure/Config           
             /rosout                                  6 msgs    : rosgraph_msgs/Log                     (2 connections)
             /scan                                 5825 msgs    : sensor_msgs/LaserScan

How can I solve this problem.?


Originally posted by adroit89 on ROS Answers with karma: 33 on 2014-04-02

Post score: 1


Original comments

Comment by demmeln on 2014-04-02:
What does rosbag info test.bag output? (edit your question to include the output)

Comment by demmeln on 2014-04-03:
It seems that the trajectory server complains, because the transform is not published. I don't know how hector mapping works, but I would disable the trajectory server and first look into how to get he mapping part to work.

Comment by demmeln on 2014-04-03:
I.e. make sure all the necessary topics and parameters are there. You can use rxgraph / rqt_graph to check that rosbag is connected to the mapping node on the laser topics.

Comment by adroit89 on 2014-04-04:
Actually I cant understand that which topics and parameter it exactly needs! I can run the bag file example that provided by hector darmstad. I am sure it is not my problem with laser device or hector slam package. It relates to parameters that bag file needs.

Comment by demmeln on 2014-04-06:
Two immediate candidates you might need are the Odometry, the IMU info and the /tf topic, which are both included in the bag file. I think hector mapping can work without IMU, but maybe needs some form of odometry still?

Comment by demmeln on 2014-04-06:
Moreover you might need to edit the launch files / parameters to account for your setup, i.e. topic and tf-frame names.

Comment by demmeln on 2014-04-06:
Have you followed this tutorial closely? http://wiki.ros.org/hector_slam/Tutorials/SettingUpForYourRobot It discusses how to set up your parameters with and without odometry.

Comment by adroit89 on 2014-04-07:
Yes, I followed this tutorial before. I can solve that problem. It was related to tf setting. Now I face another problem! During process in hector_slam I visit this message a lot: SearchDir angle change too And it appears a lot and make problem for matching the data to map.

Comment by demmeln on 2014-04-08:
If there is a different problem, you should open a seperate question about it and mark stefan's answer as accepted for this question.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

The trajectory server transform error seems to confuse a few people but is not fatal if it only happens once or twice on startup (see here for explanation). We changed it so this doesn´t happen anymore recently, but .debs might not be updated yet.

Your bagfile does not contain tf information, which hector_mapping needs to transform scan data into the stabilized frame (see setting up for your robot).


Originally posted by Stefan Kohlbrecher with karma: 24361 on 2014-04-07

This answer was ACCEPTED on the original site

Post score: 2

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.