Cartographer on Ubuntu16.04 + Kinetic + 2D

目录

Cartographer on Ubuntu16.04 + Kinetic + 2D

1. INSTALL

1.1  dependencies

1.2  ceres-solver

1.3  cartographer

1.4  proto3

1.5 abseil

1.6  cartographer-ros

2.  MAPPING

3.  SAVE MAP

3.1  mapping done

3.2  save map data as pbstream flle

 3.3  change map data to pgm file


1. INSTALL

1.1  dependencies

sudo apt-get install -y google-mock libboost-all-dev  libeigen3-dev libgflags-dev libgoogle-glog-dev liblua5.2-dev libprotobuf-dev  libsuitesparse-dev libwebp-dev ninja-build protobuf-compiler python-sphinx  ros-kinetic-tf2-eigen libatlas-base-dev libsuitesparse-dev liblapack-dev

1.2  ceres-solver

git clone https://github.com/hitcm/ceres-solver-1.11.0.git
cd ceres-solver-1.11.0
mkdir build
cd build
cmake ..
make -j4
sudo make install

1.3  cartographer

git clone https://github.com/cartographer-project/cartographer.git
cd cartographer
mkdir build
cd build
cmake .. -G Ninja
ninja
ninja test
sudo ninja install

1.4  proto3

/home/lzh/Downloads/cartographer/scripts/install_proto3.sh

1.5 abseil

/home/lzh/Downloads/cartographer/scripts/install_abseil.sh

1.6  cartographer-ros

cd catkin_ws/src
git clone https://github.com/hitcm/cartographer_ros.git
cd ..
catkin_make

2.  MAPPING

cartographer_paper_deutsches_museum.bag

roslaunch cartographer_ros demo_backpack_2d.launch bag_filename:=/home/lzh/Downloads/cartographer_paper_deutsches_museum.bag

3.  SAVE MAP

3.1  mapping done

cd catkin_ws
source devel/setup.bash
rosservice call /finish_trajectory "trajectory_id: 0"

then the terminal show

status:
  code: 0
  message: "Finished trajectory 0."

3.2  save map data as pbstream flle

rosservice call /write_state "filename: '/home/lzh/carto_ws/map/map0.pbstream'
include_unfinished_submaps: true"

then the terminal show

status:
  code: 0
  message: "State written to '/home/yx/carto_ws/map/map0.pbstream'."

 3.3  change map data to pgm file

rosrun cartographer_ros cartographer_pbstream_to_ros_map -map_filestem=/home/lzh/carto_ws/map/map1 -pbstream_filename=/home/lzh/carto_ws/map/map0.pbstream -resolution=0.02 

then the terminal show

I0220 18:39:45.450656 15055 pbstream_to_ros_map_main.cc:43] Loading submap slices from serialized data.
I0220 18:40:01.743477 15055 pbstream_to_ros_map_main.cc:51] Generating combined map image from submap slices.


 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值