From 713fcb880265c3afba47ef710dbf692f568c650f Mon Sep 17 00:00:00 2001 From: Louise Poubel Date: Mon, 27 Dec 2021 10:11:53 -0800 Subject: [PATCH 1/2] Bumps in garden : ci_matching_branch/bump_garden_ign-rendering7 Signed-off-by: Louise Poubel --- .github/ci/packages.apt | 6 +++--- CMakeLists.txt | 8 ++++---- examples/depth_camera/CMakeLists.txt | 2 +- tutorials/02_install.md | 4 ++-- tutorials/23_depth_camera_tutorial.md | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/ci/packages.apt b/.github/ci/packages.apt index 80fa960e1..3c69f1925 100644 --- a/.github/ci/packages.apt +++ b/.github/ci/packages.apt @@ -2,9 +2,9 @@ freeglut3-dev libfreeimage-dev libglew-dev libignition-cmake2-dev -libignition-common4-dev -libignition-math6-dev -libignition-math6-eigen3-dev +libignition-common5-dev +libignition-math7-dev +libignition-math7-eigen3-dev libignition-plugin-dev libignition-utils1-dev libogre-1.9-dev diff --git a/CMakeLists.txt b/CMakeLists.txt index 9ed2fb4a9..ebe717a1c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,14 +30,14 @@ option(USE_UNOFFICIAL_OGRE_VERSIONS "Accept unsupported Ogre versions in the bui #-------------------------------------- # Find ignition-math -ign_find_package(ignition-math6 REQUIRED COMPONENTS eigen3 VERSION 6.9) -set(IGN_MATH_VER ${ignition-math6_VERSION_MAJOR}) +ign_find_package(ignition-math7 REQUIRED COMPONENTS eigen3) +set(IGN_MATH_VER ${ignition-math7_VERSION_MAJOR}) #-------------------------------------- # Find ignition-common -ign_find_package(ignition-common4 REQUIRED +ign_find_package(ignition-common5 REQUIRED COMPONENTS graphics events) -set(IGN_COMMON_VER ${ignition-common4_VERSION_MAJOR}) +set(IGN_COMMON_VER ${ignition-common5_VERSION_MAJOR}) #-------------------------------------- # Find ignition-plugin diff --git a/examples/depth_camera/CMakeLists.txt b/examples/depth_camera/CMakeLists.txt index b7d40f983..338159aa3 100644 --- a/examples/depth_camera/CMakeLists.txt +++ b/examples/depth_camera/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) project(ignition-rendering-depth-camera) -find_package(ignition-rendering6 REQUIRED) +find_package(ignition-rendering7 REQUIRED) include_directories(SYSTEM ${PROJECT_BINARY_DIR} diff --git a/tutorials/02_install.md b/tutorials/02_install.md index ac799ed39..6a5b5a7f9 100644 --- a/tutorials/02_install.md +++ b/tutorials/02_install.md @@ -59,8 +59,8 @@ sudo apt install -y \ libxmu-dev \ libxi-dev \ libignition-cmake2-dev \ - libignition-math6-dev \ - libignition-common4-dev \ + libignition-math7-dev \ + libignition-common5-dev \ libignition-plugin-dev sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 800 --slave /usr/bin/g++ g++ /usr/bin/g++-8 --slave /usr/bin/gcov gcov /usr/bin/gcov-8 ``` diff --git a/tutorials/23_depth_camera_tutorial.md b/tutorials/23_depth_camera_tutorial.md index 729b5e712..33b12063f 100644 --- a/tutorials/23_depth_camera_tutorial.md +++ b/tutorials/23_depth_camera_tutorial.md @@ -63,7 +63,7 @@ depth camera to a memory reserved in a globally scoped `Image`. \snippet examples/depth_camera/GlutWindow.cc convert depth to image -The other option is the [ConnectNewRgbPointCloud](https://github.com/ignitionrobotics/ign-rendering/blob/ign-rendering6/include/ignition/rendering/DepthCamera.hh#L58) call that receives colored point cloud data on callback. +The other option is the [ConnectNewRgbPointCloud](https://github.com/ignitionrobotics/ign-rendering/blob/ign-rendering7/include/ignition/rendering/DepthCamera.hh#L58) call that receives colored point cloud data on callback. The reason for setting the camera image format to `PixelFormat::PF_FLOAT32_RGBA` is to ensure that when the `Image` is created it reserves a buffer of the From 7ebaf469fcd844c901e52042d8124ae691b27234 Mon Sep 17 00:00:00 2001 From: Louise Poubel Date: Mon, 27 Dec 2021 11:58:40 -0800 Subject: [PATCH 2/2] Address upstream deprecations Signed-off-by: Louise Poubel --- include/ignition/rendering/LidarVisual.hh | 1 - include/ignition/rendering/Marker.hh | 1 - include/ignition/rendering/Scene.hh | 10 ------- include/ignition/rendering/base/BaseCamera.hh | 2 +- .../rendering/base/BaseJointVisual.hh | 4 +-- include/ignition/rendering/base/BaseScene.hh | 7 ----- src/OrbitViewController.cc | 4 +-- src/OrthoViewController.cc | 4 +-- src/TransformController.cc | 4 +-- src/base/BaseScene.cc | 29 ------------------- 10 files changed, 9 insertions(+), 57 deletions(-) diff --git a/include/ignition/rendering/LidarVisual.hh b/include/ignition/rendering/LidarVisual.hh index 1d2314f30..a847bdf9c 100644 --- a/include/ignition/rendering/LidarVisual.hh +++ b/include/ignition/rendering/LidarVisual.hh @@ -18,7 +18,6 @@ #define IGNITION_RENDERING_LIDARVISUAL_HH_ #include -#include #include #include #include "ignition/rendering/config.hh" diff --git a/include/ignition/rendering/Marker.hh b/include/ignition/rendering/Marker.hh index 85b4795d7..d18f00a58 100644 --- a/include/ignition/rendering/Marker.hh +++ b/include/ignition/rendering/Marker.hh @@ -17,7 +17,6 @@ #ifndef IGNITION_RENDERING_MARKER_HH_ #define IGNITION_RENDERING_MARKER_HH_ -#include #include #include #include "ignition/rendering/config.hh" diff --git a/include/ignition/rendering/Scene.hh b/include/ignition/rendering/Scene.hh index c769bedd5..e7bd30cdc 100644 --- a/include/ignition/rendering/Scene.hh +++ b/include/ignition/rendering/Scene.hh @@ -23,7 +23,6 @@ #include #include -#include #include @@ -76,20 +75,11 @@ namespace ignition /// \return The creating render-engine public: virtual RenderEngine *Engine() const = 0; - /// \brief Get the last simulation update time - /// \return The last simulation update time - public: virtual common::Time IGN_DEPRECATED(4) SimTime() const = 0; - /// \brief Get the last simulation update time /// \return The last simulation update time public: virtual std::chrono::steady_clock::duration Time() const = 0; - /// \brief Set the last simulation update time - /// \param[in] _time Latest simulation update time - public: virtual void IGN_DEPRECATED(4) - SetSimTime(const common::Time &_time) = 0; - /// \brief Set the last simulation update time /// \param[in] _time Latest simulation update time public: virtual void SetTime( diff --git a/include/ignition/rendering/base/BaseCamera.hh b/include/ignition/rendering/base/BaseCamera.hh index 948dfb4f1..840f0a634 100644 --- a/include/ignition/rendering/base/BaseCamera.hh +++ b/include/ignition/rendering/base/BaseCamera.hh @@ -473,7 +473,7 @@ namespace ignition void BaseCamera::Reset() { math::Angle fov; - fov.Degree(60); + fov.SetDegree(60); this->SetImageWidth(1); this->SetImageHeight(1); this->SetImageFormat(PF_R8G8B8); diff --git a/include/ignition/rendering/base/BaseJointVisual.hh b/include/ignition/rendering/base/BaseJointVisual.hh index 07f688371..6adbeea90 100644 --- a/include/ignition/rendering/base/BaseJointVisual.hh +++ b/include/ignition/rendering/base/BaseJointVisual.hh @@ -394,9 +394,9 @@ namespace ignition ignition::math::Quaterniond quat; // check the parallel case if (ignition::math::equal(angle, IGN_PI)) - quat.Axis(u.Perpendicular(), angle); + quat.SetFromAxisAngle(u.Perpendicular(), angle); else - quat.Axis((v.Cross(u)).Normalize(), angle); + quat.SetFromAxisAngle((v.Cross(u)).Normalize(), angle); _arrowVisual->SetLocalRotation(quat); if (_useParentFrame) diff --git a/include/ignition/rendering/base/BaseScene.hh b/include/ignition/rendering/base/BaseScene.hh index c301b28b5..04cb44f3c 100644 --- a/include/ignition/rendering/base/BaseScene.hh +++ b/include/ignition/rendering/base/BaseScene.hh @@ -58,11 +58,6 @@ namespace ignition public: virtual std::string Name() const override; - public: virtual void IGN_DEPRECATED(4) - SetSimTime(const common::Time &_time) override; - - public: virtual common::Time IGN_DEPRECATED(4) SimTime() const override; - public: virtual std::chrono::steady_clock::duration Time() const override; @@ -858,8 +853,6 @@ namespace ignition protected: std::string name; IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING - protected: common::Time IGN_DEPRECATED(4) simTime; - protected: std::chrono::steady_clock::duration time = std::chrono::steady_clock::duration::zero(); diff --git a/src/OrbitViewController.cc b/src/OrbitViewController.cc index fb14c0d6c..d7bd50b65 100644 --- a/src/OrbitViewController.cc +++ b/src/OrbitViewController.cc @@ -163,14 +163,14 @@ void OrbitViewController::Orbit(const math::Vector2d &_value) // rotate around world axis at target point math::Quaterniond yawQuat; - yawQuat.Axis(math::Vector3d::UnitZ, -dy); + yawQuat.SetFromAxisAngle(math::Vector3d::UnitZ, -dy); this->dataPtr->camera->SetWorldRotation( yawQuat * this->dataPtr->camera->WorldRotation()); this->dataPtr->camera->SetWorldPosition( yawQuat * this->dataPtr->camera->WorldPosition()); math::Quaterniond localPitchQuat; - localPitchQuat.Axis( + localPitchQuat.SetFromAxisAngle( this->dataPtr->camera->WorldRotation()*math::Vector3d::UnitY, dp); this->dataPtr->camera->SetWorldRotation( localPitchQuat * this->dataPtr->camera->WorldRotation()); diff --git a/src/OrthoViewController.cc b/src/OrthoViewController.cc index 41a235c7d..154862f47 100644 --- a/src/OrthoViewController.cc +++ b/src/OrthoViewController.cc @@ -237,14 +237,14 @@ void OrthoViewController::Orbit(const math::Vector2d &_value) // rotate around world axis at target point math::Quaterniond yawQuat; - yawQuat.Axis(math::Vector3d::UnitZ, -dy); + yawQuat.SetFromAxisAngle(math::Vector3d::UnitZ, -dy); this->dataPtr->camera->SetWorldRotation( yawQuat * this->dataPtr->camera->WorldRotation()); this->dataPtr->camera->SetWorldPosition( yawQuat * this->dataPtr->camera->WorldPosition()); math::Quaterniond localPitchQuat; - localPitchQuat.Axis( + localPitchQuat.SetFromAxisAngle( this->dataPtr->camera->WorldRotation()*math::Vector3d::UnitY, dp); this->dataPtr->camera->SetWorldRotation( localPitchQuat * this->dataPtr->camera->WorldRotation()); diff --git a/src/TransformController.cc b/src/TransformController.cc index 6dce01c73..81eab74f5 100644 --- a/src/TransformController.cc +++ b/src/TransformController.cc @@ -548,9 +548,9 @@ void TransformController::Rotate(const math::Quaterniond &_rotation, bool _snap) { math::Vector3d axis; double angle; - rotation.ToAxis(axis, angle); + rotation.AxisAngle(axis, angle); angle = rint(angle / (IGN_PI * 0.25)) * (IGN_PI * 0.25); - rotation.Axis(axis, angle); + rotation.SetFromAxisAngle(axis, angle); } this->dataPtr->node->SetWorldRotation(rotation); diff --git a/src/base/BaseScene.cc b/src/base/BaseScene.cc index fe161d792..e79d4664a 100644 --- a/src/base/BaseScene.cc +++ b/src/base/BaseScene.cc @@ -23,8 +23,6 @@ #include #include -#include "ignition/common/Time.hh" - #include "ignition/rendering/ArrowVisual.hh" #include "ignition/rendering/AxisVisual.hh" #include "ignition/rendering/BoundingBoxCamera.hh" @@ -53,11 +51,6 @@ using namespace ignition; using namespace rendering; -// Prevent deprecation warnings for simTime -#ifndef _WIN32 -# pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wdeprecated-declarations" -#endif ////////////////////////////////////////////////// BaseScene::BaseScene(unsigned int _id, const std::string &_name) : id(_id), @@ -73,9 +66,6 @@ BaseScene::BaseScene(unsigned int _id, const std::string &_name) : BaseScene::~BaseScene() { } -#ifndef _WIN32 -# pragma GCC diagnostic pop -#endif ////////////////////////////////////////////////// void BaseScene::Load() @@ -145,25 +135,6 @@ void BaseScene::SetTime(const std::chrono::steady_clock::duration &_time) this->time = _time; } -////////////////////////////////////////////////// -#ifndef _WIN32 -# pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wdeprecated-declarations" -#endif -common::Time BaseScene::SimTime() const -{ - return this->simTime; -} - -//////////////////////////////////////////////////// -void BaseScene::SetSimTime(const common::Time &_time) -{ - this->simTime = _time; -} -#ifndef _WIN32 -# pragma GCC diagnostic pop -#endif - ////////////////////////////////////////////////// VisualPtr BaseScene::VisualAt(const CameraPtr &_camera, const ignition::math::Vector2i &_mousePos)