Repo symbol

nanoflann_vendor repository

nanoflann_vendor

ROS Distro
humble

Repository Summary

Description
Checkout URI https://github.com/jlblancoc/nanoflann.git
VCS Type git
VCS Version master
Last Updated 2026-10-11
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
nanoflann_vendor 2.0.0

README

nanoflann

nanoflann

CI Linux CI Check clang-format CircleCI Windows build status codecov

Distro Build dev Build releases Stable version
ROS 2 Humble (u22.04) Build Status Build Status
Build Status
Version
ROS 2 Jazzy (u24.04) Build Status Build Status
Build Status
Version
ROS 2 Kilted (u24.04) Build Status Build Status
Build Status
Version
ROS 2 Lyrical (u26.04) Build Status Build Status
Build Status
Version
ROS 2 Rolling (u26.04) Build Status Build Status
Build Status
Version

(Binary build badges are for amd64 and arm64, respectively)

1. About

nanoflann is a header-only C++ library for building KD-Trees of datasets with different topologies. The Euclidean core (R2, R3, RN point clouds) is C++11; the optional compile-time product-manifold metrics — SO(2), SO(3), SE(2), SE(3), the unit sphere S2/SN, tori, and arbitrary products — require C++17 (see §1.5). It also provides incremental / dynamic KD-tree indices for point clouds that change over time (e.g. sliding-window LiDAR maps). nanoflann returns exact nearest neighbors by default (an optional eps-approximate mode is available via SearchParameters::eps). It does not require compiling or installing: you just need to #include <nanoflann.hpp> in your code.

This library is a fork of the flann library by Marius Muja and David G. Lowe, and born as a child project of MRPT. Following the original license terms, nanoflann is distributed under the BSD license. Please, for bugs use the issues button or fork and open a pull request.

Citing nanoflann

If you use nanoflann in your research, please cite the following paper (accepted for publication in IEEE RA-L, 2026):

J.L. Blanco-Claraco, “nanoflann: A Header-Only KD-Tree Library for Exact Nearest-Neighbor Search on Compile-Time Product Manifolds,” IEEE Robotics and Automation Letters, 2026 (accepted).

@article{blancoclaraco2026nanoflann,
  title   = {nanoflann: A Header-Only {KD}-Tree Library for Exact Nearest-Neighbor Search on Compile-Time Product Manifolds},
  author  = {Blanco-Claraco, Jose Luis},
  journal = {IEEE Robotics and Automation Letters},
  year    = {2026},
  note    = {Accepted for publication}
}

Citation for the original software release (2014) ```bibtex @misc{blanco2014nanoflann, title = {nanoflann: a {C}++ header-only fork of {FLANN}, a library for Nearest Neighbor ({NN}) with KD-trees}, author = {Blanco, Jose Luis and Rai, Pranjal Kumar}, howpublished = {\url{https://github.com/jlblancoc/nanoflann}}, year = {2014} } ```

See the release CHANGELOG for a list of project changes.

1.1. Obtaining the code

  • Easiest way: clone this GIT repository and take the include/nanoflann.hpp file for use where you need it.
  • Debian or Ubuntu (21.04 or newer) users can install it simply with:
  $ sudo apt install libnanoflann-dev
  
  • macOS users can install nanoflann with Homebrew with:
  $ brew install brewsci/science/nanoflann
  

or

  $ brew tap brewsci/science
  $ brew install nanoflann
  

MacPorts users can use:

  $ sudo port install nanoflann
  

Although nanoflann itself doesn’t have to be compiled, you can build some examples and tests with:

$ sudo apt-get install build-essential cmake libgtest-dev libeigen3-dev
$ mkdir build && cd build && cmake ..
$ make && make test

1.2. C++ API reference

  • Browse the Doxygen documentation.

  • Important note: If L2 norms are used, notice that search radius and all passed and returned distances are actually squared distances.

1.3. Code examples

File truncated at 100 lines see the full file

Repo symbol

nanoflann_vendor repository

nanoflann_vendor

ROS Distro
jazzy

Repository Summary

Description
Checkout URI https://github.com/jlblancoc/nanoflann.git
VCS Type git
VCS Version master
Last Updated 2026-10-11
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
nanoflann_vendor 2.0.0

README

nanoflann

nanoflann

CI Linux CI Check clang-format CircleCI Windows build status codecov

Distro Build dev Build releases Stable version
ROS 2 Humble (u22.04) Build Status Build Status
Build Status
Version
ROS 2 Jazzy (u24.04) Build Status Build Status
Build Status
Version
ROS 2 Kilted (u24.04) Build Status Build Status
Build Status
Version
ROS 2 Lyrical (u26.04) Build Status Build Status
Build Status
Version
ROS 2 Rolling (u26.04) Build Status Build Status
Build Status
Version

(Binary build badges are for amd64 and arm64, respectively)

1. About

