segmap 编译安装指南

1、建立工作空间,下载segmap程序包

安装依赖项
$ sudo apt-get install python-wstool doxygen python3-pip python3-dev python-virtualenv
设置工作空间配置
$ mkdir -p ~/segmap_ws/src
$ cd ~/segmap_ws
$ catkin init
$ catkin config --merge-devel
$ catkin config --cmake-args -DCMAKE_BUILD_TYPE=Release
下载segmap源码
$ cd src
$ git clone https://github.com/ethz-asl/segmap.git
$ wstool init
$ wstool merge segmap/dependencies.rosinstall
$ wstool update

2、源码安装tensorflow1.8

参考网站: (https://tensorflow.google.cn/install/install_sources#ConfigureInstallation)
注意事项:
“Clone the TensorFlow repository” 步骤

$ git clone https://github.com/tensorflow/tensorflow

改为:

$ git clone -b r1.8 https://github.com/tensorflow/tensorflow

步骤
“Build the pip package”

$ bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package

改为:

$ bazel build --config=opt --define framework_shared_object=false
tensorflow:libtensorflow_cc.so

剩下的步骤不用执行

3、编译tensorflow_ros_cpp程序包

设置 CMakeLists.txt 内 tensorflow 的路径
修改:

set(TF_BAZEL_LIBRARY “CATKIN_DEVEL_PREFIX/…/libtensorflow_cc.so” CACHE STRING “Path to the bazel-compiled Tensorflow C++ library”)
set(TF_BAZEL_SRC_DIR “${CATKIN_DEVEL_PREFIX}/…/tensorflow-include-base” CACHE STRING “Path to the Tensorflow sources directory”)

内的 tensorflow 的库路径和源码路径为步骤 1 确定的路径
例如:

set(TF_BAZEL_LIBRARY “/home/ubuntu/tensorflow-r1.8/bazel-bin/tensorflow/libtensorflow_cc.so” CACHE STRING “Path to the bazel-compiled Tensorflow C++ library”)
set(TF_BAZEL_SRC_DIR “/home/ubuntu/tensorflow-r1.8” CACHE STRING “Path to the Tensorflow sources directory”)

编译

$ cd ~/segmap_ws
$ catkin build tensorflow_ros_cpp

4、编译segmapper程序包

直接编译会出现3个错误,分别安装如下功能包即可:

$sudo apt-get install autoconf automake libtool

$ git clone https://github.com/doxygen/doxygen.git
$ cd doxygen
$ mkdir build
$ cd build
$ cmake …
$ make
$ sudo make install

$ git clone https://github.com/ros-perception/pcl_conversions/tree/indigo-devel
$ cd pcl_conversions
$ mkdir build
$ cd build
$ cmake …
$ make
$ sudo make install

编译segmapper程序包

$ cd ~/segmap_ws
$ catkin build segmapper

  • 3
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值