美文网首页
VINS-Mono 运行 EuRoC VIO

VINS-Mono 运行 EuRoC VIO

作者: 几簟生凉 | 来源:发表于2022-08-01 15:59 被阅读0次

    安装ROS Kinetic

    1. 安装Ubuntu16.04,ROS Kinetic只支持这个版本,如果其他的Ubuntu版本,安装时请使用对应命令,比如18.04 sudo apt-get install ros-melodic-desktop-full,其它版本的安装方式也不同,请参考其它版本教程。

    2. 安装ROS

      sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
      sudo apt install curl
      curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
      sudo apt-get update
      sudo apt-get install ros-kinetic-desktop-full
      sudo rosdep init && rosdep update
      echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
      source ~/.bashrc
      sudo apt-get install python-rosinstall python-rosinstall-generator python-wstool build-essential
      
    3. 启动core

      roscore
      
    4. 试一下小乌龟,不要关闭core,再开一个终端

      # 小乌龟
      rosrun turtlesim turtlesim_node
      # 再开一个终端,让小乌龟运动
      rostopic pub /turtle1/cmd_vel geometry_msgs/Twist -r1 -- '[2.0, 0.0, 0.0]' '[0.0, 0.0, 1.8]'
      

    安装VINS-Mono

    1. 安装依赖

      echo  "deb http://cz.archive.ubuntu.com/ubuntu trusty main universe" > /etc/apt/sources.list
      sudo apt-get update
      sudo apt-get install liblapack-dev libsuitesparse-dev libcxsparse3.1.2 libgflags-dev
      sudo apt-get install libgoogle-glog-dev libgtest-dev
      git clone https://github.com/ceres-solver/ceres-solver.git
      cd ceres-solver
      git checkout 1.14.0
      sudo mkdir build && cd  build
      sudo cmake ..
      sudo make -j8
      sudo make install
      
    2. Build VINS-Mono on ROS

      mkdir -p ~/catkin_ws/src && cd ~/catkin_ws/src && catkin_init_workspace
      git clone https://github.com/HKUST-Aerial-Robotics/VINS-Mono.git
      cd ../
      catkin_make
      echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
      reboot
      

    运行EuRoc

    开四个窗口,分别运行下面四个命令

    roscore
    roslaunch vins_estimator euroc.launch 
    roslaunch vins_estimator vins_rviz.launch
    rosbag play YOUR_PATH_TO_DATASET/MH_01_easy.bag 
    
    运行结果

    参考

    1. 安装ROS

    2. 安装 VINS-Mono

    相关文章

      网友评论

          本文标题:VINS-Mono 运行 EuRoC VIO

          本文链接:https://www.haomeiwen.com/subject/orzkwrtx.html