nanoflann is a header-only C++ library for building KD-Trees of datasets with different topologies. The Euclidean core (R2, R3, RN point clouds) is C++11; the optional compile-time product-manifold metrics — SO(2), SO(3), SE(2), SE(3), the unit sphere S2/SN, tori, and arbitrary products — require C++17 (see §1.5). It also provides incremental / dynamic KD-tree indices for point clouds that change over time (e.g. sliding-window LiDAR maps). nanoflann returns exact nearest neighbors by default (an optional eps-approximate mode is available via SearchParameters::eps). It does not require compiling or installing: you just need to #include <nanoflann.hpp> in your code.

This library is a fork of the flann library by Marius Muja and David G. Lowe, and born as a child project of MRPT. Following the original license terms, nanoflann is distributed under the BSD license. Please, for bugs use the issues button or fork and open a pull request.

Citing nanoflann

If you use nanoflann in your research, please cite the following paper (accepted for publication in IEEE RA-L, 2026):

J.L. Blanco-Claraco, “nanoflann: A Header-Only KD-Tree Library for Exact Nearest-Neighbor Search on Compile-Time Product Manifolds,” IEEE Robotics and Automation Letters, 2026 (accepted).

@article{blancoclaraco2026nanoflann,
  title   = {nanoflann: A Header-Only {KD}-Tree Library for Exact Nearest-Neighbor Search on Compile-Time Product Manifolds},
  author  = {Blanco-Claraco, Jose Luis},
  journal = {IEEE Robotics and Automation Letters},
  year    = {2026},
  note    = {Accepted for publication}
}

Citation for the original software release (2014) ```bibtex @misc{blanco2014nanoflann, title = {nanoflann: a {C}++ header-only fork of {FLANN}, a library for Nearest Neighbor ({NN}) with KD-trees}, author = {Blanco, Jose Luis and Rai, Pranjal Kumar}, howpublished = {\url{https://github.com/jlblancoc/nanoflann}}, year = {2014} } ```

See the release CHANGELOG for a list of project changes.

1.1. Obtaining the code

  • Easiest way: clone this GIT repository and take the include/nanoflann.hpp file for use where you need it.
  • Debian or Ubuntu (21.04 or newer) users can install it simply with:
  $ sudo apt install libnanoflann-dev
  
  • macOS users can install nanoflann with Homebrew with:
  $ brew install brewsci/science/nanoflann
  

or

  $ brew tap brewsci/science
  $ brew install nanoflann
  

MacPorts users can use:

  $ sudo port install nanoflann
  

Although nanoflann itself doesn’t have to be compiled, you can build some examples and tests with:

$ sudo apt-get install build-essential cmake libgtest-dev libeigen3-dev
$ mkdir build && cd build && cmake ..
$ make && make test

1.2. C++ API reference

  • Browse the Doxygen documentation.

  • Important note: If L2 norms are used, notice that search radius and all passed and returned distances are actually squared distances.

1.3. Code examples

File truncated at 100 lines see the full file

Repo symbol

nanoflann_vendor repository

nanoflann_vendor

ROS Distro
kilted

Repository Summary

Description
Checkout URI https://github.com/jlblancoc/nanoflann.git
VCS Type git
VCS Version master
Last Updated 2026-10-11
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
nanoflann_vendor 2.0.0

README

nanoflann

nanoflann

CI Linux CI Check clang-format CircleCI Windows build status codecov

Distro Build dev Build releases Stable version
ROS 2 Humble (u22.04) Build Status Build Status
Build Status
Version
ROS 2 Jazzy (u24.04) Build Status Build Status
Build Status
Version
ROS 2 Kilted (u24.04) Build Status Build Status
Build Status
Version
ROS 2 Lyrical (u26.04) Build Status Build Status
Build Status
Version
ROS 2 Rolling (u26.04) Build Status Build Status
Build Status
Version

(Binary build badges are for amd64 and arm64, respectively)

1. About

nanoflann is a header-only C++ library for building KD-Trees of datasets with different topologies. The Euclidean core (R2, R3, RN point clouds) is C++11; the optional compile-time product-manifold metrics — SO(2), SO(3), SE(2), SE(3), the unit sphere S2/SN, tori, and arbitrary products — require C++17 (see §1.5). It also provides incremental / dynamic KD-tree indices for point clouds that change over time (e.g. sliding-window LiDAR maps). nanoflann returns exact nearest neighbors by default (an optional eps-approximate mode is available via SearchParameters::eps). It does not require compiling or installing: you just need to #include <nanoflann.hpp> in your code.

This library is a fork of the flann library by Marius Muja and David G. Lowe, and born as a child project of MRPT. Following the original license terms, nanoflann is distributed under the BSD license. Please, for bugs use the issues button or fork and open a pull request.

Citing nanoflann

If you use nanoflann in your research, please cite the following paper (accepted for publication in IEEE RA-L, 2026):

