<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: pipo_</title>
    <description>The latest articles on DEV Community by pipo_ (@_pipo).</description>
    <link>https://dev.to/_pipo</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3959537%2Fde25d3d6-4718-473d-94c2-f7c2d87b372a.png</url>
      <title>DEV Community: pipo_</title>
      <link>https://dev.to/_pipo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/_pipo"/>
    <language>en</language>
    <item>
      <title>From Blind Startup to Global Relocalization: Building a ROS 2 3D LiDAR Navigation System</title>
      <dc:creator>pipo_</dc:creator>
      <pubDate>Sat, 30 May 2026 06:26:49 +0000</pubDate>
      <link>https://dev.to/_pipo/from-blind-startup-to-global-relocalization-building-a-ros-2-3d-lidar-navigation-system-dho</link>
      <guid>https://dev.to/_pipo/from-blind-startup-to-global-relocalization-building-a-ros-2-3d-lidar-navigation-system-dho</guid>
      <description>&lt;p&gt;Open-sourced on GitHub. Stars are welcome:&lt;br&gt;
&lt;a href="https://github.com/Ikunio/Lidar_nav2_ws" rel="noopener noreferrer"&gt;https://github.com/Ikunio/Lidar_nav2_ws&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Recently, I built a ROS 2 Humble-based 3D LiDAR autonomous navigation system named &lt;strong&gt;Lidar_nav2_ws&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The focus of this system is not simply “I managed to run another Nav2 demo.” Instead, I wanted to solve two more practical problems.&lt;/p&gt;

&lt;p&gt;First, can a robot perform global relocalization using 3D point clouds when its initial pose is unknown?&lt;/p&gt;

&lt;p&gt;Second, can the system decouple &lt;strong&gt;LiDAR odometry, point cloud relocalization, Nav2 navigation, and the robot body system&lt;/strong&gt;, so that I can switch algorithms later without rewriting the entire project?&lt;/p&gt;

&lt;p&gt;In simple terms, what I wanted was not a demo that only works when the robot starts from a fixed position, but a navigation framework that can be extended, modified, tested on real hardware, and repeatedly experimented with in the future.&lt;/p&gt;


&lt;h2&gt;
  
  
  1. Why I Built This System
&lt;/h2&gt;

&lt;p&gt;In mobile robot navigation, Nav2 already provides a relatively complete navigation framework, including global planning, local planning, costmaps, behavior trees, and controllers.&lt;/p&gt;

&lt;p&gt;However, Nav2 itself does not tell the robot, “Where am I now?”&lt;/p&gt;

&lt;p&gt;For a typical 2D LiDAR-based system, AMCL is a common localization solution. But once the sensor is replaced with a 3D LiDAR such as Livox MID-360, the situation becomes more complicated.&lt;/p&gt;

&lt;p&gt;A 3D LiDAR provides richer spatial structure, but it also introduces a practical problem:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How can the current 3D point cloud scan be robustly matched against an existing global PCD map?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This becomes especially important when the robot starts up from an arbitrary position. If the robot is not placed at a fixed starting point, the system does not know its initial pose in the map. In this case, relying only on a local registration algorithm is often unreliable.&lt;/p&gt;

&lt;p&gt;Therefore, the core goals of this system are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use 3D LiDAR and IMU data to run LIO;&lt;/li&gt;
&lt;li&gt;Build a 2D map for Nav2;&lt;/li&gt;
&lt;li&gt;Save a 3D PCD map for point cloud relocalization;&lt;/li&gt;
&lt;li&gt;Perform global relocalization through point cloud matching when the initial pose is uncertain;&lt;/li&gt;
&lt;li&gt;Continuously publish &lt;code&gt;map -&amp;gt; odom&lt;/code&gt; to provide stable global localization input for Nav2;&lt;/li&gt;
&lt;li&gt;Decouple LIO, relocalization, Nav2, and robot description modules, making it easier to replace algorithms later.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The most important part is:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Using KISS-Matcher + small_gicp to achieve global relocalization.&lt;/strong&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  2. Overall System Architecture
&lt;/h2&gt;

&lt;p&gt;The overall data flow of the system is roughly as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;LiDAR / IMU
    ↓
LIO odometry
    ↓
TF bridge
    ↓
/registered_scan
    ↓
3D point cloud relocalization
    ↓
publish map -&amp;gt; odom
    ↓
