运行svln2代码

本文介绍了在Ubuntu系统上安装GitHub项目SVIn所需的依赖库,如ceres-solver、brisk和opencv,以及解决编译过程中遇到的opencv版本和boost路径问题的过程。
摘要由CSDN通过智能技术生成

根据github代码下载GitHub - AutonomousFieldRoboticsLab/SVIn: Underwater Navigation with tightly coupled fusion of Visual Inertial Sonar and Depth Information

先安装依赖
 

  sudo apt install cmake

  sudo apt install ros-noetic-pcl-ros
  sudo apt install ros-noetic-tf2-sensor-msgs

  sudo apt install libgoogle-glog-dev libatlas-base-dev libeigen3-dev

  sudo apt install libsuitesparse-dev libopencv-dev
  sudo apt install libboost-dev libboost-filesystem-dev

在安装libsuitesparse-dev libopencv-dev的时候出现了问题,但是由于之前在电脑里下载过opencv,跳过好像没影响。

安装ceres

  git clone https://github.com/ceres-solver/ceres-solver.git
  cd ceres-solver
  git checkout 1.14.x
  mkdir build
  cd build
  cmake -DCMAKE_BUILD_TYPE=Release ..
  make -j8
  sudo make install
  cd ../..

后续编译这一步会报错

手动安装了新版本ceres(2.2)

Tags · ceres-solver/ceres-solver · GitHub

安装brisk

  wget https://www.doc.ic.ac.uk/~sleutene/software/brisk-2.0.8.zip
  unzip brisk-2.0.8.zip
  cd brisk
  mkdir build
  cd build
  cmake -DCMAKE_BUILD_TYPE=Release ..
  make -j8
  sudo make install
  cd ../..

Building the project

  mkdir -p ~/svin_ws/src
  cd ~/svin_ws/src
  git clone --branch 0.2 https://github.com/AutonomousFieldRoboticsLab/SVIn.git
  git clone https://github.com/AutonomousFieldRoboticsLab/imagenex831l.git
  
  # For Ubuntu 18.04/20.04 (ROS Noetic)
  git clone --branch ros-noetic git@github.com:AutonomousFieldRoboticsLab/sonar_rviz_plugin.git
  
  cd ..
  catkin_make

这里找不到库,需要自己去重新下载

GitHub - AutonomousFieldRoboticsLab/sonar_rviz_plugin at ros-noetic

随后开始编译

处理报错

/usr/bin/ld: 找不到 -lopengv
collect2: error: ld returned 1 exit status
make[2]: *** [SVIn-main/pose_graph/CMakeFiles/pose_graph.dir/build.make:887:/home/zzz/catkin_ws_svln/devel/lib/libpose_graph.so] 错误 1
make[1]: *** [CMakeFiles/Makefile2:4448:SVIn-main/pose_graph/CMakeFiles/pose_graph.dir/all] 错误 2
make: *** [Makefile:141:all] 错误 2
Invoking "make -j12 -l12" failed

这里是自己下载了opengv的库,参考链接

https://www.cnblogs.com/long5683/p/13575788.html

sudo apt-get install build-essential
sudo apt-get install cmake
sudo apt-get install cmake libeigen3-dev
git clone https://github.com/laurentkneip/opengv
cd opengv 
mkdir build && cd build && cmake ..
make -j8
sudo make install

 随后就能正常编译了

运行

参考issue中,先使用v2测试,发现opencv版本不对,下载了4.2.0,可以运行了。

但是第二天编译发现出现了这个问题,要下载1.77boost,下载了boost也没用

找了一些电脑里的boost库,整理了一下名字,在/usr/include中把1.71.0复制到了usr/local/include中

编译,发现找不到boost,不能写版本名字。

算了还是老老实实下载boost1.71.1然后指定路径

SET(Boost_DIR /usr/local/lib/cmake/Boost-1.71.0/)   # 设置Boost_DIR

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值