0
$\begingroup$

Rosanswers logo

Hi, we are using hector slam for builiding 2D map with rpliar laser. To solve the problem that false mapping in environmets similiar to long corridor, we want to add odometry into hector slam.

We read the source code of hector_mapping. We think that we can achieve our goal by setting the parameter "p_use_tf_pose_start_estimate_" to be true.

In this way, the mapping process uses the odometry information stored in tf tree. The parameter "p_use_tf_pose_start_estimated_" may not be set to be true in the beginning. When the robot is going to walk througth a corridor, "p_use_tf_pose_start_estimated_" is set to be true.

However, in our tests, whenever the "p_use_tf_pose_start_estimate_" is set to be true, it always output following error

 [ERROR] [1501720267.512793847]: Transform from map to base_link failed with Lookup would require extrapolation into the future.  Requested time 84.940000000 but the latest data is at time 84.740000000, when looking up transform from frame [base_link] to frame [map]

So solve this error, we launched move_base as this link suggests. But it didn't work.

So we have two questions
1, How to solve above error? Why is it difficult for reading transforms from tf tree in hector slam?

2, What are other ways for adding odometry information into hector slam?

Looking for any valuable advices! Many thanks! Best Regards!


Originally posted by scopus on ROS Answers with karma: 279 on 2017-08-02

Post score: 0


Original comments

Comment by Procópio on 2017-08-03:
who is providing the base_link -> map transform? if it is AMCL, can you post the launch/config file, please?

Comment by scopus on 2017-08-03:
It is an online mapping and navigation, so we don't use AMCL. Hector slam provides the base_link-> map transform. Thanks!

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Hi !

I'm not sure this can help but I'm using RTABMap to build a map and in order to do that, I have to launch hector_mapping thanks to this modified launch file, so that hector_mapping provides the odometry needed by RTABMap, and my first test indicated it was working (odometry showed nicely in RVIZ, and behaved as expected).

During the test, I got the following tf tree thanks to

view_frames

tf tree

Here is the command line RTABMap log, which includes hector_mapping messages.

The rtabmap tutorial I used to set this up is here if you want to check the source of the launch file.

The use of hector_mapping to generate odometry in order to obtain a map thanks to RTABMap is also discussed here and here on RTABMap dedicated forum (posts on how to adapt the launch file).

Hope this helped you !


Originally posted by Blupon with karma: 127 on 2017-08-03

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by scopus on 2017-08-03:
Thank you! It is a useful experience for us. It seems that another running package would influences the running time of data processing. We can't use camera, we will consider your advice when it is necessary.

Comment by scopus on 2017-08-04:
@Blupon I found the parameter settings of hector mapping in your project, the parameter "p_use_tf_pose_start_estimate_" is not involved. Have you tried by setting it to be true and run your project again? Thanks!

Comment by Blupon on 2017-08-08:
I see that parameter in my logs but I don't see it described on hector_mapping wiki page, nor explained by google. Why do you wish to change it ? RTABMap's creator let it that way when using hector_mapping's odometry, I guess he had a good reason to ^^

Comment by scopus on 2017-08-08:
We want the hector_mapping to build map with odometry information. The odometry information from the robot's wheel encoder. We don't want to use the odom data produced by the scan matching of hector_mapping.

Comment by Blupon on 2017-08-08:
Right ! it seems I misunderstood your aim & forgot to read your question update, my bad. How do you change the parameter ? Can you do it at launch ?

Comment by scopus on 2017-08-08:
The odom data has been fused into tf tree. We think the keypoint is the paramter "p_use_tf_pose_start_estimate_". If this paramter is set to be true, the odom information from tf data can be used for estimate the pose of robot. However, as our question above mentioned, it failed.We don't know why

Comment by Blupon on 2017-08-08:
my question was: how do you set it to true ? :-)

Comment by scopus on 2017-08-08:
In your launch file, add <param name="use_tf_pose_start_estimate" value="true"/> Maybe this parameter should be used with parameter p_map_with_known_poses_ , so you also can try by adding <param name="map_with_known_poses" value="true"/>. The default value of these two paramters are false.

$\endgroup$

Your Answer

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