Nav2 navigation
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I split the whole system into several relatively independent modules:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Module&lt;/th&gt;
&lt;th&gt;Function&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;LIO module&lt;/td&gt;
&lt;td&gt;Outputs odometry results based on LiDAR and IMU data&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;TF bridge module&lt;/td&gt;
&lt;td&gt;Unifies TF relationships from different LIO backends&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Point cloud generation module&lt;/td&gt;
&lt;td&gt;Publishes &lt;code&gt;/registered_scan&lt;/code&gt; as the input for relocalization&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Relocalization module&lt;/td&gt;
&lt;td&gt;Aligns the current local point cloud with the prior PCD map&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Nav2 module&lt;/td&gt;
&lt;td&gt;Handles path planning, local obstacle avoidance, and navigation execution&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Robot description and simulation module&lt;/td&gt;
&lt;td&gt;Handles URDF, Gazebo, and sensor simulation&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;With this design, LIO is not tightly coupled with Nav2, and the relocalization module is not tied to a specific LiDAR odometry algorithm.&lt;/p&gt;

&lt;p&gt;That means the following components can be switched more conveniently later:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;FAST-LIO  ↔  Point-LIO

small_gicp  ↔  ICP  ↔  KISS-Matcher + small_gicp

simulation URDF  ↔  real robot URDF
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is exactly the effect I wanted:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Each module can be replaced independently, instead of mixing everything into one big pot of chaos.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In a robotic system, the scariest thing is often not that one algorithm is weak, but that all modules are tightly coupled together.&lt;/p&gt;

&lt;p&gt;Once something goes wrong, it becomes difficult to tell whether the issue comes from LIO drift, wrong TF, point cloud mismatch, or Nav2 going crazy.&lt;/p&gt;

&lt;p&gt;After debugging for long enough, you may even start wondering whether Ubuntu is personally targeting you.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. Mapping Mode: Generating the 2D Map and 3D PCD Map First
&lt;/h2&gt;

&lt;p&gt;The system first supports a mapping mode.&lt;/p&gt;

&lt;p&gt;During mapping, the robot moves in a simulation environment. It runs LIO using LiDAR and IMU data, while generating both a 2D map and a 3D point cloud map.&lt;/p&gt;

&lt;p&gt;The process can be understood as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;robot motion
    ↓
LiDAR scans the environment
    ↓
LIO estimates motion
    ↓
generate local point cloud and 2D LaserScan
    ↓
SLAM Toolbox builds the 2D map
    ↓
save 2D map + 3D PCD map
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The 2D map is mainly used by Nav2, while the 3D PCD map is mainly used for later point cloud relocalization.&lt;/p&gt;

&lt;p&gt;I did not force Nav2 to directly process the full 3D point cloud. Instead, I slice the 3D point cloud by height and convert it into data similar to a 2D laser scan, then feed it into the Nav2 costmap module.&lt;/p&gt;

&lt;p&gt;This may not sound particularly fancy, but it is very practical.&lt;/p&gt;

&lt;p&gt;In engineering, what matters is often not how advanced the architecture diagram looks, but whether the robot can run stably.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Relocalization Mode: KISS-Matcher + small_gicp
&lt;/h2&gt;

&lt;p&gt;The core part of this system is relocalization.&lt;/p&gt;

&lt;p&gt;The problem is as follows:&lt;/p&gt;

&lt;p&gt;The robot already has a prior PCD map. Now it starts from an unknown position in the map. The system needs to use the current local point cloud to automatically match against the global map and estimate the robot’s current pose.&lt;/p&gt;

&lt;p&gt;If only small_gicp is used, the limitation is quite obvious.&lt;/p&gt;

&lt;p&gt;small_gicp is more suitable for local fine registration.&lt;/p&gt;

&lt;p&gt;If the initial pose is already close to the true pose, it can converge quickly and provide good accuracy.&lt;/p&gt;

&lt;p&gt;However, if the initial pose is far away from the real pose, GICP can easily fall into a local optimum or fail to match at all.&lt;/p&gt;

&lt;p&gt;It is like dropping a person into an unfamiliar city and only giving them a few photos of nearby buildings, then asking them to immediately figure out where they are.&lt;/p&gt;

&lt;p&gt;If you already tell them that they are probably near a certain street, they may be able to locate themselves.&lt;/p&gt;

&lt;p&gt;But if you give them no clue at all, then the whole thing starts to feel like fortune-telling-based navigation.&lt;/p&gt;

