No version for distro humble showing github. Known supported distros are highlighted in the buttons above.
Package symbol

lidar_localization_ros2 package from lidar_localization_ros2 repo

lidar_localization_ros2

ROS Distro
github

Package Summary

Version 1.14.0
License BSD2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/rsasaki0109/lidar_localization_ros2.git
VCS Type git
VCS Version main
Last Updated 2026-12-01
Dev Status UNKNOWN
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

ROS 2 LiDAR localization with Nav2 integration, replay helpers, and benchmarking tools.

Maintainers

  • ryohei sasaki

Authors

No additional authors.

lidar_localization_ros2

Map-based 3D LiDAR localization for ROS 2 and Nav2.

build ROS 2 Jazzy ROS 2 Humble ROS 2 Foxy License BSD 2 Clause Sponsor on GitHub

Handheld outdoor run tracked on a prior point-cloud map; the estimate follows the ground truth for the whole run

Handheld Livox MID-360, ~390 m outdoors on a prior map, including stretches where the scans do not match the map and a section outside it. Each scan is matched to the map with NDT; RKO-LIO odometry predicts the motion between scans and carries the pose where matching fails. The error is 0.26 m RMSE for the whole run, in an offline replay started from the ground-truth pose (Koide Hard Point Cloud Localization Dataset outdoor_hard_02b, CC BY 4.0). How this was made · more runs

A Unitree Go2 starts with no pose on a map from another recording; ranked candidates appear all over the map, the best one is accepted, the scan snaps onto the map and the robot is tracked out of the room and down the stairs

Global localization on a Unitree Go2 (upside-down Livox MID-360), started with no initial pose, on a map from a different recording: the map is built from the run Long_Stairs, the scans come from the run Outdoor2, recorded 1.5 h later along the same route (the room was not rearranged in between). The quickstart searches the whole map: each query returns 32 ranked places (circles sized by score) in 2.6 s, and the answer is accepted when two queries agree after the odometry motion. The first pose came 13.3 s into the run, 6.4 s after the first search, 0.01 m from the motion-capture ground truth. Tracking then follows the robot out of the capture room and down the long staircase, within 0.02 m (median) of the ground truth where it exists (the room). Offline replay at 1× (JEPLO dataset, GPL-3.0; this GIF is derived from it and shared under the same licence). How this was made · pairs with moved props, including failures

Give it a point cloud map (.pcd or .ply) and a LiDAR stream; it publishes the robot pose in the map. It finds the starting pose by itself, uses odometry and IMU when you have them, and works standalone or as the localization source for Nav2.

Where to start

You want to Go to
Localize your robot on a map you already have Install, then Quick start
Run it on a Unitree Go2 or another MID-360 robot Go2 / MID-360 in five minutes
Navigate with Nav2 Nav2
Try it without a robot Run the public dataset
See how accurate it is Benchmark
Fix a bringup that does not work Troubleshooting

Install

ROS 2 Jazzy is the main target; Humble is supported. Foxy is end-of-life and supported on a best-effort basis: CI builds and tests it, and its differences are listed in the changelog under Unreleased.

All of them build from main. The old foxy, humble and jazzy branches are no longer kept; their last commits are the tags archive/foxy, archive/humble and archive/jazzy. ROS 2 Dashing, which main does not support, has the frozen dashing branch.

mkdir -p ~/lidarloc_ws/src
cd ~/lidarloc_ws/src
git clone https://github.com/rsasaki0109/lidar_localization_ros2.git
cd lidar_localization_ros2
scripts/bootstrap_colcon_workspace.sh --build
source ~/lidarloc_ws/install/setup.bash

This builds ndt_omp_ros2 and this package, about 30 minutes on an 8-core machine. small_gicp is optional (SMALL_GICP and SMALL_VGICP backends): on Jazzy, sudo apt install ros-jazzy-small-gicp-vendor before building is enough. For Humble, a manual or no-sudo build, see local build.

No ROS install? Build the Docker image and check it in one command:

docker build -f docker/Dockerfile -t lidar_localization_ros2 .
docker run --rm lidar_localization_ros2 /ws/src/lidar_localization_ros2/docker/smoke_status.sh

Quick start

  1. Start the LiDAR driver, and odometry if you have it.
  2. Run quickstart with your map:
   ros2 run lidar_localization_ros2 quickstart.py --map /absolute/path/to/map.pcd
   
  1. Check that it is tracking:
   ros2 run lidar_localization_ros2 check_lidar_localization_bringup.py --profile standalone
   

Quickstart finds the cloud and IMU topics, /clock, an odom -> base TF and the LiDAR frame, and prints what it picked on its Discovery: line. Then it starts the localizer and RViz. On the first run it searches the whole map for the robot; next time it restores the pose saved for the same map. If the search finds no safe match, it asks you for 2D Pose Estimate in RViz (press P, click the robot, drag along its heading) instead of guessing.

While it runs, the terminal prints one line whenever tracking starts, weakens, is lost or comes back, with what to do about it, and RViz shows the same status above the

File truncated at 100 lines see the full file

CHANGELOG

Changelog

Unreleased

1.14.0 - 2026-12-01

