Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ jobs:
strategy:
matrix:
DISTRO: [
{ "ubuntu": "noble_gtsam4.2a9", "suffix": "gcc" },
{ "ubuntu": "noble_gtsam4.2a9", "suffix": "llvm" },
{ "ubuntu": "noble_cuda12.5_gtsam4.2a9", "suffix": "gcc.cuda" },
{ "ubuntu": "noble_cuda12.5_gtsam4.2a9", "suffix": "llvm.cuda" },
{ "ubuntu": "jammy_gtsam4.2a9", "suffix": "gcc" },
{ "ubuntu": "jammy_cuda12.2_gtsam4.2a9", "suffix": "gcc.cuda" },
{ "ubuntu": "jammy_cuda12.5_gtsam4.2a9", "suffix": "gcc.cuda" },
{ "ubuntu": "noble_gtsam4.3a0", "suffix": "gcc" },
{ "ubuntu": "noble_gtsam4.3a0", "suffix": "llvm" },
{ "ubuntu": "noble_cuda12.5_gtsam4.3a0", "suffix": "gcc.cuda" },
{ "ubuntu": "noble_cuda12.5_gtsam4.3a0", "suffix": "llvm.cuda" },
{ "ubuntu": "jammy_gtsam4.3a0", "suffix": "gcc" },
{ "ubuntu": "jammy_cuda12.2_gtsam4.3a0", "suffix": "gcc.cuda" },
{ "ubuntu": "jammy_cuda12.5_gtsam4.3a0", "suffix": "gcc.cuda" },
]
BUILD_WITH_TBB: [ "ON", "OFF" ]

Expand Down
7 changes: 3 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.22)
project(gtsam_points VERSION 1.1.0 LANGUAGES CXX)
project(gtsam_points VERSION 1.2.0 LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_LIST_DIR}/cmake")
Expand Down Expand Up @@ -30,8 +30,8 @@ if(BUILD_WITH_MARCH_NATIVE)
endif()

find_package(Boost REQUIRED COMPONENTS graph filesystem)
find_package(GTSAM REQUIRED)
find_package(GTSAM_UNSTABLE REQUIRED)
find_package(GTSAM 4.3 REQUIRED)
find_package(GTSAM_UNSTABLE 4.3 REQUIRED)
find_package(Eigen3 REQUIRED)