J.L. Blanco-Claraco, “nanoflann: A Header-Only KD-Tree Library for Exact Nearest-Neighbor Search on Compile-Time Product Manifolds,” IEEE Robotics and Automation Letters, 2026 (accepted).

@article{blancoclaraco2026nanoflann,
  title   = {nanoflann: A Header-Only {KD}-Tree Library for Exact Nearest-Neighbor Search on Compile-Time Product Manifolds},
  author  = {Blanco-Claraco, Jose Luis},
  journal = {IEEE Robotics and Automation Letters},
  year    = {2026},
  note    = {Accepted for publication}
}

Citation for the original software release (2014) ```bibtex @misc{blanco2014nanoflann, title = {nanoflann: a {C}++ header-only fork of {FLANN}, a library for Nearest Neighbor ({NN}) with KD-trees}, author = {Blanco, Jose Luis and Rai, Pranjal Kumar}, howpublished = {\url{https://github.com/jlblancoc/nanoflann}}, year = {2014} } ```

See the release CHANGELOG for a list of project changes.

1.1. Obtaining the code

  • Easiest way: clone this GIT repository and take the include/nanoflann.hpp file for use where you need it.
  • Debian or Ubuntu (21.04 or newer) users can install it simply with:
  $ sudo apt install libnanoflann-dev
  
  • macOS users can install nanoflann with Homebrew with:
  $ brew install brewsci/science/nanoflann
  

or

  $ brew tap brewsci/science
  $ brew install nanoflann
  

MacPorts users can use:

  $ sudo port install nanoflann
  

Although nanoflann itself doesn’t have to be compiled, you can build some examples and tests with:

$ sudo apt-get install build-essential cmake libgtest-dev libeigen3-dev
$ mkdir build && cd build && cmake ..
$ make && make test

1.2. C++ API reference

  • Browse the Doxygen documentation.

  • Important note: If L2 norms are used, notice that search radius and all passed and returned distances are actually squared distances.

1.3. Code examples

File truncated at 100 lines see the full file

Repo symbol

nanoflann_vendor repository

nanoflann_vendor

ROS Distro
lyrical

Repository Summary

Description
Checkout URI https://github.com/jlblancoc/nanoflann.git
VCS Type git
VCS Version master
Last Updated 2026-10-11
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
nanoflann_vendor 2.0.0

README

nanoflann

nanoflann

CI Linux CI Check clang-format CircleCI Windows build status codecov

Distro Build dev Build releases Stable version
ROS 2 Humble (u22.04) Build Status Build Status
Build Status
Version
ROS 2 Jazzy (u24.04) Build Status Build Status
Build Status
Version
ROS 2 Kilted (u24.04) Build Status Build Status
Build Status
Version
ROS 2 Lyrical (u26.04) Build Status Build Status
Build Status
Version
ROS 2 Rolling (u26.04) Build Status Build Status
Build Status
Version

(Binary build badges are for amd64 and arm64, respectively)

1. About

nanoflann is a header-only C++ library for building KD-Trees of datasets with different topologies. The Euclidean core (R2, R3, RN point clouds) is C++11; the optional compile-time product-manifold metrics — SO(2), SO(3), SE(2), SE(3), the unit sphere S2/SN, tori, and arbitrary products — require C++17 (see §1.5). It also provides incremental / dynamic KD-tree indices for point clouds that change over time (e.g. sliding-window LiDAR maps). nanoflann returns exact nearest neighbors by default (an optional eps-approximate mode is available via SearchParameters::eps). It does not require compiling or installing: you just need to #include <nanoflann.hpp> in your code.

This library is a fork of the flann library by Marius Muja and David G. Lowe, and born as a child project of MRPT. Following the original license terms, nanoflann is distributed under the BSD license. Please, for bugs use the issues button or fork and open a pull request.

Citing nanoflann

If you use nanoflann in your research, please cite the following paper (accepted for publication in IEEE RA-L, 2026):

J.L. Blanco-Claraco, “nanoflann: A Header-Only KD-Tree Library for Exact Nearest-Neighbor Search on Compile-Time Product Manifolds,” IEEE Robotics and Automation Letters, 2026 (accepted).

@article{blancoclaraco2026nanoflann,
  title   = {nanoflann: A Header-Only {KD}-Tree Library for Exact Nearest-Neighbor Search on Compile-Time Product Manifolds},
  author  = {Blanco-Claraco, Jose Luis},
  journal = {IEEE Robotics and Automation Letters},
  year    = {2026},
  note    = {Accepted for publication}
}

Citation for the original software release (2014) ```bibtex @misc{blanco2014nanoflann, title = {nanoflann: a {C}++ header-only fork of {FLANN}, a library for Nearest Neighbor ({NN}) with KD-trees}, author = {Blanco, Jose Luis and Rai, Pranjal Kumar}, howpublished = {\url{https://github.com/jlblancoc/nanoflann}}, year = {2014} } ```

