diff options
author | CoprDistGit <infra@openeuler.org> | 2025-03-08 13:23:52 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2025-03-08 13:23:52 +0000 |
commit | 89956a992af782ca140239723b37381c8638a3ad (patch) | |
tree | b4465efb1e3b77ba1f56caee9f15bb9a315ca0c8 | |
parent | 549c482ab329830728a14475d416bfb9d6814d9c (diff) |
automatic import of ros-humble-microstrain-inertial-driveropeneuler24.03_LTS
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | microstrain-inertial-driver-fix_error_no_define.patch | 67 | ||||
-rw-r--r-- | microstrain-inertial-driver.spec | 135 | ||||
-rw-r--r-- | sources | 1 |
4 files changed, 204 insertions, 0 deletions
@@ -0,0 +1 @@ +/ros-humble-microstrain-inertial-driver_3.0.1.orig.tar.gz diff --git a/microstrain-inertial-driver-fix_error_no_define.patch b/microstrain-inertial-driver-fix_error_no_define.patch new file mode 100644 index 0000000..72729ab --- /dev/null +++ b/microstrain-inertial-driver-fix_error_no_define.patch @@ -0,0 +1,67 @@ +diff -Naur ros-humble-microstrain-inertial-driver-3.0.1_org/microstrain_inertial_driver_common/include/microstrain_inertial_driver_common/services.h ros-humble-microstrain-inertial-driver-3.0.1/microstrain_inertial_driver_common/include/microstrain_inertial_driver_common/services.h +--- ros-humble-microstrain-inertial-driver-3.0.1_org/microstrain_inertial_driver_common/include/microstrain_inertial_driver_common/services.h 2023-02-11 05:19:58.000000000 +0800 ++++ ros-humble-microstrain-inertial-driver-3.0.1/microstrain_inertial_driver_common/include/microstrain_inertial_driver_common/services.h 2023-10-21 17:04:27.000000000 +0800 +@@ -172,7 +172,12 @@ + * \return Pointer to an initialized service + */ + template<typename ServiceType> +- typename RosServiceType<ServiceType>::SharedPtr configureService(const std::string& name, bool (Services::*callback)(typename ServiceType::Request&, typename ServiceType::Response&)); ++ typename RosServiceType<ServiceType>::SharedPtr configureService(const std::string& name, bool (Services::*callback)(typename ServiceType::Request&, typename ServiceType::Response&)) ++{ ++ MICROSTRAIN_DEBUG(node_, "Configuring service %s", name.c_str()); ++ return createService<ServiceType>(node_, name, callback, this); ++} ++ + + /** + * \brief Configures a MIP command dependent service. This service will only be configured if the device supports the command +@@ -184,7 +189,19 @@ + * \return Pointer to an initialized service, or nullptr if the device does not support the MipType + */ + template<typename ServiceType, typename MipType, uint8_t DescriptorSet = MipType::DESCRIPTOR_SET> +- typename RosServiceType<ServiceType>::SharedPtr configureService(const std::string& name, bool (Services::*callback)(typename ServiceType::Request&, typename ServiceType::Response&)); ++ typename RosServiceType<ServiceType>::SharedPtr configureService(const std::string& name, bool (Services::*callback)(typename ServiceType::Request&, typename ServiceType::Response&)) ++{ ++ if (config_->mip_device_->supportsDescriptor(DescriptorSet, MipType::FIELD_DESCRIPTOR)) ++ { ++ MICROSTRAIN_DEBUG(node_, "Configuring service %s to execute MIP command 0x%02x%02x", name.c_str(), DescriptorSet, MipType::FIELD_DESCRIPTOR); ++ return createService<ServiceType>(node_, name, callback, this); ++ } ++ else ++ { ++ MICROSTRAIN_DEBUG(node_, "Device does not support the %s service because the device does not support descriptor 0x%02x%02x", name.c_str(), DescriptorSet, MipType::FIELD_DESCRIPTOR); ++ return nullptr; ++ } ++} + + // Handles to the ROS node and the config + RosNodeType* node_; +@@ -253,27 +270,8 @@ + RosServiceType<SetFilterSpeedLeverArmServiceMsg>::SharedPtr set_filter_speed_lever_arm_service_; + }; + +-template<typename ServiceType> +-typename RosServiceType<ServiceType>::SharedPtr Services::configureService(const std::string& name, bool (Services::*callback)(typename ServiceType::Request&, typename ServiceType::Response&)) +-{ +- MICROSTRAIN_DEBUG(node_, "Configuring service %s", name.c_str()); +- return createService<ServiceType>(node_, name, callback, this); +-} + +-template<typename ServiceType, typename MipType, uint8_t DescriptorSet = MipType::DESCRIPTOR_SET> +-typename RosServiceType<ServiceType>::SharedPtr Services::configureService(const std::string& name, bool (Services::*callback)(typename ServiceType::Request&, typename ServiceType::Response&)) +-{ +- if (config_->mip_device_->supportsDescriptor(DescriptorSet, MipType::FIELD_DESCRIPTOR)) +- { +- MICROSTRAIN_DEBUG(node_, "Configuring service %s to execute MIP command 0x%02x%02x", name.c_str(), DescriptorSet, MipType::FIELD_DESCRIPTOR); +- return createService<ServiceType>(node_, name, callback, this); +- } +- else +- { +- MICROSTRAIN_DEBUG(node_, "Device does not support the %s service because the device does not support descriptor 0x%02x%02x", name.c_str(), DescriptorSet, MipType::FIELD_DESCRIPTOR); +- return nullptr; +- } +-} ++ + + } // namespace microstrain + diff --git a/microstrain-inertial-driver.spec b/microstrain-inertial-driver.spec new file mode 100644 index 0000000..9f097a1 --- /dev/null +++ b/microstrain-inertial-driver.spec @@ -0,0 +1,135 @@ +%bcond_without tests +%bcond_without weak_deps + +%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') +%global __provides_exclude_from ^/opt/ros/%{ros_distro}/.*$ +%global __requires_exclude_from ^/opt/ros/%{ros_distro}/.*$ + +%define RosPkgName microstrain-inertial-driver +%define ros_distro humble + +Name: ros-%{ros_distro}-%{RosPkgName} +Version: 3.0.1 +Release: 2%{?dist}%{?release_suffix} +Summary: The ros_mscl package provides a driver for the LORD/Microstrain inertial products. + +Url: https://github.com/LORD-MicroStrain/microstrain_inertial +License: MIT +Source0: %{name}_%{version}.orig.tar.gz +Patch0: microstrain-inertial-driver-fix_error_no_define.patch + +Requires: ros-%{ros_distro}-diagnostic-updater +Requires: ros-%{ros_distro}-tf2 +Requires: ros-%{ros_distro}-tf2-ros +Requires: ros-%{ros_distro}-std-msgs +Requires: ros-%{ros_distro}-std-srvs +Requires: ros-%{ros_distro}-geometry-msgs +Requires: ros-%{ros_distro}-sensor-msgs +Requires: ros-%{ros_distro}-nav-msgs +Requires: ros-%{ros_distro}-nmea-msgs +Requires: ros-%{ros_distro}-mavros-msgs +Requires: ros-%{ros_distro}-microstrain-inertial-msgs +Requires: ros-%{ros_distro}-tf2-geometry-msgs +Requires: ros-%{ros_distro}-lifecycle-msgs +Requires: ros-%{ros_distro}-rosidl-default-runtime +Requires: ros-%{ros_distro}-rclcpp-lifecycle +Requires: ros-%{ros_distro}-diagnostic-aggregator +Requires: ros-%{ros_distro}-ros-workspace + +BuildRequires: ros-%{ros_distro}-diagnostic-updater +BuildRequires: ros-%{ros_distro}-tf2 +BuildRequires: ros-%{ros_distro}-tf2-ros +BuildRequires: ros-%{ros_distro}-std-msgs +BuildRequires: ros-%{ros_distro}-std-srvs +BuildRequires: ros-%{ros_distro}-geometry-msgs +BuildRequires: ros-%{ros_distro}-sensor-msgs +BuildRequires: ros-%{ros_distro}-nav-msgs +BuildRequires: ros-%{ros_distro}-nmea-msgs +BuildRequires: ros-%{ros_distro}-mavros-msgs +BuildRequires: ros-%{ros_distro}-microstrain-inertial-msgs +BuildRequires: ros-%{ros_distro}-tf2-geometry-msgs +BuildRequires: ros-%{ros_distro}-lifecycle-msgs +BuildRequires: ros-%{ros_distro}-ros-environment +BuildRequires: ros-%{ros_distro}-rclcpp-lifecycle +BuildRequires: jq +BuildRequires: curl +BuildRequires: git +BuildRequires: ros-%{ros_distro}-rosidl-default-generators +BuildRequires: ros-%{ros_distro}-ros-workspace + +%if 0%{?with_tests} +BuildRequires: ros-%{ros_distro}-ament-cpplint +BuildRequires: ros-%{ros_distro}-ament-cmake-gtest +%endif + +Provides: %{name}-devel = %{version}-%{release} +Provides: %{name}-doc = %{version}-%{release} +Provides: %{name}-runtime = %{version}-%{release} + +%description +The ros_mscl package provides a driver for the LORD/Microstrain inertial products. + +%prep +%autosetup -p1 + +%build +# Needed to bootstrap since the ros_workspace package does not yet exist. +export PYTHONPATH=/opt/ros/%{ros_distro}/lib/python%{python3_version}/site-packages + +# In case we're installing to a non-standard location, look for a setup.sh +# in the install tree and source it. It will set things like +# CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. +if [ -f "/opt/ros/%{ros_distro}/setup.sh" ]; then . "/opt/ros/%{ros_distro}/setup.sh"; fi +mkdir -p .obj-%{_target_platform} && cd .obj-%{_target_platform} +%cmake3 \ + -UINCLUDE_INSTALL_DIR \ + -ULIB_INSTALL_DIR \ + -USYSCONF_INSTALL_DIR \ + -USHARE_INSTALL_PREFIX \ + -ULIB_SUFFIX \ + -DCMAKE_INSTALL_PREFIX="/opt/ros/%{ros_distro}" \ + -DAMENT_PREFIX_PATH="/opt/ros/%{ros_distro}" \ + -DCMAKE_PREFIX_PATH="/opt/ros/%{ros_distro}" \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ +%if !0%{?with_tests} + -DBUILD_TESTING=OFF \ +%endif + .. + +%make_build + +%install +# Needed to bootstrap since the ros_workspace package does not yet exist. +export PYTHONPATH=/opt/ros/%{ros_distro}/lib/python%{python3_version}/site-packages + +# In case we're installing to a non-standard location, look for a setup.sh +# in the install tree and source it. It will set things like +# CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. +if [ -f "/opt/ros/%{ros_distro}/setup.sh" ]; then . "/opt/ros/%{ros_distro}/setup.sh"; fi +%make_install -C .obj-%{_target_platform} + +%if 0%{?with_tests} +%check +# Needed to bootstrap since the ros_workspace package does not yet exist. +export PYTHONPATH=/opt/ros/%{ros_distro}/lib/python%{python3_version}/site-packages + +# Look for a Makefile target with a name indicating that it runs tests +TEST_TARGET=$(%__make -qp -C .obj-%{_target_platform} | sed "s/^\(test\|check\):.*/\\1/;t f;d;:f;q0") +if [ -n "$TEST_TARGET" ]; then +# In case we're installing to a non-standard location, look for a setup.sh +# in the install tree and source it. It will set things like +# CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. +if [ -f "/opt/ros/%{ros_distro}/setup.sh" ]; then . "/opt/ros/%{ros_distro}/setup.sh"; fi +CTEST_OUTPUT_ON_FAILURE=1 \ + %make_build -C .obj-%{_target_platform} $TEST_TARGET || echo "RPM TESTS FAILED" +else echo "RPM TESTS SKIPPED"; fi +%endif + +%files +/opt/ros/%{ros_distro} + +%changelog +* Thu Oct 30 2023 619409713@qq.com - 3.0.1-2 +- fix error not define by davidhan008 +* Thu May 04 2023 Rob Fisher rob.fisher@parker.com - 3.0.1-1 +- Autogenerated by ros-porting-tools @@ -0,0 +1 @@ +0a1a72798922b23182ad723260fe956a ros-humble-microstrain-inertial-driver_3.0.1.orig.tar.gz |