diff options
author | CoprDistGit <infra@openeuler.org> | 2025-03-08 16:31:29 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2025-03-08 16:31:29 +0000 |
commit | c4b79eac90ac7c5a4e935417390928281ddec059 (patch) | |
tree | 7bd1d689c664bf539eb5e577d24339ce630a8485 | |
parent | c63c737fe722e9ebb648b052292a844f2c5702dc (diff) |
automatic import of ros-humble-octomapopeneuler24.03_LTS
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | octomap-backport-fix-deprcated-iterator.patch | 123 | ||||
-rw-r--r-- | octomap.spec | 103 | ||||
-rw-r--r-- | sources | 1 |
4 files changed, 228 insertions, 0 deletions
@@ -0,0 +1 @@ +/ros-humble-octomap_1.9.8.orig.tar.gz diff --git a/octomap-backport-fix-deprcated-iterator.patch b/octomap-backport-fix-deprcated-iterator.patch new file mode 100644 index 0000000..7f5225f --- /dev/null +++ b/octomap-backport-fix-deprcated-iterator.patch @@ -0,0 +1,123 @@ +diff --git a/octomap/include/octomap/OcTreeIterator.hxx b/octomap/include/octomap/OcTreeIterator.hxx +index 66ae63f8..5f2dd7e5 100644 +--- ros-humble-octovis-1.9.8_org/include/octomap/OcTreeIterator.hxx ++++ ros-humble-octovis-1.9.8/include/octomap/OcTreeIterator.hxx +@@ -39,8 +39,15 @@ + * const with respect to the tree. This file is included within + * OcTreeBaseImpl.h, you should probably not include this directly. + */ +- class iterator_base : public std::iterator<std::forward_iterator_tag, NodeType>{ ++ template<class NodeType> ++ class iterator_base{ + public: ++ using iterator_category = std::forward_iterator_tag; ++ using value_type = NodeType; ++ using difference_type = NodeType; ++ using pointer = NodeType*; ++ using reference = NodeType&; ++ + struct StackElement; + /// Default ctor, only used for the end-iterator + iterator_base() : tree(NULL), maxDepth(0){} +@@ -204,16 +211,16 @@ + * } + * @endcode + */ +- class tree_iterator : public iterator_base { ++ class tree_iterator : public iterator_base<NodeType> { + public: +- tree_iterator() : iterator_base(){} ++ tree_iterator() : iterator_base<NodeType>(){} + /** + * Constructor of the iterator. + * + * @param ptree OcTreeBaseImpl on which the iterator is used on + * @param depth Maximum depth to traverse the tree. 0 (default): unlimited + */ +- tree_iterator(OcTreeBaseImpl<NodeType,INTERFACE> const* ptree, uint8_t depth=0) : iterator_base(ptree, depth) {}; ++ tree_iterator(OcTreeBaseImpl<NodeType,INTERFACE> const* ptree, uint8_t depth=0) : iterator_base<NodeType>(ptree, depth) {}; + + /// postfix increment operator of iterator (it++) + tree_iterator operator++(int){ +@@ -260,9 +267,9 @@ + * @endcode + * + */ +- class leaf_iterator : public iterator_base { ++ class leaf_iterator : public iterator_base<NodeType> { + public: +- leaf_iterator() : iterator_base(){} ++ leaf_iterator() : iterator_base<NodeType>(){} + + /** + * Constructor of the iterator. +@@ -270,7 +277,7 @@ + * @param ptree OcTreeBaseImpl on which the iterator is used on + * @param depth Maximum depth to traverse the tree. 0 (default): unlimited + */ +- leaf_iterator(OcTreeBaseImpl<NodeType, INTERFACE> const* ptree, uint8_t depth=0) : iterator_base(ptree, depth) { ++ leaf_iterator(OcTreeBaseImpl<NodeType, INTERFACE> const* ptree, uint8_t depth=0) : iterator_base<NodeType>(ptree, depth) { + // tree could be empty (= no stack) + if (this->stack.size() > 0){ + // skip forward to next valid leaf node: +@@ -280,7 +287,7 @@ + } + } + +- leaf_iterator(const leaf_iterator& other) : iterator_base(other) {}; ++ leaf_iterator(const leaf_iterator& other) : iterator_base<NodeType>(other) {}; + + /// postfix increment operator of iterator (it++) + leaf_iterator operator++(int){ +@@ -332,9 +339,9 @@ + * } + * @endcode + */ +- class leaf_bbx_iterator : public iterator_base { ++ class leaf_bbx_iterator : public iterator_base<NodeType> { + public: +- leaf_bbx_iterator() : iterator_base() {}; ++ leaf_bbx_iterator() : iterator_base<NodeType>() {}; + /** + * Constructor of the iterator. The bounding box corners min and max are + * converted into an OcTreeKey first. +@@ -351,7 +358,7 @@ + * @param depth Maximum depth to traverse the tree. 0 (default): unlimited + */ + leaf_bbx_iterator(OcTreeBaseImpl<NodeType,INTERFACE> const* ptree, const point3d& min, const point3d& max, uint8_t depth=0) +- : iterator_base(ptree, depth) ++ : iterator_base<NodeType>(ptree, depth) + { + if (this->stack.size() > 0){ + assert(ptree); +@@ -379,7 +386,7 @@ + * @param depth Maximum depth to traverse the tree. 0 (default): unlimited + */ + leaf_bbx_iterator(OcTreeBaseImpl<NodeType,INTERFACE> const* ptree, const OcTreeKey& min, const OcTreeKey& max, uint8_t depth=0) +- : iterator_base(ptree, depth), minKey(min), maxKey(max) ++ : iterator_base<NodeType>(ptree, depth), minKey(min), maxKey(max) + { + // tree could be empty (= no stack) + if (this->stack.size() > 0){ +@@ -389,7 +396,7 @@ + } + } + +- leaf_bbx_iterator(const leaf_bbx_iterator& other) : iterator_base(other) { ++ leaf_bbx_iterator(const leaf_bbx_iterator& other) : iterator_base<NodeType>(other) { + minKey = other.minKey; + maxKey = other.maxKey; + } +@@ -430,10 +437,10 @@ + protected: + + void singleIncrement(){ +- typename iterator_base::StackElement top = this->stack.top(); ++ typename iterator_base<NodeType>::StackElement top = this->stack.top(); + this->stack.pop(); + +- typename iterator_base::StackElement s; ++ typename iterator_base<NodeType>::StackElement s; + s.depth = top.depth +1; + key_type center_offset_key = this->tree->tree_max_val >> s.depth; + // push on stack in reverse order diff --git a/octomap.spec b/octomap.spec new file mode 100644 index 0000000..c4fae18 --- /dev/null +++ b/octomap.spec @@ -0,0 +1,103 @@ +%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 octomap +%define ros_distro humble + +Name: ros-%{ros_distro}-%{RosPkgName} +Version: 1.9.8 +Release: 2%{?dist}%{?release_suffix} +Summary: ROS octomap package + +Url: http://octomap.github.io +License: BSD +Source0: %{name}_%{version}.orig.tar.gz +# https://github.com/OctoMap/octomap/commit/b7118e096abb223fe3ce2af70e6f8c751989fe1d +Patch0: octomap-backport-fix-deprcated-iterator.patch + +Requires: ros-%{ros_distro}-ros-workspace + +BuildRequires: cmake +BuildRequires: ros-%{ros_distro}-ros-workspace + +%if 0%{?with_tests} +%endif + +Provides: %{name}-devel = %{version}-%{release} +Provides: %{name}-doc = %{version}-%{release} +Provides: %{name}-runtime = %{version}-%{release} + +%description +The OctoMap library implements a 3D occupancy grid mapping approach, providing data structures and mapping algorithms in C++. The map implementation is based on an octree. See + http://octomap.github.io for details. + +%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}" \ + -DCMAKE_INSTALL_LIBDIR="/opt/ros/%{ros_distro}/lib" \ + -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 +* Fri Sep 08 2023 will_niutao <niutao2@huawei.com> - 1.9.8-2 +- Autogenerated by ros-porting-tools + +* Thu May 04 2023 Armin Hornung armin@hornung.io - 1.9.8-1 +- Autogenerated by ros-porting-tools @@ -0,0 +1 @@ +dd2908c93af30949b2e60b1617e7a671 ros-humble-octomap_1.9.8.orig.tar.gz |