0
$\begingroup$

Rosanswers logo

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!


Originally posted by Robbe_C on ROS Answers with karma: 23 on 2018-04-12

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by Tom Moore with karma: 13689 on 2018-04-13

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by Robbe_C on 2018-04-15:
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?

Comment by Tom Moore on 2018-04-17:
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.

$\endgroup$

Your Answer

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