Ask Your Question
0

Interfacing Rtabmap and Robot_Localization

asked 2016-02-02 11:32:11 -0500

Wagner2x gravatar image

updated 2016-02-04 10:12:11 -0500

matlabbe gravatar image

Hello,

I am working to use robot_localization to take in info from a piksi gps, rp 2d lidar, and UM7 IMU and to give me a good estimate of where I am in space. I want to report this to rtabmap so I can relate this position to the 3d environment of my robot. When I run rtabmap without robot_localization everying works, however when I run robot_localization alongside rtabmap the odom frame drifts like crazy. I didn't know if this was an issue that you have seen before or not. Let me know what you need from me!

Here is my Launch file folder: https://github.com/zastrix/ROS-Launch...

rtabmap Launch file called robo_loco.launch Robot Localization launch file called rgbd_mapping.launch

Thanks for all the help!

edit retag flag offensive close merge delete

Comments

The "odom frame drifts", do you mean /map->/odom or /odom->/base_link? Also, is it the output of robot_localization that is drifting? An IMU would drift over time (even if not moving), did you try IMU+visual odometry alone with one robot_localization (without the one for map)?

matlabbe gravatar image matlabbe  ( 2016-02-04 10:25:48 -0500 )edit

The IMU information that we had set up for RL to input was incorrect. Now that we have our launch files fixed rtabmap is working. However the instance of RL that does the tf from map to odom is not performing the transform. Running diagnostics we get /odom/filtered: no events recorded

Wagner2x gravatar image Wagner2x  ( 2016-02-08 19:20:25 -0500 )edit

I also re submitted another question for this issue titled Robot_Localization not publishing transform to odom

Wagner2x gravatar image Wagner2x  ( 2016-02-09 09:02:48 -0500 )edit

I don't think the second robot_localization node should be used for /map -> /odom transform. This transform is generally published by a node after global localization or correcting the map (after a loop closure for example) at low frequency (e.g., amcl or rtabmap nodes).

matlabbe gravatar image matlabbe  ( 2016-02-09 10:30:31 -0500 )edit

Does rtabmap provide the transform from map to odom if we only use one instance of RL? The whole reason we are using RL is to have a better representation of where we are in space so if we don't NEED to do the sensor fusion in RL to get this accuracy then that would be great.

Wagner2x gravatar image Wagner2x  ( 2016-02-09 12:21:42 -0500 )edit

Another issue has arose as well. When we try to run the scan matching rtabmap crashes and we have no idea why.

Wagner2x gravatar image Wagner2x  ( 2016-02-09 12:24:45 -0500 )edit

Yes, rtabmap node doesn't require robot_localization. robot_localization would be used to do odometry fusion of multiple sources (IMU, visual odometry, wheel odometry, etc...), giving the filtered odometry topic to rtabmap. With publish_tf=:true, rtabmap publishes /map->/odom.

matlabbe gravatar image matlabbe  ( 2016-02-09 13:36:21 -0500 )edit

For the crash, this may be related to this post

matlabbe gravatar image matlabbe  ( 2016-02-09 13:36:51 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-02-09 17:04:25 -0500

matlabbe gravatar image

Hi,

I just read this page, using two robot_localization instances makes more sense now if you use a GPS.

The problem is that rtabmap doesn't know there is a GPS going on, it will generate its own /map -> /odom transform, which is the localization correction after a loop closure. This transform is relative to the starting position of the robot.

Without the GPS, a standard setup would be: image description

You could disable map optimization from rtabmap (<param name="RGBD/OptimizeIterations" type="string" value="0"/>) to avoid /map -> /odom publishing if the second robot_localization with GPS is publishing it too. Then use the output of the second robot_localization as input odometry for rtabmap node. The map will be created using poses including the GPS, so in some way the map will be already optimized (no loop closure detection required). There may be "jumps" in the generated map though when a GPS localization occurs. Note that the following is just an idea (I've never tested a system like that):

image description

cheers, Mathieu

edit flag offensive delete link more

Comments

Has anyone tested this (Rtabmap, Robot_Localization, and GPS) and can say whether it worked? Is the diagram connection marked with "???" actually correct?

danielsnider gravatar image danielsnider  ( 2017-04-11 12:46:30 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2016-02-02 11:32:11 -0500

Seen: 2,312 times

Last updated: Feb 09 '16