See the release CHANGELOG for a list of project changes.

1.1. Obtaining the code

  • Easiest way: clone this GIT repository and take the include/nanoflann.hpp file for use where you need it.
  • Debian or Ubuntu (21.04 or newer) users can install it simply with:
  $ sudo apt install libnanoflann-dev
  
  • macOS users can install nanoflann with Homebrew with:
  $ brew install brewsci/science/nanoflann
  

or

  $ brew tap brewsci/science
  $ brew install nanoflann
  

MacPorts users can use:

  $ sudo port install nanoflann
  

Although nanoflann itself doesn’t have to be compiled, you can build some examples and tests with:

$ sudo apt-get install build-essential cmake libgtest-dev libeigen3-dev
$ mkdir build && cd build && cmake ..
$ make && make test

1.2. C++ API reference

  • Browse the Doxygen documentation.

  • Important note: If L2 norms are used, notice that search radius and all passed and returned distances are actually squared distances.

1.3. Code examples

File truncated at 100 lines see the full file

Repo symbol

nanoflann_vendor repository

nanoflann_vendor

ROS Distro
rolling

Repository Summary

Description
Checkout URI https://github.com/jlblancoc/nanoflann.git
VCS Type git
VCS Version master
Last Updated 2026-10-11
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
nanoflann_vendor 2.0.0

README

nanoflann

nanoflann

CI Linux CI Check clang-format CircleCI Windows build status codecov

Distro Build dev Build releases Stable version
ROS 2 Humble (u22.04) Build Status Build Status
Build Status
Version
ROS 2 Jazzy (u24.04) Build Status Build Status
Build Status
Version
ROS 2 Kilted (u24.04) Build Status Build Status
Build Status
Version
ROS 2 Lyrical (u26.04) Build Status Build Status
Build Status
Version
ROS 2 Rolling (u26.04) Build Status Build Status
Build Status
Version

(Binary build badges are for amd64 and arm64, respectively)

1. About

nanoflann is a header-only C++ library for building KD-Trees of datasets with different topologies. The Euclidean core (R2, R3, RN point clouds) is C++11; the optional compile-time product-manifold metrics — SO(2), SO(3), SE(2), SE(3), the unit sphere S2/SN, tori, and arbitrary products — require C++17 (see §1.5). It also provides incremental / dynamic KD-tree indices for point clouds that change over time (e.g. sliding-window LiDAR maps). nanoflann returns exact nearest neighbors by default (an optional eps-approximate mode is available via SearchParameters::eps). It does not require compiling or installing: you just need to #include <nanoflann.hpp> in your code.

This library is a fork of the flann library by Marius Muja and David G. Lowe, and born as a child project of MRPT. Following the original license terms, nanoflann is distributed under the BSD license. Please, for bugs use the issues button or fork and open a pull request.

Citing nanoflann

If you use nanoflann in your research, please cite the following paper (accepted for publication in IEEE RA-L, 2026):

J.L. Blanco-Claraco, “nanoflann: A Header-Only KD-Tree Library for Exact Nearest-Neighbor Search on Compile-Time Product Manifolds,” IEEE Robotics and Automation Letters, 2026 (accepted).

@article{blancoclaraco2026nanoflann,
  title   = {nanoflann: A Header-Only {KD}-Tree Library for Exact Nearest-Neighbor Search on Compile-Time Product Manifolds},
  author  = {Blanco-Claraco, Jose Luis},
  journal = {IEEE Robotics and Automation Letters},
  year    = {2026},
  note    = {Accepted for publication}
}

Citation for the original software release (2014) ```bibtex @misc{blanco2014nanoflann, title = {nanoflann: a {C}++ header-only fork of {FLANN}, a library for Nearest Neighbor ({NN}) with KD-trees}, author = {Blanco, Jose Luis and Rai, Pranjal Kumar}, howpublished = {\url{https://github.com/jlblancoc/nanoflann}}, year = {2014} } ```

See the release CHANGELOG for a list of project changes.

1.1. Obtaining the code

  • Easiest way: clone this GIT repository and take the include/nanoflann.hpp file for use where you need it.
  • Debian or Ubuntu (21.04 or newer) users can install it simply with:
  $ sudo apt install libnanoflann-dev
  
  • macOS users can install nanoflann with Homebrew with:
  $ brew install brewsci/science/nanoflann
  

or

  $ brew tap brewsci/science
  $ brew install nanoflann
  

MacPorts users can use:

  $ sudo port install nanoflann
  

Although nanoflann itself doesn’t have to be compiled, you can build some examples and tests with:

$ sudo apt-get install build-essential cmake libgtest-dev libeigen3-dev
$ mkdir build && cd build && cmake ..
$ make && make test

1.2. C++ API reference

  • Browse the Doxygen documentation.

  • Important note: If L2 norms are used, notice that search radius and all passed and returned distances are actually squared distances.

1.3. Code examples

