一.安装ROS:
依次执行如下命令:
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
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*
sudo apt install python-rosdep2
sudo rosdep init
rosdep update
sudo apt-get install python-rosinstall
source /opt/ros/melodic/setup.bash
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
catkin_init_workspace
cd ~/catkin_ws/
catkin_make
sudo apt install net-tools
sudo apt install python-catkin-pkg
git clone https://github.com/ros/catkin.git
二:安装依赖
- grid_map
安装: sudo apt-get install ros-melodic-grid-map
- ros-melodic-pcl-ros
安装: sudo apt-get install ros-melodic-pcl-ros
- mosquittopp 为mosquitto-1.4.15 版本的CPP wrapper
- sudo apt install libmosquitto-dev
sudo apt install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev
5.安装ceres
# CMake
sudo apt-get install cmake
# google-glog + gflags
sudo apt-get install libgoogle-glog-dev libgflags-dev
# BLAS & LAPACK
sudo apt-get install libatlas-base-dev
# Eigen3
sudo apt-get install libeigen3-dev
# SuiteSparse and CXSparse (optional)
sudo apt-get install libsuitesparse-dev
We are now ready to build, test, and install Ceres.
git clone https://ceres-solver.googlesource.com/ceres-solver
cd ceres-solver/
mkdir build
cd build/
cmake ../
make -j3
make
# Optionally install Ceres, it can also be exported using CMake which
# allows Ceres to be used without requiring installation, see the documentation
# for the EXPORT_BUILD_DIR option for more information.
sudo make install