首先要正确安装 ROS ,然后第12步应注意,proto的版本是个关键容易出错。
 
1、添加ROS源
http:/packages.ros.org/ros/ubuntu xenial main   (自己搜一下怎么添加)
sudo apt-get update     更新源。
2、Setup your sources.list
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
3、Set up your keys-
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
4、Installation
sudo apt-get update
sudo apt-get install ros-kinetic-desktop-full
5、Initialize rosdep
sudo rosdep init
sudo rosdep fix-permissions
rosdep update
6、Environment setup
It's convenient if the ROS environment variables are automatically added to your bash session every time a new shell is launched:
echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
source ~/.bashrc
If you have more than one ROS distribution installed, ~/.bashrc must only source the setup.bash for the version you are currently using.
If you just want to change the environment of your current shell, instead of the above you can type:
source /opt/ros/kinetic/setup.bash
If you use zsh instead of bash you need to run the following commands to set up your shell:
echo "source /opt/ros/kinetic/setup.zsh" >> ~/.zshrc
source ~/.zshrc
7、Dependencies for building packages
sudo apt-get install python-rosinstall python-rosinstall-generator python-wstool build-essential
8、运行小乌龟测试
新建一个终端,输入$ roscore
新建一个终端,输入$ rosrun turtlesim turtlesim_node
新建一个终端,输入$ rosrun turtlesim turtle_telelop_key
移动上下左右键, 第三个终端放在最上层 , 看到小乌龟移动了。
9、安装Cartographer基本必须的库
sudo apt-get update
sudo apt-get install -y \
    cmake \
    g++ \
    git \
    google-mock \
    libboost-all-dev \
    libcairo2-dev \
    libeigen3-dev \
    libgflags-dev \
    libgoogle-glog-dev \
    liblua5.2-dev \
    libsuitesparse-dev \
    libwebp-dev \
    ninja-build \
    python-sphinx
10、安装wstool和rosdep
sudo apt-get update
sudo apt-get install -y python-wstool python-rosdep ninja-build
11、创建workspace
mkdir catkin_ws
cd catkin_ws
wstool init src
12、下载google cartographer源码(vpn)也可以从github直接下载
wstool merge -t src https://raw.githubusercontent.com/googlecartographer/cartographer_ros/master/cartographer_ros.rosinstall
cd catkin_ws/src
将最后一个git来源网址由https://ceres-solver.googlesource.com/ceres-solver.git 改为https://github.com/ceres-solver/ceres-solver.git
wstool update -t src
# Install proto3.
src/cartographer/scripts/install_proto3.sh
# Install deb dependencies.
# The command 'sudo rosdep init' will print an error if you have already
# executed it since installing ROS. This error can be ignored.
sudo rosdep init
13、安装deb依赖
rosdep update
rosdep install --from-paths src --ignore-src --rosdistro=${kinetic} -y
14、编译并安装
catkin_make_isolated --install --use-ninja
source install_isolated/setup.bash(设置路径)
15、每次修改了lua代码都需要运行下面代码进行编译和设置路径
cd slam_ws
catkin_make_isolated --install --use-ninja进行编译
source install_isolated/setup.bash设置路径
16、Launch
roslaunch cartographer_ros demo_backpack_2d.launch bag_filename:=/home/dmchen/slam_ws/src/cartographer_ros/cartographer_ros/bag/1014.bag
其中我们自己的数据包包1014.bag存储路径为/home/dmchen/slam_ws/src/cartographer_ros/cartographer_ros/bag
数据包下载地址:https://storage.googleapis.com/cartographer-public-data/bags/revo_lds/cartographer_paper_revo_lds.bag
https://storage.googleapis.com/cartographer-public-data/bags/backpack_2d/cartographer_paper_deutsches_museum.bag
https://storage.googleapis.com/cartographer-public-data/bags/pr2/2011-09https://storage.googleapis.com/cartographer-public-data/bags/backpack_3d/cartographer_3d_deutsches_museum.bag
以后 第一次打开终端运行时 需要 source install_isolated/setup.bash (调用ROS内部命令)
测试是否安装成功:# 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/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
 

