A Visual SLAM system implemented in C++ using OpenCV and Eigen.
git clone --recurse-submodules git@github.com:MaximilianSalen/SLAMBot.git
The project is setup with uv for managing project tools. The project is built with CMake and Ninja and the C++ packages are managed with Conan. The developer environment is setup with Docker.
The docker does not exist pre-built. To build it run
docker buildx build -t slambot-dev-image .Start the container with
docker run -td --name slambot-dev-container \
--mount type=bind,source=$pwd,target=$pwd \
slambot-dev-imageAnd enter the workspace in a bash shell
docker exec -w $pwd -it slambot-dev-container bashOnce inside the container, run
uv syncto install uv managed software. First time using conan the following command
will setup the conan profile.
uv run conan profile detect --forceCreate directory build and install conan packages in build/conan.
uv run conan install . --output-folder=./build/conan --profile=conan/profiles/linuxLastly, build the project with
uv run cmake -S . -B build/release -G Ninja -DCMAKE_BUILD_TYPE=Release
uv run cmake --build build/releaseFrom the build directory, the compiled program can be executed with
./SLAMBot/SLAMBotWhen exiting the docker container, it can be stopped with
docker container stop slambot-dev-containerThe project use Catch2 for tests. Tests are added in their libraries respective CMake file. The tests can be run with the following command
uv run ctest --test-dir build/release/SLAMBotTo add a new C++ package with conan simply add the package to the
conanfile.txt. Available packages and versions can be found
here https://conan.io/center/recipes. If the
package or version does not exist, it is possible to write your own recipe and
compile it yourself.
Before a proper CI is setup the following tools are only provided as utilities.
ClangFormat is used as a
formatter for the C++ files. To format all .h and .cpp files run
find . -name "*.cpp" -o -name "*.h" | xargs uv run clang-format -i