ryuichiueda / emcl2

GNU Lesser General Public License v3.0
34 stars 15 forks source link

Add scan_time_stamp #4

Closed uhobeike closed 2 years ago

uhobeike commented 2 years ago

About the Issue

When using rosbag and running emcl2, there is a problem with the conversion between the scan coordinate system and the map coordinate system.

I can run self-location estimation without any problem, but I cannot see the scan data in RViz.

This is a PR to solve the above.

The fix in this PR have been tested on rosbag, simulator, and actual equipment.

How to reproduce

About Test Environment

Clone pkg

git clone git@github.com:rt-net/raspicat_slam_navigation.git 
(↑For pgm data and RViz configuration files)

Execute command

roscore
roslaunch emcl2 emcl2.launch initial_pose_x:=0 initial_pose_y:=0
rosrun map_server map_server raspicat_slam/config/maps/iscas_museum_map.yaml
rosrun rviz rviz -d raspicat_navigation/config/rviz/move_base.rviz
rosbag play 2022-11-04-19-38-54.bag

Rosbag recorded by simulator (Google Drive)

Click to download 2022-11-04-19-38-54.bag

Before fix

https://user-images.githubusercontent.com/40545422/200103790-670528c8-f60b-453c-aeaf-44388974debc.mp4

After

https://user-images.githubusercontent.com/40545422/200103812-ddbaae63-7436-4dac-bccc-45071179ea94.mp4

ryuichiueda commented 2 years ago

Thank you very much!