zoukankan      html  css  js  c++  java
  • cartographer 最新版安装测试

    在官网的基础上稍加修改,但保证代码都是最新的

    我的系统配置: Debian9 strech,  ROS lunar 该方法对 ubuntu 系列操作系统以及其他ROS版本同样适用。

    1.  安装依赖库

    sudo apt-get install -y 
        g++ 
        git 
        google-mock 
        libboost-all-dev 
        libcairo2-dev 
        libeigen3-dev 
        libgflags-dev 
        libgoogle-glog-dev 
        liblua5.2-dev 
        libsuitesparse-dev 
        ninja-build 
        python-sphinx
    

     2. 安装ceres-solver

    google提供的地址下载太慢,在github上git clone 也是太慢, 索性直接Donload zip

    https://github.com/ceres-solver/ceres-solver.git

    然后编译安装:

    cd ceres-solver
    mkdir build
    cd build
    cmake ..
    make -j4
    sudo make install
    

     3. 安装proto3

     a. 重要说明: 如果你已经安装了ROS Lunar, 恭喜你,其实你已经安装了protobuf了, 但是你没有安装protobuf-compiler, 你只需要安装一下protobuf-compiler就可以了

    sudo apt-get install protobuf-compiler
    

    然后你可以执行 protoc --version 查看protobuf 的版本.

    b. 如果你装的是ROS Kinetic, 你的protobuf 的版本应该是 2.x, 需要手动将其升级到 proto3
    方法:
    下载链接 https://github.com/google/protobuf/releases
    官方安装手册:https://github.com/protocolbuffers/protobuf/blob/master/src/README.md

    安装:(下载安装all版本)

    tar zxvf protobuf-all-3.6.0.tar.gz
    cd protobuf-3.6.0/
    ./configure –prefix=/usr/local/        (安装路径,一般情况下,默认会安装到/usr/include 文件下,我们需要指定安装到,/usr/local/include文件下,安装完成会有一个goole文件在/usr/local/include 下)
    make
    make check
    make install
    protoc –version               #查看版本 
    

     c. 如果你没有装ROS那么执行下面的步骤吧:

     安装依赖

    sudo apt-get install autoconf automake libtool curl make g++ unzip
    

    方式一(推荐):

    sudo apt-get install libprotobuf-dev
    sudo apt-get install protobuf-compiler
    

    方式二:

    下载zip(git clone 太慢了)

    地址: https://github.com/protocolbuffers/protobuf

    编译安装:

    ./autogen.sh
    ./configure –prefix=/usr/local/
    make -j4
    make check
    sudo make install
    sudo ldconfig # refresh shared library cache.
    

    make check 会提示又一些错误,没关系啦,核心库已经编译好啦

    4. 安装cartographer

    clone cartographer代码,这个速度还可以

    git clone https://github.com/googlecartographer/cartographer.git
    

    编译安装

    cd cartographer
    mkdir build
    cd build
    cmake ..
    make -j4
    sudo make install
    

    5. 安装cartographer_ros

    这个就简单了,地址:

    https://github.com/googlecartographer/cartographer_ros

    clone 或者下载到自己的ROS工作空间,编译一下就可以了.

    6. 测试

    2D:

    下载数据包, 地址: https://storage.googleapis.com/cartographer-public-data/bags/backpack_2d/cartographer_paper_deutsches_museum.bag

    // launch 2D example
    roslaunch cartographer_ros demo_backpack_2d.launch bag_filename:=${HOME}/Downloads/cartographer_paper_deutsches_museum.bag
    

     3D:

    下载数据包,地址: https://storage.googleapis.com/cartographer-public-data/bags/backpack_3d/with_intensities/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
    

    OK, 到此结束!

  • 相关阅读:
    U盘支持启动windows和Linux
    emacs安装
    npm 安装指定的第三方包
    npm安装第三方包
    npm 安装淘宝镜像
    ssm 环境搭建
    gitBook安装简介
    git 博客搭建
    git 多人开发
    git ssh提交
  • 原文地址:https://www.cnblogs.com/lvchaoshun/p/9824528.html
Copyright © 2011-2022 走看看