安装

获取源码

你可以使用最新 代码 .

git clone https://github.com/quanduyong/LTSLAM.git

依赖

LTSLAM工程依赖一系列c++开源库。

  • Eigen 3.3.7 or later strongly recommended, 3.3.7 or later required.

  • CMake 2.8.0 or later. Required on all platforms except for Android.

  • glog 0.5 or later. Recommended

  • gflags. Needed to build examples and tests.

  • googletest. Needed to build examples and tests.

  • SuiteSparse. Needed for solving large sparse linear systems. Optional; strongly recomended for large scale bundle adjustment

  • CXSparse. Similar to SuiteSparse but simpler and slower. CXSparse has no dependencies on LAPACK and BLAS. This makes for a simpler build process and a smaller binary. Optional

  • opencv-4.5.2. You will be build examples and tests or not.

  • opencv_contrib-4.5.2. You will be build examples and tests or not.

  • g2o. You will bebuild examples and tests or not.

  • ceres solver. You will be build examples and tests or not.

  • pangolin. You will be build examples and tests or not.

  • sophus. You will be build examples and tests or not.

ROS

ubuntu18.04安装ROS Melodic最详细配置

设置软件源:

sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.ustc.edu.cn/ros/ubuntu/ $DISTRIB_CODENAME main" > /etc/apt/sources.list.d/ros-latest.list'

设置最新的密钥:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F42ED6FBAB17C654

安装:

sudo apt-get update
sudo apt-get install ros-melodic-desktop-full
sudo apt-get install ros-melodic-rqt*

初始化rosdep:

sudo rosdep init
rosdep update

安装rosinstall:

sudo apt-get install python-rosinstall

加载环境设置文件:

source /opt/ros/melodic/setup.bash

设置环境变量:

# Set ROS Network
#ifconfig查看你的电脑ip地址
export ROS_HOSTNAME=192.168.89.135
export ROS_MASTER_URI=http://${ROS_HOSTNAME}:11311

Linux

We will use Ubuntu18.04 as our example linux distribution.

Start by installing all the dependencies.

CMake tools and some libraries

# CMake
sudo apt-get install cmake
# google-glog + gflags
sudo apt-get install libgoogle-glog-dev
# BLAS & LAPACK
sudo apt-get install libatlas-base-dev
# suitesparse
sudo apt-get install libsuitesparse-dev

glog

git clone https://github.com/google/glog
mkdir build
cd build
make -j6
sudo make install

gflags

git clone https://github.com/gflags/gflags
mkdir build
cd build
make -j6
sudo make install

googletest

git clone https://github.com/google/googletest.git
mkdir build
cd build
make -j6
sudo make install

ceres solver

git clone https://github.com/ceres-solver/ceres-solver.git
mkdir build
cd build
make -j6
sudo make install

pangolin

git clone https://github.com/stevenlovegrove/Pangolin.git
mkdir build
cd build
make -j6
sudo make install

g2o

git clone https://github.com/RainerKuemmerle/g2o.git
mkdir build
cd build
make -j6
sudo make install

sophus

git clone https://github.com/strasdat/Sophus.git
mkdir build
cd build
make -j6
sudo make install

Build

We are now ready to build, test, and begin run the demos.

mkdir build
cd build
cmake ..
make -j6