File truncated at 100 lines see the full file

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

nanoflann_vendor repository

nanoflann_vendor

ROS Distro
humble

Repository Summary

Description
Checkout URI https://github.com/jlblancoc/nanoflann.git
VCS Type git
VCS Version master
Last Updated 2026-10-11
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
nanoflann_vendor 2.0.0

README

nanoflann

nanoflann

CI Linux CI Check clang-format CircleCI Windows build status codecov

Distro Build dev Build releases Stable version
ROS 2 Humble (u22.04) Build Status Build Status
Build Status
Version
ROS 2 Jazzy (u24.04) Build Status Build Status
Build Status
Version
ROS 2 Kilted (u24.04) Build Status Build Status
Build Status
Version
ROS 2 Lyrical (u26.04) Build Status Build Status
Build Status
Version
ROS 2 Rolling (u26.04) Build Status Build Status
Build Status
Version

(Binary build badges are for amd64 and arm64, respectively)

1. About

nanoflann is a header-only C++ library for building KD-Trees of datasets with different topologies. The Euclidean core (R2, R3, RN point clouds) is C++11; the optional compile-time product-manifold metrics — SO(2), SO(3), SE(2), SE(3), the unit sphere S2/SN, tori, and arbitrary products — require C++17 (see §1.5). It also provides incremental / dynamic KD-tree indices for point clouds that change over time (e.g. sliding-window LiDAR maps). nanoflann returns exact nearest neighbors by default (an optional eps-approximate mode is available via SearchParameters::eps). It does not require compiling or installing: you just need to #include <nanoflann.hpp> in your code.

This library is a fork of the flann library by Marius Muja and David G. Lowe, and born as a child project of MRPT. Following the original license terms, nanoflann is distributed under the BSD license. Please, for bugs use the issues button or fork and open a pull request.

Citing nanoflann

If you use nanoflann in your research, please cite the following paper (accepted for publication in IEEE RA-L, 2026):

J.L. Blanco-Claraco, “nanoflann: A Header-Only KD-Tree Library for Exact Nearest-Neighbor Search on Compile-Time Product Manifolds,” IEEE Robotics and Automation Letters, 2026 (accepted).

@article{blancoclaraco2026nanoflann,
  title   = {nanoflann: A Header-Only {KD}-Tree Library for Exact Nearest-Neighbor Search on Compile-Time Product Manifolds},
  author  = {Blanco-Claraco, Jose Luis},
  journal = {IEEE Robotics and Automation Letters},
  year    = {2026},
  note    = {Accepted for publication}
}

Citation for the original software release (2014) ```bibtex @misc{blanco2014nanoflann, title = {nanoflann: a {C}++ header-only fork of {FLANN}, a library for Nearest Neighbor ({NN}) with KD-trees}, author = {Blanco, Jose Luis and Rai, Pranjal Kumar}, howpublished = {\url{https://github.com/jlblancoc/nanoflann}}, year = {2014} } ```

See the release CHANGELOG for a list of project changes.

1.1. Obtaining the code

  • Easiest way: clone this GIT repository and take the include/nanoflann.hpp file for use where you need it.
  • Debian or Ubuntu (21.04 or newer) users can install it simply with:
  $ sudo apt install libnanoflann-dev
  
  • macOS users can install nanoflann with Homebrew with:
  $ brew install brewsci/science/nanoflann
  

or

  $ brew tap brewsci/science
  $ brew install nanoflann
  

MacPorts users can use:

  $ sudo port install nanoflann
  

Although nanoflann itself doesn’t have to be compiled, you can build some examples and tests with:

$ sudo apt-get install build-essential cmake libgtest-dev libeigen3-dev
$ mkdir build && cd build && cmake ..
$ make && make test

1.2. C++ API reference

  • Browse the Doxygen documentation.

  • Important note: If L2 norms are used, notice that search radius and all passed and returned distances are actually squared distances.

1.3. Code examples

File truncated at 100 lines see the full file

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

nanoflann_vendor repository

nanoflann_vendor

ROS Distro
humble

Repository Summary

Description
Checkout URI https://github.com/jlblancoc/nanoflann.git
VCS Type git
VCS Version master
Last Updated 2026-10-11
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
nanoflann_vendor 2.0.0

README

nanoflann

nanoflann

CI Linux CI Check clang-format CircleCI Windows build status codecov

Distro Build dev Build releases Stable version
ROS 2 Humble (u22.04) Build Status Build Status
Build Status
Version
ROS 2 Jazzy (u24.04) Build Status Build Status
Build Status
Version
ROS 2 Kilted (u24.04) Build Status Build Status
Build Status
Version
ROS 2 Lyrical (u26.04) Build Status Build Status
Build Status
Version
ROS 2 Rolling (u26.04) Build Status Build Status
Build Status
Version

(Binary build badges are for amd64 and arm64, respectively)

1. About

