├── .gitignore ├── run_build_images.sh ├── support_files └── media │ ├── trajectories_sequence_01.png │ └── trajectories_sequence_02.png ├── run_containers.sh ├── evaluation.config ├── create_workspace.sh ├── .gitmodules ├── download_rosbags.sh └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | catkin_ws/ 2 | .idea/ 3 | -------------------------------------------------------------------------------- /run_build_images.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DATE_LOG=$(date '+%Y%m%d_%H%M%S') 4 | ./build_images.sh 2>&1 | tee build_images_log_$DATE_LOG.txt 5 | -------------------------------------------------------------------------------- /support_files/media/trajectories_sequence_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CIFASIS/slam_agricultural_evaluation/master/support_files/media/trajectories_sequence_01.png -------------------------------------------------------------------------------- /support_files/media/trajectories_sequence_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CIFASIS/slam_agricultural_evaluation/master/support_files/media/trajectories_sequence_02.png -------------------------------------------------------------------------------- /run_containers.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Run SLAM systems (using Docker containers). Configuration is taken from evaluation.config. 3 | 4 | CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" 5 | 6 | . $CURRENT_DIR/evaluation.config 7 | 8 | trap "exit 1" INT 9 | 10 | for m in ${MODULES[@]}; 11 | do 12 | echo "Running $m ..." 13 | $CURRENT_DIR/$m/run_all_rosario_sequences.sh $DATASET_DIR 14 | done 15 | -------------------------------------------------------------------------------- /evaluation.config: -------------------------------------------------------------------------------- 1 | export MODULES=("basalt_ros" "FLVIS" "Kimera-VIO-ROS" "msckf_vio" "okvis_ros" "ORB_SLAM3" "r-vio" "rebvo" "rovio" "svo-2.0" "VINS-Fusion") 2 | export SEQUENCES="1 2 3 4 5 6" 3 | export DATASET_DIR="${HOME}/datasets/robot_desmalezador" 4 | THIS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" 5 | export CATKIN_WS_DIR="${THIS_DIR}/catkin_ws" 6 | export ROS_HOME="${CATKIN_WS_DIR}/.ros" 7 | export ROS_DISTRO="kinetic" 8 | export POSE_LISTENER_URL=https://github.com/CIFASIS/pose_listener.git 9 | -------------------------------------------------------------------------------- /create_workspace.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Create workspace, clone pose_listener and build it. 3 | 4 | CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" 5 | 6 | . $CURRENT_DIR/evaluation.config 7 | 8 | trap "exit 1" INT 9 | 10 | mkdir -p $CATKIN_WS_DIR/src 11 | mkdir -p $ROS_HOME 12 | 13 | git clone $POSE_LISTENER_URL $CATKIN_WS_DIR/src/pose_listener 14 | source /opt/ros/$ROS_DISTRO/setup.bash 15 | 16 | if command -v catkin &> /dev/null 17 | then 18 | catkin init -w $CATKIN_WS_DIR 19 | catkin config -w $CATKIN_WS_DIR --cmake-args -DCMAKE_BUILD_TYPE=Release 20 | catkin build -w $CATKIN_WS_DIR 21 | elif command -v catkin_make &> /dev/null 22 | then 23 | catkin_make -C $CATKIN_WS_DIR 24 | else 25 | echo "Unable to build pose_listener. Either catkin or catkin_make must be installed." 26 | exit 1 27 | fi 28 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "basalt_ros"] 2 | path = basalt_ros 3 | url = git@github.com:CIFASIS/basalt_ros.git 4 | [submodule "r-vio"] 5 | path = r-vio 6 | url = git@github.com:CIFASIS/r-vio.git 7 | [submodule "rebvo"] 8 | path = rebvo 9 | url = git@github.com:CIFASIS/rebvo.git 10 | [submodule "rovio"] 11 | path = rovio 12 | url = git@github.com:CIFASIS/rovio.git 13 | [submodule "msckf_vio"] 14 | path = msckf_vio 15 | url = git@github.com:CIFASIS/msckf_vio.git 16 | [submodule "svo-2.0"] 17 | path = svo-2.0 18 | url = git@github.com:CIFASIS/svo-2.0.git 19 | [submodule "VINS-Fusion"] 20 | path = VINS-Fusion 21 | url = git@github.com:CIFASIS/VINS-Fusion.git 22 | [submodule "ORB_SLAM3"] 23 | path = ORB_SLAM3 24 | url = git@github.com:CIFASIS/ORB_SLAM3.git 25 | [submodule "FLVIS"] 26 | path = FLVIS 27 | url = git@github.com:CIFASIS/FLVIS.git 28 | [submodule "okvis_ros"] 29 | path = okvis_ros 30 | url = git@github.com:CIFASIS/okvis_ros.git 31 | [submodule "Kimera-VIO-ROS"] 32 | path = Kimera-VIO-ROS 33 | url = git@github.com:CIFASIS/Kimera-VIO-ROS.git 34 | -------------------------------------------------------------------------------- /download_rosbags.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Download rosbags from Rosario Dataset official site. The ones that will be 3 | # download are taken from evaluation.config. 4 | 5 | CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" 6 | 7 | . $CURRENT_DIR/evaluation.config 8 | mkdir -p $DATASET_DIR 9 | cd $DATASET_DIR 10 | 11 | trap "exit 1" INT 12 | 13 | echo "Downloading sequence01..." 14 | wget http://fs01.cifasis-conicet.gov.ar:90/~robot_desmalezador/robot/sequence01.bag.00 15 | wget http://fs01.cifasis-conicet.gov.ar:90/~robot_desmalezador/robot/sequence01.bag.01 16 | wget http://fs01.cifasis-conicet.gov.ar:90/~robot_desmalezador/robot/sequence01.bag.02 17 | wget http://fs01.cifasis-conicet.gov.ar:90/~robot_desmalezador/robot/calibration01.yaml 18 | wget http://fs01.cifasis-conicet.gov.ar:90/~robot_desmalezador/robot/sequence01_gt.txt 19 | 20 | echo "Downloading sequence02..." 21 | wget http://fs01.cifasis-conicet.gov.ar:90/~robot_desmalezador/robot/sequence02.bag.00 22 | wget http://fs01.cifasis-conicet.gov.ar:90/~robot_desmalezador/robot/sequence02.bag.01 23 | wget http://fs01.cifasis-conicet.gov.ar:90/~robot_desmalezador/robot/calibration02.yaml 24 | wget http://fs01.cifasis-conicet.gov.ar:90/~robot_desmalezador/robot/sequence02_gt.txt 25 | 26 | echo "Downloading sequence03..." 27 | wget http://fs01.cifasis-conicet.gov.ar:90/~robot_desmalezador/robot/sequence03.bag 28 | wget http://fs01.cifasis-conicet.gov.ar:90/~robot_desmalezador/robot/calibration03.yaml 29 | wget http://fs01.cifasis-conicet.gov.ar:90/~robot_desmalezador/robot/sequence03_gt.txt 30 | 31 | echo "Downloading sequence04..." 32 | wget http://fs01.cifasis-conicet.gov.ar:90/~robot_desmalezador/robot/sequence04.bag 33 | wget http://fs01.cifasis-conicet.gov.ar:90/~robot_desmalezador/robot/calibration04.yaml 34 | wget http://fs01.cifasis-conicet.gov.ar:90/~robot_desmalezador/robot/sequence04_gt.txt 35 | 36 | echo "Downloading sequence05..." 37 | wget http://fs01.cifasis-conicet.gov.ar:90/~robot_desmalezador/robot/sequence05.bag.00 38 | wget http://fs01.cifasis-conicet.gov.ar:90/~robot_desmalezador/robot/sequence05.bag.01 39 | wget http://fs01.cifasis-conicet.gov.ar:90/~robot_desmalezador/robot/calibration05.yaml 40 | wget http://fs01.cifasis-conicet.gov.ar:90/~robot_desmalezador/robot/sequence05_gt.txt 41 | 42 | echo "Downloading sequence06..." 43 | wget http://fs01.cifasis-conicet.gov.ar:90/~robot_desmalezador/robot/sequence06.bag.00 44 | wget http://fs01.cifasis-conicet.gov.ar:90/~robot_desmalezador/robot/sequence06.bag.01 45 | wget http://fs01.cifasis-conicet.gov.ar:90/~robot_desmalezador/robot/calibration06.yaml 46 | wget http://fs01.cifasis-conicet.gov.ar:90/~robot_desmalezador/robot/sequence06_gt.txt 47 | 48 | echo "Joining sequences..." 49 | cat sequence01.bag.* > sequence01.bag 50 | cat sequence02.bag.* > sequence02.bag 51 | cat sequence05.bag.* > sequence05.bag 52 | cat sequence06.bag.* > sequence06.bag 53 | 54 | for s in `seq 1 6`; do 55 | echo "Decompressing sequence0$s..." 56 | rosbag decompress sequence0$s.bag 57 | done 58 | 59 | echo "Computing checksums ..." 60 | for s in ${SEQUENCES[@]}; 61 | do 62 | md5sum sequence0$s.orig.bag 63 | done 64 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | This repository contains different state-of-the-art VIO systems that were evaluated in an agricultural environment by means of the [Rosario Dataset](https://www.cifasis-conicet.gov.ar/robot). As an example, some outputs regarding the sequence01 can be seen here: 2 | 3 | ![trajectories_sequence_01.png](support_files/media/trajectories_sequence_01.png) 4 | 5 | # Video 6 | There is also a video that accompanies this publication, available [here](https://youtu.be/H6dWhKUqfJA). 7 | 8 | # Publication 9 | 10 | If you use this in some academic work, please cite the related publication: 11 | 12 | J. Cremona, R. Comelli, T. Pire, **Experimental evaluation of Visual-Inertial Odometry systems for arable farming**. Journal of Field Robotics, 2022. DOI: https://doi.org/10.1002/rob.22099 13 | 14 | ```bibtex 15 | @article{cremona2022evaluation, 16 | author = {Cremona, Javier and Comelli, Rom{\'a}n and Pire, Taih{\'u}}, 17 | title = {Experimental evaluation of Visual-Inertial Odometry systems for arable farming}, 18 | journal = {Journal of Field Robotics}, 19 | volume = {39}, 20 | number = {7}, 21 | pages = {1121--1135}, 22 | keywords = {agricultural robotics, precision agriculture, SLAM, Visual-Inertial Odometry}, 23 | year = {2022}, 24 | doi = {https://doi.org/10.1002/rob.22099}, 25 | url = {https://onlinelibrary.wiley.com/doi/abs/10.1002/rob.22099}, 26 | eprint = {https://onlinelibrary.wiley.com/doi/pdf/10.1002/rob.22099} 27 | } 28 | ``` 29 | 30 | # Context 31 | 32 | As stated above, this repository has several VIO pipelines that were assessed as part of the aforementioned publication. Through the provided scripts and containerized submodules, it allows to repeat the tests done in a systematic and simple way (clearly the results could vary up to some point, depending on the hardware platform and due to the random nature of some algorithms internally used by the systems). 33 | 34 | The repository is also intended to serve as a base for further progress in the development of more accurate and robust VIO and SLAM systems, specially for the agricultural environment. Modifying the source code of the already included submodules or adding and comparing other systems is what we expect and encourage the academic community to do. 35 | 36 | # Dependencies 37 | 38 | It is necessary to have installed: 39 | 40 | * Docker 41 | * ROS (with rviz) 42 | * [pose_listener](https://github.com/CIFASIS/pose_listener) 43 | 44 | It was everything tested in Ubuntu 16.04, 18.04 and 20.04. We suggest to follow [the steps](https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user) to manage Docker as a non-root user to make it easier to run the scripts. With respect to the ROS versions, Kinetic, Melodic and Noetic have been used with their respective Ubuntu's versions. pose_listener is a simple ROS node developed to capture the systems' outputs. 45 | 46 | We also recommend to have [evo](https://github.com/MichaelGrupp/evo) installed in order to visualize and calculate the errors of the estimated trajectories. 47 | 48 | # Use 49 | 50 | To clone the repository, execute this: 51 | 52 | ```bash 53 | git clone git@github.com:CIFASIS/slam_agricultural_evaluation.git 54 | cd slam_agricultural_evaluation 55 | git submodule update --init --recursive 56 | ``` 57 | 58 | Once this is done (it may take some time), we are ready to build the images and download the Rosario Dataset rosbags. For this and the rest of the things that can be done, the `evaluation.config` file is provided. It defines which modules will be taken into account when building or launching the containers, what sequences will be used (and where they are), where the local catkin workspace will be and the ROS version used, among other things. 59 | 60 | So, to download all the sequences and store them in `${HOME}/datasets/robot_desmalezador` (default), just run: 61 | 62 | ```bash 63 | ./download_rosbags.sh 64 | ``` 65 | 66 | Of course, it could be omitted if the rosbags were downloaded previously. It would be enough to set their location in `evaluation.config`. To build the images of the different systems (this may take more time), execute: 67 | 68 | ```bash 69 | ./build_images.sh 70 | ``` 71 | 72 | Then, if a local ROS workspace with pose_listener installed is missing, we provide `create_workspace.sh` to make it in the repository directory. Just execute: 73 | 74 | ```bash 75 | ./create_workspace.sh 76 | ``` 77 | 78 | Otherwise, the path to that local ROS workspace should be set in `evaluation.config`. And finally, the tests can be done (and redone) by running: 79 | 80 | ```bash 81 | ./run_containers.sh 82 | ``` 83 | 84 | The outputs of the systems will be saved in the `outputs/` directory of each submodule, with a script to plot the results (using evo). 85 | 86 | # Development 87 | 88 | To ease the development, each submodule has some scripts (used by the scripts located in the root of this repository) that allow to build the Docker images and run the systems in visualization or development modes. Their `README.md`s explain this. 89 | 90 | # TODO 91 | 92 | * `run_rosario_sequence.sh` fails when `rostopic list $TOPIC 2> /dev/null` returns more than one result (e.g. `/odometry /odometry/gps`) 93 | * When ORB-SLAM3 is launched in DEV mode (`run.sh -d`), it cannot be neither executed nor re-built, because `build` is hidden when `docker run -v :` is executed. 94 | * When DEV mode is launched `build.sh` should be a soft link to `/scripts/build.sh`. This would allow to modify `scripts/build.sh` in the host. 95 | --------------------------------------------------------------------------------