Installation process installation Ubuntu14.04 (trusty), will install the image file to make a U disk image, enter the BIOS or WIN10 under the set-> Update and Security-> restore-> advanced boot, use U disk to start, Complete the installation of Ubuntu14.04 (trusty). Installation of Ros (Indigo), reference documents Http://wiki.ros.org/indigo/Installation/Ubuntu (original English), http://wiki.ros.org/cn/indigo/ Installation/ubuntu (Chinese translation), there are also bloggers to write their own Chinese version of the configuration tutorial, I was according to the configuration of a successful, link http://blog.csdn.net/linseeker85/article/details/ 50658865
Install all dependencies
sudo apt-get install-y google-mock libboost-all-dev libeigen3-dev libgflags-dev libgoogle-glog-dev liblua5.2-dev Libprotobuf-dev libsuitesparse-dev libwebp-dev ninja-build protobuf-compiler Python-sphinx Ros-indigo-tf2-eigen Libatlas-base-dev Libsuitesparse-dev Liblapack-dev
Install Ceres solver, download installed in the home directory, due to googlesource.com need FQ, here use HITCM (Ms Cheung) GitHub address
# Build and install Ceres.
# git clone https://ceres-solver.googlesource.com/ceres-solver
# CD Ceres-solver
git clone https://github.com/hitcm/ceres-solver-1.11.0.git
CD ceres-solver-1.11.0
mkdir Build
CD Build
CMake.. -G Ninja
Ninja
Ninja Test
sudo ninja install installation cartographer, download installed in the home directory, where the same use is HITCM (Ms Cheung) GitHub address
# Build and install cartographer.
git clone https://github.com/hitcm/cartographer.git
CD cartographer
mkdir Build
CD Build
CMake.. -G Ninja
Ninja
Ninja Test
sudo ninja install installs Cartographer_ros, where the MS Cheung address of HITCM (GitHub) is used, and because Google's official tutorials require FQ to download some files, it is easy to fail, After verifying that hitcm (Ms Cheung) has made a few modifications to the original file, it can be installed successfully, and the core code is unchanged in his modification, only the compiled file is modified.
We recommend using Wstool and ROSDEP. For faster builds, we also recommend using Ninja.
# Install Wstool and ROSDEP.
sudo apt-get update
sudo apt-get install-y python-wstool python-rosdep ninja-build
# Create A new workspace in ' Catkin_ws '.
mkdir Catkin_ws
CD CATKIN_WS
Wstool Init src
# download to the SRC folder below Catkin_ws
CD src
git clone https://github.com/hitcm/cartographer_ros.git
# then run the Catkin_make installation under Catkin_ws
Cd
CD CATKIN_WS
Catkin_make, the following error may be reported: Fatal error:pcl/conversions.h:no such file or directory., executing sudo apt-get install Ros-indigo-pcl-conversions, again Catkin_make can source./devel/setup.bash
Note: If the ROS environment variable is automatically configured (that is, added to a bash session) each time a new terminal is opened, it will be much more convenient:
echo "Source ~/catkin_ws/devel/setup.bash" >> ~/.BASHRC
SOURCE ~/.BASHRC
If you only want to change the environment variables under the current terminal, you can execute the command:
SOURCE ~/catkin_ws/devel/setup.bash Run Demo
Now, cartographer and cartographer ' s ROS integration are installed, download the example bags (e.g. 2D and 3D backpack Collections of the Deutsches Museum) to a known location, in this case ~/downloads, and use Roslaunch to bring up the DEM O:
# Download The 2D Backpack example bag.
Wget-p ~/downloads Https://storage.googleapis.com/cartographer-public-data/bags/backpack_2d/cartographer_paper_ Deutsches_museum.bag
# Launch the 2D backpack demo.
Roslaunch Cartographer_ros Demo_backpack_2d.launch Bag_filename:=${home}/downloads/cartographer_paper_deutsches_ Museum.bag
# Download The 3D Backpack example bag.
Wget-p ~/downloads Https://storage.googleapis.com/cartographer-public-data/bags/backpack_3d/cartographer_3d_ Deutsches_museum.bag
# Launch the 3D backpack demo.
Roslaunch Cartographer_ros Demo_backpack_3d.launch Bag_filename:=${home}/downloads/cartographer_3d_deutsches_ Museum.bag
# Download The Revo LDS example bag.
Wget-p ~/downloads Https://storage.googleapis.com/cartographer-public-data/bags/revo_lds/cartographer_paper_revo_lds.bag
# Launch the Revo LDS demo.
Roslaunch Cartographer_ros Demo_revo_lds.launch Bag_filename:=${home}/downloads/cartographer_paper_revo_lds.bag
# Download The PR2 example bag.
Wget-p ~/downloads Https://storage.googleapis.com/cartographer-public-data/bags/pr2/2011-09-15-08-32-46.bag
# Launch the PR2 demo.
Roslaunch Cartographer_ros Demo_pr2.launch Bag_filename:=${home}/downloads/2011-09-15-08-32-46.bag
The launch files would bring up Roscore and Rviz automatically. The effect chart of the accompanying 2d-slam demo