This is a Python implementation of the paper Data-Efficient Decentralized Visual SLAM by Titus Cieslewski, Siddharth Choudhary and Davide Scaramuzza.
This was implemented by Team 13 (Aishwarya Unnikrishnan, Devesha Tewari, Lu Wen, and Haonan Chang) for the course EECS 568: Mobile Robotics at University of Michigan.
Kindly refer to our report and our website. See our wiki for further technical troubleshooting issues.
You may want to reference our report before running the code and ensure that you installed all the listed prerequisites beforehand.
Install ORB-SLAM2 for Visual Odometry. You must have the following dependencies: C++11, Pangolin, OpenCV, Eigen3.
Install the ROS ecosystem. We tested on Ubuntu 16.04 and ROS Kinetic. Additionally, install catkin tools, vcstool, OpenCV-nonfree dev, autoconf and libglew-dev.
sudo add-apt-repository --yes ppa:xqms/opencv-nonfree
sudo apt-get update
sudo apt-get install python-catkin-tools python-vcstool libopencv-nonfree-dev autoconf libglew-dev
This implementation uses the ROS services to be running with our code. After installing ROS, execute the following:
# Create a new catkin workspace if needed:
mkdir -p my_ws/src
cd my_ws
catkin config --init --mkdirs --extend /opt/ros/<YOUR VERSION> --merge-devel --cmake-args -DCMAKE_BUILD_TYPE=Release
# Clone dslam:
cd src
git clone git@github.com:uzh-rpg/dslam_open.git
# Clone dependencies:
vcs-import < dslam_open/dependencies.yaml
# Build:
catkin build
Build the distributed-mapper 'feature/logging' branch in the folder you've cloned the code. The unit tests are not necessary and they may require extra dependencies. You will require the 'runDistributedMapper' executable to run decentralized optimization.
Clone the repository:
git clone https://github.com/decentr-vslam/decentr-vslam
Download the data to run the experiments. Extract the kitti/ and robotcar_netvlad_feats/ folders inside clone of the repository.
You can simply download the NetVLAD descriptors on KITTI dataset and use it for simulation.
If you want to generate NetVLAD descriptors for other dataset, we also provide with the codes.
First, download the well-trained checkpoint. Put the checkpoint
folder under the same folder of NetVLAD. Then run the file getNetVLAD.py
to generate a .json
file of netvlad descriptors.
Due to the amount of data generated, we have provided parameters which dictate if data should be generated or reloaded. Once the system was run once, you can change the following parameters to load the previously generated data. This is found in main.py.
# Configure params for generation/loading of data
# (1) - Generate data (default)
# (0) - Load previously generated data
regen_data = 1
regen_robots = 1
regen_stream = 1
Run a process of the verification_request_server from the ROS package in the same folder you're executing the main function from.
../../<insert your ROS workspace>/devel/lib/dslam/verification_request_server temp_request.txt temp_result.txt temp_lock.txt
Run the system
python3 main.py
If you need to watch the average static error (ATE):
Use evalAccuracy in static_tool moudule.
- Thank you to Maani Ghaffari Jadidi, our course instructor for his support.
- Thank you to Titus Cieslewski, Siddharth Chourdhary and Davide Scaramuzza who authored the paper "Data-Efficient Decentralized Visual SLAM", which our work was based on.
- Thank you to the contributors of the folowing repositories which we utilized in our project:
- distributed-mapper 'feature/logging' branch by Siddharth Choudhary, Luca Carlone, Carlos Nieto and John Rogers