Closed WilliamWoo45 closed 3 years ago
Hi, Thank you for using LaMa.
I think your problem is here: rosrun iris_lama_ros loc2d_ros scan:=base_scan
.
Your bag has a laser scan in the /scan
topic, so you should use that topic. The /map
frame does not exist because the localization never received a laser scan.
Please try running with rosrun iris_lama_ros loc2d_ros scan:=/scan
and let me know if it works.
Hi Eurico,
Thanks a lot for your speedy response. It works! I did not expect the problem could come from there :)
BTW, I did the global localization tests and found that, without specifying the correct initial pose, the base_link
and odom
frames would jump to the correct place for 1-2 seconds at the beginning of some of my rosbags. Then they would jump back to somewhere near the origin (0,0), and the localization failed (see examples below).
Example 1:
Example 2:
But at some starting place near the origin of the map (0,0), LaMa Localization managed to do the global localization after the robot moving for around 3-5m (see the screenshots below):
So, I'm wondering does the current localization node
actually support Global Localization (i.e. localization without specifying initial pose) to some extent?
Cheers!
Best Regards, William
The current localization node
does not have support for Global Localization. So you must provide an initial pose, or you can use rviz for that.
However, there is a global localization mechanism already implement in the base code of the localization algorithm. It does not requires an initial pose. It may find the correct pose, but is is not guarenteed. There is a hard-coded threshold that may not be suitable for all applications.
I may implement the global localization in the ROS node. It is not a dificult task. Stay tuned.
Hi Eurico,
Noted with thanks. I'll stay tuned and I'm very looking forward to your updates on global localization in the ROS node, since it is quite necessary when the robot is lost track of or when the robot is kidnapped in the practical applications.
Thanks again and take care!
Best Regards, William
@WilliamWoo45, you can now try a global localization method for the localization node 242c3fca21da5bf4a6cbb089b0e8f41d03767004.
Please notice that the ~gloc_thresh
parameter may need to be adjusted to your application.
Hi Eurico,
Thanks a lot for your speedy coding. Noted. I'll try it as soon as possible.
Best Regards, William
Hi Eurico @eupedrosa ,
I've implemented the global localization
approach. Its localization success rate is around 10% ~ 15% in the repetitive corridor environment (as shown previously) without specifying the initial pose
. I believe it can achieve much better global localization
performance in ordinary environments where distinct geometric features are sufficient, and with better adjustment/tunning of the ~gloc_thresh
parameter.
Regarding the global localization
ability, I think LaMa ROS
performs pretty good and is around the same performance level with AMCL
or MRPT_localization
.
Thanks and all the best!
Best Regards, William
Hi! Firstly, thanks for providing such great SLAM / Localization work.
I was trying to implement the
localization function
of LaMa ROS based on my own occupancy grid map. I launched the command lines in different windows in the following order:rosrun iris_lama_ros loc2d_ros scan:=base_scan
rosrun map_server map_server /opt/ros/kinetic/share/husky_navigation/maps/mymap.yaml
rviz
rosbag play --clock /home/williamwoo/Z_husky_S2.1/S2.1_new/husky2-pose-_2020-06-12-s2.1-way11-mrpt.bag
The map is successfully loaded, where in the command line saying that:
I suppose the localization node is successfully running. However, there is an error saying that![rviz](https://user-images.githubusercontent.com/43923666/100056271-5738a400-2e60-11eb-96d3-c8f2e627ed6b.png)
Fixed Frame [map] does not exist
(as shown below).The tf is:![way11-test-tf-tree](https://user-images.githubusercontent.com/43923666/100056301-69b2dd80-2e60-11eb-8216-9f2c7ea65a3d.png)
The rosbag info is:![way11-test-rosbag-info](https://user-images.githubusercontent.com/43923666/100056543-cca47480-2e60-11eb-869d-b6f7cd26f50d.png)
So I'm wondering how could I solve this problem? I suppose what the LaMa ROS localization node does is to publish /map --> /odom, right? The map that I used is mymap.yaml and mymap.pgm; the rosbag that I used is here.
Thanks and all the best!
Best Regards, William