赞
踩
(cartographer_ros:https://github.com/cartographer-project/cartographer_ros
解压命名为 cartographer_ros,存放在~/Dowloads文件夹里面)
- //导入工程
- sudo apt-get update
-
- sudo apt-get install -y python3-wstool python3-rosdep ninja-build stow
-
- mkdir ~/cartographer_ws
-
- cd ~/cartographer_ws
-
- mkdir catkin_ws
-
- cd catkin_ws
-
- wstool init src
-
- cp -r ~/Dowloads/cartographer_ros ~/cartographer_ws/catkin_ws/src
-
- wstool update -t sr
-
- sudo rosdep init
-
- rosdep update
-
- rosdep install --from-paths src --ignore-src --rosdistro=${ROS_DISTRO} -y
-
- //安装required libraries
- cd ~/cartographer_ws
-
- sudo apt-get update
-
- sudo apt-get install -y \
- clang \
- cmake \
- g++ \
- git \
- google-mock \
- libboost-all-dev \
- libcairo2-dev \
- libceres-dev \
- libcurl4-openssl-dev \
- libeigen3-dev \
- libgflags-dev \
- libgoogle-glog-dev \
- liblua5.2-dev \
- libsuitesparse-dev \
- lsb-release \
- ninja-build \
- python3-sphinx \
- stow
-
- git clone https://github.com/abseil/abseil-cpp.git
-
- cd abseil-cpp
-
- git checkout 215105818dfde3174fe799600bb0f3cae233d0bf
-
- mkdir build
-
- cd build
-
- cmake -G Ninja \
- -DCMAKE_BUILD_TYPE=Release \
- -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
- -DCMAKE_INSTALL_PREFIX=/usr/local/stow/absl \
- ..
-
- ninja
-
- sudo ninja install
-
- cd /usr/local/stow
-
- sudo stow absl
-
- //编译
- cd ~/cartographer_ws/catkin_ws
-
- catkin_make_isolated --install --use-ninja
- //下载2D地图数据包
- wget -P ~/Downloads https://storage.googleapis.com/cartographer-public-data/bags/backpack_2d/cartographer_paper_deutsches_museum.bag
-
- cd ~/cartographer_ws/catkin_ws
-
- source install_isolated/setup.bash
-
- roslaunch cartographer_ros demo_backpack_2d.launch bag_filename:=${HOME}/Downloads/cartographer_paper_deutsches_museum.bag
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。