Ubuntu16.04 下安装运行 rovio-slam

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/sunshinefcx/article/details/84930816

源码:https://github.com/ethz-asl/rovio

依赖:ROS、kindr、lightweight_filtering(在rovio目录下操作)

【kindr:https://github.com/ethz-asl/kindr

安装ROVIO需要先安装他的依赖,所以先安装依赖:

一、安装ROS

参考 https://blog.csdn.net/sunshinefcx/article/details/84034438 这篇博客进行ROS-Kinetic的安装

二、安装kindr

git clone https://github.com/ANYbotics/kindr

cd kindr
mkdir build
cd build
cmake ..
sudo make install

等待运行完成即可

三、安装rovio(同时安装lightweight_filtering)

因为在运行rovio的时候,需要使用ROS,因此首先要建一个ros工程

mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
catkin_init_workspace

cd ~/catkin_ws/
catkin_make

然后进入到src目录下,下载rovio的源码

cd ~/catkin_ws/src
git clone https://github.com/ethz-asl/rovio

cd rovio
git submodule update --init --recursive   #安装lightweight_filtering

cd ~/catkin_ws
catkin_make rovio --cmake-args -DCMAKE_BUILD_TYPE=Release -DMAKE_SCENE=ON
catkin_make

如果在运行的时候,提示找不到一个S开头的头文件,在rovio/Cmakelist 中最后加上 add_dependencies(rovio rovio_gencpp)

四、运行数据集

1、下载数据集(rosbag格式,链接: https://pan.baidu.com/s/1skSOcZb 密码: 5i63),放到rovio目录下,并在rovio目录下新建一个rovio目录。
2、修改rovio/launch/rovio_rosbag_node.launch中的filename参数,将其改为实际rosbag的目录

  <param name="rosbag_filename" value="你的路径/MH_01_easy.bag"/>

打开命令窗口运行roscore

roscore

打开新窗口,进入catkin_ws工作空间运行

roslaunch rovio rovio_rosbag_node.launch 

运行效果

猜你喜欢

转载自blog.csdn.net/sunshinefcx/article/details/84930816