zoukankan      html  css  js  c++  java
  • Cartographer系列之三——ROS中的安装

    个人能力有限,若有错误请批评指正!
    转载请标明出处:http://www.cnblogs.com/wenhust/

    Cartographer ROS Integration

    Cartographer is a system that provides real-time simultaneous localization and mapping (SLAM) in 2D and 3D across multiple platforms and sensor configurations. This project provides Cartographer’s ROS integration.
    官网地址:https://github.com/googlecartographer

    一、安装说明

    1. System Requirements

    Although Cartographer may run on other systems, it is confirmed to be working on systems that meet the following requirements:

    • 64-bit, modern CPU (e.g. 3rd generation i7)
    • 16 GB RAM
    • Ubuntu 14.04 (Trusty)
    • gcc version 4.8.4
    • ROS Indigo
    2. Known Issues
    • 32-bit builds have libeigen alignment problems which cause crashes and/or memory corruptions.
    3. 安装流程主要参考Cartographer的官方安装教程:

    二、安装流程

    1. 安装Ubuntu14.04(Trusty)

    将安装镜像文件制作U盘镜像,进入BIOS或WIN10下进入设置->更新和安全->恢复->高级启动,使用U盘启动,完成Ubuntu14.04(Trusty)的安装。

    2. 安装ROS(indigo)

    参考文件
    http://wiki.ros.org/indigo/Installation/Ubuntu (英文原版)
    http://wiki.ros.org/cn/indigo/Installation/Ubuntu (中文翻译)

    3. Building & Installation

    We recommend using wstool and rosdep. For faster builds, we also recommend using Ninja.

    # Install wstool and rosdep.
    sudo apt-get update
    sudo apt-get install -y python-wstool python-rosdep ninja-build
    
    # Create a new workspace in 'catkin_ws'.
    mkdir catkin_ws
    cd catkin_ws
    wstool init src
    
    # Merge the cartographer_ros.rosinstall file and fetch code for dependencies.
    wstool merge -t src https://raw.githubusercontent.com/googlecartographer/cartographer_ros/master/cartographer_ros.rosinstall
    wstool update -t src

    注意:
    此步骤需要科学上网,解决办法有两个:

    • 科学上网。
      使用VPN等方式,使得可正常下载到ceres-solver。
    • 不翻墙。
      修改下载地址为https://github.com/ceres-solver/ceres-solver.git,以正常下载到相关源码。
      cd src
      mv .rosinstall rosinstall
      点击打开rosinstall文件,将内容替换为
      - git:
      local-name: cartographer
      uri: https://github.com/googlecartographer/cartographer.git
      - git:
      local-name: cartographer_ros
      uri: https://github.com/googlecartographer/cartographer_ros.git
      - git:
      local-name: ceres-solver
      uri: https://github.com/ceres-solver/ceres-solver.git
      然后继续将文件名改回
      mv rosinstall .rosinstall
      cd ..

    继续下列操作:

    # Install deb dependencies.
    rosdep init
    rosdep update

    以上两步如果在安装ROS中已经完成,此处会提示已初始化,则可不必再次初始化,直接继续下列操作:

    rosdep install --from-paths src --ignore-src --rosdistro=${ROS_DISTRO} -y
    
    # Build and install.
    catkin_make_isolated --install --use-ninja
    source install_isolated/setup.bash

    注意: 如果每次打开一个新的终端时ROS环境变量都能够自动配置好(即添加到bash会话中),那将会方便得多:
    echo "source ~/catkin_ws/install_isolated/setup.bash" >> ~/.bashrc
    source ~/.bashrc
    如果你只想改变当前终端下的环境变量,你可以执行命令:
    source ~/catkin_ws/install_isolated/setup.bash

    4. Running the demos

    Now that Cartographer and Cartographer’s ROS integration are installed, download the example bags (e.g. 2D and 3D backpack collections of the Deutsches Museum) to a known location, in this case ~/Downloads, and use roslaunch to bring up the demo:

    # Download the 2D backpack example bag.
    wget -P ~/Downloads https://storage.googleapis.com/cartographer-public-data/bags/backpack_2d/cartographer_paper_deutsches_museum.bag
    
    # Launch the 2D backpack demo.
    roslaunch cartographer_ros demo_backpack_2d.launch bag_filename:=${HOME}/Downloads/cartographer_paper_deutsches_museum.bag
    
    # Download the 3D backpack example bag.
    wget -P ~/Downloads https://storage.googleapis.com/cartographer-public-data/bags/backpack_3d/b3-2016-04-05-14-14-00.bag
    
    # Launch the 3D backpack demo.
    roslaunch cartographer_ros demo_backpack_3d.launch bag_filename:=${HOME}/Downloads/b3-2016-04-05-14-14-00.bag
    
    # Download the Revo LDS example bag.
    wget -P ~/Downloads https://storage.googleapis.com/cartographer-public-data/bags/revo_lds/cartographer_paper_revo_lds.bag
    
    # Launch the Revo LDS demo.
    roslaunch cartographer_ros demo_revo_lds.launch bag_filename:=${HOME}/Downloads/cartographer_paper_revo_lds.bag
    
    # Download the PR2 example bag.
    wget -P ~/Downloads https://storage.googleapis.com/cartographer-public-data/bags/pr2/2011-09-15-08-32-46.bag
    
    # Launch the PR2 demo.
    roslaunch cartographer_ros demo_pr2.launch bag_filename:=${HOME}/Downloads/2011-09-15-08-32-46.bag
    
    # Download the Taurob Tracker example bag.
    wget -P ~/Downloads https://storage.googleapis.com/cartographer-public-data/bags/taurob_tracker/taurob_tracker_simulation.bag
    
    # Launch the Taurob Tracker demo.
    roslaunch cartographer_ros demo_taurob_tracker.launch bag_filename:=${HOME}/Downloads/taurob_tracker_simulation.bag

    The launch files will bring up roscore and rviz automatically.

  • 相关阅读:
    最详解JavaScript常见的创建对象的七种方式(推荐)
    详解数组的迭代方法every()、filter()、forEach()、map()以及some()的用法
    详解数组的concat()、slice()、splice()方法
    解决微信小程序中web-view无法调用微信支付
    SQLAlchemy_定义(一对一/一对多/多对多)关系
    常用算法
    Python框架之Tornado (源码之褪去模板外衣)
    Python框架之Tornado(源码之褪去模板外衣的前戏)
    Python框架之Tornado(请求)
    Python框架之Tornado(请求阶段)
  • 原文地址:https://www.cnblogs.com/wenhust/p/6112845.html
Copyright © 2011-2022 走看看