From 898ba1004afe718c552d850e2d1b96abfa75c1bd Mon Sep 17 00:00:00 2001 From: Andreas Rauschert <andreas.rb.rauschert@bmw.de> Date: Mon, 17 Feb 2025 12:32:55 +0100 Subject: [PATCH] build!: Integrate new MantleAPI - update readme - adapt to new literal mps_cb - update mantle ref (bazel&cmake) - update units ref (bazel&cmake) - remove unnecessary patch --- README.md | 4 +-- .../MotionControlAction/SpeedAction_impl.cpp | 6 ++--- .../MotionControlAction/SpeedActionTest.cpp | 24 ++++++++--------- engine/third_party/mantle_api/mantle_api.bzl | 4 +-- engine/third_party/units/units.bzl | 4 +-- utils/ci/conan/conanfile.txt | 4 +-- .../conan/recipe/mantleapi/all/conandata.yml | 4 +++ utils/ci/conan/recipe/units/all/conandata.yml | 8 ++---- .../all/patches/pascal-name-conflict.patch | 26 ------------------- 9 files changed, 29 insertions(+), 55 deletions(-) delete mode 100644 utils/ci/conan/recipe/units/all/patches/pascal-name-conflict.patch diff --git a/README.md b/README.md index 1100ed55..c8a7e9d1 100644 --- a/README.md +++ b/README.md @@ -254,10 +254,10 @@ Converts `NET_ASAM_OPENSCENARIO::v1_3::ITransitionDynamics` object type to [mant | Dependency | Commit | Version | License | | ---------- | ------ | ------- | ------- | -| [MantleAPI](https://gitlab.eclipse.org/eclipse/openpass/mantle-api) | 18eadd8a | 8.0.0 | EPL 2.0 | +| [MantleAPI](https://gitlab.eclipse.org/eclipse/openpass/mantle-api) | 86cedf7d | 9.0.0 | EPL 2.0 | | [OpenSCENARIO API](https://github.com/RA-Consulting-GmbH/openscenario.api.test/) | 5980e88 | 1.4.0 | Apache 2.0 | | [YASE](https://gitlab.eclipse.org/eclipse/openpass/yase) | d0c0e58d | | EPL 2.0 | -| [Units](https://github.com/nholthaus/units) | b04d436 | 2.3.3 | MIT License | +| [Units](https://github.com/nholthaus/units) | e27eed9 | 2.3.4 | MIT License | | [googletest](https://github.com/google/googletest) | f8d7d77 | 1.14.0 | BSD-3-Clause License | | [CPM](https://github.com/cpm-cmake/CPM.cmake) | 03705fc | 0.36.0 | MIT License | | [openpass/stochastics-library](https://gitlab.eclipse.org/eclipse/openpass/stochastics-library) | 6c9dde71 | 0.11.0 | EPL 2.0 | diff --git a/engine/src/Storyboard/MotionControlAction/SpeedAction_impl.cpp b/engine/src/Storyboard/MotionControlAction/SpeedAction_impl.cpp index c9bf0639..044cee98 100644 --- a/engine/src/Storyboard/MotionControlAction/SpeedAction_impl.cpp +++ b/engine/src/Storyboard/MotionControlAction/SpeedAction_impl.cpp @@ -26,7 +26,7 @@ using Jerk = units::jerk::meters_per_second_cubed_t; using units::literals::operator""_s; using units::literals::operator""_ms; using units::literals::operator""_mps; -using units::literals::operator""_mps_cu; +using units::literals::operator""_mps_cb; namespace detail { @@ -188,13 +188,13 @@ std::optional<mantle_api::Performance> GetVehiclePerformance(const mantle_api::I { const auto& entity_name{entity.GetName()}; - if (properties->performance.max_acceleration_rate < 0.0_mps_cu) + if (properties->performance.max_acceleration_rate < 0.0_mps_cb) { OpenScenarioEngine::v1_3::Logger::Warning("SpeedAction: the \'maxAccelerationRate\' performance parameter of entity " + entity_name + " cannot be negative. Using positive value instead."); properties->performance.max_acceleration_rate *= -1.0; } - if (properties->performance.max_deceleration_rate < 0.0_mps_cu) + if (properties->performance.max_deceleration_rate < 0.0_mps_cb) { OpenScenarioEngine::v1_3::Logger::Warning("SpeedAction: the \'maxDecelerationRate\' performance parameter of entity " + entity_name + " cannot be negative. Using positive value instead."); properties->performance.max_deceleration_rate *= -1.0; diff --git a/engine/tests/Storyboard/MotionControlAction/SpeedActionTest.cpp b/engine/tests/Storyboard/MotionControlAction/SpeedActionTest.cpp index efeb7fef..7b031316 100644 --- a/engine/tests/Storyboard/MotionControlAction/SpeedActionTest.cpp +++ b/engine/tests/Storyboard/MotionControlAction/SpeedActionTest.cpp @@ -333,8 +333,8 @@ TEST_F(SpeedActionWithJerkLimitsTestFixture, GivenDecreasingSpeedAndJerkLimits_W const Vec3<units::velocity::meters_per_second_t> initial_velocity{123.0_mps, 0.0_mps, 0.0_mps}; const auto target_speed{0.0_mps}; const auto acceleration{-123.0_mps_sq}; - const auto max_acceleration_rate{30.0_mps_cu}; - const auto max_deceleration_rate{30.0_mps_cu}; + const auto max_acceleration_rate{30.0_mps_cb}; + const auto max_deceleration_rate{30.0_mps_cb}; Init(initial_velocity, target_speed, acceleration, max_acceleration_rate, max_deceleration_rate); SetAndCheckControlStrategies(); @@ -353,8 +353,8 @@ TEST_F(SpeedActionWithJerkLimitsTestFixture, GivenDecreasingSpeedAndJerkLimitsAn const Vec3<units::velocity::meters_per_second_t> initial_velocity{456.0_mps, 0.0_mps, 0.0_mps}; const auto target_speed{123.0_mps}; const auto acceleration{-333.0_mps_sq}; - const auto max_acceleration_rate{30.0_mps_cu}; - const auto max_deceleration_rate{30.0_mps_cu}; + const auto max_acceleration_rate{30.0_mps_cb}; + const auto max_deceleration_rate{30.0_mps_cb}; Init(initial_velocity, target_speed, acceleration, max_acceleration_rate, max_deceleration_rate); SetAndCheckControlStrategies(); @@ -373,7 +373,7 @@ TEST_F(SpeedActionWithJerkLimitsTestFixture, GivenDecreasingSpeedAndAcceleration const Vec3<units::velocity::meters_per_second_t> initial_velocity{123.0_mps, 0.0_mps, 0.0_mps}; const auto target_speed{0.0_mps}; const auto acceleration{-123.0_mps_sq}; - const auto max_acceleration_rate{30.0_mps_cu}; + const auto max_acceleration_rate{30.0_mps_cb}; Init(initial_velocity, target_speed, acceleration, max_acceleration_rate); SetAndCheckControlStrategies(); @@ -391,7 +391,7 @@ TEST_F(SpeedActionWithJerkLimitsTestFixture, GivenDecreasingSpeedAndDeceleration const Vec3<units::velocity::meters_per_second_t> initial_velocity{123.0_mps, 0.0_mps, 0.0_mps}; const auto target_speed{0.0_mps}; const auto acceleration{-123.0_mps_sq}; - const auto max_deceleration_rate{30.0_mps_cu}; + const auto max_deceleration_rate{30.0_mps_cb}; Init(initial_velocity, target_speed, acceleration, std::nullopt, max_deceleration_rate); SetAndCheckControlStrategies(); @@ -425,8 +425,8 @@ TEST_F(SpeedActionWithJerkLimitsTestFixture, GivenIncreasingSpeedAndJerkLimits_W const Vec3<units::velocity::meters_per_second_t> initial_velocity{0.0_mps, 0.0_mps, 0.0_mps}; const auto target_speed{123.0_mps}; const auto acceleration{123.0_mps_sq}; - const auto max_acceleration_rate{30.0_mps_cu}; - const auto max_deceleration_rate{30.0_mps_cu}; + const auto max_acceleration_rate{30.0_mps_cb}; + const auto max_deceleration_rate{30.0_mps_cb}; Init(initial_velocity, target_speed, acceleration, max_acceleration_rate, max_deceleration_rate); SetAndCheckControlStrategies(); @@ -445,8 +445,8 @@ TEST_F(SpeedActionWithJerkLimitsTestFixture, GivenIncreasingSpeedAndJerkLimitsAn const Vec3<units::velocity::meters_per_second_t> initial_velocity{123.0_mps, 0.0_mps, 0.0_mps}; const auto target_speed{456.0_mps}; const auto acceleration{333.0_mps_sq}; - const auto max_acceleration_rate{30.0_mps_cu}; - const auto max_deceleration_rate{30.0_mps_cu}; + const auto max_acceleration_rate{30.0_mps_cb}; + const auto max_deceleration_rate{30.0_mps_cb}; Init(initial_velocity, target_speed, acceleration, max_acceleration_rate, max_deceleration_rate); SetAndCheckControlStrategies(); @@ -465,7 +465,7 @@ TEST_F(SpeedActionWithJerkLimitsTestFixture, GivenIncreasingSpeedAndAcceleration const Vec3<units::velocity::meters_per_second_t> initial_velocity{0.0_mps, 0.0_mps, 0.0_mps}; const auto target_speed{123.0_mps}; const auto acceleration{123.0_mps_sq}; - const auto max_acceleration_rate{30.0_mps_cu}; + const auto max_acceleration_rate{30.0_mps_cb}; Init(initial_velocity, target_speed, acceleration, max_acceleration_rate); SetAndCheckControlStrategies(); @@ -483,7 +483,7 @@ TEST_F(SpeedActionWithJerkLimitsTestFixture, GivenIncreasingSpeedAndDeceleration const Vec3<units::velocity::meters_per_second_t> initial_velocity{0.0_mps, 0.0_mps, 0.0_mps}; const auto target_speed{123.0_mps}; const auto acceleration{123.0_mps_sq}; - const auto max_deceleration_rate{30.0_mps_cu}; + const auto max_deceleration_rate{30.0_mps_cb}; Init(initial_velocity, target_speed, acceleration, std::nullopt, max_deceleration_rate); SetAndCheckControlStrategies(); diff --git a/engine/third_party/mantle_api/mantle_api.bzl b/engine/third_party/mantle_api/mantle_api.bzl index 2bbe12d8..d8c5afc9 100644 --- a/engine/third_party/mantle_api/mantle_api.bzl +++ b/engine/third_party/mantle_api/mantle_api.bzl @@ -1,14 +1,14 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") -_TAG = "v8.0.0" +_TAG = "v9.0.0" def mantle_api(): maybe( http_archive, name = "mantle_api", url = "https://gitlab.eclipse.org/eclipse/openpass/mantle-api/-/archive/{tag}/mantle-api-{tag}.tar.gz".format(tag = _TAG), - sha256 = "abb18f7180da012c02bda874752a7efd9ceab1da31e616174790f07a17c4fa3f", + sha256 = "c1729af0b937fc836922ae8b17f3de5fb18dca566077d52ee6c6f2a3255a3f43", strip_prefix = "mantle-api-{tag}".format(tag = _TAG), type = "tar.gz", ) diff --git a/engine/third_party/units/units.bzl b/engine/third_party/units/units.bzl index c2f4b6e3..577e056f 100644 --- a/engine/third_party/units/units.bzl +++ b/engine/third_party/units/units.bzl @@ -5,7 +5,7 @@ This module contains rule to pull nholthaus units load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") -_TAG = "2.3.3" +_TAG = "2.3.4" def units_nhh(): maybe( @@ -13,6 +13,6 @@ def units_nhh(): name = "units_nhh", build_file = Label("//:third_party/units/units.BUILD"), url = "https://github.com/nholthaus/units/archive/refs/tags/v{tag}.tar.gz".format(tag = _TAG), - sha256 = "b1f3c1dd11afa2710a179563845ce79f13ebf0c8c090d6aa68465b18bd8bd5fc", + sha256 = "e7c7d307408c30bfd30c094beea8d399907ffaf9ac4b08f4045c890f2e076049", strip_prefix = "units-{tag}".format(tag = _TAG), ) diff --git a/utils/ci/conan/conanfile.txt b/utils/ci/conan/conanfile.txt index 72e5123b..dc6a61a8 100644 --- a/utils/ci/conan/conanfile.txt +++ b/utils/ci/conan/conanfile.txt @@ -1,6 +1,6 @@ [requires] -units/2.3.3@openscenarioengine/testing -mantleapi/v8.0.0@openscenarioengine/testing +units/2.3.4@openscenarioengine/testing +mantleapi/v9.0.0@openscenarioengine/testing yase/d0c0e58d17358044cc9018c74308b45f6097ecfb@openscenarioengine/testing openscenario_api/v1.4.0@openscenarioengine/testing stochastics/0.11.0@openscenarioengine/testing diff --git a/utils/ci/conan/recipe/mantleapi/all/conandata.yml b/utils/ci/conan/recipe/mantleapi/all/conandata.yml index 2cd2f925..33e3f243 100644 --- a/utils/ci/conan/recipe/mantleapi/all/conandata.yml +++ b/utils/ci/conan/recipe/mantleapi/all/conandata.yml @@ -45,5 +45,9 @@ sources: url: https://gitlab.eclipse.org/eclipse/openpass/mantle-api.git sha256: "18eadd8ad4f3ddd78c955ce3d4d637a8ff912091" + "9.0.0": + url: https://gitlab.eclipse.org/eclipse/openpass/mantle-api.git + sha256: "ac2e9d33f00d034c6522dba3224a3dffdece9742" + "default": url: https://gitlab.eclipse.org/eclipse/openpass/mantle-api.git diff --git a/utils/ci/conan/recipe/units/all/conandata.yml b/utils/ci/conan/recipe/units/all/conandata.yml index c518b3ab..9e261012 100644 --- a/utils/ci/conan/recipe/units/all/conandata.yml +++ b/utils/ci/conan/recipe/units/all/conandata.yml @@ -13,10 +13,6 @@ ################################################################################ sources: - "2.3.3": + "2.3.4": url: https://github.com/nholthaus/units.git - sha256: "b04d436aaae198939e46194a43ea65b32e44ca6e" -patches: - "2.3.3": - - patch_file: "patches/pascal-name-conflict.patch" - base_path: "units" + sha256: "e27eed9da937f76edf4407e323498cb1096af3c1" diff --git a/utils/ci/conan/recipe/units/all/patches/pascal-name-conflict.patch b/utils/ci/conan/recipe/units/all/patches/pascal-name-conflict.patch deleted file mode 100644 index 5c36e1c5..00000000 --- a/utils/ci/conan/recipe/units/all/patches/pascal-name-conflict.patch +++ /dev/null @@ -1,26 +0,0 @@ - ---- a/include/units.h -+++ b/include/units.h -@@ -60,6 +60,11 @@ - # endif // _MSC_VER < 1800 - #endif // _MSC_VER - -+#ifdef __MINGW64__ || __MINGW32__ -+# pragma push_macro("pascal") -+# undef pascal -+#endif // __MINGW64__ or __MINGW32__ -+ - #if !defined(_MSC_VER) || _MSC_VER > 1800 - # define UNIT_HAS_LITERAL_SUPPORT - # define UNIT_HAS_VARIADIC_TEMPLATE_SUPPORT -@@ -4871,6 +4876,10 @@ namespace std - # pragma pop_macro("pascal") - #endif // _MSC_VER - -+#ifdef __MINGW64__ || __MINGW32__ -+# pragma pop_macro("pascal") -+#endif // __MINGW64__ or __MINGW32__ -+ - #endif // units_h__ - - // For Emacs -- GitLab