Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request makes significant performance and maintainability improvements to the
go2_lidar_localization.pynode by replacing thetf_transformationsdependency withscipy.spatial.transform.Rotation, introducing Numba-accelerated functions for scan matching, and refactoring related code paths. The changes enhance scan matching speed, simplify dependencies, and modernize pose and transformation handling.Performance optimizations (scan matching and pose evaluation):
evaluate_pose_numba,evaluate_multiple_poses, andcreate_gradient_mask_numbafor fast, parallelized scan matching and mask creation, and integrated them into the main localization flow. [1] [2] [3] [4] [5] [6] [7]Dependency and transformation handling refactor:
tf_transformationswithscipy.spatial.transform.Rotationfor quaternion and rotation matrix operations, and removed thetf_transformationsdependency from bothpackage.xmlandpyproject.toml. [1] [2] [3] [4] [5] [6] [7] [8]Dependency updates:
pyproject.tomlto require newer versions ofscipyandnumpy, and addednumbaas a dependency for JIT acceleration.tf_transformationsdependency. [1] [2]General code modernization and cleanup:
np.float64for consistency and Numba compatibility. [1] [2]These changes collectively improve the speed, reliability, and maintainability of the lidar localization node.