diff --git a/Makefile b/Makefile index 8e36343..c1c3c2c 100644 --- a/Makefile +++ b/Makefile @@ -4,11 +4,10 @@ SRCDIR := src INCLUDEDIR := src CC := $(shell which g++ || which clang++) -# CC := $(shell which clang++) PY := $(shell which python3 || which python) CFLAGS := -std=c++17 -pedantic -Wall -Wextra -I $(INCLUDEDIR) CDEBUG := -g -CRELEASE := -O3 -DRELEASE_BUILD #-fno-fast-math +CRELEASE := -O3 -DRELEASE_BUILD TARGET := main LIBNAME := libcevicp.a @@ -46,10 +45,6 @@ $(TARGET): main.cpp $(OBJ) $(CC) $(CFLAGS) $^ $(LDFLAGS) -o $@ @make readme -# .PHONY: run -# run: $(TARGET) -# ./$(TARGET) - .PHONY: test test: test.cpp $(OBJ) @$(CC) $(CFLAGS) -DTEST -o _temp $^ $(LDFLAGS) @@ -57,16 +52,12 @@ test: test.cpp $(OBJ) @./_temp @rm -f ./_temp -.PHONY: aux -aux: $(TARGET) - ./$(TARGET) -mvanilla - .PHONY: view view: $(TARGET) ./$(TARGET) -S ex_data/scan$(N)/first.conf -D ex_data/scan$(N)/second.conf --method $(METHOD) --gui .PHONY: bench -bench: $(TARGET) +bench: $(TARGET) ./$(TARGET) -S ex_data/scan$(N)/first.conf -D ex_data/scan$(N)/second.conf --method $(METHOD) --bench %.o: %.cpp @@ -77,15 +68,16 @@ bench: $(TARGET) clean: rm -rf $(OBJ) $(TARGET) $(TARGET) $(DEPS) $(shell find . -name "*.dSYM") $(shell find . -name "*.d") docs +# Not building book rn, add these commands to build +# cd book; \ + pdflatex icp.tex; \ + rm *.aux *.log *.out \ + mv book/icp.pdf docs .PHONY: docs docs: @make readme $(PY) script/icp_doc_builder.py src/icp/ book/icp_descr/ - cd book; \ - pdflatex icp.tex; \ - rm *.aux *.log *.out doxygen - mv book/icp.pdf docs cp book/desmos.txt docs .PHONY: cloc @@ -94,7 +86,7 @@ cloc: .PHONY: readme readme: - cd script; $(PY) readme.py `curl https://api.github.com/repos/cornellev/icp/releases/latest | jq .name` + cd script; $(PY) readme.py .PHONY: math math: diff --git a/README.md b/README.md index bb97a0f..fe36d07 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,8 @@ # icp -> Last updated 2024-10-29 20:38:09.763209. +> Last updated 2024-10-29 21:34:15.790605. +> Version v1.2.1. > Made by [Ethan Uppal](https://www.ethanuppal.com) and [Utku Melemetci](https://utku.sh). ## Introduction @@ -23,7 +24,9 @@ Please see there for information on how to download and how to use 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. -## v1.2.1 +## Versions + +### v1.1.2 Started work on a new implementation (read [this paper](book/icp.pdf)). It passes all `make test` tests. @@ -46,7 +49,7 @@ ICP ALGORITHM BENCHMARKING * Average time per invocation: 0.00413281s ``` -### v1.1.x +### v1.1.1 The algorithm runs extremely fast now. We only need it to run at 6hz with our current LiDAR. diff --git a/README.md.build b/README.md.build index c83ceff..393ecdf 100644 --- a/README.md.build +++ b/README.md.build @@ -1,6 +1,7 @@ # icp > Last updated {{DATE}}. +> Version {{VERSION}}. > Made by {{AUTHOR}}. ## Introduction @@ -20,6 +21,42 @@ Please see there for information on how to download and how to use 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. -## {{VERSION}} +## Versions + +### v1.1.2 + +Started work on a new implementation (read [this paper](book/icp.pdf)). +It passes all `make test` tests. +Here is the performance currently: +``` +ICP ALGORITHM BENCHMARKING +======================================= +* Method name: test1 +* Number of trials: 50 +* Burn-in period: 0 +* Ideal convergence threshold: 20 +* Min cost: 19.4709 +* Max cost: 19.4709 +* Median cost: 19.4709 +* Mean cost: 19.4709 +* Min iterations: 7 (real: 7) +* Max iterations: 7 (real: 7) +* Median iterations: 7 (real: 7) +* Mean iterations: 7 (real: 7) +* Average time per invocation: 0.00413281s +``` + +### v1.1.1 + +The algorithm runs extremely fast now. +We only need it to run at 6hz with our current LiDAR. + +![](book/asset/img/v1.1.1bench.png) + +It also matches quite well. +Below is the result of running this ICP implementation on two point clouds obtained within the workspace. + +![](book/asset/img/v1.1.1result.png) + +However, there is still remove for improvement with regard to outlier rejection and other parts of the algorithm (for instance, adopting a point-to-line metric). -{{VERSIONMD}} diff --git a/book/icp.pdf b/book/icp.pdf deleted file mode 100644 index 2be7b18..0000000 Binary files a/book/icp.pdf and /dev/null differ diff --git a/book/icp_descr/.gitkeep b/book/icp_descr/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/book/icp_descr/icp_test1.md b/book/icp_descr/icp_test1.md deleted file mode 100644 index a35e3f2..0000000 --- a/book/icp_descr/icp_test1.md +++ /dev/null @@ -1,25 +0,0 @@ -\page test1_icp Test1 ICP -\par Usage -You can construct a new instance of Test1 ICP with `icp::ICP::from_method("test1", config)`. Supply the following parameters to `config` (via icp::ICP::Config::set): - -Key | Description ---- | --- -`"overlap_rate"` | A `double` between 0 and 1 for the * overlap rate. The default is 1. - -\par Description -This is a WIP. - -1. **Matching Step**: see \ref vanilla_icp - for details. - -2. **Trimming Step**: see \ref trimmed_icp for details. - -3. **Transformation Step** - - See [this paper](icp.pdf) for information. I copied over the - rotation optimization from \ref vanilla_icp, and it is a TODO to - see if that is mathematically correct or not. - - -Read \ref icp_sources for a list of all resources used in this project. -This page was automatically generated from test1.cpp with icp_doc_builder.py. \ No newline at end of file diff --git a/book/versions/v1.md b/book/versions/v1.md deleted file mode 100644 index 8484a90..0000000 --- a/book/versions/v1.md +++ /dev/null @@ -1,34 +0,0 @@ -Started work on a new implementation (read [this paper](book/icp.pdf)). -It passes all `make test` tests. -Here is the performance currently: -``` -ICP ALGORITHM BENCHMARKING -======================================= -* Method name: test1 -* Number of trials: 50 -* Burn-in period: 0 -* Ideal convergence threshold: 20 -* Min cost: 19.4709 -* Max cost: 19.4709 -* Median cost: 19.4709 -* Mean cost: 19.4709 -* Min iterations: 7 (real: 7) -* Max iterations: 7 (real: 7) -* Median iterations: 7 (real: 7) -* Mean iterations: 7 (real: 7) -* Average time per invocation: 0.00413281s -``` - -### v1.1.x - -The algorithm runs extremely fast now. -We only need it to run at 6hz with our current LiDAR. - -![](book/asset/img/v1.1.1bench.png) - -It also matches quite well. -Below is the result of running this ICP implementation on two point clouds obtained within the workspace. - -![](book/asset/img/v1.1.1result.png) - -However, there is still remove for improvement with regard to outlier rejection and other parts of the algorithm (for instance, adopting a point-to-line metric). diff --git a/script/readme.py b/script/readme.py index 62e1ed9..967781a 100644 --- a/script/readme.py +++ b/script/readme.py @@ -1,13 +1,14 @@ if __name__ == "__main__": - import subprocess - import sys from datetime import datetime as dt + import requests + README_PATH = "../README.md" README_GEN_PATH = README_PATH + ".build" - VERSION_TAG = sys.argv[1][1:-1] - VERSION_MAJOR = VERSION_TAG.split(".")[0] - VERSION_MD_PATH = "../book/versions" + + VERSION_TAG = requests.get( + "https://api.github.com/repos/cornellev/icp/releases/latest" + ).json()["name"] with open(README_GEN_PATH, "r") as f: readme = {"content": f.read()} @@ -22,9 +23,6 @@ def put(var, text): "[Ethan Uppal](https://www.ethanuppal.com) and [Utku Melemetci](https://utku.sh)", ) - with open(f"{VERSION_MD_PATH}/{VERSION_MAJOR}.md", "r") as md: - put("VERSIONMD", md.read()) - with open(README_PATH, "w") as f: f.write( "\n\n\n"