&lt;p&gt;So I designed the relocalization process as two stages:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Stage 1: KISS-Matcher global coarse registration
Stage 2: small_gicp local fine registration and continuous tracking
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  5. KISS-Matcher Handles Global Coarse Registration
&lt;/h2&gt;

&lt;p&gt;In this system, KISS-Matcher is responsible for global initialization.&lt;/p&gt;

&lt;p&gt;It does not rely on a highly accurate initial pose. Instead, it uses the accumulated local point cloud and the prior PCD map to perform global matching, then estimates a rough transformation.&lt;/p&gt;

&lt;p&gt;The key point here is “coarse registration.”&lt;/p&gt;

&lt;p&gt;It does not need to give a highly accurate pose in one step. As long as it can pull the robot from:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;I have absolutely no idea where I am
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;back to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;I am probably somewhere around this region in the map
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;then small_gicp can take over.&lt;/p&gt;

&lt;p&gt;Therefore, KISS-Matcher is not the final answer in this system. It provides a reasonably reliable initial guess for small_gicp.&lt;/p&gt;

&lt;p&gt;In other words:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;KISS-Matcher reduces the problem from hell-level difficulty to normal difficulty.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  6. small_gicp Handles Fine Registration and Continuous Tracking
&lt;/h2&gt;

&lt;p&gt;After KISS-Matcher completes global initialization, the system switches to small_gicp.&lt;/p&gt;

&lt;p&gt;small_gicp uses the current &lt;code&gt;/registered_scan&lt;/code&gt; and the prior PCD map for fine registration, and continuously maintains the robot’s pose in the global map.&lt;/p&gt;

&lt;p&gt;Eventually, the system publishes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;map -&amp;gt; odom
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This TF is critical.&lt;/p&gt;

&lt;p&gt;LIO usually provides something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;odom -&amp;gt; base_footprint
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This describes the relative motion of the robot in the odometry coordinate frame.&lt;/p&gt;

&lt;p&gt;However, Nav2 needs to know the robot’s position in the global &lt;code&gt;map&lt;/code&gt; frame.&lt;/p&gt;

&lt;p&gt;Therefore, the relocalization module needs to continuously maintain:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;map -&amp;gt; odom
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then the complete TF chain becomes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;map -&amp;gt; odom -&amp;gt; base_footprint -&amp;gt; chassis -&amp;gt; livox_frame
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As long as this TF chain is stable, Nav2 can normally perform path planning, update costmaps, and display the robot’s position in the global map in RViz.&lt;/p&gt;




&lt;h2&gt;
  
  
  7. Why Not Use Only small_gicp?
&lt;/h2&gt;

&lt;p&gt;If the robot always starts from a fixed position, or if you can manually provide a fairly accurate &lt;code&gt;2D Pose Estimate&lt;/code&gt; in RViz every time, then using only small_gicp can work.&lt;/p&gt;

&lt;p&gt;But this approach is not ideal to me.&lt;/p&gt;

&lt;p&gt;Because in essence, it becomes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Step 1: A human guesses an approximate pose
Step 2: The robot proves that the human guessed reasonably well
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is not intelligence. This is human-assisted intelligence.&lt;/p&gt;

&lt;p&gt;What I want is for the system to first complete global coarse localization by itself when there is no accurate initial pose, and then enter continuous fine registration.&lt;/p&gt;

&lt;p&gt;Therefore, this system uses:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;KISS-Matcher coarse registration
    ↓
small_gicp fine registration
    ↓
continuously publish map -&amp;gt; odom
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this way, the robot can attempt relocalization from an arbitrary startup position.&lt;/p&gt;

&lt;p&gt;Of course, this statement should not be exaggerated too much.&lt;/p&gt;

&lt;p&gt;If the robot starts in an open area with too little geometric structure, or if the current environment differs too much from the prior map, then no algorithm can save it.&lt;/p&gt;

&lt;p&gt;Algorithms are not magic. They cannot localize the robot from thin air.&lt;/p&gt;

&lt;p&gt;More accurately, this system supports:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Global relocalization without an accurate initial pose when the current point cloud and prior map have sufficient structure and overlap.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is much more practical than relying on a human to manually provide the initial pose every time.&lt;/p&gt;




&lt;h2&gt;
  
  
  8. The Value of Decoupled Design
&lt;/h2&gt;

&lt;p&gt;Besides relocalization itself, another key point of this system is decoupling.&lt;/p&gt;

