AirVO环境搭建ubuntu20.04.5

https://arpg.github.io/oivio/trajectories/

 GitHub - xukuanHIT/AirVO: An Illumination-Robust Point-Line Visual Odometry

建议采用docker方式

docker pull xukuanhit/air_slam:v1
//下面指令不需要任何修改,直接运行
docker run -it --env DISPLAY=$DISPLAY 
--volume /tmp/.X11-unix:/tmp/.X11-unix 
--privileged --runtime nvidia 
--gpus all 
--volume ${PWD}:/workspace 
--workdir /workspace 
--name air_slam xukuanhit/air_slam:v1 /bin/bash 


//进入容器后执行
    cd ~/catkin_ws/src
    git clone https://github.com/xukuanHIT/AirVO.git
    cd ../
    catkin_make
    source ~/catkin_ws/devel/setup.bash

operation system :ubuntu20.04.5

Dependencies: 

[compiler] sudo apt-get install build-essential
[required] sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
[optional] sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev

cd ~/<my_working_directory>
git clone https://github.com/opencv/opencv.git
git clone https://github.com/opencv/opencv_contrib.git
//move the opencv_contrib-4.2.0 to the directory of opencv-4.2.0
mv opencv_contrib-4.2.0  opencv-4.2.0/

cd ~/opencv
mkdir build
cd build


//opencv install path is /usr/local/opencv-4.2.0/
cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local/opencv-4.2.0/ ..
make -j7 # runs 7 jobs in parallel
sudo make install

#test
git clone https://github.com/opencv/opencv_extra.git
<cmake_build_dir>/bin/opencv_test_core 
sudo apt install libeigen3-dev

sudo apt install libsuitesparse-dev qtdeclarative5-dev qt5-qmake libqglviewer-dev-qt5
git clone https://github.com/RainerKuemmerle/g2o.git
mkdir build
cd build
cmake ../
make
version="8.x.x.x-1+cudax.x"
sudo apt-get install tensorrt-dev=${version}

sudo apt-mark hold tensorrt-dev

sudo apt-get update
sudo apt-get install tensorrt
python3 -m pip install numpy
sudo apt-get install python3-libnvinfer-dev
python3 -m pip install protobuf
sudo apt-get install uff-converter-tf
python3 -m pip install numpy onnx
sudo apt-get install onnx-graphsurgeon
# 验证安装
dpkg -l | grep TensorRT

cuda卸载:

ru@ru:/usr/local/cuda-12.1/bin$ sudo ./cuda-uninstaller*

CUDA 版本切换:

wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin
sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600
wget https://developer.download.nvidia.com/compute/cuda/11.6.0/local_installers/cuda-repo-ubuntu2004-11-6-local_11.6.0-510.39.01-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu2004-11-6-local_11.6.0-510.39.01-1_amd64.deb
sudo apt-key add /var/cuda-repo-ubuntu2004-11-6-local/7fa2af80.pub
sudo apt-get update
sudo apt-get -y install cuda

The NVIDIA CUDA® Deep Neural Network library (cuDNN) is a GPU-accelerated library of primitives for deep neural networks. cuDNN provides highly tuned implementations for standard routines such as forward and backward convolution, pooling, normalization, and activation layers.

sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu/ `lsb_release -cs` main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver 'hkp://keyserver.ubun
  • 3
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 19
    评论
评论 19
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值