How to properly fuse AMCL with robot_localization

asked 2023-04-06 15:50:20 -0500

Devin1126 gravatar image

Hello,

It would be very appreciated if someone could show an example of what I am about to describe should look. I have a differential-drive robot that is equipped with wheel encoders, an IMU, and a Lidar sensor. Previously, I have only been using sensor readings from the wheel encoders and IMU for odometry estimation produced by the ekf_localization_node from the robot_localization package. Its results are okay, but I would like to improve the localization of the robot by incorporating pose estimation from amcl package. From my research so far, it seems that there are two main ways to do this which will be listed:

  • Use amcl separately from ekf_localization_node

In this method, I would continue to use the ekf_localization_node to fuse odometry estimates combined from the wheel encoders and IMU without pose estimates from amcl. However, I would use the transform from odom-->base_link to feed into the amcl node's tf paramters: odom_frame_id and base_frame_id.

  • Fuse pose estimate from amcl into ekf_localization_node

In this method, I would directly fuse pose estimates from amcl into the other sensor readings that are used as input into the ekf_localization_node. In this way, I would have three sources of odometry information that are being used for the localization node which would be twist0 (wheel odom), imu0 (IMU readings), and pose0 (pose estimation from amcl)

I am not entirely sure which method is the preferred way of going about this problem, so any input on which method works the best (and a potential example) would be highly appreciated.

edit retag flag offensive close merge delete

Comments

Hi @Devin1126,

what do you mean by an example of what I am about to describe should look? Are you asking for the package(s) structure to implement one of the two approaches you have described? Or are you in doubt about implementing a specific script?

Sorry, for answering your questions with more questions, but a more precise description of your needs may help you in receiving relevant advice.

As for the preferred way of going about this problem, my personal take is that the first approach (Use amcl separately from ekf_localization_node) should be the one to follow. Odometry (Wikipedia definition) is the use of data from motion sensors to estimate changes in position over time. Therefore, it should not integrate information from the Lidar sensor which is providing you with data about the environment, more than about the robot itself.

bluegiraffe-sc gravatar image bluegiraffe-sc  ( 2023-04-07 07:59:53 -0500 )edit