summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2026-10-20 10:42:15 +0000
committerCoprDistGit <infra@openeuler.org>2026-10-20 10:42:15 +0000
commitd2ae509bbde63eca59b6a02b9647bac7546bcda9 (patch)
treedd3e51e976cc13210188c6b7072138ab625addbf
parent2e1e2dea02d404b08364fb270768d395636a12a8 (diff)
automatic import of ros-humble-easynav-mpc-controlleropeneuler24.03_LTS_SP3
-rw-r--r--easynav-mpc-controller.spec5
-rw-r--r--eigen-matrix-init-fix.patch15
2 files changed, 20 insertions, 0 deletions
diff --git a/easynav-mpc-controller.spec b/easynav-mpc-controller.spec
index b19a83e..ad37314 100644
--- a/easynav-mpc-controller.spec
+++ b/easynav-mpc-controller.spec
@@ -26,6 +26,10 @@ Source0: https://github.com/EasyNavigation/easynav_plugins/archive/%{commit}.
# SHA256 与 CMakeLists 的 URL_HASH 一致(53e552d8...04cf0de),完整性可校验。
Source1: https://github.com/stevengj/nlopt/archive/refs/tags/v2.11.0.tar.gz#/nlopt-2.11.0.tar.gz
Patch0: nlopt-local-source.patch
+# Eigen < 3.4 不支持 Matrix2d 的 brace-enclosed initializer list 语法
+# {{a,b},{c,d}},openEuler 24.03 自带 Eigen 3.3 编译报错。改用逗号初始化器
+# (Matrix2d() << ...).finished() 替代,兼容 Eigen 3.3+
+Patch1: eigen-matrix-init-fix.patch
# debug 子包无意义(/opt 前缀,strip/debugedit 路径非常规),统一关闭
%global debug_package %{nil}
@@ -141,3 +145,4 @@ make install DESTDIR=%{buildroot}
- NLopt 2.11.0 vendored as Source1 + Patch0 for offline COPR build
- Single-package policy with virtual devel/doc/runtime Provides
- Fix: 注释中 cmake 宏泄漏导致构建失败,改用直接 cmake 调用(对齐 mhamcl 兄弟包)
+- Fix: Eigen Matrix2d brace-init 不兼容 Eigen 3.3,Patch1 改用逗号初始化器
diff --git a/eigen-matrix-init-fix.patch b/eigen-matrix-init-fix.patch
new file mode 100644
index 0000000..20f9696
--- /dev/null
+++ b/eigen-matrix-init-fix.patch
@@ -0,0 +1,15 @@
+--- a/controllers/easynav_mpc_controller/include/easynav_mpc_controller/MPCOptimizer.hpp
++++ b/controllers/easynav_mpc_controller/include/easynav_mpc_controller/MPCOptimizer.hpp
+@@ -72,9 +72,9 @@
+ private:
+ int N_ {5}; ///< Horizont Step to optimize.
+ double dt_ {0.1}; ///< Differential time to integrate.
+- Eigen::Matrix2d Q_ {{4.0, 0.0}, {0.0, 4.0}}; ///< Tracking Cost Matrix
+- Eigen::Matrix2d R_ {{0.1, 0.0}, {0.0, 0.1}}; ///< Effort Cost Matrix
+- Eigen::Matrix2d Rd_ {{0.1, 0.0}, {0.0, 0.1}}; ///< Smooth Cost Matrix
++ Eigen::Matrix2d Q_ = (Eigen::Matrix2d() << 4.0, 0.0, 0.0, 4.0).finished(); ///< Tracking Cost Matrix
++ Eigen::Matrix2d R_ = (Eigen::Matrix2d() << 0.1, 0.0, 0.0, 0.1).finished(); ///< Effort Cost Matrix
++ Eigen::Matrix2d Rd_ = (Eigen::Matrix2d() << 0.1, 0.0, 0.0, 0.1).finished(); ///< Smooth Cost Matrix
+ double qtheta_ {3.0}; ///< Angular cost value.
+
+ };