-
Notifications
You must be signed in to change notification settings - Fork 5
Installation
Workspace directory: ${HOME}/CoverageControl_ws.
Add the following lines to your ${HOME}/.bashrc file and then source ${HOME}/.bashrc or open a new terminal:
export COVERAGECONTROL_WS=${HOME}/CoverageControl_ws/Clone the repository:
mkdir -p ${COVERAGECONTROL_WS}/src
git clone https://github.com/KumarRobotics/CoverageControl.git ${COVERAGECONTROL_WS}/src/CoverageControlWe have two options: (1) Local install, or (2) Docker
Tested on Ubuntu 22.04 and 20.04.
Install latest cmake
We will need to add the path to LD_LIBRARY_PATH in ${HOME}/.bashrc. Also, we will need to provide an environment variable for cmake. Add the following lines to your .bashrc file and then source ~/.bashrc or open a new terminal:
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${COVERAGECONTROL_WS}/install/CoverageControl/lib/
export CoverageControlCore_DIR=${COVERAGECONTROL_WS}/install/CoverageControl/
export GeographicLib_DIR=${COVERAGECONTROL_WS}/install/CoverageControl/lib/cmake/GeographicLib/We will store build files in ${COVERAGECONTROL_WS}/build and install files in ${COVERAGECONTROL_WS}/install/CoverageControl.
cd ${COVERAGECONTROL_WS}/src/CoverageControl
bash install/install_dependencies.sh ${COVERAGECONTROL_WS}/install/CoverageControl
bash setup.sh -i -d ${COVERAGECONTROL_WS}Try:
cd ${COVERAGECONTROL_WS}
./install/CoverageControl/bin/coverage_algorithmWe can build python bindings by simply adding -p flag.
bash setup.sh -ip -d ${COVERAGECONTROL_WS}
python src/CoverageControl/python/tests/coverage_algorithm.pyThe library provides libtorch extensions for using machine learning models within C++:
cd ${COVERAGECONTROL_WS}/src/CoverageControl
bash install/install_libtorch.sh ${HOME}/optAdd the following lines to your .bashrc file and then source ~/.bashrc or open a new terminal:
export Torch_DIR=${HOME}/opt/libtorch/We can build libtorch bindings by adding -t flag.
bash setup.sh -ipt -d ${COVERAGECONTROL_WS}Coverage control uses GPU for creating maps. You will need to add Nvidia capability to docker.
nvida container toolkit
Download the image and create a container:
bash ${COVERAGECONTROL_WS}/src/CoverageControl/install/docker/create_gpu_container.sh ${COVERAGECONTROL_WS}This will download the image gnn and create a container gnn-${USER}.
The first time, you will be placed in a bash terminal. Exit it using Ctrl + D.
Start the container using the following command:
docker start gnn-$USERExecute the following whenever you want to get inside the container terminal:
docker exec -it gnn-$USER bashInstall the library:
bash src/CoverageControl/setup.sh -iptIf you want build directory to persist for development:
bash src/CoverageControl/setup.sh -iptg ${COVERAGECONTROL_WS}Try:
python src/CoverageControl/python/tests/coverage_algorithm.py