cartographer Ubuntu16.04 ros环境配置的更多相关文章

  1. ubuntu16.04 ROS环境下配置和运行SVO

    ubuntu16.04 ROS环境下配置和运行SVO https://blog.csdn.net/nnUyi/article/details/78005552

  2. Ubuntu 16.04 ROS环境配置

    最近新入职一家公司,是搞智能无人驾驶的,用的操作系统是Ubuntu和ros,之前没接触过ros系统,既然公司用那就必须的学习啊,话不多说先装它一个ros玩玩... 1. Ubuntu 安装 ROS K ...

  3. Faster-RCNN-TensorFlow-Python3.5 在Ubuntu16.04下的配置方法

    目录 Faster-RCNN-TensorFlow-Python3.5 在Ubuntu16.04下的配置方法 安装过程 1. 深度学习环境Tensorflow的安装 2. 安装python包 3.   ...

  4. Ubuntu16.04双网卡配置,内网外网同时访问

    Ubuntu16.04双网卡配置,内网外网同时访问 配置:vim/etc/network/interface auto lo iface lo inet loopback auto eno1 ifac ...

  5. Ubuntu16.04 静态IP配置

    Ubuntu16.04 静态IP配置 修改配置 登录系统后,编辑文件/etc/network/interfaces.原始的内容如下: # This file describes the network ...

  6. Ubuntu16.04 lnmp 环境搭建

    Ubuntu16.04 lnmp 环境搭建 nginx 安装 sudo apt-add-repository ppa:nginx/stablesudo apt-add-repository ppa:o ...

  7. Ubuntu16.04 + ROS下串口通讯

    本文参考https://blog.csdn.net/weifengdq/article/details/84374690 由于工程需要,需要Ubuntu16.04 + ROS与STM32通讯,主要有两 ...

  8. Hadoop完全分布式环境搭建(三)——基于Ubuntu16.04安装和配置Java环境

    [系统环境] 1.宿主机OS:Win10 64位 2.虚拟机软件:VMware WorkStation 12 3.虚拟机OS:Ubuntu16.04 4.三台虚拟机 5.JDK文件:jdk-8u201 ...

  9. ubuntu16.04下安装配置深度学习环境(Ubuntu 16.04/16.10+ cuda7.5/8+cudnn4/5+caffe)

    主要参照以下两篇博文:http://blog.csdn.net/g0m3e/article/details/51420565   http://blog.csdn.net/xuzhongxiong/a ...

随机推荐

  1. git的使用学习(七)githup和码云的使用

    1.使用GitHub 我们一直用GitHub作为免费的远程仓库,如果是个人的开源项目,放到GitHub上是完全没有问题的.其实GitHub还是一个开源协作社区,通过GitHub,既可以让别人参与你的开 ...

  2. AC日记——通往奥格瑞玛的道路 洛谷 P1462

    通往奥格瑞玛的道路 思路: 二分+spfa: 二分最大费用,然后判断只走小于等于二分答案的点是否可以花费小于体力上限的血量: 来,上代码: #include <cstdio> #inclu ...

  3. AC日记——[Sdoi2010]星际竞速 bzoj 1927

    1927 思路: 连边,拆点: 每个点拆成i,i+n,都向t连边: i到t表示高速模式,i+n到t表示跳跃模式: 然后读入路径,如果u>v,则交换u,v: u向v+n连边: spfa跑最小费用: ...

  4. BZOJ1054(搜索)

    大力搜,状态用一个16位的数字表示. #include <bits/stdc++.h> using namespace std; #define rep(i,a,b) for(int i( ...

  5. CentOS 6.9编译安装Python-2.7.14(python升级)

    参考 Python官网:https://www.python.org/ 阿里云 https://www.aliyun.com/jiaocheng/517192.html 一.查看CentOS版本和系统 ...

  6. 洛谷——P1462 通往奥格瑞玛的道路

    P1462 通往奥格瑞玛的道路 题目背景 在艾泽拉斯大陆上有一位名叫歪嘴哦的神奇术士,他是部落的中坚力量 有一天他醒来后发现自己居然到了联盟的主城暴风城 在被众多联盟的士兵攻击后,他决定逃回自己的家乡 ...

  7. Network| ICMP

    Internet Control Message Protocol,ICMP是网路协议族的核心协议之一.它用于TCP/IP网络中发送控制消息,提供可能发生在通信环境中的各种问题反馈,通过这些信息,令管 ...

  8. luogu P1314 聪明的质监员

    题目描述 小T 是一名质量监督员,最近负责检验一批矿产的质量.这批矿产共有 n 个矿石,从 1到n 逐一编号,每个矿石都有自己的重量 wi 以及价值vi .检验矿产的流程是: 1 .给定m 个区间[L ...

  9. noip2017集训测试赛(四)Problem A: fibonacci

    题目大意 给你一个序列\(a_1, a_2, ..., a_n\). 我们令函数\(f(n)\)表示斐波那契数列第\(n\)项的值. 总共\(m\)个操作, 分为以下两种: 将\(x \in [L, ...

  10. JDK1.5新特性:

    1.自动装箱与拆箱: 自动装箱的过程:每当需要一种类型的对象时,这种基本类型就自动地封装到与它相同类型的包装中. 自动拆箱的过程:每当需要一个值时,被装箱对象中的值就被自动地提取出来,没必要再去调用i ...