diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b649be74f0..738e0501a2 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-focal -y' || ''}} AFTER_INSTALL_TARGET_DEPENDENCIES: apt install -qq -y libogre-${{ matrix.ogre }}-dev CATKIN_LINT: true CCACHE_DIR: ${{ github.workspace }}/.ccache 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/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/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/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 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 { 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()); 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();