Warning This is an experimental feature. Stability is not guaranteed. Breaking changes are likely to occur, and occur often.
This repo wraps Cartographer as a modular resource so it is easily usable with the rest of Viam's ecosystem. Cartographer is a system that provides real-time Simultaneous Localization And Mapping (SLAM) in 2D and 3D across multiple platforms and sensor configurations.
Install viam-cartographer:
- Linux aarch64:
sudo curl -o /usr/local/bin/carto_grpc_server http://packages.viam.com/apps/slam-servers/carto_grpc_server-stable-aarch64.AppImage sudo chmod a+rx /usr/local/bin/carto_grpc_server
- Linux x86_64:
sudo curl -o /usr/local/bin/carto_grpc_server http://packages.viam.com/apps/slam-servers/carto_grpc_server-stable-x86_64.AppImage sudo chmod a+rx /usr/local/bin/carto_grpc_server
- MacOS/Linux
brew tap viamrobotics/brews && brew install carto-grpc-server
For next steps, see the Run Cartographer SLAM on your Robot with a LIDAR Tutorial.
You can either install the latest AppImages for testing, or build the code from source.
You can install the latest AppImages using:
- Linux aarch64:
sudo curl -o /usr/local/bin/carto_grpc_server http://packages.viam.com/apps/slam-servers/carto_grpc_server-latest-aarch64.AppImage sudo chmod a+rx /usr/local/bin/carto_grpc_server
- Linux x86_64:
sudo curl -o /usr/local/bin/carto_grpc_server http://packages.viam.com/apps/slam-servers/carto_grpc_server-latest-x86_64.AppImage sudo chmod a+rx /usr/local/bin/carto_grpc_server
git clone --recurse-submodules https://github.com/viamrobotics/viam-cartographer.git
If you happened to use git clone
only, you won't see the cartographer
folder and will need to fetch it:
git submodule update --init
# Setup the gRPC files
make bufinstall && make buf
# Install dependencies
make setup
# Build & install the binary
make build
sudo cp viam-cartographer/build/carto_grpc_server /usr/local/bin
# Run the binary
carto_grpc_server
make lint-setup
make lint
make test
- Commit and push changes in the
cartographer
submodule first. - Commit and push changes in the
viam-cartographer
library last.
Or, alternatively:
- Commit changes in the
cartographer
submodule - Commit changes in the main repo
- Push all changes by running
git push --recurse-submodules=on-demand
When changing branches in a submodule, update .gitmodules
, e.g., changing to a branch called kk/fix-install
:
...
[submodule "viam-cartographer/cartographer"]
path = viam-cartographer/cartographer
url = git@github.com:kkufieta/cartographer.git
branch=kk/fix-install
Commit & push the changes.
When pulling those changes, run the following:
git pull
git submodule update --init --recursive
Copyright 2023 Viam Inc.
Apache 2.0 - See LICENSE file