From 5b4bff712d41c136053c527e282993ee57d9da80 Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Wed, 7 Jan 2026 18:19:45 -0500 Subject: [PATCH 1/9] Use gtsam::NonlinearEquality instead of deprecated gtsam::NonlinearEquality1 --- gtdynamics/statics/StaticsSlice.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtdynamics/statics/StaticsSlice.cpp b/gtdynamics/statics/StaticsSlice.cpp index 97593a19..1f651feb 100644 --- a/gtdynamics/statics/StaticsSlice.cpp +++ b/gtdynamics/statics/StaticsSlice.cpp @@ -125,7 +125,7 @@ gtsam::Values Statics::solve(const Slice& slice, const Robot& robot, for (auto&& link : robot.links()) { auto key = PoseKey(link->id(), slice.k); auto pose = configuration.at(key); - graph.emplace_shared>(pose, key); + graph.emplace_shared>(key, pose); initial_values.insert(key, pose); } @@ -133,7 +133,7 @@ gtsam::Values Statics::solve(const Slice& slice, const Robot& robot, for (auto&& joint : robot.joints()) { auto key = JointAngleKey(joint->id(), slice.k); auto q = configuration.at(key); - graph.emplace_shared>(q, key); + graph.emplace_shared>(key, q); initial_values.insert(key, q); } From be493cc2fb78606ea97ea71d5ae6d23a5fce48cb Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Wed, 7 Jan 2026 18:19:58 -0500 Subject: [PATCH 2/9] include Ordering.h header in TspaceBasis.h --- gtdynamics/manifold/TspaceBasis.h | 1 + 1 file changed, 1 insertion(+) diff --git a/gtdynamics/manifold/TspaceBasis.h b/gtdynamics/manifold/TspaceBasis.h index 2ff51a5d..66acba41 100644 --- a/gtdynamics/manifold/TspaceBasis.h +++ b/gtdynamics/manifold/TspaceBasis.h @@ -18,6 +18,7 @@ #include #include #include +#include #include #include From 48a25ce1a37e278d743b140ddd66571795707f47 Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Wed, 7 Jan 2026 18:29:52 -0500 Subject: [PATCH 3/9] Fix includes and remove header bloat --- .../example_constraint_manifold/main_quadruped.cpp | 1 - examples/scripts/constrainedExample.h | 1 - gtdynamics/cablerobot/factors/CableLengthFactor.h | 2 +- gtdynamics/cablerobot/factors/CableTensionFactor.cpp | 1 - gtdynamics/cablerobot/factors/CableTensionFactor.h | 2 +- gtdynamics/cablerobot/factors/CableVelocityFactor.h | 2 +- gtdynamics/factors/CollocationFactors.h | 2 +- gtdynamics/factors/ContactDynamicsFrictionConeFactor.h | 2 +- gtdynamics/factors/ContactEqualityFactor.h | 2 +- gtdynamics/factors/ContactPointFactor.h | 10 +++++----- gtdynamics/factors/JointLimitFactor.h | 2 +- gtdynamics/factors/JointMeasurementFactor.h | 2 +- gtdynamics/factors/MinTorqueFactor.h | 2 +- gtdynamics/factors/PointGoalFactor.h | 1 - gtdynamics/factors/PreintegratedContactFactors.h | 2 +- .../jumpingrobot/factors/PneumaticActuatorFactors.h | 2 +- gtdynamics/jumpingrobot/factors/PneumaticFactors.h | 2 +- gtdynamics/manifold/GeneralPriorFactor.h | 1 - gtdynamics/optimizer/EqualityConstraint.h | 1 - gtdynamics/statics/Statics.cpp | 1 - gtdynamics/utils/JsonSaver.h | 1 - tests/constrainedExample.h | 1 - 22 files changed, 17 insertions(+), 26 deletions(-) diff --git a/examples/example_constraint_manifold/main_quadruped.cpp b/examples/example_constraint_manifold/main_quadruped.cpp index f8b13926..b127d8be 100644 --- a/examples/example_constraint_manifold/main_quadruped.cpp +++ b/examples/example_constraint_manifold/main_quadruped.cpp @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/scripts/constrainedExample.h b/examples/scripts/constrainedExample.h index 5653149b..e9e42b07 100644 --- a/examples/scripts/constrainedExample.h +++ b/examples/scripts/constrainedExample.h @@ -18,7 +18,6 @@ #include #include #include -#include #include namespace gtdynamics { diff --git a/gtdynamics/cablerobot/factors/CableLengthFactor.h b/gtdynamics/cablerobot/factors/CableLengthFactor.h index 74a52a5b..b6fc0a37 100644 --- a/gtdynamics/cablerobot/factors/CableLengthFactor.h +++ b/gtdynamics/cablerobot/factors/CableLengthFactor.h @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include diff --git a/gtdynamics/cablerobot/factors/CableTensionFactor.cpp b/gtdynamics/cablerobot/factors/CableTensionFactor.cpp index fcc64a27..569de1a7 100644 --- a/gtdynamics/cablerobot/factors/CableTensionFactor.cpp +++ b/gtdynamics/cablerobot/factors/CableTensionFactor.cpp @@ -12,7 +12,6 @@ #include #include #include -#include #include #include diff --git a/gtdynamics/cablerobot/factors/CableTensionFactor.h b/gtdynamics/cablerobot/factors/CableTensionFactor.h index cc12cf3a..102d68ea 100644 --- a/gtdynamics/cablerobot/factors/CableTensionFactor.h +++ b/gtdynamics/cablerobot/factors/CableTensionFactor.h @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include diff --git a/gtdynamics/cablerobot/factors/CableVelocityFactor.h b/gtdynamics/cablerobot/factors/CableVelocityFactor.h index a98ca76a..871c730e 100644 --- a/gtdynamics/cablerobot/factors/CableVelocityFactor.h +++ b/gtdynamics/cablerobot/factors/CableVelocityFactor.h @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include diff --git a/gtdynamics/factors/CollocationFactors.h b/gtdynamics/factors/CollocationFactors.h index 145d2b39..a00d161e 100644 --- a/gtdynamics/factors/CollocationFactors.h +++ b/gtdynamics/factors/CollocationFactors.h @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include diff --git a/gtdynamics/factors/ContactDynamicsFrictionConeFactor.h b/gtdynamics/factors/ContactDynamicsFrictionConeFactor.h index ee7bd04c..15890ef3 100644 --- a/gtdynamics/factors/ContactDynamicsFrictionConeFactor.h +++ b/gtdynamics/factors/ContactDynamicsFrictionConeFactor.h @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include diff --git a/gtdynamics/factors/ContactEqualityFactor.h b/gtdynamics/factors/ContactEqualityFactor.h index d42ca414..61afa924 100644 --- a/gtdynamics/factors/ContactEqualityFactor.h +++ b/gtdynamics/factors/ContactEqualityFactor.h @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include diff --git a/gtdynamics/factors/ContactPointFactor.h b/gtdynamics/factors/ContactPointFactor.h index 8b8b8be6..575a59b3 100644 --- a/gtdynamics/factors/ContactPointFactor.h +++ b/gtdynamics/factors/ContactPointFactor.h @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include @@ -109,7 +109,7 @@ class ContactPointFactor template void serialize(ARCHIVE &ar, const unsigned int version) { // NOLINT ar &boost::serialization::make_nvp( - "NonlinearEquality2", boost::serialization::base_object(*this)); + "NoiseModelFactorN", boost::serialization::base_object(*this)); } #endif }; @@ -207,7 +207,7 @@ class ContactPoseFactor template void serialize(ARCHIVE &ar, const unsigned int version) { // NOLINT ar &boost::serialization::make_nvp( - "NonlinearEquality2", boost::serialization::base_object(*this)); + "NoiseModelFactorN", boost::serialization::base_object(*this)); } #endif }; @@ -255,7 +255,7 @@ class FixedContactPointFactor : public gtsam::NoiseModelFactorN { return error; } - //// @return a deep copy of this factor + /// @return a deep copy of this factor gtsam::NonlinearFactor::shared_ptr clone() const override { return std::static_pointer_cast( gtsam::NonlinearFactor::shared_ptr(new This(*this))); @@ -277,7 +277,7 @@ class FixedContactPointFactor : public gtsam::NoiseModelFactorN { template void serialize(ARCHIVE &ar, const unsigned int version) { // NOLINT ar &boost::serialization::make_nvp( - "NonlinearEquality1", boost::serialization::base_object(*this)); + "NoiseModelFactorN", boost::serialization::base_object(*this)); } #endif }; diff --git a/gtdynamics/factors/JointLimitFactor.h b/gtdynamics/factors/JointLimitFactor.h index 6e38e208..c1fdfe38 100644 --- a/gtdynamics/factors/JointLimitFactor.h +++ b/gtdynamics/factors/JointLimitFactor.h @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include diff --git a/gtdynamics/factors/JointMeasurementFactor.h b/gtdynamics/factors/JointMeasurementFactor.h index 5ad05666..00f37eb9 100644 --- a/gtdynamics/factors/JointMeasurementFactor.h +++ b/gtdynamics/factors/JointMeasurementFactor.h @@ -15,7 +15,7 @@ #pragma once #include #include -#include +#include namespace gtdynamics { diff --git a/gtdynamics/factors/MinTorqueFactor.h b/gtdynamics/factors/MinTorqueFactor.h index 10704910..2286d722 100644 --- a/gtdynamics/factors/MinTorqueFactor.h +++ b/gtdynamics/factors/MinTorqueFactor.h @@ -15,7 +15,7 @@ #include #include -#include +#include #include #include diff --git a/gtdynamics/factors/PointGoalFactor.h b/gtdynamics/factors/PointGoalFactor.h index 308896ad..f0fe1650 100644 --- a/gtdynamics/factors/PointGoalFactor.h +++ b/gtdynamics/factors/PointGoalFactor.h @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/gtdynamics/factors/PreintegratedContactFactors.h b/gtdynamics/factors/PreintegratedContactFactors.h index 36eda772..a6e6a32f 100644 --- a/gtdynamics/factors/PreintegratedContactFactors.h +++ b/gtdynamics/factors/PreintegratedContactFactors.h @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include diff --git a/gtdynamics/jumpingrobot/factors/PneumaticActuatorFactors.h b/gtdynamics/jumpingrobot/factors/PneumaticActuatorFactors.h index bf1e0032..8395ad59 100644 --- a/gtdynamics/jumpingrobot/factors/PneumaticActuatorFactors.h +++ b/gtdynamics/jumpingrobot/factors/PneumaticActuatorFactors.h @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include diff --git a/gtdynamics/jumpingrobot/factors/PneumaticFactors.h b/gtdynamics/jumpingrobot/factors/PneumaticFactors.h index 2eccdb57..8cc5ba66 100644 --- a/gtdynamics/jumpingrobot/factors/PneumaticFactors.h +++ b/gtdynamics/jumpingrobot/factors/PneumaticFactors.h @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include diff --git a/gtdynamics/manifold/GeneralPriorFactor.h b/gtdynamics/manifold/GeneralPriorFactor.h index 0c3af44e..69f5dab4 100644 --- a/gtdynamics/manifold/GeneralPriorFactor.h +++ b/gtdynamics/manifold/GeneralPriorFactor.h @@ -17,7 +17,6 @@ #include #include -#include #include #include diff --git a/gtdynamics/optimizer/EqualityConstraint.h b/gtdynamics/optimizer/EqualityConstraint.h index 6bc22f69..d2df7d39 100644 --- a/gtdynamics/optimizer/EqualityConstraint.h +++ b/gtdynamics/optimizer/EqualityConstraint.h @@ -14,7 +14,6 @@ #pragma once #include -#include #include namespace gtdynamics { diff --git a/gtdynamics/statics/Statics.cpp b/gtdynamics/statics/Statics.cpp index 86a681e8..fd90114f 100644 --- a/gtdynamics/statics/Statics.cpp +++ b/gtdynamics/statics/Statics.cpp @@ -15,7 +15,6 @@ #include #include #include -#include namespace gtdynamics { diff --git a/gtdynamics/utils/JsonSaver.h b/gtdynamics/utils/JsonSaver.h index 44f4514d..c1c37b2f 100644 --- a/gtdynamics/utils/JsonSaver.h +++ b/gtdynamics/utils/JsonSaver.h @@ -22,7 +22,6 @@ #include #include #include -#include #include #include diff --git a/tests/constrainedExample.h b/tests/constrainedExample.h index 5653149b..e9e42b07 100644 --- a/tests/constrainedExample.h +++ b/tests/constrainedExample.h @@ -18,7 +18,6 @@ #include #include #include -#include #include namespace gtdynamics { From 8ef3f42ff0e01952fd26fc601391a56ba3ee5419 Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Wed, 7 Jan 2026 19:02:54 -0500 Subject: [PATCH 4/9] Fix doxygent comments since 4 slashes (////) is not a supported syntax --- gtdynamics.i | 2 +- gtdynamics/factors/CollocationFactors.h | 12 ++++++------ .../factors/ContactDynamicsFrictionConeFactor.h | 2 +- gtdynamics/factors/ContactDynamicsMomentFactor.h | 2 +- gtdynamics/factors/ContactHeightFactor.h | 2 +- gtdynamics/factors/ContactKinematicsAccelFactor.h | 2 +- gtdynamics/factors/ContactKinematicsTwistFactor.h | 2 +- gtdynamics/factors/ContactPointFactor.h | 4 ++-- gtdynamics/factors/JointLimitFactor.h | 2 +- gtdynamics/factors/MinTorqueFactor.h | 2 +- gtdynamics/factors/PreintegratedContactFactors.h | 4 ++-- .../tests/testPneumaticActuatorFactors.cpp | 1 - 12 files changed, 18 insertions(+), 19 deletions(-) diff --git a/gtdynamics.i b/gtdynamics.i index 836fcc03..3c13ea95 100644 --- a/gtdynamics.i +++ b/gtdynamics.i @@ -679,7 +679,7 @@ gtsam::Key ContactWrenchKey(int i, int k, int t=0); gtsam::Key PhaseKey(int k); gtsam::Key TimeKey(int t); -///////////////////// Key Methods ///////////////////// +/******************** Key Methods ********************/ void InsertJointAngle(gtsam::Values@ values, int j, int t, double value); void InsertJointAngle(gtsam::Values @values, int j, double value); diff --git a/gtdynamics/factors/CollocationFactors.h b/gtdynamics/factors/CollocationFactors.h index a00d161e..419a0554 100644 --- a/gtdynamics/factors/CollocationFactors.h +++ b/gtdynamics/factors/CollocationFactors.h @@ -96,7 +96,7 @@ class EulerPoseCollocationFactor return error; } - //// @return a deep copy of this factor + /// @return a deep copy of this factor gtsam::NonlinearFactor::shared_ptr clone() const override { return std::static_pointer_cast( gtsam::NonlinearFactor::shared_ptr(new This(*this))); @@ -180,7 +180,7 @@ class TrapezoidalPoseCollocationFactor return error; } - //// @return a deep copy of this factor + /// @return a deep copy of this factor gtsam::NonlinearFactor::shared_ptr clone() const override { return std::static_pointer_cast( gtsam::NonlinearFactor::shared_ptr(new This(*this))); @@ -261,7 +261,7 @@ class FixTimeTrapezoidalPoseCollocationFactor return error; } - //// @return a deep copy of this factor + /// @return a deep copy of this factor gtsam::NonlinearFactor::shared_ptr clone() const override { return std::static_pointer_cast( gtsam::NonlinearFactor::shared_ptr(new This(*this))); @@ -338,7 +338,7 @@ class EulerTwistCollocationFactor return error; } - //// @return a deep copy of this factor + /// @return a deep copy of this factor gtsam::NonlinearFactor::shared_ptr clone() const override { return std::static_pointer_cast( gtsam::NonlinearFactor::shared_ptr(new This(*this))); @@ -423,7 +423,7 @@ class TrapezoidalTwistCollocationFactor return error; } - //// @return a deep copy of this factor + /// @return a deep copy of this factor gtsam::NonlinearFactor::shared_ptr clone() const override { return std::static_pointer_cast( gtsam::NonlinearFactor::shared_ptr(new This(*this))); @@ -505,7 +505,7 @@ class FixTimeTrapezoidalTwistCollocationFactor return error; } - //// @return a deep copy of this factor + /// @return a deep copy of this factor gtsam::NonlinearFactor::shared_ptr clone() const override { return std::static_pointer_cast( gtsam::NonlinearFactor::shared_ptr(new This(*this))); diff --git a/gtdynamics/factors/ContactDynamicsFrictionConeFactor.h b/gtdynamics/factors/ContactDynamicsFrictionConeFactor.h index 15890ef3..8697cdfa 100644 --- a/gtdynamics/factors/ContactDynamicsFrictionConeFactor.h +++ b/gtdynamics/factors/ContactDynamicsFrictionConeFactor.h @@ -140,7 +140,7 @@ class ContactDynamicsFrictionConeFactor return error; } - //// @return a deep copy of this factor + /// @return a deep copy of this factor gtsam::NonlinearFactor::shared_ptr clone() const override { return std::static_pointer_cast( gtsam::NonlinearFactor::shared_ptr(new This(*this))); diff --git a/gtdynamics/factors/ContactDynamicsMomentFactor.h b/gtdynamics/factors/ContactDynamicsMomentFactor.h index 895991c0..c618e528 100644 --- a/gtdynamics/factors/ContactDynamicsMomentFactor.h +++ b/gtdynamics/factors/ContactDynamicsMomentFactor.h @@ -94,7 +94,7 @@ class ContactDynamicsMomentFactor virtual ~ContactDynamicsMomentFactor() {} - //// @return a deep copy of this factor + /// @return a deep copy of this factor gtsam::NonlinearFactor::shared_ptr clone() const override { return std::static_pointer_cast( gtsam::NonlinearFactor::shared_ptr(new This(*this))); diff --git a/gtdynamics/factors/ContactHeightFactor.h b/gtdynamics/factors/ContactHeightFactor.h index c10f9dd8..bd8a8591 100644 --- a/gtdynamics/factors/ContactHeightFactor.h +++ b/gtdynamics/factors/ContactHeightFactor.h @@ -72,7 +72,7 @@ class ContactHeightFactor : public gtsam::ExpressionFactor { virtual ~ContactHeightFactor() {} - //// @return a deep copy of this factor + /// @return a deep copy of this factor gtsam::NonlinearFactor::shared_ptr clone() const override { return std::static_pointer_cast( gtsam::NonlinearFactor::shared_ptr(new This(*this))); diff --git a/gtdynamics/factors/ContactKinematicsAccelFactor.h b/gtdynamics/factors/ContactKinematicsAccelFactor.h index b6daee2b..236cf7ae 100644 --- a/gtdynamics/factors/ContactKinematicsAccelFactor.h +++ b/gtdynamics/factors/ContactKinematicsAccelFactor.h @@ -71,7 +71,7 @@ class ContactKinematicsAccelFactor virtual ~ContactKinematicsAccelFactor() {} - //// @return a deep copy of this factor + /// @return a deep copy of this factor gtsam::NonlinearFactor::shared_ptr clone() const override { return std::static_pointer_cast( gtsam::NonlinearFactor::shared_ptr(new This(*this))); diff --git a/gtdynamics/factors/ContactKinematicsTwistFactor.h b/gtdynamics/factors/ContactKinematicsTwistFactor.h index e831a690..06909fcd 100644 --- a/gtdynamics/factors/ContactKinematicsTwistFactor.h +++ b/gtdynamics/factors/ContactKinematicsTwistFactor.h @@ -70,7 +70,7 @@ class ContactKinematicsTwistFactor ContactKinematicsTwistConstraint(twist_key, cTcom)) {} virtual ~ContactKinematicsTwistFactor() {} - //// @return a deep copy of this factor + /// @return a deep copy of this factor gtsam::NonlinearFactor::shared_ptr clone() const override { return std::static_pointer_cast( gtsam::NonlinearFactor::shared_ptr(new This(*this))); diff --git a/gtdynamics/factors/ContactPointFactor.h b/gtdynamics/factors/ContactPointFactor.h index 575a59b3..e3a360c2 100644 --- a/gtdynamics/factors/ContactPointFactor.h +++ b/gtdynamics/factors/ContactPointFactor.h @@ -87,7 +87,7 @@ class ContactPointFactor return error; } - //// @return a deep copy of this factor + /// @return a deep copy of this factor gtsam::NonlinearFactor::shared_ptr clone() const override { return std::static_pointer_cast( gtsam::NonlinearFactor::shared_ptr(new This(*this))); @@ -186,7 +186,7 @@ class ContactPoseFactor return error; } - //// @return a deep copy of this factor + /// @return a deep copy of this factor gtsam::NonlinearFactor::shared_ptr clone() const override { return std::static_pointer_cast( gtsam::NonlinearFactor::shared_ptr(new This(*this))); diff --git a/gtdynamics/factors/JointLimitFactor.h b/gtdynamics/factors/JointLimitFactor.h index c1fdfe38..11b74ff4 100644 --- a/gtdynamics/factors/JointLimitFactor.h +++ b/gtdynamics/factors/JointLimitFactor.h @@ -79,7 +79,7 @@ class JointLimitFactor : public gtsam::NoiseModelFactorN { } } - //// @return a deep copy of this factor + /// @return a deep copy of this factor gtsam::NonlinearFactor::shared_ptr clone() const override { return std::static_pointer_cast( gtsam::NonlinearFactor::shared_ptr(new This(*this))); diff --git a/gtdynamics/factors/MinTorqueFactor.h b/gtdynamics/factors/MinTorqueFactor.h index 2286d722..53fb3f1e 100644 --- a/gtdynamics/factors/MinTorqueFactor.h +++ b/gtdynamics/factors/MinTorqueFactor.h @@ -56,7 +56,7 @@ class MinTorqueFactor : public gtsam::NoiseModelFactorN { return error; } - //// @return a deep copy of this factor + /// @return a deep copy of this factor gtsam::NonlinearFactor::shared_ptr clone() const override { return std::static_pointer_cast( gtsam::NonlinearFactor::shared_ptr(new This(*this))); diff --git a/gtdynamics/factors/PreintegratedContactFactors.h b/gtdynamics/factors/PreintegratedContactFactors.h index a6e6a32f..79437214 100644 --- a/gtdynamics/factors/PreintegratedContactFactors.h +++ b/gtdynamics/factors/PreintegratedContactFactors.h @@ -170,7 +170,7 @@ class PreintegratedPointContactFactor return error; } - //// @return a deep copy of this factor + /// @return a deep copy of this factor gtsam::NonlinearFactor::shared_ptr clone() const override { return std::static_pointer_cast( gtsam::NonlinearFactor::shared_ptr(new This(*this))); @@ -288,7 +288,7 @@ class PreintegratedRigidContactFactor virtual ~PreintegratedRigidContactFactor() {} - //// @return a deep copy of this factor + /// @return a deep copy of this factor gtsam::NonlinearFactor::shared_ptr clone() const override { return std::static_pointer_cast( gtsam::NonlinearFactor::shared_ptr(new This(*this))); diff --git a/gtdynamics/jumpingrobot/tests/testPneumaticActuatorFactors.cpp b/gtdynamics/jumpingrobot/tests/testPneumaticActuatorFactors.cpp index efc212aa..0ba4d019 100644 --- a/gtdynamics/jumpingrobot/tests/testPneumaticActuatorFactors.cpp +++ b/gtdynamics/jumpingrobot/tests/testPneumaticActuatorFactors.cpp @@ -264,7 +264,6 @@ TEST(SmoothActuatorFactor, zero_force) { EXPECT_CORRECT_FACTOR_JACOBIANS(factor, values, diffDelta, 1e-3); } -//// following tests are deprecated TEST(ClippingActuatorFactor, Factor) { const double delta_x = 1; const double p = 120; From fbdd035b1146fe5cc7ed0cf693999cbfbb143c05 Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Sun, 11 Jan 2026 17:58:39 -0500 Subject: [PATCH 5/9] Update CI to use docker image instead of Ubuntu package --- .github/workflows/linux-ci.yml | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/.github/workflows/linux-ci.yml b/.github/workflows/linux-ci.yml index 1c1bc9dc..b9a1b32f 100644 --- a/.github/workflows/linux-ci.yml +++ b/.github/workflows/linux-ci.yml @@ -2,10 +2,22 @@ name: Linux CI on: [pull_request] +# Cancels any in-progress workflow runs for the same PR when a new push is made, +# allowing the runner to become available more quickly for the latest changes. +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: build: name: ${{ matrix.name }} ${{ matrix.build_type }} - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest + container: + image: borglab/gtsam:latest + env: + CMAKE_BUILD_TYPE: ${{ matrix.build_type }} + volumes: + - ${{ github.workspace }}:/gtdynamics env: CTEST_OUTPUT_ON_FAILURE: ON @@ -17,19 +29,17 @@ jobs: matrix: # Github Actions requires a single row to be added to the build matrix. # See https://help.github.com/en/articles/workflow-syntax-for-github-actions. - name: [ubuntu-22.04-gcc-9, ubuntu-22.04-clang-12] + name: [ubuntu-24.04-gcc-9, ubuntu-24.04-clang-12] build_type: [Debug, Release] include: - - name: ubuntu-22.04-gcc-9 - os: ubuntu-22.04 + - name: ubuntu-24.04-gcc-11 compiler: gcc - version: "9" + version: "11" - - name: ubuntu-22.04-clang-12 - os: ubuntu-22.04 + - name: ubuntu-24.04-clang-16 compiler: clang - version: "12" + version: "16" steps: - name: Setup Compiler @@ -54,7 +64,7 @@ jobs: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys D2486D2DD83DB69272AFE98867170598AF249743 sudo apt-get -y update - sudo apt-get -y install libtbb-dev libboost-all-dev libsdformat15-dev + sudo apt-get -y install libsdformat15-dev # Install CppUnitLite. git clone https://github.com/borglab/CppUnitLite.git @@ -62,12 +72,6 @@ jobs: cmake .. && sudo make -j4 install cd ../../ - - name: GTSAM - run: | - sudo add-apt-repository -y ppa:borglab/gtsam-develop - sudo apt-get -y update - sudo apt-get -y install libgtsam-no-tbb-dev libgtsam-no-tbb-unstable-dev - - name: Checkout uses: actions/checkout@master From 000ed176af2ea95f72e6c68ab1349418821dc4ef Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Sun, 11 Jan 2026 18:01:20 -0500 Subject: [PATCH 6/9] update Python bindings CI as well --- .github/workflows/linux-ci.yml | 2 +- .github/workflows/python-ci.yml | 20 +++++++++++++------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.github/workflows/linux-ci.yml b/.github/workflows/linux-ci.yml index b9a1b32f..1e9feeeb 100644 --- a/.github/workflows/linux-ci.yml +++ b/.github/workflows/linux-ci.yml @@ -29,7 +29,7 @@ jobs: matrix: # Github Actions requires a single row to be added to the build matrix. # See https://help.github.com/en/articles/workflow-syntax-for-github-actions. - name: [ubuntu-24.04-gcc-9, ubuntu-24.04-clang-12] + name: [ubuntu-24.04-gcc-11, ubuntu-24.04-clang-16] build_type: [Debug, Release] include: diff --git a/.github/workflows/python-ci.yml b/.github/workflows/python-ci.yml index 38400622..4e6fb073 100644 --- a/.github/workflows/python-ci.yml +++ b/.github/workflows/python-ci.yml @@ -2,6 +2,12 @@ name: Python CI on: [pull_request] +# Cancels any in-progress workflow runs for the same PR when a new push is made, +# allowing the runner to become available more quickly for the latest changes. +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: build: name: ${{ matrix.name }} ${{ matrix.build_type }} Python ${{ matrix.python_version }} @@ -17,18 +23,18 @@ jobs: strategy: fail-fast: false matrix: - name: [ubuntu-22.04-gcc-9, ubuntu-22.04-clang-12, macOS-14-xcode-15.4] + name: [ubuntu-24.04-gcc-11, ubuntu-24.04-clang-16, macOS-14-xcode-15.4] build_type: [Debug, Release] python_version: [3] include: - - name: ubuntu-22.04-gcc-9 - os: ubuntu-22.04 + - name: ubuntu-24.04-gcc-11 + os: ubuntu-24.04 compiler: gcc - version: "9" - - name: ubuntu-22.04-clang-12 - os: ubuntu-22.04 + version: "11" + - name: ubuntu-24.04-clang-16 + os: ubuntu-24.04 compiler: clang - version: "12" + version: "16" - name: macOS-14-xcode-15.4 os: macOS-14 compiler: xcode From dae91569bd2d19c5303998f4aa5a9988c1e9e2c6 Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Sun, 11 Jan 2026 18:02:30 -0500 Subject: [PATCH 7/9] remove sudo since we're using docker image --- .github/workflows/linux-ci.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/linux-ci.yml b/.github/workflows/linux-ci.yml index 1e9feeeb..3352492f 100644 --- a/.github/workflows/linux-ci.yml +++ b/.github/workflows/linux-ci.yml @@ -44,15 +44,15 @@ jobs: steps: - name: Setup Compiler run: | - sudo apt-get -y clean && sudo apt-get -y update + apt-get -y clean && apt-get -y update if [ "${{ matrix.compiler }}" = "gcc" ]; then - sudo apt-get install -y g++-${{ matrix.version }} g++-${{ matrix.version }}-multilib + apt-get install -y g++-${{ matrix.version }} g++-${{ matrix.version }}-multilib echo "CC=gcc-${{ matrix.version }}" >> $GITHUB_ENV echo "CXX=g++-${{ matrix.version }}" >> $GITHUB_ENV else - sudo apt-get install -y clang-${{ matrix.version }} g++-multilib + apt-get install -y clang-${{ matrix.version }} g++-multilib echo "CC=clang-${{ matrix.version }}" >> $GITHUB_ENV echo "CXX=clang++-${{ matrix.version }}" >> $GITHUB_ENV fi @@ -60,16 +60,16 @@ jobs: - name: Install Dependencies run: | # For SDFormat - sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list' - sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys D2486D2DD83DB69272AFE98867170598AF249743 - sudo apt-get -y update + sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list' + apt-key adv --keyserver keyserver.ubuntu.com --recv-keys D2486D2DD83DB69272AFE98867170598AF249743 + apt-get -y update - sudo apt-get -y install libsdformat15-dev + apt-get -y install libsdformat15-dev # Install CppUnitLite. git clone https://github.com/borglab/CppUnitLite.git cd CppUnitLite && mkdir build && cd $_ - cmake .. && sudo make -j4 install + cmake .. && make -j4 install cd ../../ - name: Checkout @@ -92,5 +92,5 @@ jobs: working-directory: ./build - name: Install - run: sudo make -j$(nproc) install + run: make -j$(nproc) install working-directory: ./build From 1797ff172efd448723a886701ddae8899f2bee30 Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Sun, 11 Jan 2026 18:04:47 -0500 Subject: [PATCH 8/9] install lsb_release in linux CI --- .github/workflows/linux-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/linux-ci.yml b/.github/workflows/linux-ci.yml index 3352492f..22516e82 100644 --- a/.github/workflows/linux-ci.yml +++ b/.github/workflows/linux-ci.yml @@ -60,6 +60,7 @@ jobs: - name: Install Dependencies run: | # For SDFormat + apt-get install -y lsb-release sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list' apt-key adv --keyserver keyserver.ubuntu.com --recv-keys D2486D2DD83DB69272AFE98867170598AF249743 apt-get -y update From 31121030487989ee2d7874b5a46bc88aa5b10d04 Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Sun, 11 Jan 2026 18:05:29 -0500 Subject: [PATCH 9/9] automatic cancellation for MacOS CI as well --- .github/workflows/macos-ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/macos-ci.yml b/.github/workflows/macos-ci.yml index 1948bbb1..bfb73b1d 100755 --- a/.github/workflows/macos-ci.yml +++ b/.github/workflows/macos-ci.yml @@ -2,6 +2,12 @@ name: macOS CI on: [pull_request] +# Cancels any in-progress workflow runs for the same PR when a new push is made, +# allowing the runner to become available more quickly for the latest changes. +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: build: name: ${{ matrix.name }} ${{ matrix.build_type }}