
8.1. Install Cartographer ROS
1. Install Dependencies:
sudo apt-get update
sudo apt-get install -y python3-wstool python3-rosdep ninja-build stow
mkdir -p ~/cartographer_ws/src
cd ~/cartographer_ws
wstool init src
wstool merge -t src https://raw.githubusercontent.com/cartographer-project/cartographer_ros/master/cartographer_ros.rosinstall
wstool update -t src
sudo apt-get install -y libprotobuf-dev protobuf-compiler
sudo rosdep init
rosdep update
rosdep install --from-paths src --ignore-src --rosdistro=noetic -y
But, error..... si

errored at "libabsl-dev"
First, ensure that you have all the necessary tools and dependencies installed:
sudo apt-get update
sudo apt-get install -y \
build-essential \
ninja-build \
stow \
git \
cmake \
libcairo2-dev \
libpango1.0-dev \
liblua5.3-dev \
libboost-all-dev \
libgflags-dev \
libgoogle-glog-dev \
libprotobuf-dev \
protobuf-compiler \
libceres-dev \
python3-sphinx \
libeigen3-dev \
libjsoncpp-dev \
python3-wstool \
python3-rosdep \
python3-catkin-tools \
ros-noetic-tf2-eigen \
ros-noetic-tf2-sensor-msgs
Clone the Abseil C++ repository from GitHub:
cd ~
git clone https://github.com/abseil/abseil-cpp.git
Build and install abseil-cpp:
cd abseil-cpp
mkdir build && cd build
cmake -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE=Release ..
make -j$(nproc)
sudo make install
Explanation:
After installing new libraries, update the system's library cache:
sudo ldconfig
Check that the Abseil libraries are installed:
ls /usr/local/lib/libabsl_*.a
You should see several libabsl_*.a files listed.
cd ~/cartographer_ws/src/cartographer
ls
nano package.xml
remove this part.
<depend>libabsl-dev</depend>
Full script.
<?xml version="1.0"?>
<!--
Copyright 2016 The Cartographer Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<package format="3">
<name>cartographer</name>
<version>2.0.0</version>
<description>
Cartographer is a system that provides real-time simultaneous localization
and mapping (SLAM) in 2D and 3D across multiple platforms and sensor
configurations.
</description>
<maintainer email="cartographer-owners@googlegroups.com">
The Cartographer Authors
</maintainer>
<license>Apache 2.0</license>
<url>https://github.com/cartographer-project/cartographer</url>
<author email="google-cartographer@googlegroups.com">
The Cartographer Authors
</author>
<buildtool_depend>cmake</buildtool_depend>
<build_depend>git</build_depend>
<build_depend>google-mock</build_depend>
<build_depend>gtest</build_depend>
<build_depend>python3-sphinx</build_depend>
<depend>libboost-iostreams-dev</depend>
<depend>eigen</depend>
<!-- depend>libabsl-dev/depend -->
<depend>libcairo2-dev</depend>
<depend>libceres-dev</depend>
<depend>libgflags-dev</depend>
<depend>libgoogle-glog-dev</depend>
<depend>lua5.2-dev</depend>
<depend>protobuf-dev</depend>
<export>
<build_type>cmake</build_type>
</export>
</package>

cd ~/cartographer_ws
rosdep install --from-paths src --ignore-src --rosdistro=noetic -y --skip-keys=libabsl-dev
catkin_make_isolated --install --use-ninja

..... Erorr again...