Skip to content

A simple example: Implementing pointcloud alignment and localization using small_gicp

License

Notifications You must be signed in to change notification settings

SMBU-PolarBear-Robotics-Team/small_gicp_relocalization

Repository files navigation

small_gicp_relocalization

License Build

A simple example: Implementing point cloud alignment and localization using small_gicp

Given a registered pointcloud (based on the odom frame) and prior pointcloud (mapped using pointlio or similar tools), the node will calculate the transformation between the two point clouds and publish the correction from the map frame to the odom frame.

Dependencies

  • ROS2 Humble
  • small_gicp
  • pcl
  • OpenMP

Build

mkdir -p ~/ros2_ws/src
cd ~/ros2_ws/src

git clone https://github.com/LihanChen2004/small_gicp_relocalization.git

cd ..
  1. Install dependencies

    rosdepc install -r --from-paths src --ignore-src --rosdistro $ROS_DISTRO -y
  2. Build

    colcon build --symlink-install -DCMAKE_BUILD_TYPE=release

Usage

  1. Set prior pointcloud file in launch file

  2. Adjust the transformation between base_frame and lidar_frame

    The global_pcd_map output by algorithms such as pointlio and fastlio is strictly based on the lidar_odom frame. However, the initial position of the robot is typically defined by the base_link frame within the odom coordinate system. To address this discrepancy, the code listens for the coordinate transformation from base_frame(velocity_reference_frame) to lidar_frame, allowing the global_pcd_map to be converted into the odom coordinate system.

    If not set, empty transformation will be used.

  3. Run

    ros2 launch small_gicp_relocalization small_gicp_relocalization_launch.py

About

A simple example: Implementing pointcloud alignment and localization using small_gicp

Resources

License

Stars

Watchers

Forks

Packages

No packages published