55![ Docs Badge] ( https://github.com/cornellev/icp/actions/workflows/docs.yaml/badge.svg )
66
77## Introduction
8-
98This repository hosts CEV's implementation of Iterative Closest Points (ICP) as applied to scan matching.
109
1110## Authors
@@ -19,12 +18,29 @@ Please see [LICENSE](LICENSE). Note that all code is licensed under the MIT lice
1918## Install
2019You can view installation instructions at [ INSTALL.md] ( INSTALL.md ) .
2120
22- ## Usage and Documentation
23- We host the usage information and documentation at [ cornellev.github.io/icp/] ( https://cornellev.github.io/icp/ ) .
24- Please see there for information on how to download and how to use or extend the library.
25-
26- You can build the documentation yourself locally with ` make docs ` .
27- The main page will be located at ` docs/index.html ` relative to the project root.
21+ ## Usage
22+ ``` cpp
23+ #include " icp/icp.h"
24+ #include " icp/geo.h"
25+ #include " icp/driver.h"
26+ #include < iostream>
27+
28+ void align_clouds (const icp::PointCloud2& a, const icp::PointCloud2& b) {
29+ std::unique_ptr< icp::ICP2 > icp = icp::ICP2::from_method("vanilla", icp::Config()).value();
30+ icp::ICPDriver driver(std::move(icp));
31+
32+ driver.set_max_iterations(100);
33+ driver.set_transform_tolerance(0.1 * M_PI / 180, 0.1);
34+ auto result = driver.converge(a, b, icp::RBTransform2::Identity());
35+
36+ std::cout << "Rotation: " << result.transform.rotation() << "\n";
37+ std::cout << "Translation: " << result.transform.translation() << "\n";
38+ }
39+ ```
40+
41+ ## Documentation
42+ Some documentation is available in the `book` folder. There are also Doxygen docs and other generated documentation hosted at
43+ [cornellev.github.io/icp/](https://cornellev.github.io/icp/), but we haven't update this system in a bit and it might be out of date.
2844
2945## Versions
3046Version information can be found in the [releases](https://github.com/cornellev/icp/releases) page.
0 commit comments