nanoflann is a header-only C++ library for building KD-Trees of datasets with different topologies. The Euclidean core (R2, R3, RN point clouds) is C++11; the optional compile-time product-manifold metrics — SO(2), SO(3), SE(2), SE(3), the unit sphere S2/SN, tori, and arbitrary products — require C++17 (see §1.5). It also provides incremental / dynamic KD-tree indices for point clouds that change over time (e.g. sliding-window LiDAR maps). nanoflann returns exact nearest neighbors by default (an optional eps-approximate mode is available via SearchParameters::eps). It does not require compiling or installing: you just need to #include <nanoflann.hpp> in your code.

This library is a fork of the flann library by Marius Muja and David G. Lowe, and born as a child project of MRPT. Following the original license terms, nanoflann is distributed under the BSD license. Please, for bugs use the issues button or fork and open a pull request.

Citing nanoflann

If you use nanoflann in your research, please cite the following paper (accepted for publication in IEEE RA-L, 2026):

J.L. Blanco-Claraco, “nanoflann: A Header-Only KD-Tree Library for Exact Nearest-Neighbor Search on Compile-Time Product Manifolds,” IEEE Robotics and Automation Letters, 2026 (accepted).

@article{blancoclaraco2026nanoflann,
  title   = {nanoflann: A Header-Only {KD}-Tree Library for Exact Nearest-Neighbor Search on Compile-Time Product Manifolds},
  author  = {Blanco-Claraco, Jose Luis},
  journal = {IEEE Robotics and Automation Letters},
  year    = {2026},
  note    = {Accepted for publication}
}

Citation for the original software release (2014) ```bibtex @misc{blanco2014nanoflann, title = {nanoflann: a {C}++ header-only fork of {FLANN}, a library for Nearest Neighbor ({NN}) with KD-trees}, author = {Blanco, Jose Luis and Rai, Pranjal Kumar}, howpublished = {\url{https://github.com/jlblancoc/nanoflann}}, year = {2014} } ```

See the release CHANGELOG for a list of project changes.

1.1. Obtaining the code

  • Easiest way: clone this GIT repository and take the include/nanoflann.hpp file for use where you need it.
  • Debian or Ubuntu (21.04 or newer) users can install it simply with:
  $ sudo apt install libnanoflann-dev
  
  • macOS users can install nanoflann with Homebrew with:
  $ brew install brewsci/science/nanoflann
  

or

  $ brew tap brewsci/science
  $ brew install nanoflann
  

MacPorts users can use:

  $ sudo port install nanoflann
  

Although nanoflann itself doesn’t have to be compiled, you can build some examples and tests with:

$ sudo apt-get install build-essential cmake libgtest-dev libeigen3-dev
$ mkdir build && cd build && cmake ..
$ make && make test

1.2. C++ API reference

  • Browse the Doxygen documentation.

  • Important note: If L2 norms are used, notice that search radius and all passed and returned distances are actually squared distances.

1.3. Code examples

File truncated at 100 lines see the full file

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

nanoflann_vendor repository

nanoflann_vendor

ROS Distro
humble

Repository Summary

Description
Checkout URI https://github.com/jlblancoc/nanoflann.git
VCS Type git
VCS Version master
Last Updated 2026-10-11
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
nanoflann_vendor 2.0.0

README

nanoflann

nanoflann

CI Linux CI Check clang-format CircleCI Windows build status codecov

Distro Build dev Build releases Stable version
ROS 2 Humble (u22.04) Build Status Build Status
Build Status
Version
ROS 2 Jazzy (u24.04) Build Status Build Status
Build Status
Version
ROS 2 Kilted (u24.04) Build Status Build Status
Build Status
Version
ROS 2 Lyrical (u26.04) Build Status Build Status
Build Status
Version
ROS 2 Rolling (u26.04) Build Status Build Status
Build Status
Version

(Binary build badges are for amd64 and arm64, respectively)

1. About

nanoflann is a header-only C++ library for building KD-Trees of datasets with different topologies. The Euclidean core (R2, R3, RN point clouds) is C++11; the optional compile-time product-manifold metrics — SO(2), SO(3), SE(2), SE(3), the unit sphere S2/SN, tori, and arbitrary products — require C++17 (see §1.5). It also provides incremental / dynamic KD-tree indices for point clouds that change over time (e.g. sliding-window LiDAR maps). nanoflann returns exact nearest neighbors by default (an optional eps-approximate mode is available via SearchParameters::eps). It does not require compiling or installing: you just need to #include <nanoflann.hpp> in your code.

This library is a fork of the flann library by Marius Muja and David G. Lowe, and born as a child project of MRPT. Following the original license terms, nanoflann is distributed under the BSD license. Please, for bugs use the issues button or fork and open a pull request.

Citing nanoflann

If you use nanoflann in your research, please cite the following paper (accepted for publication in IEEE RA-L, 2026):

