ubuntu14.04安装maplab及问题详解

1 安装ROS

export UBUNTU_VERSION=trusty

exportROS_VERSION=indigo

sudo apt install software-properties-common

sudo add-apt-repository"deb http://packages.ros.org/ros/ubuntu$UBUNTU_VERSION main"

wget https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -O -| sudo apt-key add -

sudo apt update

sudo apt install ros-$ROS_VERSION-desktop-full"ros-$ROS_VERSION-tf2-*""ros-$ROS_VERSION-camera-info-manager*" --yes

# Install framework dependencies.

sudo apt install autotools-dev ccache doxygen dh-autoreconf git liblapack-dev libblas-dev libgtest-dev libreadline-dev libssh2-1-dev pylint clang-format-3.8 python-autopep8 python-catkin-tools python-pip python-git python-setuptools python-termcolor python-wstool --yes

sudo pip install requests

2 更新ROS环境

sudo rosdep init

rosdep update

echo". /opt/ros/$ROS_VERSION/setup.bash">>~/.bashrc

source~/.bashrc

3 创建catkin工作空间

export ROS_VERSION=indigo

export CATKIN_WS=~/maplab_ws

mkdir -p $CATKIN_WS/src

cd$CATKIN_WS

catkin init

catkin config --merge-devel# Necessary for catkin_tools >= 0.4.

catkin config --extend /opt/ros/$ROS_VERSION

catkin config --cmake-args -DCMAKE_BUILD_TYPE=Release

cd src

4 下载maplab源码

git clone https://github.com/ethz-asl/maplab.git  --recursive

git clone https://github.com/ethz-asl/maplab_dependencies  --recursive

5 建立linter

cd$CATKIN_WS/src/maplab

./tools/linter/init-git-hooks.py

6 生成maplab

cd$CATKIN_WS

catkin build maplab


在此期间遇到很多问题,折磨了两天,网上没有现成的解决方法,特意写下笔记供大家参考

1)好多catkin_package下载不了

比如opencv3_catkin,glog_catkin,lp_solve_catkin,metis_catkin,protobuf_catkin等,只能打开相应的cmake文件,找到下载地址,手动下载后放到目的地址。

注意,有的源码放进目的地址后,执行后会恢复为空文档,我把download-*_src.cmake文件里添加了if函数,如果存在.zip,就不再进行下载)

2)ceres-solver链接无法连接,导致安装不成功

CMakeLists.txt下载地址GIT_REPOSITORY修改为https://github.com/ceres-solver/ceres-solver

3)opencv3_catkinvgg_generated_48.i下载不了,说是HASH冲突

相同的,执行到下载boostdesc_bgm.i时,也是相同的问题,可以直接下载http://download.csdn.net/download/snnily/10201215

对照着download-*_src.cmake里的hash号,建立相应的文件夹,放入对应的.i文件

4)对rovio执行make时,出现有关eigen/StdVector的错误

./Eigen/src/StlSupport/StdVector.h:69:9: error: partial specialization of 'std::vector >' after instantiation of 'std::vector >' [-fpermissive]

解决方法是,在出现错误相关联的文件中添加#include,问题就会消失。


最后执行catkin build maplab后,Failed: none ,Abandoned: none

你可能感兴趣的:(map)