From 8a0e58b194db6ac2d3b2bd809ca26f306dd05016 Mon Sep 17 00:00:00 2001 From: Bernd Pfrommer Date: Fri, 8 Aug 2025 15:53:31 -0400 Subject: [PATCH 1/3] adjust to latest changes to build on rolling --- include/gtsam_distortion/Cal3DS3.h | 7 ++++--- include/gtsam_distortion/Cal3FS2.h | 7 ++++--- include/tagslam/cal3ds2u.hpp | 4 ++-- src/gtsam_optimizer.cpp | 6 ++---- src/tagslam.cpp | 4 ++-- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/include/gtsam_distortion/Cal3DS3.h b/include/gtsam_distortion/Cal3DS3.h index 2913616..7c52986 100644 --- a/include/gtsam_distortion/Cal3DS3.h +++ b/include/gtsam_distortion/Cal3DS3.h @@ -150,8 +150,8 @@ class Cal3DS3 * @return point in (distorted) image coordinates */ gtsam::Point2 uncalibrate( - const gtsam::Point2 & p, gtsam::OptionalJacobian<2, 12> Dcal = boost::none, - gtsam::OptionalJacobian<2, 2> Dp = boost::none) const; + const gtsam::Point2 & p, gtsam::OptionalJacobian<2, 12> Dcal = {}, + gtsam::OptionalJacobian<2, 2> Dp = {}) const; /// Convert (distorted) image coordinates uv to intrinsic coordinates xy gtsam::Point2 calibrate( @@ -180,6 +180,7 @@ class Cal3DS3 /// @name Advanced Interface /// @{ +#if 0 /** Serialization function */ friend class boost::serialization::access; template @@ -198,7 +199,7 @@ class Cal3DS3 ar & BOOST_SERIALIZATION_NVP(k_[4]); ar & BOOST_SERIALIZATION_NVP(k_[5]); } - +#endif /// @} }; // This is really ugly, injecting stuff into gtsam's namespace! diff --git a/include/gtsam_distortion/Cal3FS2.h b/include/gtsam_distortion/Cal3FS2.h index bb85109..72855b6 100644 --- a/include/gtsam_distortion/Cal3FS2.h +++ b/include/gtsam_distortion/Cal3FS2.h @@ -144,8 +144,8 @@ class Cal3FS2 * @return point in (distorted) image coordinates */ gtsam::Point2 uncalibrate( - const gtsam::Point2 & p, gtsam::OptionalJacobian<2, 8> Dcal = boost::none, - gtsam::OptionalJacobian<2, 2> Dp = boost::none) const; + const gtsam::Point2 & p, gtsam::OptionalJacobian<2, 8> Dcal = {}, + gtsam::OptionalJacobian<2, 2> Dp = {}) const; /// Convert (distorted) image coordinates uv to intrinsic coordinates xy gtsam::Point2 calibrate( @@ -175,6 +175,7 @@ class Cal3FS2 /// @{ /** Serialization function */ +#if 0 friend class boost::serialization::access; template void serialize(Archive & ar, const unsigned int /*version*/) @@ -188,7 +189,7 @@ class Cal3FS2 ar & BOOST_SERIALIZATION_NVP(k3_); ar & BOOST_SERIALIZATION_NVP(k4_); } - +#endif /// @} }; // This is really ugly, injecting stuff into gtsam's namespace! diff --git a/include/tagslam/cal3ds2u.hpp b/include/tagslam/cal3ds2u.hpp index 0093d8e..9cbc9e1 100644 --- a/include/tagslam/cal3ds2u.hpp +++ b/include/tagslam/cal3ds2u.hpp @@ -30,8 +30,8 @@ class Cal3DS2U : public gtsam::Cal3DS2 explicit Cal3DS2U(const gtsam::Cal3DS2 & cal) : Cal3DS2(cal) {} gtsam::Point2 uncalibrate( - const gtsam::Point2 & p, gtsam::OptionalJacobian<2, 9> Dcal = boost::none, - gtsam::OptionalJacobian<2, 2> Dp = boost::none) const + const gtsam::Point2 & p, gtsam::OptionalJacobian<2, 9> Dcal = {}, + gtsam::OptionalJacobian<2, 2> Dp = {}) const { return (gtsam::Cal3DS2_Base::uncalibrate(p, Dcal, Dp)); } diff --git a/src/gtsam_optimizer.cpp b/src/gtsam_optimizer.cpp index 3d12872..091f77d 100644 --- a/src/gtsam_optimizer.cpp +++ b/src/gtsam_optimizer.cpp @@ -138,8 +138,7 @@ std::shared_ptr GTSAMOptimizer::getEquiModel( static double distance( const gtsam::Point3 & p1, const gtsam::Point3 & p2, - gtsam::OptionalJacobian<1, 3> H1 = boost::none, - gtsam::OptionalJacobian<1, 3> H2 = boost::none) + gtsam::OptionalJacobian<1, 3> H1 = {}, gtsam::OptionalJacobian<1, 3> H2 = {}) { const gtsam::Point3 d = p1 - p2; double r = sqrt(d.x() * d.x() + d.y() * d.y() + d.z() * d.z()); @@ -150,8 +149,7 @@ static double distance( static double proj( const gtsam::Point3 & p, const gtsam::Point3 & n, - gtsam::OptionalJacobian<1, 3> Hp = boost::none, - gtsam::OptionalJacobian<1, 3> Hn = boost::none) + gtsam::OptionalJacobian<1, 3> Hp = {}, gtsam::OptionalJacobian<1, 3> Hn = {}) { double r = p.x() * n.x() + p.y() * n.y() + p.z() * n.z(); if (Hp) *Hp << n.x(), n.y(), n.z(); // jacobian w.r.t to p diff --git a/src/tagslam.cpp b/src/tagslam.cpp index 8328b1d..91c6ab0 100644 --- a/src/tagslam.cpp +++ b/src/tagslam.cpp @@ -19,8 +19,6 @@ #include #endif -#include -#include #include #include @@ -46,6 +44,8 @@ #include #include #include +#include +#include #include const int QSZ = 1000; From 066f6230722ee5e2e2382fb772456d80f4b625ae Mon Sep 17 00:00:00 2001 From: Bernd Pfrommer Date: Thu, 14 Aug 2025 09:23:06 -0400 Subject: [PATCH 2/3] fix latest API changes --- CMakeLists.txt | 4 ++++ include/tagslam/sync_and_detect.hpp | 7 ++++++- include/tagslam/tagslam.hpp | 5 ++++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 38601e7..3fa569d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -71,6 +71,10 @@ if(${cv_bridge_VERSION} GREATER "3.3.0") add_definitions(-DUSE_CV_BRIDGE_HPP) endif() +if(${image_transport_VERSION} VERSION_GREATER_EQUAL "6.3.0") + add_definitions(-DIMAGE_TRANSPORT_USE_QOS) +endif() + # # --------- library # diff --git a/include/tagslam/sync_and_detect.hpp b/include/tagslam/sync_and_detect.hpp index 60145d3..bca84ea 100644 --- a/include/tagslam/sync_and_detect.hpp +++ b/include/tagslam/sync_and_detect.hpp @@ -55,7 +55,12 @@ class Subscriber std::bind( &Subscriber::callback, this, std::placeholders::_1), node->get_parameter_or(param_name, "raw"), - qos.get_rmw_qos_profile())); +#ifdef IMAGE_TRANSPORT_USE_QOS + qos +#else + qos.get_rmw_qos_profile() +#endif + )); } void callback(const TConstSharedPtr & msg) { sync_->process(topic_, msg); } diff --git a/include/tagslam/tagslam.hpp b/include/tagslam/tagslam.hpp index cea5e06..66c2016 100644 --- a/include/tagslam/tagslam.hpp +++ b/include/tagslam/tagslam.hpp @@ -16,8 +16,11 @@ #ifndef TAGSLAM__TAGSLAM_HPP_ #define TAGSLAM__TAGSLAM_HPP_ +#if __has_include() +#include +#else #include - +#endif #include #include #include From 38382118969b0ab6116efdcc2d03e1044c474fb7 Mon Sep 17 00:00:00 2001 From: Bernd Pfrommer Date: Thu, 14 Aug 2025 09:33:15 -0400 Subject: [PATCH 3/3] fix linter error --- include/gtsam_distortion/Cal3FS2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/gtsam_distortion/Cal3FS2.h b/include/gtsam_distortion/Cal3FS2.h index 72855b6..c0e5ed8 100644 --- a/include/gtsam_distortion/Cal3FS2.h +++ b/include/gtsam_distortion/Cal3FS2.h @@ -175,7 +175,7 @@ class Cal3FS2 /// @{ /** Serialization function */ -#if 0 +#if 0 friend class boost::serialization::access; template void serialize(Archive & ar, const unsigned int /*version*/)