J.L. Blanco-Claraco, “nanoflann: A Header-Only KD-Tree Library for Exact Nearest-Neighbor Search on Compile-Time Product Manifolds,” IEEE Robotics and Automation Letters, 2026 (accepted).

@article{blancoclaraco2026nanoflann,
  title   = {nanoflann: A Header-Only {KD}-Tree Library for Exact Nearest-Neighbor Search on Compile-Time Product Manifolds},
  author  = {Blanco-Claraco, Jose Luis},
  journal = {IEEE Robotics and Automation Letters},
  year    = {2026},
  note    = {Accepted for publication}
}

Citation for the original software release (2014) ```bibtex @misc{blanco2014nanoflann, title = {nanoflann: a {C}++ header-only fork of {FLANN}, a library for Nearest Neighbor ({NN}) with KD-trees}, author = {Blanco, Jose Luis and Rai, Pranjal Kumar}, howpublished = {\url{https://github.com/jlblancoc/nanoflann}}, year = {2014} } ```

See the release CHANGELOG for a list of project changes.

1.1. Obtaining the code

  • Easiest way: clone this GIT repository and take the include/nanoflann.hpp file for use where you need it.
  • Debian or Ubuntu (21.04 or newer) users can install it simply with:
  $ sudo apt install libnanoflann-dev
  
  • macOS users can install nanoflann with Homebrew with:
  $ brew install brewsci/science/nanoflann
  

or

  $ brew tap brewsci/science
  $ brew install nanoflann
  

MacPorts users can use:

  $ sudo port install nanoflann
  

Although nanoflann itself doesn’t have to be compiled, you can build some examples and tests with:

$ sudo apt-get install build-essential cmake libgtest-dev libeigen3-dev
$ mkdir build && cd build && cmake ..
$ make && make test

1.2. C++ API reference

  • Browse the Doxygen documentation.

  • Important note: If L2 norms are used, notice that search radius and all passed and returned distances are actually squared distances.

1.3. Code examples

File truncated at 100 lines see the full file

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

nanoflann_vendor repository

nanoflann_vendor

ROS Distro
humble

Repository Summary

Description
Checkout URI https://github.com/jlblancoc/nanoflann.git
VCS Type git
VCS Version master
Last Updated 2026-10-11
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
nanoflann_vendor 2.0.0

README

nanoflann

nanoflann

CI Linux CI Check clang-format CircleCI Windows build status codecov

Distro Build dev Build releases Stable version
ROS 2 Humble (u22.04) Build Status Build Status
Build Status
Version
ROS 2 Jazzy (u24.04) Build Status Build Status
Build Status
Version
ROS 2 Kilted (u24.04) Build Status Build Status
Build Status
Version
ROS 2 Lyrical (u26.04) Build Status Build Status
Build Status
Version
ROS 2 Rolling (u26.04) Build Status Build Status
Build Status
Version

(Binary build badges are for amd64 and arm64, respectively)

1. About

nanoflann is a header-only C++ library for building KD-Trees of datasets with different topologies. The Euclidean core (R2, R3, RN point clouds) is C++11; the optional compile-time product-manifold metrics — SO(2), SO(3), SE(2), SE(3), the unit sphere S2/SN, tori, and arbitrary products — require C++17 (see §1.5). It also provides incremental / dynamic KD-tree indices for point clouds that change over time (e.g. sliding-window LiDAR maps). nanoflann returns exact nearest neighbors by default (an optional eps-approximate mode is available via SearchParameters::eps). It does not require compiling or installing: you just need to #include <nanoflann.hpp> in your code.

This library is a fork of the flann library by Marius Muja and David G. Lowe, and born as a child project of MRPT. Following the original license terms, nanoflann is distributed under the BSD license. Please, for bugs use the issues button or fork and open a pull request.

Citing nanoflann

If you use nanoflann in your research, please cite the following paper (accepted for publication in IEEE RA-L, 2026):

J.L. Blanco-Claraco, “nanoflann: A Header-Only KD-Tree Library for Exact Nearest-Neighbor Search on Compile-Time Product Manifolds,” IEEE Robotics and Automation Letters, 2026 (accepted).

@article{blancoclaraco2026nanoflann,
  title   = {nanoflann: A Header-Only {KD}-Tree Library for Exact Nearest-Neighbor Search on Compile-Time Product Manifolds},
  author  = {Blanco-Claraco, Jose Luis},
  journal = {IEEE Robotics and Automation Letters},
  year    = {2026},
  note    = {Accepted for publication}
}

Citation for the original software release (2014) ```bibtex @misc{blanco2014nanoflann, title = {nanoflann: a {C}++ header-only fork of {FLANN}, a library for Nearest Neighbor ({NN}) with KD-trees}, author = {Blanco, Jose Luis and Rai, Pranjal Kumar}, howpublished = {\url{https://github.com/jlblancoc/nanoflann}}, year = {2014} } ```