&lt;p&gt;I do not want it to be a system that only works under one fixed configuration. Instead, I want it to serve as an experimental framework that can continue to evolve.&lt;/p&gt;

&lt;p&gt;Currently, LIO, relocalization, and Nav2 mainly communicate through standard ROS 2 interfaces:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/registered_scan

/Odometry

TF: map -&amp;gt; odom -&amp;gt; base_footprint

PCD map

2D map
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This means that later, when replacing algorithms, the whole system does not need to be rebuilt from scratch.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Replaceable Part&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;FAST-LIO / Point-LIO&lt;/td&gt;
&lt;td&gt;Switch between different LiDAR odometry backends&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;small_gicp / ICP&lt;/td&gt;
&lt;td&gt;Switch between different local point cloud registration methods&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;KISS-Matcher + small_gicp&lt;/td&gt;
&lt;td&gt;Use global coarse registration plus local fine registration&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Simulation robot / real robot&lt;/td&gt;
&lt;td&gt;Switch between different URDF and sensor configurations&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;This structure is important for robot debugging.&lt;/p&gt;

&lt;p&gt;In real-world debugging, the common problem is not always that a certain algorithm is completely unusable. More often, you simply do not know which layer is causing the problem.&lt;/p&gt;

&lt;p&gt;If the module boundaries are clear, the system can be checked layer by layer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Whether LIO outputs odometry correctly;&lt;/li&gt;
&lt;li&gt;Whether &lt;code&gt;/registered_scan&lt;/code&gt; is published correctly;&lt;/li&gt;
&lt;li&gt;Whether the PCD map coordinate frame is correct;&lt;/li&gt;
&lt;li&gt;Whether only one node is publishing &lt;code&gt;map -&amp;gt; odom&lt;/code&gt;;&lt;/li&gt;
&lt;li&gt;Whether the Nav2 costmap is updating correctly;&lt;/li&gt;
&lt;li&gt;Whether the extrinsic transform from &lt;code&gt;base_footprint&lt;/code&gt; to &lt;code&gt;livox_frame&lt;/code&gt; is correct.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The system may not be elegant, but at least problems can still be located.&lt;/p&gt;

&lt;p&gt;For robotics development, this is already very important.&lt;/p&gt;




&lt;h2&gt;
  
  
  9. Current Implementation Results
&lt;/h2&gt;

&lt;p&gt;The system currently supports two main modes.&lt;/p&gt;

&lt;h3&gt;
  
  
  9.1 Mapping Mode
&lt;/h3&gt;

&lt;p&gt;In mapping mode, the robot moves in the Gazebo simulation environment. It runs LIO with LiDAR and IMU data, builds a 2D occupancy grid map, and saves a 3D PCD map.&lt;/p&gt;

&lt;p&gt;This mode is mainly used to generate the prior maps required for later navigation and relocalization.&lt;/p&gt;

&lt;h3&gt;
  
  
  9.2 Relocalization Navigation Mode
&lt;/h3&gt;

&lt;p&gt;In relocalization mode, the system loads an existing PCD map and matches the current &lt;code&gt;/registered_scan&lt;/code&gt; against the prior map.&lt;/p&gt;

&lt;p&gt;When using the KISS-Matcher + small_gicp solution, the workflow is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;accumulate current local point cloud
    ↓
KISS-Matcher global coarse registration
    ↓
initialization succeeds
    ↓
small_gicp continuous fine registration
    ↓
continuously publish map -&amp;gt; odom
    ↓
Nav2 navigation works normally
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In RViz, the robot can be seen relocating itself back into the global map coordinate frame through point cloud matching.&lt;/p&gt;

&lt;p&gt;Once &lt;code&gt;map -&amp;gt; odom&lt;/code&gt; is published stably, Nav2 can perform path planning and navigation control in the global map.&lt;/p&gt;




&lt;h2&gt;
  
  
  10. Some Debugging Experience
&lt;/h2&gt;

&lt;h3&gt;
  
  
  10.1 Only One Node Should Publish map -&amp;gt; odom at the Same Time
&lt;/h3&gt;

&lt;p&gt;This is a very important point.&lt;/p&gt;

&lt;p&gt;If small_gicp and another relocalization node publish &lt;code&gt;map -&amp;gt; odom&lt;/code&gt; at the same time, the robot pose may jump, and Nav2 may also behave abnormally.&lt;/p&gt;

