mim-solvers: fix for crocoddyl 3.1.0

This commit is contained in:
Guilhem Saurel
2025-10-15 20:29:17 +02:00
parent 43f736f7ba
commit 62397c8736
2 changed files with 55 additions and 0 deletions
@@ -0,0 +1,52 @@
From 1cb7fe38e3ec43117c646cae521eb8347145965a Mon Sep 17 00:00:00 2001
From: Guilhem Saurel <guilhem.saurel@laas.fr>
Date: Tue, 14 Oct 2025 19:37:16 +0200
Subject: [PATCH] fix for crocoddyl v3.1.0 explicit template instanciation
ref. https://github.com/loco-3d/crocoddyl/pull/1367
Yes, that was a breaking change
---
tests/factory/point-mass.hpp | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/tests/factory/point-mass.hpp b/tests/factory/point-mass.hpp
index e82c977..c2e93af 100644
--- a/tests/factory/point-mass.hpp
+++ b/tests/factory/point-mass.hpp
@@ -60,6 +60,17 @@ class DAMPointMass1D : public crocoddyl::DifferentialActionModelAbstract {
// Destructor
virtual ~DAMPointMass1D();
+ // Explicit template instanciation
+ std::shared_ptr<crocoddyl::DifferentialActionModelBase> cloneAsDouble()
+ const override {
+ return std::make_shared<DAMPointMass1D>(*this);
+ }
+
+ std::shared_ptr<crocoddyl::DifferentialActionModelBase> cloneAsFloat()
+ const override {
+ return std::make_shared<DAMPointMass1D>(*this);
+ }
+
// Cost & dynamics
void calc(const std::shared_ptr<DifferentialActionDataAbstract>& data,
const Eigen::Ref<const VectorXd>& x,
@@ -135,6 +146,17 @@ class DAMPointMass2D : public crocoddyl::DifferentialActionModelAbstract {
// Destructor
virtual ~DAMPointMass2D();
+ // Explicit template instanciation
+ std::shared_ptr<crocoddyl::DifferentialActionModelBase> cloneAsDouble()
+ const override {
+ return std::make_shared<DAMPointMass2D>(*this);
+ }
+
+ std::shared_ptr<crocoddyl::DifferentialActionModelBase> cloneAsFloat()
+ const override {
+ return std::make_shared<DAMPointMass2D>(*this);
+ }
+
// Cost & dynamics
void calc(const std::shared_ptr<DifferentialActionDataAbstract>& data,
const Eigen::Ref<const VectorXd>& x,
+3
View File
@@ -30,6 +30,9 @@ stdenv.mkDerivation (finalAttrs: {
url = "https://github.com/machines-in-motion/mim_solvers/commit/796eecf05dd9165dd0795aa562ead17de4f19633.patch";
hash = "sha256-/OiMzyDVEbpC/Dr/HcguwAdhmbQNxnIRsHAVkX68xqA=";
})
# Fix for crocoddyl 3.1.0
# ref. https://github.com/machines-in-motion/mim_solvers/pull/72
./fix-croco-310.patch
];
nativeBuildInputs = [