Compare commits
No commits in common. "eb5d0b2218e839f754475eb2d352a995f0616970" and "b1b63a3cb1e24098b1473e79cc05be7116e2a48a" have entirely different histories.
eb5d0b2218
...
b1b63a3cb1
|
@ -1,15 +0,0 @@
|
|||
name: Debian Bullseye CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["master"]
|
||||
pull_request:
|
||||
branches: ["master"]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Run the Dockerfile
|
||||
run: docker build . -f Dockerfile.bullseye
|
|
@ -1,15 +0,0 @@
|
|||
name: Ubuntu 22.04 CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["master"]
|
||||
pull_request:
|
||||
branches: ["master"]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Run the Dockerfile
|
||||
run: docker build . -f Dockerfile.jammy
|
|
@ -1,3 +1,2 @@
|
|||
build
|
||||
bazel-*
|
||||
/scripts/abseil-cpp/
|
||||
|
|
|
@ -29,8 +29,6 @@ include("${PROJECT_SOURCE_DIR}/cmake/functions.cmake")
|
|||
google_initialize_cartographer_project()
|
||||
google_enable_testing()
|
||||
|
||||
list(APPEND CMAKE_PREFIX_PATH "/usr/local/stow/absl")
|
||||
|
||||
find_package(absl REQUIRED)
|
||||
set(BOOST_COMPONENTS iostreams)
|
||||
if(WIN32)
|
||||
|
@ -270,41 +268,6 @@ target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC
|
|||
${PROTOBUF_INCLUDE_DIR})
|
||||
# TODO(hrapp): This should not explicitly list pthread and use
|
||||
# PROTOBUF_LIBRARIES, but that failed on first try.
|
||||
|
||||
# 函数来递归查找库文件路径
|
||||
function(get_library_paths target)
|
||||
get_target_property(LINK_LIBS ${target} INTERFACE_LINK_LIBRARIES)
|
||||
if(NOT LINK_LIBS)
|
||||
message(WARNING "Target ${target} has no INTERFACE_LINK_LIBRARIES")
|
||||
return()
|
||||
endif()
|
||||
foreach(lib IN LISTS LINK_LIBS)
|
||||
if(TARGET ${lib})
|
||||
get_target_property(TYPE ${lib} TYPE)
|
||||
if(TYPE STREQUAL "INTERFACE_LIBRARY")
|
||||
get_library_paths(${lib})
|
||||
elseif(TYPE STREQUAL "STATIC_LIBRARY" OR TYPE STREQUAL "SHARED_LIBRARY" OR TYPE STREQUAL "MODULE_LIBRARY")
|
||||
get_target_property(LIB_PATH ${lib} LOCATION)
|
||||
if(LIB_PATH)
|
||||
message(STATUS "Library ${lib} is located at ${LIB_PATH}")
|
||||
else()
|
||||
message(WARNING "Library ${lib} has no LOCATION property")
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
if("${lib}" MATCHES "-NOTFOUND$")
|
||||
message(WARNING "Library ${lib} is NOTFOUND")
|
||||
else()
|
||||
message(STATUS "Linked library: ${lib}")
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
|
||||
# 获取absl::base目标的实际库文件路径
|
||||
get_library_paths(absl::base)
|
||||
|
||||
target_link_libraries(${PROJECT_NAME} PUBLIC ${PROTOBUF_LIBRARY}
|
||||
absl::algorithm
|
||||
absl::base
|
||||
|
|
|
@ -31,5 +31,11 @@ COPY scripts/install_abseil.sh cartographer/scripts/
|
|||
RUN cartographer/scripts/install_abseil.sh && rm -rf /var/lib/apt/lists/*
|
||||
COPY scripts/install_proto3.sh cartographer/scripts/
|
||||
RUN cartographer/scripts/install_proto3.sh && rm -rf protobuf
|
||||
COPY scripts/install_grpc.sh cartographer/scripts/
|
||||
RUN cartographer/scripts/install_grpc.sh && rm -rf grpc
|
||||
COPY scripts/install_async_grpc.sh cartographer/scripts/
|
||||
RUN cartographer/scripts/install_async_grpc.sh && rm -rf async_grpc
|
||||
COPY scripts/install_prometheus_cpp.sh cartographer/scripts/
|
||||
RUN cartographer/scripts/install_prometheus_cpp.sh && rm -rf prometheus-cpp
|
||||
COPY . cartographer
|
||||
RUN cartographer/scripts/install_cartographer_cmake.sh && rm -rf cartographer
|
||||
RUN cartographer/scripts/install_cartographer_cmake_with_grpc.sh && rm -rf cartographer
|
||||
|
|
|
@ -1,41 +0,0 @@
|
|||
# Copyright 2020 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.
|
||||
|
||||
FROM ubuntu:bionic
|
||||
|
||||
ARG cc
|
||||
ARG cxx
|
||||
|
||||
# Set the preferred C/C++ compiler toolchain, if given (otherwise default).
|
||||
ENV CC=$cc
|
||||
ENV CXX=$cxx
|
||||
|
||||
# This base image doesn't ship with sudo, apt-utils. tzdata is installed here to avoid hanging later
|
||||
# when it would wait for user input.
|
||||
RUN apt-get update && apt-get install -y sudo apt-utils tzdata && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY scripts/install_debs_cmake.sh cartographer/scripts/
|
||||
RUN cartographer/scripts/install_debs_cmake.sh && rm -rf /var/lib/apt/lists/*
|
||||
COPY scripts/install_abseil.sh cartographer/scripts/
|
||||
RUN cartographer/scripts/install_abseil.sh && rm -rf /var/lib/apt/lists/*
|
||||
COPY scripts/install_proto3.sh cartographer/scripts/
|
||||
RUN cartographer/scripts/install_proto3.sh && rm -rf protobuf
|
||||
COPY scripts/install_grpc.sh cartographer/scripts/
|
||||
RUN cartographer/scripts/install_grpc.sh && rm -rf grpc
|
||||
COPY scripts/install_async_grpc.sh cartographer/scripts/
|
||||
RUN cartographer/scripts/install_async_grpc.sh && rm -rf async_grpc
|
||||
COPY scripts/install_prometheus_cpp.sh cartographer/scripts/
|
||||
RUN cartographer/scripts/install_prometheus_cpp.sh && rm -rf prometheus-cpp
|
||||
COPY . cartographer
|
||||
RUN cartographer/scripts/install_cartographer_cmake_with_grpc.sh && rm -rf cartographer
|
|
@ -1,31 +0,0 @@
|
|||
# Copyright 2020 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.
|
||||
|
||||
FROM ubuntu:jammy
|
||||
|
||||
ARG cc
|
||||
ARG cxx
|
||||
|
||||
# Set the preferred C/C++ compiler toolchain, if given (otherwise default).
|
||||
ENV CC=$cc
|
||||
ENV CXX=$cxx
|
||||
|
||||
# This base image doesn't ship with sudo, apt-utils. tzdata is installed here to avoid hanging later
|
||||
# when it would wait for user input.
|
||||
RUN apt-get update && apt-get install -y sudo apt-utils tzdata && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY scripts/install_debs_cmake.sh cartographer/scripts/
|
||||
RUN cartographer/scripts/install_debs_cmake.sh && rm -rf /var/lib/apt/lists/*
|
||||
COPY . cartographer
|
||||
RUN cartographer/scripts/install_cartographer_cmake.sh && rm -rf cartographer
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright 2022 The Cartographer Authors
|
||||
# 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.
|
||||
|
@ -12,7 +12,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
FROM debian:bullseye
|
||||
FROM debian:stretch
|
||||
|
||||
ARG cc
|
||||
ARG cxx
|
||||
|
@ -26,5 +26,11 @@ RUN apt-get update && apt-get install -y sudo && rm -rf /var/lib/apt/lists/*
|
|||
|
||||
COPY scripts/install_debs_cmake.sh cartographer/scripts/
|
||||
RUN cartographer/scripts/install_debs_cmake.sh && rm -rf /var/lib/apt/lists/*
|
||||
COPY scripts/install_abseil.sh cartographer/scripts/
|
||||
RUN cartographer/scripts/install_abseil.sh && rm -rf /var/lib/apt/lists/*
|
||||
COPY scripts/install_ceres.sh cartographer/scripts/
|
||||
RUN cartographer/scripts/install_ceres.sh && rm -rf ceres-solver
|
||||
COPY scripts/install_proto3.sh cartographer/scripts/
|
||||
RUN cartographer/scripts/install_proto3.sh && rm -rf protobuf
|
||||
COPY . cartographer
|
||||
RUN cartographer/scripts/install_cartographer_cmake.sh && rm -rf cartographer
|
37
README.rst
37
README.rst
|
@ -16,7 +16,7 @@
|
|||
Cartographer
|
||||
============
|
||||
|
||||
|build-jammy| |build-focal| |build-bionic| |build-bullseye| |build-buster| |docs| |license|
|
||||
|build| |docs| |license|
|
||||
|
||||
Purpose
|
||||
=======
|
||||
|
@ -30,23 +30,6 @@ configurations.
|
|||
.. _Cartographer: https://github.com/cartographer-project/cartographer
|
||||
.. _SLAM: https://en.wikipedia.org/wiki/Simultaneous_localization_and_mapping
|
||||
|
||||
A Note for ROS Users
|
||||
====================
|
||||
|
||||
**Cartographer is no longer actively maintained.**
|
||||
On rare occasions critical pull requests may be merged, but no new development is currently taking place, including issue response.
|
||||
If you are installing Cartographer in ROS 1 / ROS 2 using a binary package that package is a fork of this repository.
|
||||
The ROS fork of Cartographer is only maintained in a limited capacity.
|
||||
No new development takes place on this fork, but pull requests may be merged at the maintainers' discretion.
|
||||
|
||||
The ROS fork of Cartographer, and the ROS wrapper library, can be found at these locations:
|
||||
|
||||
- `Cartographer Fork <https://github.com/ros2/cartographer>`_
|
||||
- `Cartographer ROS <https://github.com/ros2/cartographer_ros>`_
|
||||
|
||||
Additional discussion can be found in `this ROS Discourse thread<https://discourse.ros.org/t/rolling-and-soon-humble-release-of-both-cartographer-and-cartographer-ros-v2-and-call-for-testing/25137>`_.
|
||||
|
||||
|
||||
Getting started
|
||||
===============
|
||||
|
||||
|
@ -100,26 +83,10 @@ Slides of these Cartographer Open House meetings are listed below.
|
|||
- June 22, 2017: `Slides <https://storage.googleapis.com/cartographer-public-data/cartographer-open-house/170622/sildes.pdf>`_
|
||||
- June 8, 2017: `Slides <https://storage.googleapis.com/cartographer-public-data/cartographer-open-house/170608/slides.pdf>`_
|
||||
|
||||
.. |build-jammy| image:: https://github.com/cartographer-project/cartographer/actions/workflows/ci-jammy.yaml/badge.svg
|
||||
:alt: Ubuntu 22.04 Build Status
|
||||
:scale: 100%
|
||||
:target: https://github.com/cartographer-project/cartographer/actions/workflows/ci-jammy.yaml
|
||||
.. |build-focal| image:: https://github.com/cartographer-project/cartographer/actions/workflows/ci-focal.yaml/badge.svg
|
||||
.. |build| image:: https://github.com/cartographer-project/cartographer/actions/workflows/ci-focal.yaml/badge.svg
|
||||
:alt: Ubuntu 20.04 Build Status
|
||||
:scale: 100%
|
||||
:target: https://github.com/cartographer-project/cartographer/actions/workflows/ci-focal.yaml
|
||||
.. |build-bionic| image:: https://github.com/cartographer-project/cartographer/actions/workflows/ci-bionic.yaml/badge.svg
|
||||
:alt: Ubuntu 18.04 Build Status
|
||||
:scale: 100%
|
||||
:target: https://github.com/cartographer-project/cartographer/actions/workflows/ci-bionic.yaml
|
||||
.. |build-bullseye| image:: https://github.com/cartographer-project/cartographer/actions/workflows/ci-bullseye.yaml/badge.svg
|
||||
:alt: Debian Bullseye Build Status
|
||||
:scale: 100%
|
||||
:target: https://github.com/cartographer-project/cartographer/actions/workflows/ci-bullseye.yaml
|
||||
.. |build-buster| image:: https://github.com/cartographer-project/cartographer/actions/workflows/ci-buster.yaml/badge.svg
|
||||
:alt: Debian Buster Build Status
|
||||
:scale: 100%
|
||||
:target: https://github.com/cartographer-project/cartographer/actions/workflows/ci-buster.yaml
|
||||
.. |docs| image:: https://readthedocs.org/projects/google-cartographer/badge/?version=latest
|
||||
:alt: Documentation Status
|
||||
:scale: 100%
|
||||
|
|
|
@ -20,10 +20,11 @@ def cartographer_repositories():
|
|||
_maybe(
|
||||
http_archive,
|
||||
name = "com_github_nelhage_rules_boost",
|
||||
sha256 = "f7d620c0061631d5b7685cd1065f2e2bf0768559555010a75e8e4720006f5867",
|
||||
strip_prefix = "rules_boost-c3fae06e819ed8b93e31b150387dce4864758643",
|
||||
sha256 = "371f49e7b29e44a718baf8b9a2dd3eca865005a851c9ecf8fb6a10a715aa58dd",
|
||||
strip_prefix = "rules_boost-a5a95642f6097f8949020646ffe89d7243008981",
|
||||
urls = [
|
||||
"https://github.com/nelhage/rules_boost/archive/c3fae06e819ed8b93e31b150387dce4864758643.tar.gz",
|
||||
"https://mirror.bazel.build/github.com/nelhage/rules_boost/archive/a5a95642f6097f8949020646ffe89d7243008981.tar.gz",
|
||||
"https://github.com/nelhage/rules_boost/archive/a5a95642f6097f8949020646ffe89d7243008981.tar.gz",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
@ -374,8 +374,6 @@ void OptimizationProblem3D::Solve(
|
|||
|
||||
auto imu_it = imu_data.begin();
|
||||
auto prev_node_it = node_it;
|
||||
|
||||
bool gravity_block_added = false;
|
||||
for (++node_it; node_it != trajectory_end; ++node_it) {
|
||||
const NodeId first_node_id = prev_node_it->id;
|
||||
const NodeSpec3D& first_node_data = prev_node_it->data;
|
||||
|
@ -434,7 +432,6 @@ void OptimizationProblem3D::Solve(
|
|||
C_nodes.at(third_node_id).translation(),
|
||||
&trajectory_data.gravity_constant,
|
||||
trajectory_data.imu_calibration.data());
|
||||
gravity_block_added = true;
|
||||
}
|
||||
problem.AddResidualBlock(
|
||||
RotationCostFunction3D::CreateAutoDiffCostFunction(
|
||||
|
@ -445,11 +442,8 @@ void OptimizationProblem3D::Solve(
|
|||
trajectory_data.imu_calibration.data());
|
||||
}
|
||||
|
||||
if (gravity_block_added) {
|
||||
// Force gravity constant to be positive.
|
||||
problem.SetParameterLowerBound(&trajectory_data.gravity_constant, 0,
|
||||
0.0);
|
||||
}
|
||||
problem.SetParameterLowerBound(&trajectory_data.gravity_constant, 0, 0.0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ macro(_parse_arguments ARGS)
|
|||
"${OPTIONS}" "${ONE_VALUE_ARG}" "${MULTI_VALUE_ARGS}" ${ARGS})
|
||||
endmacro(_parse_arguments)
|
||||
|
||||
macro(_common_compile_stuff)
|
||||
macro(_common_compile_stuff VISIBILITY)
|
||||
set(TARGET_COMPILE_FLAGS "${TARGET_COMPILE_FLAGS} ${GOOG_CXX_FLAGS}")
|
||||
|
||||
set_target_properties(${NAME} PROPERTIES
|
||||
|
@ -34,7 +34,7 @@ endmacro(_common_compile_stuff)
|
|||
|
||||
function(google_test NAME ARG_SRC)
|
||||
add_executable(${NAME} ${ARG_SRC})
|
||||
_common_compile_stuff()
|
||||
_common_compile_stuff("PRIVATE")
|
||||
|
||||
# Make sure that gmock always includes the correct gtest/gtest.h.
|
||||
target_include_directories("${NAME}" SYSTEM PRIVATE
|
||||
|
@ -49,7 +49,7 @@ function(google_binary NAME)
|
|||
|
||||
add_executable(${NAME} ${ARG_SRCS})
|
||||
|
||||
_common_compile_stuff()
|
||||
_common_compile_stuff("PRIVATE")
|
||||
|
||||
install(TARGETS "${NAME}" RUNTIME DESTINATION bin)
|
||||
endfunction()
|
||||
|
|
|
@ -106,7 +106,7 @@ TRAJECTORY_BUILDER_3D = {
|
|||
},
|
||||
},
|
||||
|
||||
-- When setting use_intensities to true, the intensity_cost_function_options_0
|
||||
-- When setting use_intensites to true, the intensity_cost_function_options_0
|
||||
-- parameter in ceres_scan_matcher has to be set up as well or otherwise
|
||||
-- CeresScanMatcher will CHECK-fail.
|
||||
use_intensities = false,
|
||||
|
|
|
@ -75,6 +75,10 @@ On Ubuntu 18.04 (Bionic):
|
|||
:language: bash
|
||||
:lines: 20-
|
||||
|
||||
.. literalinclude:: ../../scripts/install_ceres.sh
|
||||
:language: bash
|
||||
:lines: 20-
|
||||
|
||||
.. literalinclude:: ../../scripts/install_proto3.sh
|
||||
:language: bash
|
||||
:lines: 20-
|
||||
|
@ -93,8 +97,8 @@ on systems that meet the following requirements:
|
|||
|
||||
* 64-bit, modern CPU (e.g. 3rd generation i7)
|
||||
* 16 GB RAM
|
||||
* Ubuntu 18.04 (Bionic), 20.04 (Focal), 22.04 (Jammy)
|
||||
* gcc version 7.5.0, 8.3.0, 9.3.0, 10.2.1, 11.2.0
|
||||
* Ubuntu 18.04 (Bionic), 20.04 (Focal)
|
||||
* gcc version 6.3.0, 7.5.0, 9.3.0
|
||||
|
||||
Known Issues
|
||||
------------
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
|
||||
<depend>libboost-iostreams-dev</depend>
|
||||
<depend>eigen</depend>
|
||||
<depend>libabsl-dev</depend>
|
||||
<depend>libcairo2-dev</depend>
|
||||
<depend>libceres-dev</depend>
|
||||
<depend>libgflags-dev</depend>
|
||||
|
|
|
@ -19,7 +19,7 @@ set -o verbose
|
|||
|
||||
git clone https://github.com/abseil/abseil-cpp.git
|
||||
cd abseil-cpp
|
||||
git checkout 215105818dfde3174fe799600bb0f3cae233d0bf # 20211102.0
|
||||
git checkout d902eb869bcfacc1bad14933ed9af4bed006d481
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -G Ninja \
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
#!/bin/sh
|
||||
|
||||
# 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.
|
||||
|
||||
set -o errexit
|
||||
set -o verbose
|
||||
|
||||
VERSION="1.13.0"
|
||||
|
||||
# Build and install Ceres.
|
||||
git clone https://ceres-solver.googlesource.com/ceres-solver
|
||||
cd ceres-solver
|
||||
git checkout tags/${VERSION}
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -G Ninja -DCXX11=ON
|
||||
ninja
|
||||
CTEST_OUTPUT_ON_FAILURE=1 ninja test
|
||||
sudo ninja install
|
|
@ -27,7 +27,6 @@ sudo apt-get install -y \
|
|||
google-mock \
|
||||
libboost-all-dev \
|
||||
libcairo2-dev \
|
||||
libceres-dev \
|
||||
libcurl4-openssl-dev \
|
||||
libeigen3-dev \
|
||||
libgflags-dev \
|
||||
|
@ -36,16 +35,19 @@ sudo apt-get install -y \
|
|||
libsuitesparse-dev \
|
||||
lsb-release \
|
||||
ninja-build \
|
||||
python3-sphinx \
|
||||
stow
|
||||
|
||||
# Install Protocol Buffers and Abseil if available.
|
||||
# Install Ceres Solver and Protocol Buffers support if available.
|
||||
# No need to build it ourselves.
|
||||
case "$(lsb_release -sc)" in
|
||||
jammy|bullseye)
|
||||
sudo apt-get install -y libgmock-dev protobuf-compiler libabsl-dev ;;
|
||||
focal|buster)
|
||||
sudo apt-get install -y libgmock-dev protobuf-compiler ;;
|
||||
bionic)
|
||||
;;
|
||||
esac
|
||||
if [[ "$(lsb_release -sc)" = "focal" || "$(lsb_release -sc)" = "buster" ]]
|
||||
then
|
||||
sudo apt-get install -y python3-sphinx libgmock-dev libceres-dev protobuf-compiler
|
||||
else
|
||||
sudo apt-get install -y python-sphinx
|
||||
if [[ "$(lsb_release -sc)" = "bionic" ]]
|
||||
then
|
||||
sudo apt-get install -y libceres-dev
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue