hdl_localization定位(Ubuntu18.04 melodic)

发现写博客还蛮有意思 哈哈
用前面SC-LeGO-LOAM地图来跑定位 总体效果还是不错的
hdl_localization https://github.com/koide3/hdl_localization
上干货

How to use

cd /your/catkin_ws/src
git clone https://github.com/koide3/ndt_omp
git clone https://github.com/SMRT-AIST/fast_gicp --recursive
git clone https://github.com/koide3/hdl_localization
git clone https://github.com/koide3/hdl_global_localization
在\src\hdl_global_localization\CMakeLists.txt下添加

set(CMAKE_CXX_FLAGS "-std=c++11")
set(CMAKE_CXX_FLAGS "-std=c++14")

在以下头文件添加

#include 
src\fast_gicp\include\fast_gicp\gicp\fast_gicp_st.hpp   
src\fast_gicp\include\fast_gicp\gicp\fast_gicp.hpp
src\fast_gicp\include\fast_gicp\gicp\fast_vgicp.hpp

catkin_make -DCMAKE_BUILD_TYPE=Release

fatal error: cloud_msgs/cloud_info.h: No such file or directory

catkin_make -j1
hdl_localization.launch
修改topic: 点云 点云坐标 imu

<arg name="points_topic" default="/velodyne_points" /> 
<arg name="odom_child_frame_id" default="laser_link" />
<arg name="imu_topic" default="/imu" />

文件加载路径

<param name="globalmap_pcd" value="$(find hdl_localization) .." />

开头选择性加

<param name="/use_sim_time" value="true" />

末尾加

<node pkg="rviz" type="rviz" name="rviz" args="-d $(find hdl_localization)/rviz/hdl_localization.rviz" />

roslaunch hdl_localization hdl_localization.launch 运行
call /relocalize service, and then the localizer will be reset with the estimated global pose: https://github.com/koide3/hdl_localization/issues/60

Final

定位的效果很不错 室外可能还是要多考虑下环境以及转圈速度等问题 有待优化吧
不使用imu也可以定位 以及初始位姿 都在launch中
而且带有 /initialpose 的功能 体验很棒
顺便测试了下hdl_graph_slam配合也蛮好

你可能感兴趣的:(ros,slam,localization,slam)