diff --git a/README.md b/README.md index 843c9fd..1e3c294 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,6 @@ ![Docs Badge](https://github.com/cornellev/icp/actions/workflows/docs.yaml/badge.svg) ## Introduction - This repository hosts CEV's implementation of Iterative Closest Points (ICP) as applied to scan matching. ## Authors @@ -19,12 +18,29 @@ Please see [LICENSE](LICENSE). Note that all code is licensed under the MIT lice ## Install You can view installation instructions at [INSTALL.md](INSTALL.md). -## Usage and Documentation -We host the usage information and documentation at [cornellev.github.io/icp/](https://cornellev.github.io/icp/). -Please see there for information on how to download and how to use or extend the library. - -You can build the documentation yourself locally with `make docs`. -The main page will be located at `docs/index.html` relative to the project root. +## Usage +```cpp +#include "icp/icp.h" +#include "icp/geo.h" +#include "icp/driver.h" +#include + +void align_clouds(const icp::PointCloud2& a, const icp::PointCloud2& b) { + std::unique_ptr icp = icp::ICP2::from_method("vanilla", icp::Config()).value(); + icp::ICPDriver driver(std::move(icp)); + + driver.set_max_iterations(100); + driver.set_transform_tolerance(0.1 * M_PI / 180, 0.1); + auto result = driver.converge(a, b, icp::RBTransform2::Identity()); + + std::cout << "Rotation: " << result.transform.rotation() << "\n"; + std::cout << "Translation: " << result.transform.translation() << "\n"; +} +``` + +## Documentation +Some documentation is available in the `book` folder. There are also Doxygen docs and other generated documentation hosted at +[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. ## Versions Version information can be found in the [releases](https://github.com/cornellev/icp/releases) page.