if(BUILD_WITH_TBB)
Expand Down Expand Up @@ -197,7 +197,6 @@ add_library(gtsam_points SHARED
src/gtsam_points/optimizers/isam2_ext_impl.cpp
src/gtsam_points/optimizers/incremental_fixed_lag_smoother_ext.cpp
src/gtsam_points/optimizers/incremental_fixed_lag_smoother_ext_with_fallback.cpp
# src/gtsam_points/optimizers/dogleg_optimizer_ext.cpp
src/gtsam_points/optimizers/dogleg_optimizer_ext_impl.cpp
)
target_include_directories(gtsam_points PUBLIC
Expand Down
17 changes: 11 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This is a collection of [GTSAM](https://gtsam.org/) factors and optimizers for range-based SLAM.

Tested on Ubuntu 22.04 / 24.04 and CUDA 12.2, and NVIDIA Jetson Orin with **GTSAM 4.2a9**.
Tested on Ubuntu 22.04 / 24.04 and CUDA 12.2, and NVIDIA Jetson Orin with **GTSAM 4.3a0**.


[![DOI](https://zenodo.org/badge/819211095.svg)](https://zenodo.org/doi/10.5281/zenodo.13378351) [![Doc](https://img.shields.io/badge/API_list-Doxygen-blue)](https://koide3.github.io/gtsam_points/doc_cpp/index.html) [![Build](https://github.com/koide3/gtsam_points/actions/workflows/build.yml/badge.svg)](https://github.com/koide3/gtsam_points/actions/workflows/build.yml)
Expand Down Expand Up @@ -94,7 +94,7 @@ All the following optimizers were derived from the implementations in GTSAM.
# Install gtsam
git clone https://github.com/borglab/gtsam
cd gtsam
git checkout 4.2a9
git checkout 4.3a0

mkdir build && cd build
cmake .. \
Expand Down Expand Up @@ -122,10 +122,15 @@ cmake .. -DCMAKE_BUILD_TYPE=Release

# Optional cmake arguments
# cmake .. \
# -DBUILD_DEMO=OFF \
# -DBUILD_TESTS=OFF \
# -DBUILD_WITH_CUDA=OFF \
# -DBUILD_WITH_MARCH_NATIVE=OFF
# -DBUILD_DEMO=OFF \ # Set ON to build demo programs
# -DBUILD_TESTS=OFF \ # Set ON to build unit tests
# -DBUILD_TOOLS=OFF \ # Set ON to build tools
# -DBUILD_WITH_TBB=OFF \ # Set ON to enable TBB
# -DBUILD_WITH_OPENMP=OFF \ # Set ON to enable OpenMP
# -DBUILD_WITH_CUDA=OFF \ # Set ON to enable CUDA support
# -DBUILD_WITH_CUDA_MULTIARCH=OFF \ # Set ON to enable multi-arch CUDA support
# -DCMAKE_CUDA_ARCHITECTURES=89 \ # If not specified, "native" architecture is used
# -DBUILD_WITH_MARCH_NATIVE=OFF # Set ON to enable -march=native (recommended to keep it OFF)

make -j$(nproc)
sudo make install
Expand Down
2 changes: 1 addition & 1 deletion cmake/gtsam_points-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if(GTSAM_POINTS_USE_TBB)
find_dependency(TBB REQUIRED)
endif()

if(BUILD_WITH_CUDA)
if(GTSAM_POINTS_USE_CUDA)
find_dependency(CUDAToolkit REQUIRED)
endif()

Expand Down
2 changes: 1 addition & 1 deletion docker/deb/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RUN apt-get install -y --no-install-recommends
RUN apt-get install -y --no-install-recommends build-essential \
git cmake libeigen3-dev ca-certificates libboost-all-dev libmetis-dev file

RUN git clone https://github.com/borglab/gtsam.git /root/gtsam -b 4.2a9
RUN git clone https://github.com/borglab/gtsam.git /root/gtsam -b 4.3a0
WORKDIR /root/gtsam/build
# Rename libgtsam-dev to libgtsam-notbb-dev
RUN sed -i 's/libgtsam-dev/libgtsam-notbb-dev/g' ../cmake/HandleCPack.cmake
Expand Down
117 changes: 0 additions & 117 deletions docker/deb/Dockerfile.focal

This file was deleted.

31 changes: 0 additions & 31 deletions docker/ubuntu/Dockerfile.focal

This file was deleted.

39 changes: 0 additions & 39 deletions docker/ubuntu/Dockerfile.focal.cuda

This file was deleted.

4 changes: 2 additions & 2 deletions include/gtsam_points/cuda/nonlinear_factor_set_gpu.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class NonlinearFactorSetGPU : public NonlinearFactorSet {
* @param factor Nonlinear factor
* @return True if the factor is GPU-based one and added to the set
*/
bool add(boost::shared_ptr<gtsam::NonlinearFactor> factor) override;
bool add(std::shared_ptr<gtsam::NonlinearFactor> factor) override;

/**
* @brief Add all GPU-based factors in a factor graph to the GPU factor set
Expand Down Expand Up @@ -105,7 +105,7 @@ class NonlinearFactorSetGPU : public NonlinearFactorSet {
int num_linearizations;
int num_evaluations;

std::vector<boost::shared_ptr<NonlinearFactorGPU>> factors;
std::vector<std::shared_ptr<NonlinearFactorGPU>> factors;

std::vector<unsigned char, Eigen::aligned_allocator<unsigned char>> linearization_input_buffer_cpu;
std::vector<unsigned char, Eigen::aligned_allocator<unsigned char>> linearization_output_buffer_cpu;
Expand Down
6 changes: 3 additions & 3 deletions include/gtsam_points/factors/bundle_adjustment_factor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace gtsam_points {
*/
class BundleAdjustmentFactorBase : public gtsam::NonlinearFactor {
public:
using shared_ptr = boost::shared_ptr<BundleAdjustmentFactorBase>;
using shared_ptr = std::shared_ptr<BundleAdjustmentFactorBase>;

virtual ~BundleAdjustmentFactorBase() {}

Expand All @@ -29,10 +29,10 @@ class BundleAdjustmentFactorBase : public gtsam::NonlinearFactor {
* @return Number of points
*/
virtual int num_points() const = 0;

/**
* @brief Set a constant error scale to boost the weight of the constraint
*/
virtual void set_scale(double scale) {}
};
}
} // namespace gtsam_points
10 changes: 5 additions & 5 deletions include/gtsam_points/factors/bundle_adjustment_factor_evm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ struct BALMFeature;
*/
class EVMBundleAdjustmentFactorBase : public BundleAdjustmentFactorBase {
public:
using shared_ptr = boost::shared_ptr<EVMBundleAdjustmentFactorBase>;
using shared_ptr = std::shared_ptr<EVMBundleAdjustmentFactorBase>;

EVMBundleAdjustmentFactorBase();
virtual ~EVMBundleAdjustmentFactorBase() override;
Expand Down Expand Up @@ -72,7 +72,7 @@ class EVMBundleAdjustmentFactorBase : public BundleAdjustmentFactorBase {
*/
class PlaneEVMFactor : public EVMBundleAdjustmentFactorBase {
public:
using shared_ptr = boost::shared_ptr<PlaneEVMFactor>;
using shared_ptr = std::shared_ptr<PlaneEVMFactor>;

PlaneEVMFactor();
virtual ~PlaneEVMFactor() override;
Expand All @@ -81,7 +81,7 @@ class PlaneEVMFactor : public EVMBundleAdjustmentFactorBase {
virtual void print(const std::string& s = "", const gtsam::KeyFormatter& keyFormatter = gtsam::DefaultKeyFormatter) const override;

virtual double error(const gtsam::Values& c) const override;
virtual boost::shared_ptr<gtsam::GaussianFactor> linearize(const gtsam::Values& c) const override;
virtual std::shared_ptr<gtsam::GaussianFactor> linearize(const gtsam::Values& c) const override;

// TODO: Add feature parameter extraction method
};
Expand All @@ -91,7 +91,7 @@ class PlaneEVMFactor : public EVMBundleAdjustmentFactorBase {
*/
class EdgeEVMFactor : public EVMBundleAdjustmentFactorBase {
public:
using shared_ptr = boost::shared_ptr<EdgeEVMFactor>;
using shared_ptr = std::shared_ptr<EdgeEVMFactor>;

EdgeEVMFactor();
virtual ~EdgeEVMFactor() override;
Expand All @@ -100,6 +100,6 @@ class EdgeEVMFactor : public EVMBundleAdjustmentFactorBase {
virtual void print(const std::string& s = "", const gtsam::KeyFormatter& keyFormatter = gtsam::DefaultKeyFormatter) const override;

virtual double error(const gtsam::Values& c) const override;
virtual boost::shared_ptr<gtsam::GaussianFactor> linearize(const gtsam::Values& c) const override;
virtual std::shared_ptr<gtsam::GaussianFactor> linearize(const gtsam::Values& c) const override;
};
} // namespace gtsam_points
4 changes: 2 additions & 2 deletions include/gtsam_points/factors/bundle_adjustment_factor_lsq.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace gtsam_points {
class LsqBundleAdjustmentFactor : public BundleAdjustmentFactorBase {
public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
using shared_ptr = boost::shared_ptr<LsqBundleAdjustmentFactor>;
using shared_ptr = std::shared_ptr<LsqBundleAdjustmentFactor>;

LsqBundleAdjustmentFactor();
virtual ~LsqBundleAdjustmentFactor() override;
Expand All @@ -30,7 +30,7 @@ class LsqBundleAdjustmentFactor : public BundleAdjustmentFactorBase {

virtual size_t dim() const override { return 6; }
virtual double error(const gtsam::Values& c) const override;
virtual boost::shared_ptr<gtsam::GaussianFactor> linearize(const gtsam::Values& c) const override;
virtual std::shared_ptr<gtsam::GaussianFactor> linearize(const gtsam::Values& c) const override;

virtual void add(const gtsam::Point3& pt, const gtsam::Key& key) override;
virtual int num_points() const override { return global_num_points; }
Expand Down
Loading