Upgrading: two behaviours change by default, both only for quickstart.py with odometry prediction on (the odom TF discovered, or --odom-tf-prediction), under every profile, and both can be turned off; two fixes change behaviour for everyone. Without odometry prediction, and for the node, the config generator, param/mid360_legged.yaml and quickstart.launch.py called directly, every setting keeps its 1.13.0 default except those fixes, and every new setting defaults to off.

  • Quickstart sets seed_correction_guard_tilt_deg: 5.0 (#373): a scan whose registration would tilt map -> odom more than 5 degrees from where it was once the guards warmed up is rejected. It assumes the odometry carries the vertical; with a planar (wheel) odometry on ramps, restore with --seed-correction-tilt-deg 0.
  • Quickstart sets seed_correction_guard_odometry_jump_release_m: 0.3 (#366), with the agreement release on (its default of 4 with odometry prediction). To restore: --seed-correction-odometry-jump-release-m 0.
  • The reinitialization supervisor’s dropout waiver is bounded (#376): after an odom TF gap it releases an answer only within odometry_dropout_max_speed_mps (new, 5 m/s; 0 = the unbounded waiver of 1.13.0) over the gap, plus the bridged motion, plus 2 m; a farther answer waits for a second one that agrees. A sensor carried faster than that through a gap needs a higher value.
  • A global fix published at startup now takes the roll and pitch of the odometry at publication, not those of its scan (#368), and the seed guards’ warmup no longer restarts for a gap the node made itself while aligning a slow scan (#369).
  • The package depends on vision_msgs (#375, #374): Detection3DArray carries dynamic_objects_topic and the new detector’s output. The build still works without it (the node then warns that the topic is ignored); install ros-$ROS_DISTRO-vision-msgs (rosdep does) to use them. CI builds the node on Foxy, Humble and Jazzy (Foxy’s vision_msgs 2.x layout is handled at compile time); the detector needs vision_msgs 4 (Humble, Jazzy).
  • C API callers must rebuild: lidarloc_tracking gained fields at its end (the degeneracy remapping’s three in #360, the odometry jump release’s three in #363, and seed_correction_guard_tilt_deg in #373) and lidarloc_result gained degeneracy_remapped, degeneracy_dropped_m and horizontal_constraint. Take the new fields from lidarloc_default_tracking, which leaves each off.

The release adds the opt-in solution remapping of degenerate alignments (#360), the odometry jump release (#363, a quickstart default since #366), the tilt guard that fixes the Koide outdoor_hard_02b 115-160 s loss (#373), exclusion of detected objects from registration (#375) with a map-difference object detector (#374), dynamic obstacle tools for your own bags and a walking crowd (#370, #371), the negative result of tracking-based prefiltering (#372), and fixes to the startup roll and pitch (#368), the guards’ warmup (#369) and the reinitialization dropout waiver (#376).

Fixed: a reinitialization reset onto a wrong G2 answer after a short odometry stall. After an odom TF gap of more than 2 s in the last 120 s, the reinitialization supervisor reset on a single G2 answer without the second, agreeing one it otherwise waits for (the dropout waiver, kept for a sensor carried while covered). On a Koide outdoor_hard_02b crowd run, RKO-LIO stopped for 3.7 s while G2 searched; 18 s later, with the bridged pose 0.1 m from the ground truth, an answer 63 m off (score 0.33, registration fitness 4.05) passed every other gate and was published. Seed motion compensation then moved it 61 m on a “velocity” from two answers 100 m apart (the earlier one withheld as aliased), although the reset was stamped with its scan and the localizer carries such a reset to the present by odometry: the run was lost, 64 m at most. Now:

  • the waiver releases an answer only within reach of the bridged pose before the first gap: odometry_dropout_max_speed_mps (new supervisor parameter, default 5 m/s; 0 = the unbounded waiver) over each gap, plus the bridged motion between and after the gaps, plus 2 m. A farther answer waits for a second one that agrees after odometry, as without a dropout, and the log says so (... but the answer is N m from the bridged pose before the gap ...). A carried sensor (Koide outdoor_kidnap: up to 2.5 m/s) stays within it;
  • with an odom bridge pose at the answer’s scan stamp, seed motion compensation is skipped (the localizer carries the reset from its scan stamp by odometry); without odometry it is unchanged.

A replay of the run’s logged supervisor inputs (G2 answers, odom TF gap, bridged pose) reproduces the published reset to the centimetre on the old code and withholds it now (test_dropout_waiver_is_bounded_by_the_motion_the_gap_can_hide). In the synthetic comparison (experiments/odometry_dropout_confirmation) the bounded waiver passes every fixture the old one passed, with the same recovery times, and both 02b fixtures where the answer after a gap was wrong. Not measured on outdoor_kidnap_b (not on this machine) (measured).

New: exclude detected objects from registration (dynamic_objects_topic, off by default). Given a vision_msgs/Detection3DArray topic (stamped with the scan the detections came from; boxes in the map frame or any frame with TF), the node leaves the scan points inside the boxes, grown by dynamic_objects_margin_m (0.3), out of every alignment attempt of a scan, the NDT initializer and the local reacquisition, after deskew and the voxel filter and before the map-distance prefilter. Boxes in the map frame are moved into the scan by the scan’s seed; other frames go through TF (from the detection’s stamp to the scan’s, across the odometry frame). A scan uses the array stamped nearest to it within dynamic_objects_max_age_sec (0.5); detections scored below dynamic_objects_min_score (0) are dropped; a scan that would lose more than dynamic_objects_max_excluded_ratio (0.5) of its points, or keep fewer than min_registration_points, is aligned whole. The subscription has its own callback group. /alignment_status gains dynamic_objects_status, dynamic_objects_boxes, dynamic_objects_excluded_points and dynamic_objects_age_sec (also kept by tools/benchmark/record_pose.py); quickstart.py and create_lidar_localization_config.py gain --dynamic-objects-topic. The box test is a header without ROS types (dynamic_object_exclusion.hpp, unit-tested). The package now depends on vision_msgs (Foxy’s 2.x message layout is handled at compile time; built and tested on Jazzy only here); a build without it still works and the

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged lidar_localization_ros2 at Robotics Stack Exchange

No version for distro jazzy showing github. Known supported distros are highlighted in the buttons above.
Package symbol

lidar_localization_ros2 package from lidar_localization_ros2 repo

lidar_localization_ros2

ROS Distro
github

Package Summary

Version 1.14.0
License BSD2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/rsasaki0109/lidar_localization_ros2.git
VCS Type git
VCS Version main
Last Updated 2026-12-01
Dev Status UNKNOWN
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

ROS 2 LiDAR localization with Nav2 integration, replay helpers, and benchmarking tools.

Maintainers

  • ryohei sasaki

Authors

No additional authors.

lidar_localization_ros2

Map-based 3D LiDAR localization for ROS 2 and Nav2.

build ROS 2 Jazzy ROS 2 Humble ROS 2 Foxy License BSD 2 Clause Sponsor on GitHub

Handheld outdoor run tracked on a prior point-cloud map; the estimate follows the ground truth for the whole run

Handheld Livox MID-360, ~390 m outdoors on a prior map, including stretches where the scans do not match the map and a section outside it. Each scan is matched to the map with NDT; RKO-LIO odometry predicts the motion between scans and carries the pose where matching fails. The error is 0.26 m RMSE for the whole run, in an offline replay started from the ground-truth pose (Koide Hard Point Cloud Localization Dataset outdoor_hard_02b, CC BY 4.0). How this was made · more runs

A Unitree Go2 starts with no pose on a map from another recording; ranked candidates appear all over the map, the best one is accepted, the scan snaps onto the map and the robot is tracked out of the room and down the stairs

Global localization on a Unitree Go2 (upside-down Livox MID-360), started with no initial pose, on a map from a different recording: the map is built from the run Long_Stairs, the scans come from the run Outdoor2, recorded 1.5 h later along the same route (the room was not rearranged in between). The quickstart searches the whole map: each query returns 32 ranked places (circles sized by score) in 2.6 s, and the answer is accepted when two queries agree after the odometry motion. The first pose came 13.3 s into the run, 6.4 s after the first search, 0.01 m from the motion-capture ground truth. Tracking then follows the robot out of the capture room and down the long staircase, within 0.02 m (median) of the ground truth where it exists (the room). Offline replay at 1× (JEPLO dataset, GPL-3.0; this GIF is derived from it and shared under the same licence). How this was made · pairs with moved props, including failures

Give it a point cloud map (.pcd or .ply) and a LiDAR stream; it publishes the robot pose in the map. It finds the starting pose by itself, uses odometry and IMU when you have them, and works standalone or as the localization source for Nav2.

Where to start

You want to Go to
Localize your robot on a map you already have Install, then Quick start
Run it on a Unitree Go2 or another MID-360 robot Go2 / MID-360 in five minutes
Navigate with Nav2 Nav2
Try it without a robot Run the public dataset
See how accurate it is Benchmark
Fix a bringup that does not work Troubleshooting

Install

ROS 2 Jazzy is the main target; Humble is supported. Foxy is end-of-life and supported on a best-effort basis: CI builds and tests it, and its differences are listed in the changelog under Unreleased.

All of them build from main. The old foxy, humble and jazzy branches are no longer kept; their last commits are the tags archive/foxy, archive/humble and archive/jazzy. ROS 2 Dashing, which main does not support, has the frozen dashing branch.

mkdir -p ~/lidarloc_ws/src
cd ~/lidarloc_ws/src
git clone https://github.com/rsasaki0109/lidar_localization_ros2.git
cd lidar_localization_ros2
scripts/bootstrap_colcon_workspace.sh --build
source ~/lidarloc_ws/install/setup.bash

This builds ndt_omp_ros2 and this package, about 30 minutes on an 8-core machine. small_gicp is optional (SMALL_GICP and SMALL_VGICP backends): on Jazzy, sudo apt install ros-jazzy-small-gicp-vendor before building is enough. For Humble, a manual or no-sudo build, see local build.

No ROS install? Build the Docker image and check it in one command:

docker build -f docker/Dockerfile -t lidar_localization_ros2 .
docker run --rm lidar_localization_ros2 /ws/src/lidar_localization_ros2/docker/smoke_status.sh

Quick start

  1. Start the LiDAR driver, and odometry if you have it.
  2. Run quickstart with your map:
   ros2 run lidar_localization_ros2 quickstart.py --map /absolute/path/to/map.pcd
   
  1. Check that it is tracking:
   ros2 run lidar_localization_ros2 check_lidar_localization_bringup.py --profile standalone
   

Quickstart finds the cloud and IMU topics, /clock, an odom -> base TF and the LiDAR frame, and prints what it picked on its Discovery: line. Then it starts the localizer and RViz. On the first run it searches the whole map for the robot; next time it restores the pose saved for the same map. If the search finds no safe match, it asks you for 2D Pose Estimate in RViz (press P, click the robot, drag along its heading) instead of guessing.

While it runs, the terminal prints one line whenever tracking starts, weakens, is lost or comes back, with what to do about it, and RViz shows the same status above the

File truncated at 100 lines see the full file

CHANGELOG

Changelog

Unreleased

1.14.0 - 2026-12-01

Upgrading: two behaviours change by default, both only for quickstart.py with odometry prediction on (the odom TF discovered, or --odom-tf-prediction), under every profile, and both can be turned off; two fixes change behaviour for everyone. Without odometry prediction, and for the node, the config generator, param/mid360_legged.yaml and quickstart.launch.py called directly, every setting keeps its 1.13.0 default except those fixes, and every new setting defaults to off.

  • Quickstart sets seed_correction_guard_tilt_deg: 5.0 (#373): a scan whose registration would tilt map -> odom more than 5 degrees from where it was once the guards warmed up is rejected. It assumes the odometry carries the vertical; with a planar (wheel) odometry on ramps, restore with --seed-correction-tilt-deg 0.
  • Quickstart sets seed_correction_guard_odometry_jump_release_m: 0.3 (#366), with the agreement release on (its default of 4 with odometry prediction). To restore: --seed-correction-odometry-jump-release-m 0.
  • The reinitialization supervisor’s dropout waiver is bounded (#376): after an odom TF gap it releases an answer only within odometry_dropout_max_speed_mps (new, 5 m/s; 0 = the unbounded waiver of 1.13.0) over the gap, plus the bridged motion, plus 2 m; a farther answer waits for a second one that agrees. A sensor carried faster than that through a gap needs a higher value.
  • A global fix published at startup now takes the roll and pitch of the odometry at publication, not those of its scan (#368), and the seed guards’ warmup no longer restarts for a gap the node made itself while aligning a slow scan (#369).
  • The package depends on vision_msgs (#375, #374): Detection3DArray carries dynamic_objects_topic and the new detector’s output. The build still works without it (the node then warns that the topic is ignored); install ros-$ROS_DISTRO-vision-msgs (rosdep does) to use them. CI builds the node on Foxy, Humble and Jazzy (Foxy’s vision_msgs 2.x layout is handled at compile time); the detector needs vision_msgs 4 (Humble, Jazzy).
  • C API callers must rebuild: lidarloc_tracking gained fields at its end (the degeneracy remapping’s three in #360, the odometry jump release’s three in #363, and seed_correction_guard_tilt_deg in #373) and lidarloc_result gained degeneracy_remapped, degeneracy_dropped_m and horizontal_constraint. Take the new fields from lidarloc_default_tracking, which leaves each off.

The release adds the opt-in solution remapping of degenerate alignments (#360), the odometry jump release (#363, a quickstart default since #366), the tilt guard that fixes the Koide outdoor_hard_02b 115-160 s loss (#373), exclusion of detected objects from registration (#375) with a map-difference object detector (#374), dynamic obstacle tools for your own bags and a walking crowd (#370, #371), the negative result of tracking-based prefiltering (#372), and fixes to the startup roll and pitch (#368), the guards’ warmup (#369) and the reinitialization dropout waiver (#376).

Fixed: a reinitialization reset onto a wrong G2 answer after a short odometry stall. After an odom TF gap of more than 2 s in the last 120 s, the reinitialization supervisor reset on a single G2 answer without the second, agreeing one it otherwise waits for (the dropout waiver, kept for a sensor carried while covered). On a Koide outdoor_hard_02b crowd run, RKO-LIO stopped for 3.7 s while G2 searched; 18 s later, with the bridged pose 0.1 m from the ground truth, an answer 63 m off (score 0.33, registration fitness 4.05) passed every other gate and was published. Seed motion compensation then moved it 61 m on a “velocity” from two answers 100 m apart (the earlier one withheld as aliased), although the reset was stamped with its scan and the localizer carries such a reset to the present by odometry: the run was lost, 64 m at most. Now:

  • the waiver releases an answer only within reach of the bridged pose before the first gap: odometry_dropout_max_speed_mps (new supervisor parameter, default 5 m/s; 0 = the unbounded waiver) over each gap, plus the bridged motion between and after the gaps, plus 2 m. A farther answer waits for a second one that agrees after odometry, as without a dropout, and the log says so (... but the answer is N m from the bridged pose before the gap ...). A carried sensor (Koide outdoor_kidnap: up to 2.5 m/s) stays within it;
  • with an odom bridge pose at the answer’s scan stamp, seed motion compensation is skipped (the localizer carries the reset from its scan stamp by odometry); without odometry it is unchanged.

A replay of the run’s logged supervisor inputs (G2 answers, odom TF gap, bridged pose) reproduces the published reset to the centimetre on the old code and withholds it now (test_dropout_waiver_is_bounded_by_the_motion_the_gap_can_hide). In the synthetic comparison (experiments/odometry_dropout_confirmation) the bounded waiver passes every fixture the old one passed, with the same recovery times, and both 02b fixtures where the answer after a gap was wrong. Not measured on outdoor_kidnap_b (not on this machine) (measured).

New: exclude detected objects from registration (dynamic_objects_topic, off by default). Given a vision_msgs/Detection3DArray topic (stamped with the scan the detections came from; boxes in the map frame or any frame with TF), the node leaves the scan points inside the boxes, grown by dynamic_objects_margin_m (0.3), out of every alignment attempt of a scan, the NDT initializer and the local reacquisition, after deskew and the voxel filter and before the map-distance prefilter. Boxes in the map frame are moved into the scan by the scan’s seed; other frames go through TF (from the detection’s stamp to the scan’s, across the odometry frame). A scan uses the array stamped nearest to it within dynamic_objects_max_age_sec (0.5); detections scored below dynamic_objects_min_score (0) are dropped; a scan that would lose more than dynamic_objects_max_excluded_ratio (0.5) of its points, or keep fewer than min_registration_points, is aligned whole. The subscription has its own callback group. /alignment_status gains dynamic_objects_status, dynamic_objects_boxes, dynamic_objects_excluded_points and dynamic_objects_age_sec (also kept by tools/benchmark/record_pose.py); quickstart.py and create_lidar_localization_config.py gain --dynamic-objects-topic. The box test is a header without ROS types (dynamic_object_exclusion.hpp, unit-tested). The package now depends on vision_msgs (Foxy’s 2.x message layout is handled at compile time; built and tested on Jazzy only here); a build without it still works and the

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged lidar_localization_ros2 at Robotics Stack Exchange

No version for distro kilted showing github. Known supported distros are highlighted in the buttons above.
Package symbol

lidar_localization_ros2 package from lidar_localization_ros2 repo

lidar_localization_ros2

ROS Distro
github

Package Summary

Version 1.14.0
License BSD2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/rsasaki0109/lidar_localization_ros2.git
VCS Type git
VCS Version main
Last Updated 2026-12-01
Dev Status UNKNOWN
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

ROS 2 LiDAR localization with Nav2 integration, replay helpers, and benchmarking tools.

Maintainers

  • ryohei sasaki

Authors

No additional authors.

lidar_localization_ros2

Map-based 3D LiDAR localization for ROS 2 and Nav2.

build ROS 2 Jazzy ROS 2 Humble ROS 2 Foxy License BSD 2 Clause Sponsor on GitHub

Handheld outdoor run tracked on a prior point-cloud map; the estimate follows the ground truth for the whole run

Handheld Livox MID-360, ~390 m outdoors on a prior map, including stretches where the scans do not match the map and a section outside it. Each scan is matched to the map with NDT; RKO-LIO odometry predicts the motion between scans and carries the pose where matching fails. The error is 0.26 m RMSE for the whole run, in an offline replay started from the ground-truth pose (Koide Hard Point Cloud Localization Dataset outdoor_hard_02b, CC BY 4.0). How this was made · more runs

A Unitree Go2 starts with no pose on a map from another recording; ranked candidates appear all over the map, the best one is accepted, the scan snaps onto the map and the robot is tracked out of the room and down the stairs

Global localization on a Unitree Go2 (upside-down Livox MID-360), started with no initial pose, on a map from a different recording: the map is built from the run Long_Stairs, the scans come from the run Outdoor2, recorded 1.5 h later along the same route (the room was not rearranged in between). The quickstart searches the whole map: each query returns 32 ranked places (circles sized by score) in 2.6 s, and the answer is accepted when two queries agree after the odometry motion. The first pose came 13.3 s into the run, 6.4 s after the first search, 0.01 m from the motion-capture ground truth. Tracking then follows the robot out of the capture room and down the long staircase, within 0.02 m (median) of the ground truth where it exists (the room). Offline replay at 1× (JEPLO dataset, GPL-3.0; this GIF is derived from it and shared under the same licence). How this was made · pairs with moved props, including failures

Give it a point cloud map (.pcd or .ply) and a LiDAR stream; it publishes the robot pose in the map. It finds the starting pose by itself, uses odometry and IMU when you have them, and works standalone or as the localization source for Nav2.

Where to start

You want to Go to
Localize your robot on a map you already have Install, then Quick start
Run it on a Unitree Go2 or another MID-360 robot Go2 / MID-360 in five minutes
Navigate with Nav2 Nav2
Try it without a robot Run the public dataset
See how accurate it is Benchmark
Fix a bringup that does not work Troubleshooting

Install

ROS 2 Jazzy is the main target; Humble is supported. Foxy is end-of-life and supported on a best-effort basis: CI builds and tests it, and its differences are listed in the changelog under Unreleased.

All of them build from main. The old foxy, humble and jazzy branches are no longer kept; their last commits are the tags archive/foxy, archive/humble and archive/jazzy. ROS 2 Dashing, which main does not support, has the frozen dashing branch.

mkdir -p ~/lidarloc_ws/src
cd ~/lidarloc_ws/src
git clone https://github.com/rsasaki0109/lidar_localization_ros2.git
cd lidar_localization_ros2
scripts/bootstrap_colcon_workspace.sh --build
source ~/lidarloc_ws/install/setup.bash

This builds ndt_omp_ros2 and this package, about 30 minutes on an 8-core machine. small_gicp is optional (SMALL_GICP and SMALL_VGICP backends): on Jazzy, sudo apt install ros-jazzy-small-gicp-vendor before building is enough. For Humble, a manual or no-sudo build, see local build.

No ROS install? Build the Docker image and check it in one command:

docker build -f docker/Dockerfile -t lidar_localization_ros2 .
docker run --rm lidar_localization_ros2 /ws/src/lidar_localization_ros2/docker/smoke_status.sh

Quick start

  1. Start the LiDAR driver, and odometry if you have it.
  2. Run quickstart with your map:
   ros2 run lidar_localization_ros2 quickstart.py --map /absolute/path/to/map.pcd
   
  1. Check that it is tracking:
   ros2 run lidar_localization_ros2 check_lidar_localization_bringup.py --profile standalone
   

Quickstart finds the cloud and IMU topics, /clock, an odom -> base TF and the LiDAR frame, and prints what it picked on its Discovery: line. Then it starts the localizer and RViz. On the first run it searches the whole map for the robot; next time it restores the pose saved for the same map. If the search finds no safe match, it asks you for 2D Pose Estimate in RViz (press P, click the robot, drag along its heading) instead of guessing.

While it runs, the terminal prints one line whenever tracking starts, weakens, is lost or comes back, with what to do about it, and RViz shows the same status above the

File truncated at 100 lines see the full file

CHANGELOG

Changelog

Unreleased

1.14.0 - 2026-12-01

Upgrading: two behaviours change by default, both only for quickstart.py with odometry prediction on (the odom TF discovered, or --odom-tf-prediction), under every profile, and both can be turned off; two fixes change behaviour for everyone. Without odometry prediction, and for the node, the config generator, param/mid360_legged.yaml and quickstart.launch.py called directly, every setting keeps its 1.13.0 default except those fixes, and every new setting defaults to off.

  • Quickstart sets seed_correction_guard_tilt_deg: 5.0 (#373): a scan whose registration would tilt map -> odom more than 5 degrees from where it was once the guards warmed up is rejected. It assumes the odometry carries the vertical; with a planar (wheel) odometry on ramps, restore with --seed-correction-tilt-deg 0.
  • Quickstart sets seed_correction_guard_odometry_jump_release_m: 0.3 (#366), with the agreement release on (its default of 4 with odometry prediction). To restore: --seed-correction-odometry-jump-release-m 0.
  • The reinitialization supervisor’s dropout waiver is bounded (#376): after an odom TF gap it releases an answer only within odometry_dropout_max_speed_mps (new, 5 m/s; 0 = the unbounded waiver of 1.13.0) over the gap, plus the bridged motion, plus 2 m; a farther answer waits for a second one that agrees. A sensor carried faster than that through a gap needs a higher value.
  • A global fix published at startup now takes the roll and pitch of the odometry at publication, not those of its scan (#368), and the seed guards’ warmup no longer restarts for a gap the node made itself while aligning a slow scan (#369).
  • The package depends on vision_msgs (#375, #374): Detection3DArray carries dynamic_objects_topic and the new detector’s output. The build still works without it (the node then warns that the topic is ignored); install ros-$ROS_DISTRO-vision-msgs (rosdep does) to use them. CI builds the node on Foxy, Humble and Jazzy (Foxy’s vision_msgs 2.x layout is handled at compile time); the detector needs vision_msgs 4 (Humble, Jazzy).
  • C API callers must rebuild: lidarloc_tracking gained fields at its end (the degeneracy remapping’s three in #360, the odometry jump release’s three in #363, and seed_correction_guard_tilt_deg in #373) and lidarloc_result gained degeneracy_remapped, degeneracy_dropped_m and horizontal_constraint. Take the new fields from lidarloc_default_tracking, which leaves each off.

The release adds the opt-in solution remapping of degenerate alignments (#360), the odometry jump release (#363, a quickstart default since #366), the tilt guard that fixes the Koide outdoor_hard_02b 115-160 s loss (#373), exclusion of detected objects from registration (#375) with a map-difference object detector (#374), dynamic obstacle tools for your own bags and a walking crowd (#370, #371), the negative result of tracking-based prefiltering (#372), and fixes to the startup roll and pitch (#368), the guards’ warmup (#369) and the reinitialization dropout waiver (#376).

Fixed: a reinitialization reset onto a wrong G2 answer after a short odometry stall. After an odom TF gap of more than 2 s in the last 120 s, the reinitialization supervisor reset on a single G2 answer without the second, agreeing one it otherwise waits for (the dropout waiver, kept for a sensor carried while covered). On a Koide outdoor_hard_02b crowd run, RKO-LIO stopped for 3.7 s while G2 searched; 18 s later, with the bridged pose 0.1 m from the ground truth, an answer 63 m off (score 0.33, registration fitness 4.05) passed every other gate and was published. Seed motion compensation then moved it 61 m on a “velocity” from two answers 100 m apart (the earlier one withheld as aliased), although the reset was stamped with its scan and the localizer carries such a reset to the present by odometry: the run was lost, 64 m at most. Now:

  • the waiver releases an answer only within reach of the bridged pose before the first gap: odometry_dropout_max_speed_mps (new supervisor parameter, default 5 m/s; 0 = the unbounded waiver) over each gap, plus the bridged motion between and after the gaps, plus 2 m. A farther answer waits for a second one that agrees after odometry, as without a dropout, and the log says so (... but the answer is N m from the bridged pose before the gap ...). A carried sensor (Koide outdoor_kidnap: up to 2.5 m/s) stays within it;
  • with an odom bridge pose at the answer’s scan stamp, seed motion compensation is skipped (the localizer carries the reset from its scan stamp by odometry); without odometry it is unchanged.

A replay of the run’s logged supervisor inputs (G2 answers, odom TF gap, bridged pose) reproduces the published reset to the centimetre on the old code and withholds it now (test_dropout_waiver_is_bounded_by_the_motion_the_gap_can_hide). In the synthetic comparison (experiments/odometry_dropout_confirmation) the bounded waiver passes every fixture the old one passed, with the same recovery times, and both 02b fixtures where the answer after a gap was wrong. Not measured on outdoor_kidnap_b (not on this machine) (measured).

New: exclude detected objects from registration (dynamic_objects_topic, off by default). Given a vision_msgs/Detection3DArray topic (stamped with the scan the detections came from; boxes in the map frame or any frame with TF), the node leaves the scan points inside the boxes, grown by dynamic_objects_margin_m (0.3), out of every alignment attempt of a scan, the NDT initializer and the local reacquisition, after deskew and the voxel filter and before the map-distance prefilter. Boxes in the map frame are moved into the scan by the scan’s seed; other frames go through TF (from the detection’s stamp to the scan’s, across the odometry frame). A scan uses the array stamped nearest to it within dynamic_objects_max_age_sec (0.5); detections scored below dynamic_objects_min_score (0) are dropped; a scan that would lose more than dynamic_objects_max_excluded_ratio (0.5) of its points, or keep fewer than min_registration_points, is aligned whole. The subscription has its own callback group. /alignment_status gains dynamic_objects_status, dynamic_objects_boxes, dynamic_objects_excluded_points and dynamic_objects_age_sec (also kept by tools/benchmark/record_pose.py); quickstart.py and create_lidar_localization_config.py gain --dynamic-objects-topic. The box test is a header without ROS types (dynamic_object_exclusion.hpp, unit-tested). The package now depends on vision_msgs (Foxy’s 2.x message layout is handled at compile time; built and tested on Jazzy only here); a build without it still works and the

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged lidar_localization_ros2 at Robotics Stack Exchange

No version for distro lyrical showing github. Known supported distros are highlighted in the buttons above.
Package symbol

lidar_localization_ros2 package from lidar_localization_ros2 repo

lidar_localization_ros2

ROS Distro
github

Package Summary

Version 1.14.0
License BSD2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/rsasaki0109/lidar_localization_ros2.git
VCS Type git
VCS Version main
Last Updated 2026-12-01
Dev Status UNKNOWN
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

ROS 2 LiDAR localization with Nav2 integration, replay helpers, and benchmarking tools.

Maintainers

  • ryohei sasaki

Authors

No additional authors.

lidar_localization_ros2

Map-based 3D LiDAR localization for ROS 2 and Nav2.

build ROS 2 Jazzy ROS 2 Humble ROS 2 Foxy License BSD 2 Clause Sponsor on GitHub

Handheld outdoor run tracked on a prior point-cloud map; the estimate follows the ground truth for the whole run

Handheld Livox MID-360, ~390 m outdoors on a prior map, including stretches where the scans do not match the map and a section outside it. Each scan is matched to the map with NDT; RKO-LIO odometry predicts the motion between scans and carries the pose where matching fails. The error is 0.26 m RMSE for the whole run, in an offline replay started from the ground-truth pose (Koide Hard Point Cloud Localization Dataset outdoor_hard_02b, CC BY 4.0). How this was made · more runs

A Unitree Go2 starts with no pose on a map from another recording; ranked candidates appear all over the map, the best one is accepted, the scan snaps onto the map and the robot is tracked out of the room and down the stairs

Global localization on a Unitree Go2 (upside-down Livox MID-360), started with no initial pose, on a map from a different recording: the map is built from the run Long_Stairs, the scans come from the run Outdoor2, recorded 1.5 h later along the same route (the room was not rearranged in between). The quickstart searches the whole map: each query returns 32 ranked places (circles sized by score) in 2.6 s, and the answer is accepted when two queries agree after the odometry motion. The first pose came 13.3 s into the run, 6.4 s after the first search, 0.01 m from the motion-capture ground truth. Tracking then follows the robot out of the capture room and down the long staircase, within 0.02 m (median) of the ground truth where it exists (the room). Offline replay at 1× (JEPLO dataset, GPL-3.0; this GIF is derived from it and shared under the same licence). How this was made · pairs with moved props, including failures

Give it a point cloud map (.pcd or .ply) and a LiDAR stream; it publishes the robot pose in the map. It finds the starting pose by itself, uses odometry and IMU when you have them, and works standalone or as the localization source for Nav2.

Where to start

You want to Go to
Localize your robot on a map you already have Install, then Quick start
Run it on a Unitree Go2 or another MID-360 robot Go2 / MID-360 in five minutes
Navigate with Nav2 Nav2
Try it without a robot Run the public dataset
See how accurate it is Benchmark
Fix a bringup that does not work Troubleshooting

Install

ROS 2 Jazzy is the main target; Humble is supported. Foxy is end-of-life and supported on a best-effort basis: CI builds and tests it, and its differences are listed in the changelog under Unreleased.

All of them build from main. The old foxy, humble and jazzy branches are no longer kept; their last commits are the tags archive/foxy, archive/humble and archive/jazzy. ROS 2 Dashing, which main does not support, has the frozen dashing branch.

mkdir -p ~/lidarloc_ws/src
cd ~/lidarloc_ws/src
git clone https://github.com/rsasaki0109/lidar_localization_ros2.git
cd lidar_localization_ros2
scripts/bootstrap_colcon_workspace.sh --build
source ~/lidarloc_ws/install/setup.bash

This builds ndt_omp_ros2 and this package, about 30 minutes on an 8-core machine. small_gicp is optional (SMALL_GICP and SMALL_VGICP backends): on Jazzy, sudo apt install ros-jazzy-small-gicp-vendor before building is enough. For Humble, a manual or no-sudo build, see local build.

No ROS install? Build the Docker image and check it in one command:

docker build -f docker/Dockerfile -t lidar_localization_ros2 .
docker run --rm lidar_localization_ros2 /ws/src/lidar_localization_ros2/docker/smoke_status.sh

Quick start

  1. Start the LiDAR driver, and odometry if you have it.
  2. Run quickstart with your map:
   ros2 run lidar_localization_ros2 quickstart.py --map /absolute/path/to/map.pcd
   
  1. Check that it is tracking:
   ros2 run lidar_localization_ros2 check_lidar_localization_bringup.py --profile standalone
   

Quickstart finds the cloud and IMU topics, /clock, an odom -> base TF and the LiDAR frame, and prints what it picked on its Discovery: line. Then it starts the localizer and RViz. On the first run it searches the whole map for the robot; next time it restores the pose saved for the same map. If the search finds no safe match, it asks you for 2D Pose Estimate in RViz (press P, click the robot, drag along its heading) instead of guessing.

While it runs, the terminal prints one line whenever tracking starts, weakens, is lost or comes back, with what to do about it, and RViz shows the same status above the

File truncated at 100 lines see the full file

CHANGELOG

Changelog

Unreleased

1.14.0 - 2026-12-01

Upgrading: two behaviours change by default, both only for quickstart.py with odometry prediction on (the odom TF discovered, or --odom-tf-prediction), under every profile, and both can be turned off; two fixes change behaviour for everyone. Without odometry prediction, and for the node, the config generator, param/mid360_legged.yaml and quickstart.launch.py called directly, every setting keeps its 1.13.0 default except those fixes, and every new setting defaults to off.

  • Quickstart sets seed_correction_guard_tilt_deg: 5.0 (#373): a scan whose registration would tilt map -> odom more than 5 degrees from where it was once the guards warmed up is rejected. It assumes the odometry carries the vertical; with a planar (wheel) odometry on ramps, restore with --seed-correction-tilt-deg 0.
  • Quickstart sets seed_correction_guard_odometry_jump_release_m: 0.3 (#366), with the agreement release on (its default of 4 with odometry prediction). To restore: --seed-correction-odometry-jump-release-m 0.
  • The reinitialization supervisor’s dropout waiver is bounded (#376): after an odom TF gap it releases an answer only within odometry_dropout_max_speed_mps (new, 5 m/s; 0 = the unbounded waiver of 1.13.0) over the gap, plus the bridged motion, plus 2 m; a farther answer waits for a second one that agrees. A sensor carried faster than that through a gap needs a higher value.
  • A global fix published at startup now takes the roll and pitch of the odometry at publication, not those of its scan (#368), and the seed guards’ warmup no longer restarts for a gap the node made itself while aligning a slow scan (#369).
  • The package depends on vision_msgs (#375, #374): Detection3DArray carries dynamic_objects_topic and the new detector’s output. The build still works without it (the node then warns that the topic is ignored); install ros-$ROS_DISTRO-vision-msgs (rosdep does) to use them. CI builds the node on Foxy, Humble and Jazzy (Foxy’s vision_msgs 2.x layout is handled at compile time); the detector needs vision_msgs 4 (Humble, Jazzy).
  • C API callers must rebuild: lidarloc_tracking gained fields at its end (the degeneracy remapping’s three in #360, the odometry jump release’s three in #363, and seed_correction_guard_tilt_deg in #373) and lidarloc_result gained degeneracy_remapped, degeneracy_dropped_m and horizontal_constraint. Take the new fields from lidarloc_default_tracking, which leaves each off.

The release adds the opt-in solution remapping of degenerate alignments (#360), the odometry jump release (#363, a quickstart default since #366), the tilt guard that fixes the Koide outdoor_hard_02b 115-160 s loss (#373), exclusion of detected objects from registration (#375) with a map-difference object detector (#374), dynamic obstacle tools for your own bags and a walking crowd (#370, #371), the negative result of tracking-based prefiltering (#372), and fixes to the startup roll and pitch (#368), the guards’ warmup (#369) and the reinitialization dropout waiver (#376).

Fixed: a reinitialization reset onto a wrong G2 answer after a short odometry stall. After an odom TF gap of more than 2 s in the last 120 s, the reinitialization supervisor reset on a single G2 answer without the second, agreeing one it otherwise waits for (the dropout waiver, kept for a sensor carried while covered). On a Koide outdoor_hard_02b crowd run, RKO-LIO stopped for 3.7 s while G2 searched; 18 s later, with the bridged pose 0.1 m from the ground truth, an answer 63 m off (score 0.33, registration fitness 4.05) passed every other gate and was published. Seed motion compensation then moved it 61 m on a “velocity” from two answers 100 m apart (the earlier one withheld as aliased), although the reset was stamped with its scan and the localizer carries such a reset to the present by odometry: the run was lost, 64 m at most. Now:

  • the waiver releases an answer only within reach of the bridged pose before the first gap: odometry_dropout_max_speed_mps (new supervisor parameter, default 5 m/s; 0 = the unbounded waiver) over each gap, plus the bridged motion between and after the gaps, plus 2 m. A farther answer waits for a second one that agrees after odometry, as without a dropout, and the log says so (... but the answer is N m from the bridged pose before the gap ...). A carried sensor (Koide outdoor_kidnap: up to 2.5 m/s) stays within it;
  • with an odom bridge pose at the answer’s scan stamp, seed motion compensation is skipped (the localizer carries the reset from its scan stamp by odometry); without odometry it is unchanged.

A replay of the run’s logged supervisor inputs (G2 answers, odom TF gap, bridged pose) reproduces the published reset to the centimetre on the old code and withholds it now (test_dropout_waiver_is_bounded_by_the_motion_the_gap_can_hide). In the synthetic comparison (experiments/odometry_dropout_confirmation) the bounded waiver passes every fixture the old one passed, with the same recovery times, and both 02b fixtures where the answer after a gap was wrong. Not measured on outdoor_kidnap_b (not on this machine) (measured).

New: exclude detected objects from registration (dynamic_objects_topic, off by default). Given a vision_msgs/Detection3DArray topic (stamped with the scan the detections came from; boxes in the map frame or any frame with TF), the node leaves the scan points inside the boxes, grown by dynamic_objects_margin_m (0.3), out of every alignment attempt of a scan, the NDT initializer and the local reacquisition, after deskew and the voxel filter and before the map-distance prefilter. Boxes in the map frame are moved into the scan by the scan’s seed; other frames go through TF (from the detection’s stamp to the scan’s, across the odometry frame). A scan uses the array stamped nearest to it within dynamic_objects_max_age_sec (0.5); detections scored below dynamic_objects_min_score (0) are dropped; a scan that would lose more than dynamic_objects_max_excluded_ratio (0.5) of its points, or keep fewer than min_registration_points, is aligned whole. The subscription has its own callback group. /alignment_status gains dynamic_objects_status, dynamic_objects_boxes, dynamic_objects_excluded_points and dynamic_objects_age_sec (also kept by tools/benchmark/record_pose.py); quickstart.py and create_lidar_localization_config.py gain --dynamic-objects-topic. The box test is a header without ROS types (dynamic_object_exclusion.hpp, unit-tested). The package now depends on vision_msgs (Foxy’s 2.x message layout is handled at compile time; built and tested on Jazzy only here); a build without it still works and the

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged lidar_localization_ros2 at Robotics Stack Exchange

No version for distro rolling showing github. Known supported distros are highlighted in the buttons above.
Package symbol

lidar_localization_ros2 package from lidar_localization_ros2 repo

lidar_localization_ros2

ROS Distro
github

Package Summary

Version 1.14.0
License BSD2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/rsasaki0109/lidar_localization_ros2.git
VCS Type git
VCS Version main
Last Updated 2026-12-01
Dev Status UNKNOWN
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

ROS 2 LiDAR localization with Nav2 integration, replay helpers, and benchmarking tools.

Maintainers

  • ryohei sasaki

Authors

No additional authors.

lidar_localization_ros2

Map-based 3D LiDAR localization for ROS 2 and Nav2.

build ROS 2 Jazzy ROS 2 Humble ROS 2 Foxy License BSD 2 Clause Sponsor on GitHub

Handheld outdoor run tracked on a prior point-cloud map; the estimate follows the ground truth for the whole run

Handheld Livox MID-360, ~390 m outdoors on a prior map, including stretches where the scans do not match the map and a section outside it. Each scan is matched to the map with NDT; RKO-LIO odometry predicts the motion between scans and carries the pose where matching fails. The error is 0.26 m RMSE for the whole run, in an offline replay started from the ground-truth pose (Koide Hard Point Cloud Localization Dataset outdoor_hard_02b, CC BY 4.0). How this was made · more runs

A Unitree Go2 starts with no pose on a map from another recording; ranked candidates appear all over the map, the best one is accepted, the scan snaps onto the map and the robot is tracked out of the room and down the stairs

Global localization on a Unitree Go2 (upside-down Livox MID-360), started with no initial pose, on a map from a different recording: the map is built from the run Long_Stairs, the scans come from the run Outdoor2, recorded 1.5 h later along the same route (the room was not rearranged in between). The quickstart searches the whole map: each query returns 32 ranked places (circles sized by score) in 2.6 s, and the answer is accepted when two queries agree after the odometry motion. The first pose came 13.3 s into the run, 6.4 s after the first search, 0.01 m from the motion-capture ground truth. Tracking then follows the robot out of the capture room and down the long staircase, within 0.02 m (median) of the ground truth where it exists (the room). Offline replay at 1× (JEPLO dataset, GPL-3.0; this GIF is derived from it and shared under the same licence). How this was made · pairs with moved props, including failures

Give it a point cloud map (.pcd or .ply) and a LiDAR stream; it publishes the robot pose in the map. It finds the starting pose by itself, uses odometry and IMU when you have them, and works standalone or as the localization source for Nav2.

Where to start

You want to Go to
Localize your robot on a map you already have Install, then Quick start
Run it on a Unitree Go2 or another MID-360 robot Go2 / MID-360 in five minutes
Navigate with Nav2 Nav2
Try it without a robot Run the public dataset
See how accurate it is Benchmark
Fix a bringup that does not work Troubleshooting

Install

ROS 2 Jazzy is the main target; Humble is supported. Foxy is end-of-life and supported on a best-effort basis: CI builds and tests it, and its differences are listed in the changelog under Unreleased.

All of them build from main. The old foxy, humble and jazzy branches are no longer kept; their last commits are the tags archive/foxy, archive/humble and archive/jazzy. ROS 2 Dashing, which main does not support, has the frozen dashing branch.

mkdir -p ~/lidarloc_ws/src
cd ~/lidarloc_ws/src
git clone https://github.com/rsasaki0109/lidar_localization_ros2.git
cd lidar_localization_ros2
scripts/bootstrap_colcon_workspace.sh --build
source ~/lidarloc_ws/install/setup.bash

This builds ndt_omp_ros2 and this package, about 30 minutes on an 8-core machine. small_gicp is optional (SMALL_GICP and SMALL_VGICP backends): on Jazzy, sudo apt install ros-jazzy-small-gicp-vendor before building is enough. For Humble, a manual or no-sudo build, see local build.

No ROS install? Build the Docker image and check it in one command:

docker build -f docker/Dockerfile -t lidar_localization_ros2 .
docker run --rm lidar_localization_ros2 /ws/src/lidar_localization_ros2/docker/smoke_status.sh

Quick start

  1. Start the LiDAR driver, and odometry if you have it.
  2. Run quickstart with your map:
   ros2 run lidar_localization_ros2 quickstart.py --map /absolute/path/to/map.pcd
   
  1. Check that it is tracking:
   ros2 run lidar_localization_ros2 check_lidar_localization_bringup.py --profile standalone
   

Quickstart finds the cloud and IMU topics, /clock, an odom -> base TF and the LiDAR frame, and prints what it picked on its Discovery: line. Then it starts the localizer and RViz. On the first run it searches the whole map for the robot; next time it restores the pose saved for the same map. If the search finds no safe match, it asks you for 2D Pose Estimate in RViz (press P, click the robot, drag along its heading) instead of guessing.

While it runs, the terminal prints one line whenever tracking starts, weakens, is lost or comes back, with what to do about it, and RViz shows the same status above the

File truncated at 100 lines see the full file

CHANGELOG

Changelog

Unreleased

1.14.0 - 2026-12-01

Upgrading: two behaviours change by default, both only for quickstart.py with odometry prediction on (the odom TF discovered, or --odom-tf-prediction), under every profile, and both can be turned off; two fixes change behaviour for everyone. Without odometry prediction, and for the node, the config generator, param/mid360_legged.yaml and quickstart.launch.py called directly, every setting keeps its 1.13.0 default except those fixes, and every new setting defaults to off.

  • Quickstart sets seed_correction_guard_tilt_deg: 5.0 (#373): a scan whose registration would tilt map -> odom more than 5 degrees from where it was once the guards warmed up is rejected. It assumes the odometry carries the vertical; with a planar (wheel) odometry on ramps, restore with --seed-correction-tilt-deg 0.
  • Quickstart sets seed_correction_guard_odometry_jump_release_m: 0.3 (#366), with the agreement release on (its default of 4 with odometry prediction). To restore: --seed-correction-odometry-jump-release-m 0.
  • The reinitialization supervisor’s dropout waiver is bounded (#376): after an odom TF gap it releases an answer only within odometry_dropout_max_speed_mps (new, 5 m/s; 0 = the unbounded waiver of 1.13.0) over the gap, plus the bridged motion, plus 2 m; a farther answer waits for a second one that agrees. A sensor carried faster than that through a gap needs a higher value.
  • A global fix published at startup now takes the roll and pitch of the odometry at publication, not those of its scan (#368), and the seed guards’ warmup no longer restarts for a gap the node made itself while aligning a slow scan (#369).
  • The package depends on vision_msgs (#375, #374): Detection3DArray carries dynamic_objects_topic and the new detector’s output. The build still works without it (the node then warns that the topic is ignored); install ros-$ROS_DISTRO-vision-msgs (rosdep does) to use them. CI builds the node on Foxy, Humble and Jazzy (Foxy’s vision_msgs 2.x layout is handled at compile time); the detector needs vision_msgs 4 (Humble, Jazzy).
  • C API callers must rebuild: lidarloc_tracking gained fields at its end (the degeneracy remapping’s three in #360, the odometry jump release’s three in #363, and seed_correction_guard_tilt_deg in #373) and lidarloc_result gained degeneracy_remapped, degeneracy_dropped_m and horizontal_constraint. Take the new fields from lidarloc_default_tracking, which leaves each off.

The release adds the opt-in solution remapping of degenerate alignments (#360), the odometry jump release (#363, a quickstart default since #366), the tilt guard that fixes the Koide outdoor_hard_02b 115-160 s loss (#373), exclusion of detected objects from registration (#375) with a map-difference object detector (#374), dynamic obstacle tools for your own bags and a walking crowd (#370, #371), the negative result of tracking-based prefiltering (#372), and fixes to the startup roll and pitch (#368), the guards’ warmup (#369) and the reinitialization dropout waiver (#376).

Fixed: a reinitialization reset onto a wrong G2 answer after a short odometry stall. After an odom TF gap of more than 2 s in the last 120 s, the reinitialization supervisor reset on a single G2 answer without the second, agreeing one it otherwise waits for (the dropout waiver, kept for a sensor carried while covered). On a Koide outdoor_hard_02b crowd run, RKO-LIO stopped for 3.7 s while G2 searched; 18 s later, with the bridged pose 0.1 m from the ground truth, an answer 63 m off (score 0.33, registration fitness 4.05) passed every other gate and was published. Seed motion compensation then moved it 61 m on a “velocity” from two answers 100 m apart (the earlier one withheld as aliased), although the reset was stamped with its scan and the localizer carries such a reset to the present by odometry: the run was lost, 64 m at most. Now:

  • the waiver releases an answer only within reach of the bridged pose before the first gap: odometry_dropout_max_speed_mps (new supervisor parameter, default 5 m/s; 0 = the unbounded waiver) over each gap, plus the bridged motion between and after the gaps, plus 2 m. A farther answer waits for a second one that agrees after odometry, as without a dropout, and the log says so (... but the answer is N m from the bridged pose before the gap ...). A carried sensor (Koide outdoor_kidnap: up to 2.5 m/s) stays within it;
  • with an odom bridge pose at the answer’s scan stamp, seed motion compensation is skipped (the localizer carries the reset from its scan stamp by odometry); without odometry it is unchanged.

A replay of the run’s logged supervisor inputs (G2 answers, odom TF gap, bridged pose) reproduces the published reset to the centimetre on the old code and withholds it now (test_dropout_waiver_is_bounded_by_the_motion_the_gap_can_hide). In the synthetic comparison (experiments/odometry_dropout_confirmation) the bounded waiver passes every fixture the old one passed, with the same recovery times, and both 02b fixtures where the answer after a gap was wrong. Not measured on outdoor_kidnap_b (not on this machine) (measured).

New: exclude detected objects from registration (dynamic_objects_topic, off by default). Given a vision_msgs/Detection3DArray topic (stamped with the scan the detections came from; boxes in the map frame or any frame with TF), the node leaves the scan points inside the boxes, grown by dynamic_objects_margin_m (0.3), out of every alignment attempt of a scan, the NDT initializer and the local reacquisition, after deskew and the voxel filter and before the map-distance prefilter. Boxes in the map frame are moved into the scan by the scan’s seed; other frames go through TF (from the detection’s stamp to the scan’s, across the odometry frame). A scan uses the array stamped nearest to it within dynamic_objects_max_age_sec (0.5); detections scored below dynamic_objects_min_score (0) are dropped; a scan that would lose more than dynamic_objects_max_excluded_ratio (0.5) of its points, or keep fewer than min_registration_points, is aligned whole. The subscription has its own callback group. /alignment_status gains dynamic_objects_status, dynamic_objects_boxes, dynamic_objects_excluded_points and dynamic_objects_age_sec (also kept by tools/benchmark/record_pose.py); quickstart.py and create_lidar_localization_config.py gain --dynamic-objects-topic. The box test is a header without ROS types (dynamic_object_exclusion.hpp, unit-tested). The package now depends on vision_msgs (Foxy’s 2.x message layout is handled at compile time; built and tested on Jazzy only here); a build without it still works and the

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged lidar_localization_ros2 at Robotics Stack Exchange

Package symbol

lidar_localization_ros2 package from lidar_localization_ros2 repo

lidar_localization_ros2

ROS Distro
github

Package Summary

Version 1.14.0
License BSD2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/rsasaki0109/lidar_localization_ros2.git
VCS Type git
VCS Version main
Last Updated 2026-12-01
Dev Status UNKNOWN
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

ROS 2 LiDAR localization with Nav2 integration, replay helpers, and benchmarking tools.

Maintainers

  • ryohei sasaki

Authors

No additional authors.

lidar_localization_ros2

Map-based 3D LiDAR localization for ROS 2 and Nav2.

build ROS 2 Jazzy ROS 2 Humble ROS 2 Foxy License BSD 2 Clause Sponsor on GitHub

Handheld outdoor run tracked on a prior point-cloud map; the estimate follows the ground truth for the whole run

Handheld Livox MID-360, ~390 m outdoors on a prior map, including stretches where the scans do not match the map and a section outside it. Each scan is matched to the map with NDT; RKO-LIO odometry predicts the motion between scans and carries the pose where matching fails. The error is 0.26 m RMSE for the whole run, in an offline replay started from the ground-truth pose (Koide Hard Point Cloud Localization Dataset outdoor_hard_02b, CC BY 4.0). How this was made · more runs

A Unitree Go2 starts with no pose on a map from another recording; ranked candidates appear all over the map, the best one is accepted, the scan snaps onto the map and the robot is tracked out of the room and down the stairs

Global localization on a Unitree Go2 (upside-down Livox MID-360), started with no initial pose, on a map from a different recording: the map is built from the run Long_Stairs, the scans come from the run Outdoor2, recorded 1.5 h later along the same route (the room was not rearranged in between). The quickstart searches the whole map: each query returns 32 ranked places (circles sized by score) in 2.6 s, and the answer is accepted when two queries agree after the odometry motion. The first pose came 13.3 s into the run, 6.4 s after the first search, 0.01 m from the motion-capture ground truth. Tracking then follows the robot out of the capture room and down the long staircase, within 0.02 m (median) of the ground truth where it exists (the room). Offline replay at 1× (JEPLO dataset, GPL-3.0; this GIF is derived from it and shared under the same licence). How this was made · pairs with moved props, including failures

Give it a point cloud map (.pcd or .ply) and a LiDAR stream; it publishes the robot pose in the map. It finds the starting pose by itself, uses odometry and IMU when you have them, and works standalone or as the localization source for Nav2.

Where to start

You want to Go to
Localize your robot on a map you already have Install, then Quick start
Run it on a Unitree Go2 or another MID-360 robot Go2 / MID-360 in five minutes
Navigate with Nav2 Nav2
Try it without a robot Run the public dataset
See how accurate it is Benchmark
Fix a bringup that does not work Troubleshooting

Install

ROS 2 Jazzy is the main target; Humble is supported. Foxy is end-of-life and supported on a best-effort basis: CI builds and tests it, and its differences are listed in the changelog under Unreleased.

All of them build from main. The old foxy, humble and jazzy branches are no longer kept; their last commits are the tags archive/foxy, archive/humble and archive/jazzy. ROS 2 Dashing, which main does not support, has the frozen dashing branch.

mkdir -p ~/lidarloc_ws/src
cd ~/lidarloc_ws/src
git clone https://github.com/rsasaki0109/lidar_localization_ros2.git
cd lidar_localization_ros2
scripts/bootstrap_colcon_workspace.sh --build
source ~/lidarloc_ws/install/setup.bash

This builds ndt_omp_ros2 and this package, about 30 minutes on an 8-core machine. small_gicp is optional (SMALL_GICP and SMALL_VGICP backends): on Jazzy, sudo apt install ros-jazzy-small-gicp-vendor before building is enough. For Humble, a manual or no-sudo build, see local build.

No ROS install? Build the Docker image and check it in one command:

docker build -f docker/Dockerfile -t lidar_localization_ros2 .
docker run --rm lidar_localization_ros2 /ws/src/lidar_localization_ros2/docker/smoke_status.sh

Quick start

  1. Start the LiDAR driver, and odometry if you have it.
  2. Run quickstart with your map:
   ros2 run lidar_localization_ros2 quickstart.py --map /absolute/path/to/map.pcd
   
  1. Check that it is tracking:
   ros2 run lidar_localization_ros2 check_lidar_localization_bringup.py --profile standalone
   

Quickstart finds the cloud and IMU topics, /clock, an odom -> base TF and the LiDAR frame, and prints what it picked on its Discovery: line. Then it starts the localizer and RViz. On the first run it searches the whole map for the robot; next time it restores the pose saved for the same map. If the search finds no safe match, it asks you for 2D Pose Estimate in RViz (press P, click the robot, drag along its heading) instead of guessing.

While it runs, the terminal prints one line whenever tracking starts, weakens, is lost or comes back, with what to do about it, and RViz shows the same status above the

File truncated at 100 lines see the full file

CHANGELOG

Changelog

Unreleased

1.14.0 - 2026-12-01

Upgrading: two behaviours change by default, both only for quickstart.py with odometry prediction on (the odom TF discovered, or --odom-tf-prediction), under every profile, and both can be turned off; two fixes change behaviour for everyone. Without odometry prediction, and for the node, the config generator, param/mid360_legged.yaml and quickstart.launch.py called directly, every setting keeps its 1.13.0 default except those fixes, and every new setting defaults to off.

  • Quickstart sets seed_correction_guard_tilt_deg: 5.0 (#373): a scan whose registration would tilt map -> odom more than 5 degrees from where it was once the guards warmed up is rejected. It assumes the odometry carries the vertical; with a planar (wheel) odometry on ramps, restore with --seed-correction-tilt-deg 0.
  • Quickstart sets seed_correction_guard_odometry_jump_release_m: 0.3 (#366), with the agreement release on (its default of 4 with odometry prediction). To restore: --seed-correction-odometry-jump-release-m 0.
  • The reinitialization supervisor’s dropout waiver is bounded (#376): after an odom TF gap it releases an answer only within odometry_dropout_max_speed_mps (new, 5 m/s; 0 = the unbounded waiver of 1.13.0) over the gap, plus the bridged motion, plus 2 m; a farther answer waits for a second one that agrees. A sensor carried faster than that through a gap needs a higher value.
  • A global fix published at startup now takes the roll and pitch of the odometry at publication, not those of its scan (#368), and the seed guards’ warmup no longer restarts for a gap the node made itself while aligning a slow scan (#369).
  • The package depends on vision_msgs (#375, #374): Detection3DArray carries dynamic_objects_topic and the new detector’s output. The build still works without it (the node then warns that the topic is ignored); install ros-$ROS_DISTRO-vision-msgs (rosdep does) to use them. CI builds the node on Foxy, Humble and Jazzy (Foxy’s vision_msgs 2.x layout is handled at compile time); the detector needs vision_msgs 4 (Humble, Jazzy).
  • C API callers must rebuild: lidarloc_tracking gained fields at its end (the degeneracy remapping’s three in #360, the odometry jump release’s three in #363, and seed_correction_guard_tilt_deg in #373) and lidarloc_result gained degeneracy_remapped, degeneracy_dropped_m and horizontal_constraint. Take the new fields from lidarloc_default_tracking, which leaves each off.

The release adds the opt-in solution remapping of degenerate alignments (#360), the odometry jump release (#363, a quickstart default since #366), the tilt guard that fixes the Koide outdoor_hard_02b 115-160 s loss (#373), exclusion of detected objects from registration (#375) with a map-difference object detector (#374), dynamic obstacle tools for your own bags and a walking crowd (#370, #371), the negative result of tracking-based prefiltering (#372), and fixes to the startup roll and pitch (#368), the guards’ warmup (#369) and the reinitialization dropout waiver (#376).

Fixed: a reinitialization reset onto a wrong G2 answer after a short odometry stall. After an odom TF gap of more than 2 s in the last 120 s, the reinitialization supervisor reset on a single G2 answer without the second, agreeing one it otherwise waits for (the dropout waiver, kept for a sensor carried while covered). On a Koide outdoor_hard_02b crowd run, RKO-LIO stopped for 3.7 s while G2 searched; 18 s later, with the bridged pose 0.1 m from the ground truth, an answer 63 m off (score 0.33, registration fitness 4.05) passed every other gate and was published. Seed motion compensation then moved it 61 m on a “velocity” from two answers 100 m apart (the earlier one withheld as aliased), although the reset was stamped with its scan and the localizer carries such a reset to the present by odometry: the run was lost, 64 m at most. Now:

  • the waiver releases an answer only within reach of the bridged pose before the first gap: odometry_dropout_max_speed_mps (new supervisor parameter, default 5 m/s; 0 = the unbounded waiver) over each gap, plus the bridged motion between and after the gaps, plus 2 m. A farther answer waits for a second one that agrees after odometry, as without a dropout, and the log says so (... but the answer is N m from the bridged pose before the gap ...). A carried sensor (Koide outdoor_kidnap: up to 2.5 m/s) stays within it;
  • with an odom bridge pose at the answer’s scan stamp, seed motion compensation is skipped (the localizer carries the reset from its scan stamp by odometry); without odometry it is unchanged.

A replay of the run’s logged supervisor inputs (G2 answers, odom TF gap, bridged pose) reproduces the published reset to the centimetre on the old code and withholds it now (test_dropout_waiver_is_bounded_by_the_motion_the_gap_can_hide). In the synthetic comparison (experiments/odometry_dropout_confirmation) the bounded waiver passes every fixture the old one passed, with the same recovery times, and both 02b fixtures where the answer after a gap was wrong. Not measured on outdoor_kidnap_b (not on this machine) (measured).

New: exclude detected objects from registration (dynamic_objects_topic, off by default). Given a vision_msgs/Detection3DArray topic (stamped with the scan the detections came from; boxes in the map frame or any frame with TF), the node leaves the scan points inside the boxes, grown by dynamic_objects_margin_m (0.3), out of every alignment attempt of a scan, the NDT initializer and the local reacquisition, after deskew and the voxel filter and before the map-distance prefilter. Boxes in the map frame are moved into the scan by the scan’s seed; other frames go through TF (from the detection’s stamp to the scan’s, across the odometry frame). A scan uses the array stamped nearest to it within dynamic_objects_max_age_sec (0.5); detections scored below dynamic_objects_min_score (0) are dropped; a scan that would lose more than dynamic_objects_max_excluded_ratio (0.5) of its points, or keep fewer than min_registration_points, is aligned whole. The subscription has its own callback group. /alignment_status gains dynamic_objects_status, dynamic_objects_boxes, dynamic_objects_excluded_points and dynamic_objects_age_sec (also kept by tools/benchmark/record_pose.py); quickstart.py and create_lidar_localization_config.py gain --dynamic-objects-topic. The box test is a header without ROS types (dynamic_object_exclusion.hpp, unit-tested). The package now depends on vision_msgs (Foxy’s 2.x message layout is handled at compile time; built and tested on Jazzy only here); a build without it still works and the

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged lidar_localization_ros2 at Robotics Stack Exchange

No version for distro galactic showing github. Known supported distros are highlighted in the buttons above.
Package symbol

lidar_localization_ros2 package from lidar_localization_ros2 repo

lidar_localization_ros2

ROS Distro
github

Package Summary

Version 1.14.0
License BSD2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/rsasaki0109/lidar_localization_ros2.git
VCS Type git
VCS Version main
Last Updated 2026-12-01
Dev Status UNKNOWN
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

ROS 2 LiDAR localization with Nav2 integration, replay helpers, and benchmarking tools.

Maintainers

  • ryohei sasaki

Authors

No additional authors.

lidar_localization_ros2

Map-based 3D LiDAR localization for ROS 2 and Nav2.

build ROS 2 Jazzy ROS 2 Humble ROS 2 Foxy License BSD 2 Clause Sponsor on GitHub

Handheld outdoor run tracked on a prior point-cloud map; the estimate follows the ground truth for the whole run

Handheld Livox MID-360, ~390 m outdoors on a prior map, including stretches where the scans do not match the map and a section outside it. Each scan is matched to the map with NDT; RKO-LIO odometry predicts the motion between scans and carries the pose where matching fails. The error is 0.26 m RMSE for the whole run, in an offline replay started from the ground-truth pose (Koide Hard Point Cloud Localization Dataset outdoor_hard_02b, CC BY 4.0). How this was made · more runs

A Unitree Go2 starts with no pose on a map from another recording; ranked candidates appear all over the map, the best one is accepted, the scan snaps onto the map and the robot is tracked out of the room and down the stairs

Global localization on a Unitree Go2 (upside-down Livox MID-360), started with no initial pose, on a map from a different recording: the map is built from the run Long_Stairs, the scans come from the run Outdoor2, recorded 1.5 h later along the same route (the room was not rearranged in between). The quickstart searches the whole map: each query returns 32 ranked places (circles sized by score) in 2.6 s, and the answer is accepted when two queries agree after the odometry motion. The first pose came 13.3 s into the run, 6.4 s after the first search, 0.01 m from the motion-capture ground truth. Tracking then follows the robot out of the capture room and down the long staircase, within 0.02 m (median) of the ground truth where it exists (the room). Offline replay at 1× (JEPLO dataset, GPL-3.0; this GIF is derived from it and shared under the same licence). How this was made · pairs with moved props, including failures

Give it a point cloud map (.pcd or .ply) and a LiDAR stream; it publishes the robot pose in the map. It finds the starting pose by itself, uses odometry and IMU when you have them, and works standalone or as the localization source for Nav2.

Where to start

You want to Go to
Localize your robot on a map you already have Install, then Quick start
Run it on a Unitree Go2 or another MID-360 robot Go2 / MID-360 in five minutes
Navigate with Nav2 Nav2
Try it without a robot Run the public dataset
See how accurate it is Benchmark
Fix a bringup that does not work Troubleshooting

Install

ROS 2 Jazzy is the main target; Humble is supported. Foxy is end-of-life and supported on a best-effort basis: CI builds and tests it, and its differences are listed in the changelog under Unreleased.

All of them build from main. The old foxy, humble and jazzy branches are no longer kept; their last commits are the tags archive/foxy, archive/humble and archive/jazzy. ROS 2 Dashing, which main does not support, has the frozen dashing branch.

mkdir -p ~/lidarloc_ws/src
cd ~/lidarloc_ws/src
git clone https://github.com/rsasaki0109/lidar_localization_ros2.git
cd lidar_localization_ros2
scripts/bootstrap_colcon_workspace.sh --build
source ~/lidarloc_ws/install/setup.bash

This builds ndt_omp_ros2 and this package, about 30 minutes on an 8-core machine. small_gicp is optional (SMALL_GICP and SMALL_VGICP backends): on Jazzy, sudo apt install ros-jazzy-small-gicp-vendor before building is enough. For Humble, a manual or no-sudo build, see local build.

No ROS install? Build the Docker image and check it in one command:

docker build -f docker/Dockerfile -t lidar_localization_ros2 .
docker run --rm lidar_localization_ros2 /ws/src/lidar_localization_ros2/docker/smoke_status.sh

Quick start

  1. Start the LiDAR driver, and odometry if you have it.
  2. Run quickstart with your map:
   ros2 run lidar_localization_ros2 quickstart.py --map /absolute/path/to/map.pcd
   
  1. Check that it is tracking:
   ros2 run lidar_localization_ros2 check_lidar_localization_bringup.py --profile standalone
   

Quickstart finds the cloud and IMU topics, /clock, an odom -> base TF and the LiDAR frame, and prints what it picked on its Discovery: line. Then it starts the localizer and RViz. On the first run it searches the whole map for the robot; next time it restores the pose saved for the same map. If the search finds no safe match, it asks you for 2D Pose Estimate in RViz (press P, click the robot, drag along its heading) instead of guessing.

While it runs, the terminal prints one line whenever tracking starts, weakens, is lost or comes back, with what to do about it, and RViz shows the same status above the

File truncated at 100 lines see the full file

CHANGELOG

Changelog

Unreleased

1.14.0 - 2026-12-01

Upgrading: two behaviours change by default, both only for quickstart.py with odometry prediction on (the odom TF discovered, or --odom-tf-prediction), under every profile, and both can be turned off; two fixes change behaviour for everyone. Without odometry prediction, and for the node, the config generator, param/mid360_legged.yaml and quickstart.launch.py called directly, every setting keeps its 1.13.0 default except those fixes, and every new setting defaults to off.

  • Quickstart sets seed_correction_guard_tilt_deg: 5.0 (#373): a scan whose registration would tilt map -> odom more than 5 degrees from where it was once the guards warmed up is rejected. It assumes the odometry carries the vertical; with a planar (wheel) odometry on ramps, restore with --seed-correction-tilt-deg 0.
  • Quickstart sets seed_correction_guard_odometry_jump_release_m: 0.3 (#366), with the agreement release on (its default of 4 with odometry prediction). To restore: --seed-correction-odometry-jump-release-m 0.
  • The reinitialization supervisor’s dropout waiver is bounded (#376): after an odom TF gap it releases an answer only within odometry_dropout_max_speed_mps (new, 5 m/s; 0 = the unbounded waiver of 1.13.0) over the gap, plus the bridged motion, plus 2 m; a farther answer waits for a second one that agrees. A sensor carried faster than that through a gap needs a higher value.
  • A global fix published at startup now takes the roll and pitch of the odometry at publication, not those of its scan (#368), and the seed guards’ warmup no longer restarts for a gap the node made itself while aligning a slow scan (#369).
  • The package depends on vision_msgs (#375, #374): Detection3DArray carries dynamic_objects_topic and the new detector’s output. The build still works without it (the node then warns that the topic is ignored); install ros-$ROS_DISTRO-vision-msgs (rosdep does) to use them. CI builds the node on Foxy, Humble and Jazzy (Foxy’s vision_msgs 2.x layout is handled at compile time); the detector needs vision_msgs 4 (Humble, Jazzy).
  • C API callers must rebuild: lidarloc_tracking gained fields at its end (the degeneracy remapping’s three in #360, the odometry jump release’s three in #363, and seed_correction_guard_tilt_deg in #373) and lidarloc_result gained degeneracy_remapped, degeneracy_dropped_m and horizontal_constraint. Take the new fields from lidarloc_default_tracking, which leaves each off.

The release adds the opt-in solution remapping of degenerate alignments (#360), the odometry jump release (#363, a quickstart default since #366), the tilt guard that fixes the Koide outdoor_hard_02b 115-160 s loss (#373), exclusion of detected objects from registration (#375) with a map-difference object detector (#374), dynamic obstacle tools for your own bags and a walking crowd (#370, #371), the negative result of tracking-based prefiltering (#372), and fixes to the startup roll and pitch (#368), the guards’ warmup (#369) and the reinitialization dropout waiver (#376).

Fixed: a reinitialization reset onto a wrong G2 answer after a short odometry stall. After an odom TF gap of more than 2 s in the last 120 s, the reinitialization supervisor reset on a single G2 answer without the second, agreeing one it otherwise waits for (the dropout waiver, kept for a sensor carried while covered). On a Koide outdoor_hard_02b crowd run, RKO-LIO stopped for 3.7 s while G2 searched; 18 s later, with the bridged pose 0.1 m from the ground truth, an answer 63 m off (score 0.33, registration fitness 4.05) passed every other gate and was published. Seed motion compensation then moved it 61 m on a “velocity” from two answers 100 m apart (the earlier one withheld as aliased), although the reset was stamped with its scan and the localizer carries such a reset to the present by odometry: the run was lost, 64 m at most. Now:

  • the waiver releases an answer only within reach of the bridged pose before the first gap: odometry_dropout_max_speed_mps (new supervisor parameter, default 5 m/s; 0 = the unbounded waiver) over each gap, plus the bridged motion between and after the gaps, plus 2 m. A farther answer waits for a second one that agrees after odometry, as without a dropout, and the log says so (... but the answer is N m from the bridged pose before the gap ...). A carried sensor (Koide outdoor_kidnap: up to 2.5 m/s) stays within it;
  • with an odom bridge pose at the answer’s scan stamp, seed motion compensation is skipped (the localizer carries the reset from its scan stamp by odometry); without odometry it is unchanged.

A replay of the run’s logged supervisor inputs (G2 answers, odom TF gap, bridged pose) reproduces the published reset to the centimetre on the old code and withholds it now (test_dropout_waiver_is_bounded_by_the_motion_the_gap_can_hide). In the synthetic comparison (experiments/odometry_dropout_confirmation) the bounded waiver passes every fixture the old one passed, with the same recovery times, and both 02b fixtures where the answer after a gap was wrong. Not measured on outdoor_kidnap_b (not on this machine) (measured).

New: exclude detected objects from registration (dynamic_objects_topic, off by default). Given a vision_msgs/Detection3DArray topic (stamped with the scan the detections came from; boxes in the map frame or any frame with TF), the node leaves the scan points inside the boxes, grown by dynamic_objects_margin_m (0.3), out of every alignment attempt of a scan, the NDT initializer and the local reacquisition, after deskew and the voxel filter and before the map-distance prefilter. Boxes in the map frame are moved into the scan by the scan’s seed; other frames go through TF (from the detection’s stamp to the scan’s, across the odometry frame). A scan uses the array stamped nearest to it within dynamic_objects_max_age_sec (0.5); detections scored below dynamic_objects_min_score (0) are dropped; a scan that would lose more than dynamic_objects_max_excluded_ratio (0.5) of its points, or keep fewer than min_registration_points, is aligned whole. The subscription has its own callback group. /alignment_status gains dynamic_objects_status, dynamic_objects_boxes, dynamic_objects_excluded_points and dynamic_objects_age_sec (also kept by tools/benchmark/record_pose.py); quickstart.py and create_lidar_localization_config.py gain --dynamic-objects-topic. The box test is a header without ROS types (dynamic_object_exclusion.hpp, unit-tested). The package now depends on vision_msgs (Foxy’s 2.x message layout is handled at compile time; built and tested on Jazzy only here); a build without it still works and the

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged lidar_localization_ros2 at Robotics Stack Exchange

No version for distro iron showing github. Known supported distros are highlighted in the buttons above.
Package symbol

lidar_localization_ros2 package from lidar_localization_ros2 repo

lidar_localization_ros2

ROS Distro
github

Package Summary

Version 1.14.0
License BSD2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/rsasaki0109/lidar_localization_ros2.git
VCS Type git
VCS Version main
Last Updated 2026-12-01
Dev Status UNKNOWN
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

ROS 2 LiDAR localization with Nav2 integration, replay helpers, and benchmarking tools.

Maintainers

  • ryohei sasaki

Authors

No additional authors.

lidar_localization_ros2

Map-based 3D LiDAR localization for ROS 2 and Nav2.

build ROS 2 Jazzy ROS 2 Humble ROS 2 Foxy License BSD 2 Clause Sponsor on GitHub

Handheld outdoor run tracked on a prior point-cloud map; the estimate follows the ground truth for the whole run

Handheld Livox MID-360, ~390 m outdoors on a prior map, including stretches where the scans do not match the map and a section outside it. Each scan is matched to the map with NDT; RKO-LIO odometry predicts the motion between scans and carries the pose where matching fails. The error is 0.26 m RMSE for the whole run, in an offline replay started from the ground-truth pose (Koide Hard Point Cloud Localization Dataset outdoor_hard_02b, CC BY 4.0). How this was made · more runs

A Unitree Go2 starts with no pose on a map from another recording; ranked candidates appear all over the map, the best one is accepted, the scan snaps onto the map and the robot is tracked out of the room and down the stairs

Global localization on a Unitree Go2 (upside-down Livox MID-360), started with no initial pose, on a map from a different recording: the map is built from the run Long_Stairs, the scans come from the run Outdoor2, recorded 1.5 h later along the same route (the room was not rearranged in between). The quickstart searches the whole map: each query returns 32 ranked places (circles sized by score) in 2.6 s, and the answer is accepted when two queries agree after the odometry motion. The first pose came 13.3 s into the run, 6.4 s after the first search, 0.01 m from the motion-capture ground truth. Tracking then follows the robot out of the capture room and down the long staircase, within 0.02 m (median) of the ground truth where it exists (the room). Offline replay at 1× (JEPLO dataset, GPL-3.0; this GIF is derived from it and shared under the same licence). How this was made · pairs with moved props, including failures

Give it a point cloud map (.pcd or .ply) and a LiDAR stream; it publishes the robot pose in the map. It finds the starting pose by itself, uses odometry and IMU when you have them, and works standalone or as the localization source for Nav2.

Where to start

You want to Go to
Localize your robot on a map you already have Install, then Quick start
Run it on a Unitree Go2 or another MID-360 robot Go2 / MID-360 in five minutes
Navigate with Nav2 Nav2
Try it without a robot Run the public dataset
See how accurate it is Benchmark
Fix a bringup that does not work Troubleshooting

Install

ROS 2 Jazzy is the main target; Humble is supported. Foxy is end-of-life and supported on a best-effort basis: CI builds and tests it, and its differences are listed in the changelog under Unreleased.

All of them build from main. The old foxy, humble and jazzy branches are no longer kept; their last commits are the tags archive/foxy, archive/humble and archive/jazzy. ROS 2 Dashing, which main does not support, has the frozen dashing branch.

mkdir -p ~/lidarloc_ws/src
cd ~/lidarloc_ws/src
git clone https://github.com/rsasaki0109/lidar_localization_ros2.git
cd lidar_localization_ros2
scripts/bootstrap_colcon_workspace.sh --build
source ~/lidarloc_ws/install/setup.bash

This builds ndt_omp_ros2 and this package, about 30 minutes on an 8-core machine. small_gicp is optional (SMALL_GICP and SMALL_VGICP backends): on Jazzy, sudo apt install ros-jazzy-small-gicp-vendor before building is enough. For Humble, a manual or no-sudo build, see local build.

No ROS install? Build the Docker image and check it in one command:

docker build -f docker/Dockerfile -t lidar_localization_ros2 .
docker run --rm lidar_localization_ros2 /ws/src/lidar_localization_ros2/docker/smoke_status.sh

Quick start

  1. Start the LiDAR driver, and odometry if you have it.
  2. Run quickstart with your map:
   ros2 run lidar_localization_ros2 quickstart.py --map /absolute/path/to/map.pcd
   
  1. Check that it is tracking:
   ros2 run lidar_localization_ros2 check_lidar_localization_bringup.py --profile standalone
   

Quickstart finds the cloud and IMU topics, /clock, an odom -> base TF and the LiDAR frame, and prints what it picked on its Discovery: line. Then it starts the localizer and RViz. On the first run it searches the whole map for the robot; next time it restores the pose saved for the same map. If the search finds no safe match, it asks you for 2D Pose Estimate in RViz (press P, click the robot, drag along its heading) instead of guessing.

While it runs, the terminal prints one line whenever tracking starts, weakens, is lost or comes back, with what to do about it, and RViz shows the same status above the

File truncated at 100 lines see the full file

CHANGELOG

Changelog

Unreleased

1.14.0 - 2026-12-01

Upgrading: two behaviours change by default, both only for quickstart.py with odometry prediction on (the odom TF discovered, or --odom-tf-prediction), under every profile, and both can be turned off; two fixes change behaviour for everyone. Without odometry prediction, and for the node, the config generator, param/mid360_legged.yaml and quickstart.launch.py called directly, every setting keeps its 1.13.0 default except those fixes, and every new setting defaults to off.

  • Quickstart sets seed_correction_guard_tilt_deg: 5.0 (#373): a scan whose registration would tilt map -> odom more than 5 degrees from where it was once the guards warmed up is rejected. It assumes the odometry carries the vertical; with a planar (wheel) odometry on ramps, restore with --seed-correction-tilt-deg 0.
  • Quickstart sets seed_correction_guard_odometry_jump_release_m: 0.3 (#366), with the agreement release on (its default of 4 with odometry prediction). To restore: --seed-correction-odometry-jump-release-m 0.
  • The reinitialization supervisor’s dropout waiver is bounded (#376): after an odom TF gap it releases an answer only within odometry_dropout_max_speed_mps (new, 5 m/s; 0 = the unbounded waiver of 1.13.0) over the gap, plus the bridged motion, plus 2 m; a farther answer waits for a second one that agrees. A sensor carried faster than that through a gap needs a higher value.
  • A global fix published at startup now takes the roll and pitch of the odometry at publication, not those of its scan (#368), and the seed guards’ warmup no longer restarts for a gap the node made itself while aligning a slow scan (#369).
  • The package depends on vision_msgs (#375, #374): Detection3DArray carries dynamic_objects_topic and the new detector’s output. The build still works without it (the node then warns that the topic is ignored); install ros-$ROS_DISTRO-vision-msgs (rosdep does) to use them. CI builds the node on Foxy, Humble and Jazzy (Foxy’s vision_msgs 2.x layout is handled at compile time); the detector needs vision_msgs 4 (Humble, Jazzy).
  • C API callers must rebuild: lidarloc_tracking gained fields at its end (the degeneracy remapping’s three in #360, the odometry jump release’s three in #363, and seed_correction_guard_tilt_deg in #373) and lidarloc_result gained degeneracy_remapped, degeneracy_dropped_m and horizontal_constraint. Take the new fields from lidarloc_default_tracking, which leaves each off.

The release adds the opt-in solution remapping of degenerate alignments (#360), the odometry jump release (#363, a quickstart default since #366), the tilt guard that fixes the Koide outdoor_hard_02b 115-160 s loss (#373), exclusion of detected objects from registration (#375) with a map-difference object detector (#374), dynamic obstacle tools for your own bags and a walking crowd (#370, #371), the negative result of tracking-based prefiltering (#372), and fixes to the startup roll and pitch (#368), the guards’ warmup (#369) and the reinitialization dropout waiver (#376).

Fixed: a reinitialization reset onto a wrong G2 answer after a short odometry stall. After an odom TF gap of more than 2 s in the last 120 s, the reinitialization supervisor reset on a single G2 answer without the second, agreeing one it otherwise waits for (the dropout waiver, kept for a sensor carried while covered). On a Koide outdoor_hard_02b crowd run, RKO-LIO stopped for 3.7 s while G2 searched; 18 s later, with the bridged pose 0.1 m from the ground truth, an answer 63 m off (score 0.33, registration fitness 4.05) passed every other gate and was published. Seed motion compensation then moved it 61 m on a “velocity” from two answers 100 m apart (the earlier one withheld as aliased), although the reset was stamped with its scan and the localizer carries such a reset to the present by odometry: the run was lost, 64 m at most. Now:

  • the waiver releases an answer only within reach of the bridged pose before the first gap: odometry_dropout_max_speed_mps (new supervisor parameter, default 5 m/s; 0 = the unbounded waiver) over each gap, plus the bridged motion between and after the gaps, plus 2 m. A farther answer waits for a second one that agrees after odometry, as without a dropout, and the log says so (... but the answer is N m from the bridged pose before the gap ...). A carried sensor (Koide outdoor_kidnap: up to 2.5 m/s) stays within it;
  • with an odom bridge pose at the answer’s scan stamp, seed motion compensation is skipped (the localizer carries the reset from its scan stamp by odometry); without odometry it is unchanged.

A replay of the run’s logged supervisor inputs (G2 answers, odom TF gap, bridged pose) reproduces the published reset to the centimetre on the old code and withholds it now (test_dropout_waiver_is_bounded_by_the_motion_the_gap_can_hide). In the synthetic comparison (experiments/odometry_dropout_confirmation) the bounded waiver passes every fixture the old one passed, with the same recovery times, and both 02b fixtures where the answer after a gap was wrong. Not measured on outdoor_kidnap_b (not on this machine) (measured).

New: exclude detected objects from registration (dynamic_objects_topic, off by default). Given a vision_msgs/Detection3DArray topic (stamped with the scan the detections came from; boxes in the map frame or any frame with TF), the node leaves the scan points inside the boxes, grown by dynamic_objects_margin_m (0.3), out of every alignment attempt of a scan, the NDT initializer and the local reacquisition, after deskew and the voxel filter and before the map-distance prefilter. Boxes in the map frame are moved into the scan by the scan’s seed; other frames go through TF (from the detection’s stamp to the scan’s, across the odometry frame). A scan uses the array stamped nearest to it within dynamic_objects_max_age_sec (0.5); detections scored below dynamic_objects_min_score (0) are dropped; a scan that would lose more than dynamic_objects_max_excluded_ratio (0.5) of its points, or keep fewer than min_registration_points, is aligned whole. The subscription has its own callback group. /alignment_status gains dynamic_objects_status, dynamic_objects_boxes, dynamic_objects_excluded_points and dynamic_objects_age_sec (also kept by tools/benchmark/record_pose.py); quickstart.py and create_lidar_localization_config.py gain --dynamic-objects-topic. The box test is a header without ROS types (dynamic_object_exclusion.hpp, unit-tested). The package now depends on vision_msgs (Foxy’s 2.x message layout is handled at compile time; built and tested on Jazzy only here); a build without it still works and the

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged lidar_localization_ros2 at Robotics Stack Exchange

No version for distro melodic showing github. Known supported distros are highlighted in the buttons above.
Package symbol

lidar_localization_ros2 package from lidar_localization_ros2 repo

lidar_localization_ros2

ROS Distro
github

Package Summary

Version 1.14.0
License BSD2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/rsasaki0109/lidar_localization_ros2.git
VCS Type git
VCS Version main
Last Updated 2026-12-01
Dev Status UNKNOWN
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

ROS 2 LiDAR localization with Nav2 integration, replay helpers, and benchmarking tools.

Maintainers

  • ryohei sasaki

Authors

No additional authors.

lidar_localization_ros2

Map-based 3D LiDAR localization for ROS 2 and Nav2.

build ROS 2 Jazzy ROS 2 Humble ROS 2 Foxy License BSD 2 Clause Sponsor on GitHub

Handheld outdoor run tracked on a prior point-cloud map; the estimate follows the ground truth for the whole run

Handheld Livox MID-360, ~390 m outdoors on a prior map, including stretches where the scans do not match the map and a section outside it. Each scan is matched to the map with NDT; RKO-LIO odometry predicts the motion between scans and carries the pose where matching fails. The error is 0.26 m RMSE for the whole run, in an offline replay started from the ground-truth pose (Koide Hard Point Cloud Localization Dataset outdoor_hard_02b, CC BY 4.0). How this was made · more runs

A Unitree Go2 starts with no pose on a map from another recording; ranked candidates appear all over the map, the best one is accepted, the scan snaps onto the map and the robot is tracked out of the room and down the stairs

Global localization on a Unitree Go2 (upside-down Livox MID-360), started with no initial pose, on a map from a different recording: the map is built from the run Long_Stairs, the scans come from the run Outdoor2, recorded 1.5 h later along the same route (the room was not rearranged in between). The quickstart searches the whole map: each query returns 32 ranked places (circles sized by score) in 2.6 s, and the answer is accepted when two queries agree after the odometry motion. The first pose came 13.3 s into the run, 6.4 s after the first search, 0.01 m from the motion-capture ground truth. Tracking then follows the robot out of the capture room and down the long staircase, within 0.02 m (median) of the ground truth where it exists (the room). Offline replay at 1× (JEPLO dataset, GPL-3.0; this GIF is derived from it and shared under the same licence). How this was made · pairs with moved props, including failures

Give it a point cloud map (.pcd or .ply) and a LiDAR stream; it publishes the robot pose in the map. It finds the starting pose by itself, uses odometry and IMU when you have them, and works standalone or as the localization source for Nav2.

Where to start

You want to Go to
Localize your robot on a map you already have Install, then Quick start
Run it on a Unitree Go2 or another MID-360 robot Go2 / MID-360 in five minutes
Navigate with Nav2 Nav2
Try it without a robot Run the public dataset
See how accurate it is Benchmark
Fix a bringup that does not work Troubleshooting

Install

ROS 2 Jazzy is the main target; Humble is supported. Foxy is end-of-life and supported on a best-effort basis: CI builds and tests it, and its differences are listed in the changelog under Unreleased.

All of them build from main. The old foxy, humble and jazzy branches are no longer kept; their last commits are the tags archive/foxy, archive/humble and archive/jazzy. ROS 2 Dashing, which main does not support, has the frozen dashing branch.

mkdir -p ~/lidarloc_ws/src
cd ~/lidarloc_ws/src
git clone https://github.com/rsasaki0109/lidar_localization_ros2.git
cd lidar_localization_ros2
scripts/bootstrap_colcon_workspace.sh --build
source ~/lidarloc_ws/install/setup.bash

This builds ndt_omp_ros2 and this package, about 30 minutes on an 8-core machine. small_gicp is optional (SMALL_GICP and SMALL_VGICP backends): on Jazzy, sudo apt install ros-jazzy-small-gicp-vendor before building is enough. For Humble, a manual or no-sudo build, see local build.

No ROS install? Build the Docker image and check it in one command:

docker build -f docker/Dockerfile -t lidar_localization_ros2 .
docker run --rm lidar_localization_ros2 /ws/src/lidar_localization_ros2/docker/smoke_status.sh

Quick start

  1. Start the LiDAR driver, and odometry if you have it.
  2. Run quickstart with your map:
   ros2 run lidar_localization_ros2 quickstart.py --map /absolute/path/to/map.pcd
   
  1. Check that it is tracking:
   ros2 run lidar_localization_ros2 check_lidar_localization_bringup.py --profile standalone
   

Quickstart finds the cloud and IMU topics, /clock, an odom -> base TF and the LiDAR frame, and prints what it picked on its Discovery: line. Then it starts the localizer and RViz. On the first run it searches the whole map for the robot; next time it restores the pose saved for the same map. If the search finds no safe match, it asks you for 2D Pose Estimate in RViz (press P, click the robot, drag along its heading) instead of guessing.

While it runs, the terminal prints one line whenever tracking starts, weakens, is lost or comes back, with what to do about it, and RViz shows the same status above the

File truncated at 100 lines see the full file

CHANGELOG

Changelog

Unreleased

1.14.0 - 2026-12-01

Upgrading: two behaviours change by default, both only for quickstart.py with odometry prediction on (the odom TF discovered, or --odom-tf-prediction), under every profile, and both can be turned off; two fixes change behaviour for everyone. Without odometry prediction, and for the node, the config generator, param/mid360_legged.yaml and quickstart.launch.py called directly, every setting keeps its 1.13.0 default except those fixes, and every new setting defaults to off.

  • Quickstart sets seed_correction_guard_tilt_deg: 5.0 (#373): a scan whose registration would tilt map -> odom more than 5 degrees from where it was once the guards warmed up is rejected. It assumes the odometry carries the vertical; with a planar (wheel) odometry on ramps, restore with --seed-correction-tilt-deg 0.
  • Quickstart sets seed_correction_guard_odometry_jump_release_m: 0.3 (#366), with the agreement release on (its default of 4 with odometry prediction). To restore: --seed-correction-odometry-jump-release-m 0.
  • The reinitialization supervisor’s dropout waiver is bounded (#376): after an odom TF gap it releases an answer only within odometry_dropout_max_speed_mps (new, 5 m/s; 0 = the unbounded waiver of 1.13.0) over the gap, plus the bridged motion, plus 2 m; a farther answer waits for a second one that agrees. A sensor carried faster than that through a gap needs a higher value.
  • A global fix published at startup now takes the roll and pitch of the odometry at publication, not those of its scan (#368), and the seed guards’ warmup no longer restarts for a gap the node made itself while aligning a slow scan (#369).
  • The package depends on vision_msgs (#375, #374): Detection3DArray carries dynamic_objects_topic and the new detector’s output. The build still works without it (the node then warns that the topic is ignored); install ros-$ROS_DISTRO-vision-msgs (rosdep does) to use them. CI builds the node on Foxy, Humble and Jazzy (Foxy’s vision_msgs 2.x layout is handled at compile time); the detector needs vision_msgs 4 (Humble, Jazzy).
  • C API callers must rebuild: lidarloc_tracking gained fields at its end (the degeneracy remapping’s three in #360, the odometry jump release’s three in #363, and seed_correction_guard_tilt_deg in #373) and lidarloc_result gained degeneracy_remapped, degeneracy_dropped_m and horizontal_constraint. Take the new fields from lidarloc_default_tracking, which leaves each off.

The release adds the opt-in solution remapping of degenerate alignments (#360), the odometry jump release (#363, a quickstart default since #366), the tilt guard that fixes the Koide outdoor_hard_02b 115-160 s loss (#373), exclusion of detected objects from registration (#375) with a map-difference object detector (#374), dynamic obstacle tools for your own bags and a walking crowd (#370, #371), the negative result of tracking-based prefiltering (#372), and fixes to the startup roll and pitch (#368), the guards’ warmup (#369) and the reinitialization dropout waiver (#376).

Fixed: a reinitialization reset onto a wrong G2 answer after a short odometry stall. After an odom TF gap of more than 2 s in the last 120 s, the reinitialization supervisor reset on a single G2 answer without the second, agreeing one it otherwise waits for (the dropout waiver, kept for a sensor carried while covered). On a Koide outdoor_hard_02b crowd run, RKO-LIO stopped for 3.7 s while G2 searched; 18 s later, with the bridged pose 0.1 m from the ground truth, an answer 63 m off (score 0.33, registration fitness 4.05) passed every other gate and was published. Seed motion compensation then moved it 61 m on a “velocity” from two answers 100 m apart (the earlier one withheld as aliased), although the reset was stamped with its scan and the localizer carries such a reset to the present by odometry: the run was lost, 64 m at most. Now:

  • the waiver releases an answer only within reach of the bridged pose before the first gap: odometry_dropout_max_speed_mps (new supervisor parameter, default 5 m/s; 0 = the unbounded waiver) over each gap, plus the bridged motion between and after the gaps, plus 2 m. A farther answer waits for a second one that agrees after odometry, as without a dropout, and the log says so (... but the answer is N m from the bridged pose before the gap ...). A carried sensor (Koide outdoor_kidnap: up to 2.5 m/s) stays within it;
  • with an odom bridge pose at the answer’s scan stamp, seed motion compensation is skipped (the localizer carries the reset from its scan stamp by odometry); without odometry it is unchanged.

A replay of the run’s logged supervisor inputs (G2 answers, odom TF gap, bridged pose) reproduces the published reset to the centimetre on the old code and withholds it now (test_dropout_waiver_is_bounded_by_the_motion_the_gap_can_hide). In the synthetic comparison (experiments/odometry_dropout_confirmation) the bounded waiver passes every fixture the old one passed, with the same recovery times, and both 02b fixtures where the answer after a gap was wrong. Not measured on outdoor_kidnap_b (not on this machine) (measured).

New: exclude detected objects from registration (dynamic_objects_topic, off by default). Given a vision_msgs/Detection3DArray topic (stamped with the scan the detections came from; boxes in the map frame or any frame with TF), the node leaves the scan points inside the boxes, grown by dynamic_objects_margin_m (0.3), out of every alignment attempt of a scan, the NDT initializer and the local reacquisition, after deskew and the voxel filter and before the map-distance prefilter. Boxes in the map frame are moved into the scan by the scan’s seed; other frames go through TF (from the detection’s stamp to the scan’s, across the odometry frame). A scan uses the array stamped nearest to it within dynamic_objects_max_age_sec (0.5); detections scored below dynamic_objects_min_score (0) are dropped; a scan that would lose more than dynamic_objects_max_excluded_ratio (0.5) of its points, or keep fewer than min_registration_points, is aligned whole. The subscription has its own callback group. /alignment_status gains dynamic_objects_status, dynamic_objects_boxes, dynamic_objects_excluded_points and dynamic_objects_age_sec (also kept by tools/benchmark/record_pose.py); quickstart.py and create_lidar_localization_config.py gain --dynamic-objects-topic. The box test is a header without ROS types (dynamic_object_exclusion.hpp, unit-tested). The package now depends on vision_msgs (Foxy’s 2.x message layout is handled at compile time; built and tested on Jazzy only here); a build without it still works and the

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged lidar_localization_ros2 at Robotics Stack Exchange

No version for distro noetic showing github. Known supported distros are highlighted in the buttons above.
Package symbol

lidar_localization_ros2 package from lidar_localization_ros2 repo

lidar_localization_ros2

ROS Distro
github

Package Summary

Version 1.14.0
License BSD2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/rsasaki0109/lidar_localization_ros2.git
VCS Type git
VCS Version main
Last Updated 2026-12-01
Dev Status UNKNOWN
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

ROS 2 LiDAR localization with Nav2 integration, replay helpers, and benchmarking tools.

Maintainers

  • ryohei sasaki

Authors

No additional authors.

lidar_localization_ros2

Map-based 3D LiDAR localization for ROS 2 and Nav2.

build ROS 2 Jazzy ROS 2 Humble ROS 2 Foxy License BSD 2 Clause Sponsor on GitHub

Handheld outdoor run tracked on a prior point-cloud map; the estimate follows the ground truth for the whole run

Handheld Livox MID-360, ~390 m outdoors on a prior map, including stretches where the scans do not match the map and a section outside it. Each scan is matched to the map with NDT; RKO-LIO odometry predicts the motion between scans and carries the pose where matching fails. The error is 0.26 m RMSE for the whole run, in an offline replay started from the ground-truth pose (Koide Hard Point Cloud Localization Dataset outdoor_hard_02b, CC BY 4.0). How this was made · more runs

A Unitree Go2 starts with no pose on a map from another recording; ranked candidates appear all over the map, the best one is accepted, the scan snaps onto the map and the robot is tracked out of the room and down the stairs

Global localization on a Unitree Go2 (upside-down Livox MID-360), started with no initial pose, on a map from a different recording: the map is built from the run Long_Stairs, the scans come from the run Outdoor2, recorded 1.5 h later along the same route (the room was not rearranged in between). The quickstart searches the whole map: each query returns 32 ranked places (circles sized by score) in 2.6 s, and the answer is accepted when two queries agree after the odometry motion. The first pose came 13.3 s into the run, 6.4 s after the first search, 0.01 m from the motion-capture ground truth. Tracking then follows the robot out of the capture room and down the long staircase, within 0.02 m (median) of the ground truth where it exists (the room). Offline replay at 1× (JEPLO dataset, GPL-3.0; this GIF is derived from it and shared under the same licence). How this was made · pairs with moved props, including failures

Give it a point cloud map (.pcd or .ply) and a LiDAR stream; it publishes the robot pose in the map. It finds the starting pose by itself, uses odometry and IMU when you have them, and works standalone or as the localization source for Nav2.

Where to start

You want to Go to
Localize your robot on a map you already have Install, then Quick start
Run it on a Unitree Go2 or another MID-360 robot Go2 / MID-360 in five minutes
Navigate with Nav2 Nav2
Try it without a robot Run the public dataset
See how accurate it is Benchmark
Fix a bringup that does not work Troubleshooting

Install

ROS 2 Jazzy is the main target; Humble is supported. Foxy is end-of-life and supported on a best-effort basis: CI builds and tests it, and its differences are listed in the changelog under Unreleased.

All of them build from main. The old foxy, humble and jazzy branches are no longer kept; their last commits are the tags archive/foxy, archive/humble and archive/jazzy. ROS 2 Dashing, which main does not support, has the frozen dashing branch.

mkdir -p ~/lidarloc_ws/src
cd ~/lidarloc_ws/src
git clone https://github.com/rsasaki0109/lidar_localization_ros2.git
cd lidar_localization_ros2
scripts/bootstrap_colcon_workspace.sh --build
source ~/lidarloc_ws/install/setup.bash

This builds ndt_omp_ros2 and this package, about 30 minutes on an 8-core machine. small_gicp is optional (SMALL_GICP and SMALL_VGICP backends): on Jazzy, sudo apt install ros-jazzy-small-gicp-vendor before building is enough. For Humble, a manual or no-sudo build, see local build.

No ROS install? Build the Docker image and check it in one command:

docker build -f docker/Dockerfile -t lidar_localization_ros2 .
docker run --rm lidar_localization_ros2 /ws/src/lidar_localization_ros2/docker/smoke_status.sh

Quick start

  1. Start the LiDAR driver, and odometry if you have it.
  2. Run quickstart with your map:
   ros2 run lidar_localization_ros2 quickstart.py --map /absolute/path/to/map.pcd
   
  1. Check that it is tracking:
   ros2 run lidar_localization_ros2 check_lidar_localization_bringup.py --profile standalone
   

Quickstart finds the cloud and IMU topics, /clock, an odom -> base TF and the LiDAR frame, and prints what it picked on its Discovery: line. Then it starts the localizer and RViz. On the first run it searches the whole map for the robot; next time it restores the pose saved for the same map. If the search finds no safe match, it asks you for 2D Pose Estimate in RViz (press P, click the robot, drag along its heading) instead of guessing.

While it runs, the terminal prints one line whenever tracking starts, weakens, is lost or comes back, with what to do about it, and RViz shows the same status above the

File truncated at 100 lines see the full file

CHANGELOG

Changelog

Unreleased

1.14.0 - 2026-12-01

Upgrading: two behaviours change by default, both only for quickstart.py with odometry prediction on (the odom TF discovered, or --odom-tf-prediction), under every profile, and both can be turned off; two fixes change behaviour for everyone. Without odometry prediction, and for the node, the config generator, param/mid360_legged.yaml and quickstart.launch.py called directly, every setting keeps its 1.13.0 default except those fixes, and every new setting defaults to off.

  • Quickstart sets seed_correction_guard_tilt_deg: 5.0 (#373): a scan whose registration would tilt map -> odom more than 5 degrees from where it was once the guards warmed up is rejected. It assumes the odometry carries the vertical; with a planar (wheel) odometry on ramps, restore with --seed-correction-tilt-deg 0.
  • Quickstart sets seed_correction_guard_odometry_jump_release_m: 0.3 (#366), with the agreement release on (its default of 4 with odometry prediction). To restore: --seed-correction-odometry-jump-release-m 0.
  • The reinitialization supervisor’s dropout waiver is bounded (#376): after an odom TF gap it releases an answer only within odometry_dropout_max_speed_mps (new, 5 m/s; 0 = the unbounded waiver of 1.13.0) over the gap, plus the bridged motion, plus 2 m; a farther answer waits for a second one that agrees. A sensor carried faster than that through a gap needs a higher value.
  • A global fix published at startup now takes the roll and pitch of the odometry at publication, not those of its scan (#368), and the seed guards’ warmup no longer restarts for a gap the node made itself while aligning a slow scan (#369).
  • The package depends on vision_msgs (#375, #374): Detection3DArray carries dynamic_objects_topic and the new detector’s output. The build still works without it (the node then warns that the topic is ignored); install ros-$ROS_DISTRO-vision-msgs (rosdep does) to use them. CI builds the node on Foxy, Humble and Jazzy (Foxy’s vision_msgs 2.x layout is handled at compile time); the detector needs vision_msgs 4 (Humble, Jazzy).
  • C API callers must rebuild: lidarloc_tracking gained fields at its end (the degeneracy remapping’s three in #360, the odometry jump release’s three in #363, and seed_correction_guard_tilt_deg in #373) and lidarloc_result gained degeneracy_remapped, degeneracy_dropped_m and horizontal_constraint. Take the new fields from lidarloc_default_tracking, which leaves each off.

The release adds the opt-in solution remapping of degenerate alignments (#360), the odometry jump release (#363, a quickstart default since #366), the tilt guard that fixes the Koide outdoor_hard_02b 115-160 s loss (#373), exclusion of detected objects from registration (#375) with a map-difference object detector (#374), dynamic obstacle tools for your own bags and a walking crowd (#370, #371), the negative result of tracking-based prefiltering (#372), and fixes to the startup roll and pitch (#368), the guards’ warmup (#369) and the reinitialization dropout waiver (#376).

Fixed: a reinitialization reset onto a wrong G2 answer after a short odometry stall. After an odom TF gap of more than 2 s in the last 120 s, the reinitialization supervisor reset on a single G2 answer without the second, agreeing one it otherwise waits for (the dropout waiver, kept for a sensor carried while covered). On a Koide outdoor_hard_02b crowd run, RKO-LIO stopped for 3.7 s while G2 searched; 18 s later, with the bridged pose 0.1 m from the ground truth, an answer 63 m off (score 0.33, registration fitness 4.05) passed every other gate and was published. Seed motion compensation then moved it 61 m on a “velocity” from two answers 100 m apart (the earlier one withheld as aliased), although the reset was stamped with its scan and the localizer carries such a reset to the present by odometry: the run was lost, 64 m at most. Now:

  • the waiver releases an answer only within reach of the bridged pose before the first gap: odometry_dropout_max_speed_mps (new supervisor parameter, default 5 m/s; 0 = the unbounded waiver) over each gap, plus the bridged motion between and after the gaps, plus 2 m. A farther answer waits for a second one that agrees after odometry, as without a dropout, and the log says so (... but the answer is N m from the bridged pose before the gap ...). A carried sensor (Koide outdoor_kidnap: up to 2.5 m/s) stays within it;
  • with an odom bridge pose at the answer’s scan stamp, seed motion compensation is skipped (the localizer carries the reset from its scan stamp by odometry); without odometry it is unchanged.

A replay of the run’s logged supervisor inputs (G2 answers, odom TF gap, bridged pose) reproduces the published reset to the centimetre on the old code and withholds it now (test_dropout_waiver_is_bounded_by_the_motion_the_gap_can_hide). In the synthetic comparison (experiments/odometry_dropout_confirmation) the bounded waiver passes every fixture the old one passed, with the same recovery times, and both 02b fixtures where the answer after a gap was wrong. Not measured on outdoor_kidnap_b (not on this machine) (measured).

New: exclude detected objects from registration (dynamic_objects_topic, off by default). Given a vision_msgs/Detection3DArray topic (stamped with the scan the detections came from; boxes in the map frame or any frame with TF), the node leaves the scan points inside the boxes, grown by dynamic_objects_margin_m (0.3), out of every alignment attempt of a scan, the NDT initializer and the local reacquisition, after deskew and the voxel filter and before the map-distance prefilter. Boxes in the map frame are moved into the scan by the scan’s seed; other frames go through TF (from the detection’s stamp to the scan’s, across the odometry frame). A scan uses the array stamped nearest to it within dynamic_objects_max_age_sec (0.5); detections scored below dynamic_objects_min_score (0) are dropped; a scan that would lose more than dynamic_objects_max_excluded_ratio (0.5) of its points, or keep fewer than min_registration_points, is aligned whole. The subscription has its own callback group. /alignment_status gains dynamic_objects_status, dynamic_objects_boxes, dynamic_objects_excluded_points and dynamic_objects_age_sec (also kept by tools/benchmark/record_pose.py); quickstart.py and create_lidar_localization_config.py gain --dynamic-objects-topic. The box test is a header without ROS types (dynamic_object_exclusion.hpp, unit-tested). The package now depends on vision_msgs (Foxy’s 2.x message layout is handled at compile time; built and tested on Jazzy only here); a build without it still works and the

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged lidar_localization_ros2 at Robotics Stack Exchange