See the release CHANGELOG for a list of project changes.

1.1. Obtaining the code

  • Easiest way: clone this GIT repository and take the include/nanoflann.hpp file for use where you need it.
  • Debian or Ubuntu (21.04 or newer) users can install it simply with:
  $ sudo apt install libnanoflann-dev
  
  • macOS users can install nanoflann with Homebrew with:
  $ brew install brewsci/science/nanoflann
  

or

  $ brew tap brewsci/science
  $ brew install nanoflann
  

MacPorts users can use:

  $ sudo port install nanoflann
  

Although nanoflann itself doesn’t have to be compiled, you can build some examples and tests with:

$ sudo apt-get install build-essential cmake libgtest-dev libeigen3-dev
$ mkdir build && cd build && cmake ..
$ make && make test

1.2. C++ API reference

  • Browse the Doxygen documentation.

  • Important note: If L2 norms are used, notice that search radius and all passed and returned distances are actually squared distances.

1.3. Code examples

File truncated at 100 lines see the full file

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

nanoflann_vendor repository

nanoflann_vendor

ROS Distro
humble

Repository Summary

Description
Checkout URI https://github.com/jlblancoc/nanoflann.git
VCS Type git
VCS Version master
Last Updated 2026-10-11
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
nanoflann_vendor 2.0.0

README

nanoflann

nanoflann

CI Linux CI Check clang-format CircleCI Windows build status codecov

Distro Build dev Build releases Stable version
ROS 2 Humble (u22.04) Build Status Build Status
Build Status
Version
ROS 2 Jazzy (u24.04) Build Status Build Status
Build Status
Version
ROS 2 Kilted (u24.04) Build Status Build Status
Build Status
Version
ROS 2 Lyrical (u26.04) Build Status Build Status
Build Status
Version
ROS 2 Rolling (u26.04) Build Status Build Status
Build Status
Version

(Binary build badges are for amd64 and arm64, respectively)

1. About

nanoflann is a header-only C++ library for building KD-Trees of datasets with different topologies. The Euclidean core (R2, R3, RN point clouds) is C++11; the optional compile-time product-manifold metrics — SO(2), SO(3), SE(2), SE(3), the unit sphere S2/SN, tori, and arbitrary products — require C++17 (see §1.5). It also provides incremental / dynamic KD-tree indices for point clouds that change over time (e.g. sliding-window LiDAR maps). nanoflann returns exact nearest neighbors by default (an optional eps-approximate mode is available via SearchParameters::eps). It does not require compiling or installing: you just need to #include <nanoflann.hpp> in your code.

This library is a fork of the flann library by Marius Muja and David G. Lowe, and born as a child project of MRPT. Following the original license terms, nanoflann is distributed under the BSD license. Please, for bugs use the issues button or fork and open a pull request.

Citing nanoflann

If you use nanoflann in your research, please cite the following paper (accepted for publication in IEEE RA-L, 2026):

J.L. Blanco-Claraco, “nanoflann: A Header-Only KD-Tree Library for Exact Nearest-Neighbor Search on Compile-Time Product Manifolds,” IEEE Robotics and Automation Letters, 2026 (accepted).

@article{blancoclaraco2026nanoflann,
  title   = {nanoflann: A Header-Only {KD}-Tree Library for Exact Nearest-Neighbor Search on Compile-Time Product Manifolds},
  author  = {Blanco-Claraco, Jose Luis},
  journal = {IEEE Robotics and Automation Letters},
  year    = {2026},
  note    = {Accepted for publication}
}

Citation for the original software release (2014) ```bibtex @misc{blanco2014nanoflann, title = {nanoflann: a {C}++ header-only fork of {FLANN}, a library for Nearest Neighbor ({NN}) with KD-trees}, author = {Blanco, Jose Luis and Rai, Pranjal Kumar}, howpublished = {\url{https://github.com/jlblancoc/nanoflann}}, year = {2014} } ```

See the release CHANGELOG for a list of project changes.

1.1. Obtaining the code

  • Easiest way: clone this GIT repository and take the include/nanoflann.hpp file for use where you need it.
  • Debian or Ubuntu (21.04 or newer) users can install it simply with:
  $ sudo apt install libnanoflann-dev
  
  • macOS users can install nanoflann with Homebrew with:
  $ brew install brewsci/science/nanoflann
  

or

  $ brew tap brewsci/science
  $ brew install nanoflann
  

MacPorts users can use:

  $ sudo port install nanoflann
  

Although nanoflann itself doesn’t have to be compiled, you can build some examples and tests with:

$ sudo apt-get install build-essential cmake libgtest-dev libeigen3-dev
$ mkdir build && cd build && cmake ..
$ make && make test

1.2. C++ API reference

  • Browse the Doxygen documentation.

  • Important note: If L2 norms are used, notice that search radius and all passed and returned distances are actually squared distances.

1.3. Code examples

File truncated at 100 lines see the full file