From 9328b129f8fa267952227f0b2a24ff0e6a631392 Mon Sep 17 00:00:00 2001 From: Simon Schmeisser Date: Thu, 27 Apr 2023 15:40:56 +0200 Subject: [PATCH 1/6] adapt to new createSceneManager in Ogre 13 --- src/image_view/image_view.cpp | 5 +++++ src/rviz/default_plugin/image_display.cpp | 5 +++++ src/rviz/visualization_manager.cpp | 5 ++++- src/test/render_points_test.cpp | 5 +++++ src/test/two_render_widgets.cpp | 5 +++++ 5 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/image_view/image_view.cpp b/src/image_view/image_view.cpp index 3ade801f25..904bf3f7ba 100644 --- a/src/image_view/image_view.cpp +++ b/src/image_view/image_view.cpp @@ -58,7 +58,12 @@ using namespace rviz; ImageView::ImageView(QWidget* parent) : QtOgreRenderWindow(parent), texture_it_(nh_) { setAutoRender(false); +#if (OGRE_VERSION < OGRE_VERSION_CHECK(13, 0, 0)) scene_manager_ = ogre_root_->createSceneManager(Ogre::ST_GENERIC, "TestSceneManager"); +#else + scene_manager_ = ogre_root_->createSceneManager(Ogre::DefaultSceneManagerFactory::FACTORY_TYPE_NAME, + "TestSceneManager"); +#endif } ImageView::~ImageView() diff --git a/src/rviz/default_plugin/image_display.cpp b/src/rviz/default_plugin/image_display.cpp index 91847beddd..8efe0e1719 100644 --- a/src/rviz/default_plugin/image_display.cpp +++ b/src/rviz/default_plugin/image_display.cpp @@ -81,7 +81,12 @@ void ImageDisplay::onInitialize() static uint32_t count = 0; std::stringstream ss; ss << "ImageDisplay" << count++; +#if (OGRE_VERSION < OGRE_VERSION_CHECK(13, 0, 0)) img_scene_manager_ = Ogre::Root::getSingleton().createSceneManager(Ogre::ST_GENERIC, ss.str()); +#else + img_scene_manager_ = Ogre::Root::getSingleton().createSceneManager( + Ogre::DefaultSceneManagerFactory::FACTORY_TYPE_NAME, ss.str()); +#endif } img_scene_node_ = img_scene_manager_->getRootSceneNode()->createChildSceneNode(); diff --git a/src/rviz/visualization_manager.cpp b/src/rviz/visualization_manager.cpp index 9bdb7ac63e..fdae05a366 100644 --- a/src/rviz/visualization_manager.cpp +++ b/src/rviz/visualization_manager.cpp @@ -140,8 +140,11 @@ VisualizationManager::VisualizationManager(RenderPanel* render_panel, render_panel->setAutoRender(false); private_->threaded_nh_.setCallbackQueue(&private_->threaded_queue_); - +#if (OGRE_VERSION < OGRE_VERSION_CHECK(13, 0, 0)) scene_manager_ = ogre_root_->createSceneManager(Ogre::ST_GENERIC); +#else + scene_manager_ = ogre_root_->createSceneManager(); +#endif rviz::RenderSystem::RenderSystem::get()->prepareOverlays(scene_manager_); diff --git a/src/test/render_points_test.cpp b/src/test/render_points_test.cpp index 63c3ec44aa..6501c1ddc7 100644 --- a/src/test/render_points_test.cpp +++ b/src/test/render_points_test.cpp @@ -52,7 +52,12 @@ MyFrame::MyFrame(QWidget* parent) try { +#if (OGRE_VERSION < OGRE_VERSION_CHECK(13, 0, 0)) scene_manager_ = root_->createSceneManager(Ogre::ST_GENERIC, "TestSceneManager"); +#else + scene_manager_ = root_->createSceneManager(Ogre::DefaultSceneManagerFactory::FACTORY_TYPE_NAME, + "TestSceneManager"); +#endif render_panel_ = new QtOgreRenderWindow(); render_panel_->resize(this->size()); diff --git a/src/test/two_render_widgets.cpp b/src/test/two_render_widgets.cpp index fa0d938d66..5d2d7507c4 100644 --- a/src/test/two_render_widgets.cpp +++ b/src/test/two_render_widgets.cpp @@ -27,6 +27,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#include #include #include @@ -68,7 +69,11 @@ int main(int argc, char** argv) container.show(); // Make a scene and show it in the window. +#if (OGRE_VERSION < OGRE_VERSION_CHECK(13, 0, 0)) Ogre::SceneManager* scene_manager = render_system->root()->createSceneManager(Ogre::ST_GENERIC); +#else + Ogre::SceneManager* scene_manager = render_system->root()->createSceneManager(); +#endif Ogre::Entity* thing = scene_manager->createEntity("thing", "rviz_cone.mesh"); Ogre::SceneNode* node = scene_manager->getRootSceneNode()->createChildSceneNode(); From 7fe37b8282b6cd3bdbef0b18f154563be6244c16 Mon Sep 17 00:00:00 2001 From: Simon Schmeisser Date: Thu, 27 Apr 2023 15:41:19 +0200 Subject: [PATCH 2/6] add missing deque include --- src/rviz/default_plugin/covariance_property.h | 2 ++ src/rviz/image/ros_image_texture.h | 1 + 2 files changed, 3 insertions(+) diff --git a/src/rviz/default_plugin/covariance_property.h b/src/rviz/default_plugin/covariance_property.h index eae8247116..d1a0999de6 100644 --- a/src/rviz/default_plugin/covariance_property.h +++ b/src/rviz/default_plugin/covariance_property.h @@ -30,6 +30,8 @@ #ifndef COVARIANCE_PROPERTY_H #define COVARIANCE_PROPERTY_H +#include + #include #include diff --git a/src/rviz/image/ros_image_texture.h b/src/rviz/image/ros_image_texture.h index 55d7769390..161cc0dc3b 100644 --- a/src/rviz/image/ros_image_texture.h +++ b/src/rviz/image/ros_image_texture.h @@ -41,6 +41,7 @@ #include +#include #include namespace rviz From 25380ce13f2591f8bd3a24c1bd324a24503f5a82 Mon Sep 17 00:00:00 2001 From: Simon Schmeisser Date: Thu, 27 Apr 2023 15:41:43 +0200 Subject: [PATCH 3/6] add missing include for Iterator --- src/rviz/ogre_helpers/apply_visibility_bits.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/rviz/ogre_helpers/apply_visibility_bits.cpp b/src/rviz/ogre_helpers/apply_visibility_bits.cpp index 674795e8d5..5bb051e97d 100644 --- a/src/rviz/ogre_helpers/apply_visibility_bits.cpp +++ b/src/rviz/ogre_helpers/apply_visibility_bits.cpp @@ -31,6 +31,7 @@ #include #include +#include namespace rviz { From ea2ca2caf17c48d33898d0ef366cfdf8b27c6b59 Mon Sep 17 00:00:00 2001 From: Simon Schmeisser Date: Thu, 27 Apr 2023 15:42:58 +0200 Subject: [PATCH 4/6] Ogre::UTFString was removed in 13.0 --- src/rviz/ogre_helpers/movable_text.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/rviz/ogre_helpers/movable_text.cpp b/src/rviz/ogre_helpers/movable_text.cpp index 6a516d4af0..b17c55eae2 100644 --- a/src/rviz/ogre_helpers/movable_text.cpp +++ b/src/rviz/ogre_helpers/movable_text.cpp @@ -51,7 +51,9 @@ #include #include #include +#if (OGRE_VERSION < OGRE_VERSION_CHECK(13, 0, 0)) #include +#endif #include @@ -215,7 +217,11 @@ void MovableText::showOnTop(bool show) void MovableText::_setupGeometry() { +#if (OGRE_VERSION >= OGRE_VERSION_CHECK(13, 0, 0)) + Ogre::String utfCaption(mCaption); +#else Ogre::UTFString::utf32string utfCaption(Ogre::UTFString(mCaption).asUTF32()); +#endif assert(mpFont); assert(!mpMaterial.isNull()); From 1ecdd40f0a2172abe5d75f57a9ca99d2b9d23323 Mon Sep 17 00:00:00 2001 From: Robert Haschke Date: Thu, 25 May 2023 22:44:36 +0200 Subject: [PATCH 5/6] GHA: Add Ogre 13.6 (#1) * GHA: Add Ogre 13.6 --- .github/workflows/ci.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b649be74f0..f633abfde3 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -14,16 +14,20 @@ jobs: fail-fast: false matrix: distro: [noetic, jammy] - ogre: ["1.9", "1.12"] + ogre: ["1.9", "1.12", "13.6"] include: - distro: noetic ogre: 1.9 env: CLANG_TIDY: true + exclude: + - distro: jammy + ogre: "13.6" env: CXXFLAGS: "-DRVIZ_DEPRECATE_QT4_SLOTS -Werror -Wall -Wextra -Wwrite-strings -Wunreachable-code -Wpointer-arith -Wredundant-decls -Wno-strict-aliasing -Wno-sign-compare" UPSTREAM_WORKSPACE: ${{ matrix.distro != 'jammy' && 'github:rhaschke/python_qt_binding#silent-external-warnings' || '' }} + AFTER_INIT: ${{ startsWith(matrix.ogre, '13') && 'apt install -q -y software-properties-common && add-apt-repository ppa:s-schmeisser/ogre-13-${{ matrix.distro }} -y' || ''}} AFTER_INSTALL_TARGET_DEPENDENCIES: apt install -qq -y libogre-${{ matrix.ogre }}-dev CATKIN_LINT: true CCACHE_DIR: ${{ github.workspace }}/.ccache From e916c4e3e96f289cd42010f3de2cbf0da05fd4b8 Mon Sep 17 00:00:00 2001 From: Simon Schmeisser Date: Mon, 29 Jan 2024 19:27:50 +0100 Subject: [PATCH 6/6] fix bad substitution, repo is named after ubuntu distribution --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f633abfde3..738e0501a2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -27,7 +27,7 @@ jobs: env: CXXFLAGS: "-DRVIZ_DEPRECATE_QT4_SLOTS -Werror -Wall -Wextra -Wwrite-strings -Wunreachable-code -Wpointer-arith -Wredundant-decls -Wno-strict-aliasing -Wno-sign-compare" UPSTREAM_WORKSPACE: ${{ matrix.distro != 'jammy' && 'github:rhaschke/python_qt_binding#silent-external-warnings' || '' }} - AFTER_INIT: ${{ startsWith(matrix.ogre, '13') && 'apt install -q -y software-properties-common && add-apt-repository ppa:s-schmeisser/ogre-13-${{ matrix.distro }} -y' || ''}} + AFTER_INIT: ${{ startsWith(matrix.ogre, '13') && 'apt install -q -y software-properties-common && add-apt-repository ppa:s-schmeisser/ogre-13-focal -y' || ''}} AFTER_INSTALL_TARGET_DEPENDENCIES: apt install -qq -y libogre-${{ matrix.ogre }}-dev CATKIN_LINT: true CCACHE_DIR: ${{ github.workspace }}/.ccache