代码参考:
http://github.com/AbangLZU/ndt_localizer
数据集使用的是github中提到的KAIST02-small.bag
cd catkin_ws/src/
git clone https://github.com/AbangLZU/ndt_localizer.git
cd ..
catkin_make
# open a roscore
roscore
# in other terminal
cd catkin_ws
source devel/setup.bash
# use rosbag sim time if you are playing a rosbag!!!
rosparam set use_sim_time true
# launch the ndt_localizer node
roslaunch ndt_localizer ndt_localizer.launch
当地图加载成功之后 最重要的一步是在rviz中选择2D Pose Estimate,然后给定一个初始位姿:
rosbag play KAIST02-small.bag --clock
最后运行的结果为: