---
# System prepended metadata

title: VINS-Fisheye on Desktop using Docker

---

# VINS-Fisheye on Desktop using Docker
## 工具環境
* Docker version 24.0.5
* linux/amd64
## GPU環境
* 確認terminal輸入`nvidia-smi`輸入後有東西出來
* [安裝nvidia-docker2](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html)
```bash=
sudo apt-get update && sudo apt-get install -y nvidia-container-toolkit-base
nvidia-ctk --version
```
## 啟動docker container
```bash=
FOLDER=放置bag檔的資料夾位置
xhost +
docker pull frakw/vins-fisheye:latest
docker run -it --device=/dev/dri --group-add video --volume=/tmp/.X11-unix:/tmp/.X11-unix  --gpus all --env="DISPLAY=$DISPLAY" -e NVIDIA_VISIBLE_DEVICES=all -e NVIDIA_DRIVER_CAPABILITIES=all --env="QT_X11_NO_MITSHM=1" -v "$FOLDER:/bags" --name=vins-fisheye-container frakw/vins-fisheye:latest /bin/bash

#進入後要先確認rviz可以用:
# new terminal
roscore
# new terminal
rviz
```
## 測試 (預設使用stable版)
```bash=
# new terminal
docker exec -it vins-fisheye-container /bin/bash
roscore
# new terminal
docker exec -it vins-fisheye-container /bin/bash
rosbag play /bags/fisheye_vins_2020-01-30-10-38-14.bag --clock -s 12
# new terminal
docker exec -it vins-fisheye-container /bin/bash
cd ~/catkin_ws/
roslaunch vins fisheye.launch config_file:=/root/catkin_ws/src/VINS-Fisheye/config/fisheye_ptgrey_n3/fisheye_cuda.yaml
# new terminal
xhost +
docker exec -it vins-fisheye-container /bin/bash
cd ~/catkin_ws/
roslaunch vins vins_rviz.launch
```
## 切換最新版 (latest分支)
```bash=
cd ~/catkin_ws/src/VINS-Fisheye
git pull
# git設定email 名字
git stash save
git checkout latest
```
## Docker image 環境資訊
* Ubuntu 18.04
* ROS Melodic
* OpenCV 3.4.20
* Cuda 11.4
* CMake 20.0
* boost 1.82.0
* ceres-solver 2.1.0
* libSGM >3.0