欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  科技

解决catkin指令找不到问题并运行PL-VIO

程序员文章站 2022-03-19 16:12:55
sudo apt-get install ros-kinetic-cv-bridge ros-kinetic-tf ros-kinetic-message-filters ros-kinetic-image-transportsudo apt-get install ros-kinetic-opencv3...

解决catkin指令找不到问题:

运行PL-VIO过程中,提示找不到catkin指令。find_package(catkin) failed;

安装catkin过程中提示错误: catkin : 依赖: python-catkin-pkg 但是它将不会被安装。

考虑到如果安装ros成功会自带catkin,之前博主成功安装过ROS,可以参照之前的博文:

https://mp.csdn.net/console/editor/html/103150788

所以考虑为ros安装文件受损。

重新安装:

sudo apt-get install ros-kinetic-desktop-full
roscore

roscore(如果能够启动ros,证明修复成功);

source ~/.bashrc (设置环境变量 )

sudo updatedb (手动更新数据库)

 locate catkin (可查看catkin所有的安装目录);

运行PL-VIO:

安装 Ubuntu 16.04. ROS Kinetic。SLAM运行环境配置可以参考博主的博文:https://blog.csdn.net/neptune4751/article/details/108936754 ;额外的ROS包安装:

sudo apt-get install ros-kinetic-cv-bridge ros-kinetic-tf ros-kinetic-message-filters ros-kinetic-image-transport

更新opencv3:

sudo apt-get install ros-kinetic-opencv3

 在ROS上创建PL-VIO:

  cd ~/catkin_ws/src
    git clone https://github.com/HeYijia/PL-VIO.git
    cd ../
    catkin_make
    source ~/catkin_ws/devel/setup.bash

 运行仿真数据库:

开启两个终端,在catkin_ws目录下运行指令分别为:

source ~/catkin_ws/devel/setup.bash
roslaunch plvio_estimator simdata_fix.launch
source ~/catkin_ws/devel/setup.bash
roslaunch plvio_estimator vins_rviz.launch 

 解决catkin指令找不到问题并运行PL-VIO

EuRoC数据库运行:

feature.bag:开启三个终端:

source ~/catkin_ws/devel/setup.bash
roslaunch plvio_estimator euroc_fix_offline.launch 
source ~/catkin_ws/devel/setup.bash
roslaunch plvio_estimator vins_rviz.launch 
source ~/catkin_ws/devel/setup.bash
rosbag play -r 5 src/PL-VIO/config/mh05_feature.bag 

 解决catkin指令找不到问题并运行PL-VIO

以MH_05为例,运行EuRoc数据库:

source ~/catkin_ws/devel/setup.bash
roslaunch plvio_estimator euroc_fix_extrinsic.launch 
source ~/catkin_ws/devel/setup.bash
roslaunch plvio_estimator vins_rviz.launch 
source ~/catkin_ws/devel/setup.bash
 rosbag play -r 0.2 src/PL-VIO/config/euroc/MH_05_difficult.bag 

 解决catkin指令找不到问题并运行PL-VIO

另外,由于每次编译都需要在终端执行 source ~/catkin_ws/devel/setup.bash,比较麻烦,解决办法:

可以将其设置在环境变量中:

在catkin_ws目录下,设置环境变量

source devel/setup.bash:

gedit ~/.bashrc

在最后一行加上:source ~/catkin_ws/devel/setup.bash

解决catkin指令找不到问题并运行PL-VIO

 

 

本文地址:https://blog.csdn.net/neptune4751/article/details/109290829