&lt;p&gt;This kind of issue looks like algorithm instability, but it is actually TF conflict.&lt;/p&gt;

&lt;p&gt;Both nodes think they are correct, and in the end, the wrong one is you.&lt;/p&gt;

&lt;h3&gt;
  
  
  10.2 The Current Point Cloud and Prior Map Must Have Enough Overlap
&lt;/h3&gt;

&lt;p&gt;Although KISS-Matcher can perform global coarse registration, it is not magic.&lt;/p&gt;

&lt;p&gt;If the robot sees too little structure when it starts, or if the current local scan has insufficient overlap with the prior map, initialization may fail.&lt;/p&gt;

&lt;p&gt;A practical method is to let the robot rotate in place or move slowly for a short distance during initialization, so that more local point cloud data can be accumulated.&lt;/p&gt;

&lt;p&gt;The richer the point cloud structure is, the easier global initialization becomes.&lt;/p&gt;

&lt;h3&gt;
  
  
  10.3 Coordinate Frames Must Be Consistent
&lt;/h3&gt;

&lt;p&gt;A common TF chain is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;map -&amp;gt; odom -&amp;gt; base_footprint -&amp;gt; chassis -&amp;gt; livox_frame
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the extrinsic transform from &lt;code&gt;base_footprint&lt;/code&gt; to &lt;code&gt;livox_frame&lt;/code&gt; is incorrect, or if the frame names are inconsistent, the relocalization result will be biased.&lt;/p&gt;

&lt;p&gt;Many times, what looks like GICP failing to converge is actually a TF error from the very beginning.&lt;/p&gt;

&lt;p&gt;This kind of problem is painful because it may not produce an obvious error. It just remains consistently wrong.&lt;/p&gt;

&lt;h3&gt;
  
  
  10.4 Downsampling Parameters Must Be Adjusted According to Map Scale
&lt;/h3&gt;

&lt;p&gt;Both KISS-Matcher and small_gicp involve point cloud downsampling.&lt;/p&gt;

&lt;p&gt;Common parameters include:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;voxel_resolution
global_leaf_size
registered_leaf_size
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the voxel size is too small, computation and memory pressure increase.&lt;/p&gt;

&lt;p&gt;If the voxel size is too large, geometric details are lost and matching quality decreases.&lt;/p&gt;

&lt;p&gt;Therefore, these parameters should not be copied blindly. They need to be adjusted based on map size, point cloud density, and hardware performance.&lt;/p&gt;

&lt;p&gt;There is no silver bullet for parameter tuning. There is only repeated testing.&lt;/p&gt;

&lt;p&gt;This is also one of the simplest truths in robotics development.&lt;/p&gt;




&lt;h2&gt;
  
  
  11. Summary
&lt;/h2&gt;

&lt;p&gt;The core of this ROS 2 3D LiDAR autonomous navigation system is not simply making Nav2 run. Instead, it focuses on two goals.&lt;/p&gt;

&lt;p&gt;First, it uses &lt;strong&gt;KISS-Matcher + small_gicp&lt;/strong&gt; to achieve global relocalization.&lt;/p&gt;

&lt;p&gt;KISS-Matcher performs global coarse registration when there is no accurate initial pose. small_gicp performs local fine registration and continuous tracking. The system eventually continuously publishes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;map -&amp;gt; odom
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This provides stable global localization input for Nav2.&lt;/p&gt;

&lt;p&gt;Second, the overall system adopts a decoupled design.&lt;/p&gt;

&lt;p&gt;LIO, relocalization, Nav2, robot description, and simulation modules communicate through standard ROS 2 interfaces as much as possible, making it easier to switch between:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;FAST-LIO / Point-LIO

small_gicp / ICP / KISS-Matcher + small_gicp

simulation environment / real robot environment
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The system is not perfect yet, but it has already solved the problem I cared about most:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The robot does not have to start from a fixed position every time, nor does it need to fully rely on a manually provided initial pose. Instead, it can attempt global relocalization through 3D point clouds.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In one sentence:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This is a ROS 2-based 3D LiDAR autonomous navigation system centered on global relocalization and designed around modular decoupling.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It is still not perfect, but at least it has evolved from “it runs, so do not touch anything” to “I know where it can move, and I also know which part may explode if it moves.”&lt;/p&gt;

&lt;p&gt;For a ROS 2 robot navigation project, that already counts as a meaningful stage victory.&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>github</category>
      <category>opensource</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
