ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

How to set up robot_localization with gmapping, IMU and GPS

asked 2018-04-12 06:14:51 -0600

Robbe_C gravatar image

Hello

I am planning to use robot_localization to localize my boat, equipped with a 2D laser scanner, 9 dof IMU and GPS. My plan was to use 1 kf_localization_node that has, as inputs, the output of the gmapping node and the IMU data. If there is no laser data available (the boat may be floating in water without close walls), I would close that node and I would use another kf_localization_node to fuse GPS data (with navsat_transform_node) with IMU data. So GPS and Gmapping would never work at the same time.

Is this a good approach? Or is there an easy way to use gmapping, GPS and IMU data at the same time?

Thanks in advance!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2018-04-13 06:19:47 -0600

Tom Moore gravatar image

updated 2018-04-13 06:20:02 -0600

I'm not totally clear on your use case. Do you already have a map for your boat, or are you literally running mapping every time you run? If you already have a map, then you'd want to use something like amcl, though you can still work with the EKF in that case.

If you are running mapping every time you run, the problem is that the coordinate frame of the GPS data isn't going to match your gmapping output. When you first start, they'll be fine for a very short period, but as soon as gmapping closes a loop, you're hosed, because the two frames won't match. gmapping will say you are at, e.g., (10, 10), and your GPS will say you are at e.g., (12, 17). The root issue is that any time you map, the coordinate frame in which you are mapping is subject to change.

If you already have a map, it's a very different story. It's still pretty complicated, though, because you have to make sure your robot gets localized within your map before navsat_transform_node computes its transform.

edit flag offensive delete link more

Comments

I have no map, so I want to use SLAM to make a map and localize in it. The pose estimation from the gmapping package is way more accurate than a gps. Therefore, I was thinking to first fuse only gmapping with Imu and if that works, fuse a twist message with gps velocities Do you think it's possible?

Robbe_C gravatar image Robbe_C  ( 2018-04-15 09:09:30 -0600 )edit

No, not really, and for the reason I outlined above. You might get away with fusing the GPS data in differential mode, which will convert it to velocities.

Tom Moore gravatar image Tom Moore  ( 2018-04-17 02:52:09 -0600 )edit

Question Tools

4 followers

Stats

Asked: 2018-04-12 06:14:51 -0600

Seen: 1,501 times

Last updated: Apr 13 '18