This repository contains a method for localization within a pointcloud map using NDT (Normal Distributions Transform) algorithms. It is designed to work with ROS (Robot Operating System) environments.
This method utilizes .pcd (Point Cloud Data) files for map-based localization.
-
PCD Map and rosbag(.bag):
- Ensure you have a .pcd map file ready. For this example, we use
map_v1.pcd. - The ROSbag used here is
mapping_lidar.bag. - Place the .pcd file in the
mapfolder within your workspace.
- Ensure you have a .pcd map file ready. For this example, we use
-
Building in Your ROS Workspace:
- Clone the entire repository into your own ROS workspace.
-
Map Loader:
-
Modify the map loader configuration to point to your .pcd file, like so:
<arg name="pcd_path" default="$(find ndt_localizer)/map/map_v1.pcd"/>
-
-
Point Cloud Downsampling (Pre-configured):
- If using sparse Lidar data (e.g., VLP-16), set a smaller
leaf_sizeinlaunch/points_downsample.launchto2.0. - For denser Lidar point clouds (e.g., VLP-32, Hesai Pandar40P, HDL-64), use a
leaf_sizeof3.0.
- If using sparse Lidar data (e.g., VLP-16), set a smaller
After completing the above steps:
-
Start ROScore:
roscore
-
Navigate to Your Workspace:
cd catkin_ws source devel/setup.bash rosparam set use_sim_time true
-
Launch the Package:
- To run only the
ndt_localizerpackage:roslaunch ndt_localizer ndt_localizer.launch
- To run both
scan contextandndt_localizer:roslaunch ndt_localizer sc_ndt_localizer.launch
- To run only the