From 8498dc1060ff833cdc117d2d340af2bb345d3eed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Hern=C3=A1ndez=20Cordero?= Date: Wed, 23 Jun 2021 01:52:07 +0200 Subject: [PATCH 1/2] Removed and moved tape measure and grid config to ign-gui (#870) Signed-off-by: ahcorde Signed-off-by: Louise Poubel Co-authored-by: Louise Poubel --- Migration.md | 7 + src/gui/plugins/CMakeLists.txt | 2 - src/gui/plugins/grid_config/CMakeLists.txt | 8 - src/gui/plugins/grid_config/GridConfig.cc | 294 ---------------- src/gui/plugins/grid_config/GridConfig.hh | 88 ----- src/gui/plugins/grid_config/GridConfig.qml | 325 ----------------- src/gui/plugins/grid_config/GridConfig.qrc | 5 - src/gui/plugins/tape_measure/CMakeLists.txt | 6 - src/gui/plugins/tape_measure/TapeMeasure.cc | 333 ------------------ src/gui/plugins/tape_measure/TapeMeasure.hh | 105 ------ src/gui/plugins/tape_measure/TapeMeasure.qml | 100 ------ src/gui/plugins/tape_measure/TapeMeasure.qrc | 7 - src/gui/plugins/tape_measure/tape_measure.png | Bin 8586 -> 0 bytes src/gui/plugins/tape_measure/trashcan.png | Bin 5374 -> 0 bytes 14 files changed, 7 insertions(+), 1273 deletions(-) delete mode 100644 src/gui/plugins/grid_config/CMakeLists.txt delete mode 100644 src/gui/plugins/grid_config/GridConfig.cc delete mode 100644 src/gui/plugins/grid_config/GridConfig.hh delete mode 100644 src/gui/plugins/grid_config/GridConfig.qml delete mode 100644 src/gui/plugins/grid_config/GridConfig.qrc delete mode 100644 src/gui/plugins/tape_measure/CMakeLists.txt delete mode 100644 src/gui/plugins/tape_measure/TapeMeasure.cc delete mode 100644 src/gui/plugins/tape_measure/TapeMeasure.hh delete mode 100644 src/gui/plugins/tape_measure/TapeMeasure.qml delete mode 100644 src/gui/plugins/tape_measure/TapeMeasure.qrc delete mode 100644 src/gui/plugins/tape_measure/tape_measure.png delete mode 100644 src/gui/plugins/tape_measure/trashcan.png diff --git a/Migration.md b/Migration.md index cad3dd1548..1b25235ba9 100644 --- a/Migration.md +++ b/Migration.md @@ -5,6 +5,13 @@ Deprecated code produces compile-time warnings. These warning serve as notification to users that their code should be upgraded. The next major release will remove the deprecated code. +## Ignition Gazebo 5.x to 6.x + +* Some GUI plugins have been moved to Ignition GUI. Gazebo users don't need to + change their configuration files, the plugins will be loaded the same way. + * Grid Config + * Tape Measure + ## Ignition Gazebo 4.x to 5.x * Use `cli` component of `ignition-utils1`. diff --git a/src/gui/plugins/CMakeLists.txt b/src/gui/plugins/CMakeLists.txt index 7beccab42b..eef52f90ff 100644 --- a/src/gui/plugins/CMakeLists.txt +++ b/src/gui/plugins/CMakeLists.txt @@ -121,7 +121,6 @@ add_subdirectory(modules) add_subdirectory(align_tool) add_subdirectory(component_inspector) add_subdirectory(entity_tree) -add_subdirectory(grid_config) add_subdirectory(joint_position_controller) add_subdirectory(lights) add_subdirectory(playback_scrubber) @@ -129,7 +128,6 @@ add_subdirectory(plotting) add_subdirectory(resource_spawner) add_subdirectory(scene3d) add_subdirectory(shapes) -add_subdirectory(tape_measure) add_subdirectory(transform_control) add_subdirectory(video_recorder) add_subdirectory(view_angle) diff --git a/src/gui/plugins/grid_config/CMakeLists.txt b/src/gui/plugins/grid_config/CMakeLists.txt deleted file mode 100644 index fed08c8844..0000000000 --- a/src/gui/plugins/grid_config/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -gz_add_gui_plugin(GridConfig - SOURCES - GridConfig.cc - QT_HEADERS - GridConfig.hh - PUBLIC_LINK_LIBS - ${IGNITION-RENDERING_LIBRARIES} -) diff --git a/src/gui/plugins/grid_config/GridConfig.cc b/src/gui/plugins/grid_config/GridConfig.cc deleted file mode 100644 index 9ecc148c71..0000000000 --- a/src/gui/plugins/grid_config/GridConfig.cc +++ /dev/null @@ -1,294 +0,0 @@ -/* - * Copyright (C) 2020 Open Source Robotics Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * -*/ - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "GridConfig.hh" - -namespace ignition::gazebo -{ - struct GridParam - { - /// \brief Default horizontal cell count - int hCellCount{20}; - - /// \brief Default vertical cell count - int vCellCount{0}; - - /// \brief Default cell length - double cellLength{1.0}; - - /// \brief Default pose of grid - math::Pose3d pose{math::Pose3d::Zero}; - - /// \brief Default color of grid - math::Color color{math::Color(0.7f, 0.7f, 0.7f, 1.0f)}; - - /// \brief Default visible state - bool visible{true}; - }; - - class GridConfigPrivate - { - /// \brief Assume only one gridptr in a scene - public: rendering::GridPtr grid; - - /// \brief Default grid parameters - public: GridParam gridParam; - - /// \brief Flag that indicates whether there are new updates to be rendered. - public: bool dirty{false}; - }; -} - -using namespace ignition; -using namespace gazebo; - -///////////////////////////////////////////////// -GridConfig::GridConfig() - : ignition::gui::Plugin(), dataPtr(std::make_unique()) -{ -} - -///////////////////////////////////////////////// -GridConfig::~GridConfig() = default; - -///////////////////////////////////////////////// -void GridConfig::LoadConfig(const tinyxml2::XMLElement *) -{ - if (this->title.empty()) - this->title = "Grid config"; - - ignition::gui::App()->findChild< - ignition::gui::MainWindow *>()->installEventFilter(this); -} - -///////////////////////////////////////////////// -bool GridConfig::eventFilter(QObject *_obj, QEvent *_event) -{ - if (_event->type() == ignition::gui::events::Render::kType) - { - // This event is called in Scene3d's RenderThread, so it's safe to make - // rendering calls here - this->UpdateGrid(); - } - - // Standard event processing - return QObject::eventFilter(_obj, _event); -} - -///////////////////////////////////////////////// -void GridConfig::UpdateGrid() -{ - // Load grid if it doesn't already exist - if (!this->dataPtr->grid) - this->LoadGrid(); - - // If grid was not loaded successfully, don't update - if (!this->dataPtr->grid) - return; - - if (!this->dataPtr->dirty) - return; - - this->dataPtr->grid->SetVerticalCellCount( - this->dataPtr->gridParam.vCellCount); - this->dataPtr->grid->SetCellCount( - this->dataPtr->gridParam.hCellCount); - this->dataPtr->grid->SetCellLength( - this->dataPtr->gridParam.cellLength); - - auto visual = this->dataPtr->grid->Parent(); - if (visual) - { - visual->SetLocalPose(this->dataPtr->gridParam.pose); - - auto mat = visual->Material(); - if (mat) - { - mat->SetAmbient(this->dataPtr->gridParam.color); - mat->SetDiffuse(this->dataPtr->gridParam.color); - mat->SetSpecular(this->dataPtr->gridParam.color); - } - else - { - ignerr << "Grid visual missing material" << std::endl; - } - - visual->SetVisible(this->dataPtr->gridParam.visible); - } - else - { - ignerr << "Grid missing parent visual" << std::endl; - } - - this->dataPtr->dirty = false; -} - -///////////////////////////////////////////////// -void GridConfig::LoadGrid() -{ - auto loadedEngNames = rendering::loadedEngines(); - if (loadedEngNames.empty()) - return; - - // assume there is only one engine loaded - auto engineName = loadedEngNames[0]; - if (loadedEngNames.size() > 1) - { - igndbg << "More than one engine is available. " - << "Grid config plugin will use engine [" - << engineName << "]" << std::endl; - } - auto engine = rendering::engine(engineName); - if (!engine) - { - ignerr << "Internal error: failed to load engine [" << engineName - << "]. Grid plugin won't work." << std::endl; - return; - } - - if (engine->SceneCount() == 0) - return; - - // assume there is only one scene - // load scene - auto scene = engine->SceneByIndex(0); - if (!scene) - { - ignerr << "Internal error: scene is null." << std::endl; - return; - } - - if (!scene->IsInitialized() || nullptr == scene->RootVisual()) - { - return; - } - - // load grid - // if gridPtr found, load the existing gridPtr to class - for (unsigned int i = 0; i < scene->VisualCount(); ++i) - { - auto vis = scene->VisualByIndex(i); - if (!vis || vis->GeometryCount() == 0) - continue; - for (unsigned int j = 0; j < vis->GeometryCount(); ++j) - { - auto grid = std::dynamic_pointer_cast( - vis->GeometryByIndex(j)); - if (grid) - { - igndbg << "Attaching to existing grid" << std::endl; - this->dataPtr->grid = grid; - return; - } - } - } - - if (this->dataPtr->grid) - return; - - // Create grid - igndbg << "Creating grid" << std::endl; - - auto root = scene->RootVisual(); - this->dataPtr->grid = scene->CreateGrid(); - if (!this->dataPtr->grid) - { - ignwarn << "Failed to create grid, grid config plugin won't work." - << std::endl; - - // If we get here, most likely the render engine and scene are fully loaded, - // but they don't support grids. So stop trying. - ignition::gui::App()->findChild< - ignition::gui::MainWindow *>()->removeEventFilter(this); - return; - } - - this->dataPtr->grid->SetCellCount( - this->dataPtr->gridParam.hCellCount); - this->dataPtr->grid->SetVerticalCellCount( - this->dataPtr->gridParam.vCellCount); - this->dataPtr->grid->SetCellLength( - this->dataPtr->gridParam.cellLength); - - auto vis = scene->CreateVisual(); - root->AddChild(vis); - vis->SetLocalPose(this->dataPtr->gridParam.pose); - vis->AddGeometry(this->dataPtr->grid); - - auto mat = scene->CreateMaterial(); - mat->SetAmbient(this->dataPtr->gridParam.color); - mat->SetDiffuse(this->dataPtr->gridParam.color); - mat->SetSpecular(this->dataPtr->gridParam.color); - vis->SetMaterial(mat); -} - -///////////////////////////////////////////////// -void GridConfig::UpdateVCellCount(int _cellCount) -{ - this->dataPtr->gridParam.vCellCount = _cellCount; - this->dataPtr->dirty = true; -} - -///////////////////////////////////////////////// -void GridConfig::UpdateHCellCount(int _cellCount) -{ - this->dataPtr->gridParam.hCellCount = _cellCount; - this->dataPtr->dirty = true; -} - -///////////////////////////////////////////////// -void GridConfig::UpdateCellLength(double _length) -{ - this->dataPtr->gridParam.cellLength = _length; - this->dataPtr->dirty = true; -} - -///////////////////////////////////////////////// -void GridConfig::SetPose( - double _x, double _y, double _z, - double _roll, double _pitch, double _yaw) -{ - this->dataPtr->gridParam.pose = math::Pose3d(_x, _y, _z, _roll, _pitch, _yaw); - this->dataPtr->dirty = true; -} - -///////////////////////////////////////////////// -void GridConfig::SetColor(double _r, double _g, double _b, double _a) -{ - this->dataPtr->gridParam.color = math::Color(_r, _g, _b, _a); - this->dataPtr->dirty = true; -} - -///////////////////////////////////////////////// -void GridConfig::OnShow(bool _checked) -{ - this->dataPtr->gridParam.visible = _checked; - this->dataPtr->dirty = true; -} - -// Register this plugin -IGNITION_ADD_PLUGIN(ignition::gazebo::GridConfig, - ignition::gui::Plugin) diff --git a/src/gui/plugins/grid_config/GridConfig.hh b/src/gui/plugins/grid_config/GridConfig.hh deleted file mode 100644 index c39184e7e6..0000000000 --- a/src/gui/plugins/grid_config/GridConfig.hh +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (C) 2020 Open Source Robotics Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * -*/ - -#ifndef IGNITION_GAZEBO_GUI_GRIDCONFIG_HH_ -#define IGNITION_GAZEBO_GUI_GRIDCONFIG_HH_ - -#include - -#include -#include - -namespace ignition -{ -namespace gazebo -{ - class GridConfigPrivate; - - class GridConfig : public ignition::gui::Plugin - { - Q_OBJECT - - /// \brief Constructor - public: GridConfig(); - - /// \brief Destructor - public: ~GridConfig() override; - - // Documentation inherited - public: void LoadConfig(const tinyxml2::XMLElement *) override; - - // Documentation inherited - protected: bool eventFilter(QObject *_obj, QEvent *_event) override; - - /// \brief Update grid - public: void UpdateGrid(); - - /// \brief Callback to retrieve existing grid or create a new one. - /// \param[in] _scene Scene to look for grid. - public: void LoadGrid(); - - /// \brief Callback to update vertical cell count - /// \param[in] _cellCount new vertical cell count - public slots: void UpdateVCellCount(int _cellCount); - - /// \brief Callback to update horizontal cell count - /// \param[in] _cellCount new horizontal cell count - public slots: void UpdateHCellCount(int _cellCount); - - /// \brief Callback to update cell length - /// \param[in] _length new cell length - public slots: void UpdateCellLength(double _length); - - /// \brief Callback to update grid pose - /// \param[in] _x, _y, _z cartesion coordinates - /// \param[in] _roll, _pitch, _yaw principal coordinates - public slots: void SetPose(double _x, double _y, double _z, - double _roll, double _pitch, double _yaw); - - /// \brief Callback to update grid color - /// \param[in] _r, _g, _b, _a RGB color model with fourth alpha channel - public slots: void SetColor(double _r, double _g, double _b, double _a); - - /// \brief Callback when checkbox is clicked. - /// \param[in] _checked indicates show or hide grid - public slots: void OnShow(bool _checked); - - /// \internal - /// \brief Pointer to private data. - private: std::unique_ptr dataPtr; - }; -} -} - -#endif diff --git a/src/gui/plugins/grid_config/GridConfig.qml b/src/gui/plugins/grid_config/GridConfig.qml deleted file mode 100644 index d73efd47d8..0000000000 --- a/src/gui/plugins/grid_config/GridConfig.qml +++ /dev/null @@ -1,325 +0,0 @@ -/* - * Copyright (C) 2020 Open Source Robotics Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * -*/ -import QtQuick 2.9 -import QtQuick.Controls 2.1 -import QtQuick.Dialogs 1.0 -import QtQuick.Layouts 1.3 -import "qrc:/qml" - -GridLayout { - columns: 6 - columnSpacing: 10 - Layout.minimumWidth: 300 - Layout.minimumHeight: 625 - anchors.fill: parent - anchors.leftMargin: 10 - anchors.rightMargin: 10 - - // Left spacer - Item { - Layout.columnSpan: 1 - Layout.rowSpan: 15 - Layout.fillWidth: true - } - - CheckBox { - Layout.alignment: Qt.AlignHCenter - id: showgrid - Layout.columnSpan: 4 - text: qsTr("Show/Hide Grid") - checked: true - onClicked: { - GridConfig.OnShow(checked) - } - } - - // Right spacer - Item { - Layout.columnSpan: 1 - Layout.rowSpan: 15 - Layout.fillWidth: true - } - - Text { - Layout.columnSpan: 4 - text: "Cell Count" - color: "dimgrey" - font.bold: true - } - - Text { - Layout.columnSpan: 2 - id: vercelltext - color: "dimgrey" - text: "Vertical" - } - - IgnSpinBox { - Layout.columnSpan: 2 - id: verticalCellCount - maximumValue: 1000 - minimumValue: 0 - value: 0 - onEditingFinished: GridConfig.UpdateVCellCount(verticalCellCount.value) - } - - Text { - Layout.columnSpan: 2 - id: honcelltext - color: "dimgrey" - text: "Horizontal" - } - - IgnSpinBox { - Layout.columnSpan: 2 - id: horizontalCellCount - maximumValue: 1000 - minimumValue: 1 - value: 20 - onEditingFinished: GridConfig.UpdateHCellCount(horizontalCellCount.value) - } - - Text { - Layout.columnSpan: 4 - id: celllengthtext - text: "Cell Length" - color: "dimgrey" - font.bold: true - } - - Text { - Layout.columnSpan: 2 - id: length - color: "dimgrey" - text: "Length (m)" - } - IgnSpinBox { - Layout.columnSpan: 2 - id: cellLength - maximumValue: 1000.00 - minimumValue: 0.01 - value: 1.00 - decimals: 2 - stepSize: 0.01 - onEditingFinished: GridConfig.UpdateCellLength(cellLength.value) - } - - Text { - Layout.columnSpan: 2 - id: cartesian - color: "dimgrey" - font.bold: true - text: "Position (m)" - } - - Text { - Layout.columnSpan: 2 - id: principal - text: "Rotation (rad)" - color: "dimgrey" - font.bold: true - } - - Text { - text: "X" - color: "dimgrey" - } - - IgnSpinBox { - id: x - value: 0.00 - maximumValue: 1000.00 - minimumValue: -1000.00 - decimals: 2 - stepSize: 0.01 - onEditingFinished: GridConfig.SetPose(x.value, y.value, z.value, roll.value, pitch.value, yaw.value) - } - - Text { - text: "Roll" - color: "dimgrey" - } - - IgnSpinBox { - id: roll - maximumValue: 6.28 - minimumValue: 0.00 - value: 0.00 - decimals: 2 - stepSize: 0.01 - onEditingFinished: GridConfig.SetPose(x.value, y.value, z.value, roll.value, pitch.value, yaw.value) - } - - Text { - text: "Y" - color: "dimgrey" - } - - IgnSpinBox { - id: y - value: 0.00 - maximumValue: 1000.00 - minimumValue: -1000.00 - decimals: 2 - stepSize: 0.01 - onEditingFinished: GridConfig.SetPose(x.value, y.value, z.value, roll.value, pitch.value, yaw.value) - } - - Text { - text: "Pitch" - color: "dimgrey" - } - - IgnSpinBox { - id: pitch - maximumValue: 6.28 - minimumValue: 0.00 - value: 0.00 - decimals: 2 - stepSize: 0.01 - onEditingFinished: GridConfig.SetPose(x.value, y.value, z.value, roll.value, pitch.value, yaw.value) - } - - Text { - text: "Z" - color: "dimgrey" - } - - IgnSpinBox { - id: z - value: 0.00 - maximumValue: 1000.00 - minimumValue: -1000.00 - decimals: 2 - stepSize: 0.01 - onEditingFinished: GridConfig.SetPose(x.value, y.value, z.value, roll.value, pitch.value, yaw.value) - } - - Text { - text: "Yaw" - color: "dimgrey" - } - - IgnSpinBox { - id: yaw - maximumValue: 6.28 - minimumValue: 0.00 - value: 0.00 - decimals: 2 - stepSize: 0.01 - onEditingFinished: GridConfig.SetPose(x.value, y.value, z.value, roll.value, pitch.value, yaw.value) - } - - Text { - Layout.columnSpan: 4 - text: "Color" - color: "dimgrey" - font.bold: true - } - - Text { - text: "R" - color: "dimgrey" - } - - IgnSpinBox { - id: r - maximumValue: 1.00 - minimumValue: 0.00 - value: 0.7 - stepSize: 0.01 - decimals: 2 - onEditingFinished: GridConfig.SetColor(r.value, g.value, b.value, a.value) - } - - Text { - text: "G" - color: "dimgrey" - } - - IgnSpinBox { - id: g - maximumValue: 1.00 - minimumValue: 0.00 - value: 0.7 - stepSize: 0.01 - decimals: 2 - onEditingFinished: GridConfig.SetColor(r.value, g.value, b.value, a.value) - } - - Text { - text: "B" - color: "dimgrey" - } - - IgnSpinBox { - id: b - maximumValue: 1.00 - minimumValue: 0.00 - value: 0.7 - stepSize: 0.01 - decimals: 2 - onEditingFinished: GridConfig.SetColor(r.value, g.value, b.value, a.value) - } - - Text { - text: "A" - color: "dimgrey" - } - - IgnSpinBox { - id: a - maximumValue: 1.00 - minimumValue: 0.00 - value: 1.0 - stepSize: 0.01 - decimals: 2 - onEditingFinished: GridConfig.SetColor(r.value, g.value, b.value, a.value) - } - - Button { - Layout.alignment: Qt.AlignHCenter - Layout.columnSpan: 4 - id: color - text: qsTr("Custom Color") - onClicked: colorDialog.open() - - ColorDialog { - id: colorDialog - title: "Choose a grid color" - visible: false - onAccepted: { - r.value = colorDialog.color.r - g.value = colorDialog.color.g - b.value = colorDialog.color.b - a.value = colorDialog.color.a - GridConfig.SetColor(colorDialog.color.r, colorDialog.color.g, colorDialog.color.b, colorDialog.color.a) - colorDialog.close() - } - onRejected: { - colorDialog.close() - } - } - } - - // Bottom spacer - Item { - Layout.columnSpan: 4 - Layout.fillHeight: true - } -} - diff --git a/src/gui/plugins/grid_config/GridConfig.qrc b/src/gui/plugins/grid_config/GridConfig.qrc deleted file mode 100644 index 107fb5f078..0000000000 --- a/src/gui/plugins/grid_config/GridConfig.qrc +++ /dev/null @@ -1,5 +0,0 @@ - - - GridConfig.qml - - diff --git a/src/gui/plugins/tape_measure/CMakeLists.txt b/src/gui/plugins/tape_measure/CMakeLists.txt deleted file mode 100644 index 4b5322fc2a..0000000000 --- a/src/gui/plugins/tape_measure/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ -gz_add_gui_plugin(TapeMeasure - SOURCES TapeMeasure.cc - QT_HEADERS TapeMeasure.hh - PRIVATE_LINK_LIBS - ${IGNITION-RENDERING_LIBRARIES} -) diff --git a/src/gui/plugins/tape_measure/TapeMeasure.cc b/src/gui/plugins/tape_measure/TapeMeasure.cc deleted file mode 100644 index 39c4bf0248..0000000000 --- a/src/gui/plugins/tape_measure/TapeMeasure.cc +++ /dev/null @@ -1,333 +0,0 @@ -/* - * Copyright (C) 2020 Open Source Robotics Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * -*/ - -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "ignition/gazebo/gui/GuiEvents.hh" -#include "TapeMeasure.hh" - -namespace ignition::gazebo -{ - class TapeMeasurePrivate - { - /// \brief Ignition communication node. - public: transport::Node node; - - /// \brief True if currently measuring, else false. - public: bool measure = false; - - /// \brief The id of the start point marker. - public: const int kStartPointId = 1; - - /// \brief The id of the end point marker. - public: const int kEndPointId = 2; - - /// \brief The id of the line marker. - public: const int kLineId = 3; - - /// \brief The id of the start or end point marker that is currently - /// being placed. This is primarily used to track the state machine of - /// the plugin. - public: int currentId = kStartPointId; - - /// \brief The location of the placed starting point of the tape measure - /// tool, only set when the user clicks to set the point. - public: ignition::math::Vector3d startPoint = - ignition::math::Vector3d::Zero; - - /// \brief The location of the placed ending point of the tape measure - /// tool, only set when the user clicks to set the point. - public: ignition::math::Vector3d endPoint = ignition::math::Vector3d::Zero; - - /// \brief The color to set the marker when hovering the mouse over the - /// scene. - public: ignition::math::Color - hoverColor{ignition::math::Color(0.2f, 0.2f, 0.2f, 0.5f)}; - - /// \brief The color to draw the marker when the user clicks to confirm - /// its location. - public: ignition::math::Color - drawColor{ignition::math::Color(0.2f, 0.2f, 0.2f, 1.0f)}; - - /// \brief A set of the currently placed markers. Used to make sure a - /// non-existent marker is not deleted. - public: std::unordered_set placedMarkers; - - /// \brief The current distance between the two points. This distance - /// is updated as the user hovers the end point as well. - public: double distance = 0.0; - - /// \brief The namespace that the markers for this plugin are placed in. - public: std::string ns = "tape_measure"; - }; -} - -using namespace ignition; -using namespace gazebo; - -///////////////////////////////////////////////// -TapeMeasure::TapeMeasure() - : ignition::gui::Plugin(), - dataPtr(std::make_unique()) -{ -} - -///////////////////////////////////////////////// -TapeMeasure::~TapeMeasure() = default; - -///////////////////////////////////////////////// -void TapeMeasure::LoadConfig(const tinyxml2::XMLElement *) -{ - if (this->title.empty()) - this->title = "Tape measure"; - - ignition::gui::App()->findChild - ()->installEventFilter(this); - ignition::gui::App()->findChild - ()->QuickWindow()->installEventFilter(this); -} - -///////////////////////////////////////////////// -void TapeMeasure::OnMeasure() -{ - this->Measure(); -} - -///////////////////////////////////////////////// -void TapeMeasure::Measure() -{ - this->Reset(); - this->dataPtr->measure = true; - QGuiApplication::setOverrideCursor(Qt::CrossCursor); - - // Notify Scene3D to disable the right click menu while we use it to - // cancel our current measuring action - ignition::gui::events::DropdownMenuEnabled dropdownMenuEnabledEvent(false); - ignition::gui::App()->sendEvent( - ignition::gui::App()->findChild(), - &dropdownMenuEnabledEvent); -} - -///////////////////////////////////////////////// -void TapeMeasure::OnReset() -{ - this->Reset(); -} - -///////////////////////////////////////////////// -void TapeMeasure::Reset() -{ - this->DeleteMarker(this->dataPtr->kStartPointId); - this->DeleteMarker(this->dataPtr->kEndPointId); - this->DeleteMarker(this->dataPtr->kLineId); - - this->dataPtr->currentId = this->dataPtr->kStartPointId; - this->dataPtr->startPoint = ignition::math::Vector3d::Zero; - this->dataPtr->endPoint = ignition::math::Vector3d::Zero; - this->dataPtr->distance = 0.0; - this->dataPtr->measure = false; - this->newDistance(); - QGuiApplication::restoreOverrideCursor(); - - // Notify Scene3D that we are done using the right click, so it can - // re-enable the settings menu - ignition::gui::events::DropdownMenuEnabled dropdownMenuEnabledEvent(true); - ignition::gui::App()->sendEvent( - ignition::gui::App()->findChild(), - &dropdownMenuEnabledEvent); -} - -///////////////////////////////////////////////// -double TapeMeasure::Distance() -{ - return this->dataPtr->distance; -} - -///////////////////////////////////////////////// -void TapeMeasure::DeleteMarker(int _id) -{ - if (this->dataPtr->placedMarkers.find(_id) == - this->dataPtr->placedMarkers.end()) - return; - - // Delete the previously created marker - ignition::msgs::Marker markerMsg; - markerMsg.set_ns(this->dataPtr->ns); - markerMsg.set_id(_id); - markerMsg.set_action(ignition::msgs::Marker::DELETE_MARKER); - this->dataPtr->node.Request("/marker", markerMsg); - this->dataPtr->placedMarkers.erase(_id); -} - -///////////////////////////////////////////////// -void TapeMeasure::DrawPoint(int _id, - ignition::math::Vector3d &_point, ignition::math::Color &_color) -{ - this->DeleteMarker(_id); - - ignition::msgs::Marker markerMsg; - markerMsg.set_ns(this->dataPtr->ns); - markerMsg.set_id(_id); - markerMsg.set_action(ignition::msgs::Marker::ADD_MODIFY); - markerMsg.set_type(ignition::msgs::Marker::SPHERE); - ignition::msgs::Set(markerMsg.mutable_material()->mutable_ambient(), _color); - ignition::msgs::Set(markerMsg.mutable_material()->mutable_diffuse(), _color); - ignition::msgs::Set(markerMsg.mutable_scale(), - ignition::math::Vector3d(0.1, 0.1, 0.1)); - ignition::msgs::Set(markerMsg.mutable_pose(), - ignition::math::Pose3d(_point.X(), _point.Y(), _point.Z(), 0, 0, 0)); - - this->dataPtr->node.Request("/marker", markerMsg); - this->dataPtr->placedMarkers.insert(_id); -} - -///////////////////////////////////////////////// -void TapeMeasure::DrawLine(int _id, ignition::math::Vector3d &_startPoint, - ignition::math::Vector3d &_endPoint, ignition::math::Color &_color) -{ - this->DeleteMarker(_id); - - ignition::msgs::Marker markerMsg; - markerMsg.set_ns(this->dataPtr->ns); - markerMsg.set_id(_id); - markerMsg.set_action(ignition::msgs::Marker::ADD_MODIFY); - markerMsg.set_type(ignition::msgs::Marker::LINE_LIST); - ignition::msgs::Set(markerMsg.mutable_material()->mutable_ambient(), _color); - ignition::msgs::Set(markerMsg.mutable_material()->mutable_diffuse(), _color); - ignition::msgs::Set(markerMsg.add_point(), _startPoint); - ignition::msgs::Set(markerMsg.add_point(), _endPoint); - - this->dataPtr->node.Request("/marker", markerMsg); - this->dataPtr->placedMarkers.insert(_id); -} - -///////////////////////////////////////////////// -bool TapeMeasure::eventFilter(QObject *_obj, QEvent *_event) -{ - if (_event->type() == ignition::gui::events::HoverToScene::kType) - { - auto hoverToSceneEvent = - reinterpret_cast(_event); - - // This event is called in Scene3d's RenderThread, so it's safe to make - // rendering calls here - if (this->dataPtr->measure && hoverToSceneEvent) - { - ignition::math::Vector3d point = hoverToSceneEvent->Point(); - this->DrawPoint(this->dataPtr->currentId, point, - this->dataPtr->hoverColor); - - // If the user is currently choosing the end point, draw the connecting - // line and update the new distance. - if (this->dataPtr->currentId == this->dataPtr->kEndPointId) - { - this->DrawLine(this->dataPtr->kLineId, this->dataPtr->startPoint, - point, this->dataPtr->hoverColor); - this->dataPtr->distance = this->dataPtr->startPoint.Distance(point); - this->newDistance(); - } - } - } - else if (_event->type() == ignition::gui::events::LeftClickToScene::kType) - { - auto leftClickToSceneEvent = - reinterpret_cast(_event); - - // This event is called in Scene3d's RenderThread, so it's safe to make - // rendering calls here - if (this->dataPtr->measure && leftClickToSceneEvent) - { - ignition::math::Vector3d point = leftClickToSceneEvent->Point(); - this->DrawPoint(this->dataPtr->currentId, point, - this->dataPtr->drawColor); - // If the user is placing the start point, update its position - if (this->dataPtr->currentId == this->dataPtr->kStartPointId) - { - this->dataPtr->startPoint = point; - } - // If the user is placing the end point, update the end position, - // end the measurement state, and update the draw line and distance - else - { - this->dataPtr->endPoint = point; - this->dataPtr->measure = false; - this->DrawLine(this->dataPtr->kLineId, this->dataPtr->startPoint, - this->dataPtr->endPoint, this->dataPtr->drawColor); - this->dataPtr->distance = - this->dataPtr->startPoint.Distance(this->dataPtr->endPoint); - this->newDistance(); - QGuiApplication::restoreOverrideCursor(); - - // Notify Scene3D that we are done using the right click, so it can - // re-enable the settings menu - ignition::gui::events::DropdownMenuEnabled - dropdownMenuEnabledEvent(true); - - ignition::gui::App()->sendEvent( - ignition::gui::App()->findChild(), - &dropdownMenuEnabledEvent); - } - this->dataPtr->currentId = this->dataPtr->kEndPointId; - } - } - else if (_event->type() == QEvent::KeyPress) - { - QKeyEvent *keyEvent = static_cast(_event); - if (keyEvent && keyEvent->key() == Qt::Key_M) - { - this->Reset(); - this->Measure(); - } - } - else if (_event->type() == QEvent::KeyRelease) - { - QKeyEvent *keyEvent = static_cast(_event); - if (keyEvent && keyEvent->key() == Qt::Key_Escape && - this->dataPtr->measure) - { - this->Reset(); - } - } - // Cancel the current action if a right click is detected - else if (_event->type() == ignition::gui::events::RightClickToScene::kType) - { - if (this->dataPtr->measure) - { - this->Reset(); - } - } - - return QObject::eventFilter(_obj, _event); -} - -// Register this plugin -IGNITION_ADD_PLUGIN(ignition::gazebo::TapeMeasure, - ignition::gui::Plugin) diff --git a/src/gui/plugins/tape_measure/TapeMeasure.hh b/src/gui/plugins/tape_measure/TapeMeasure.hh deleted file mode 100644 index 0da8719f2b..0000000000 --- a/src/gui/plugins/tape_measure/TapeMeasure.hh +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (C) 2020 Open Source Robotics Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * -*/ -#ifndef IGNITION_GAZEBO_GUI_TAPEMEASURE_HH_ -#define IGNITION_GAZEBO_GUI_TAPEMEASURE_HH_ - -#include - -#include -#include -#include - -namespace ignition -{ -namespace gazebo -{ - class TapeMeasurePrivate; - - /// \brief Provides buttons for the tape measure tool. - class TapeMeasure : public ignition::gui::Plugin - { - Q_OBJECT - - /// \brief Constructor - public: TapeMeasure(); - - /// \brief Destructor - public: ~TapeMeasure() override; - - // Documentation inherited - public: void LoadConfig(const tinyxml2::XMLElement *_pluginElem) override; - - /// \brief Deletes the marker with the provided id within the - /// "tape_measure" namespace. - /// \param[in] _id The id of the marker - public: void DeleteMarker(int _id); - - /// \brief Resets all of the relevant data for this plugin. Called when - /// the user clicks the reset button and when the user starts a new - /// measurement. - public: void Reset(); - - /// \brief Starts a new measurement. Erases any previous measurement in - /// progress or already made. - public: void Measure(); - - /// \brief Draws a point marker. Called to display the start and end - /// point of the tape measure. - /// \param[in] _id The id of the marker - /// \param[in] _point The x, y, z coordinates of where to place the marker - /// \param[in] _color The rgba color to set the marker - public: void DrawPoint(int _id, - ignition::math::Vector3d &_point, - ignition::math::Color &_color); - - /// \brief Draws a line marker. Called to display the line between the - /// start and end point of the tape measure. - /// \param[in] _id The id of the marker - /// \param[in] _startPoint The x, y, z coordinates of the line start point - /// \param[in] _endPoint The x, y, z coordinates of the line end point - /// \param[in] _color The rgba color to set the marker - public: void DrawLine(int _id, - ignition::math::Vector3d &_startPoint, - ignition::math::Vector3d &_endPoint, - ignition::math::Color &_color); - - /// \brief Callback in Qt thread when the new measurement button is - /// clicked. - public slots: void OnMeasure(); - - /// \brief Callback in Qt thread when the reset button is clicked. - public slots: void OnReset(); - - /// \brief Callback in Qt thread to get the distance to display in the - /// gui window. - /// \return The distance between the start and end point of the measurement - public slots: double Distance(); - - // Documentation inherited - protected: bool eventFilter(QObject *_obj, QEvent *_event) override; - - /// \brief Signal fired when a new tape measure distance is set. - signals: void newDistance(); - - /// \internal - /// \brief Pointer to private data. - private: std::unique_ptr dataPtr; - }; -} -} - -#endif diff --git a/src/gui/plugins/tape_measure/TapeMeasure.qml b/src/gui/plugins/tape_measure/TapeMeasure.qml deleted file mode 100644 index 29362bcf09..0000000000 --- a/src/gui/plugins/tape_measure/TapeMeasure.qml +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (C) 2020 Open Source Robotics Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * -*/ -import QtQuick 2.9 -import QtQuick.Window 2.2 -import QtQuick.Controls 2.1 -import QtQuick.Controls.Material 2.2 -import QtQuick.Controls.Material.impl 2.2 -import QtQuick.Layouts 1.3 -import QtQuick.Controls.Styles 1.4 -import "qrc:/qml" - -ToolBar { - id: tapeMeasure - Layout.minimumWidth: 250 - Layout.minimumHeight: 100 - - property var distance: 0.0 - - function updateDistance() { - distance = TapeMeasure.Distance(); - } - - Connections { - target: TapeMeasure - onNewDistance: { - updateDistance(); - } - } - - background: Rectangle { - color: "transparent" - } - - ButtonGroup { - id: group - } - - RowLayout { - spacing: 1 - ToolButton { - id: select - checkable: true - checked: true - ButtonGroup.group: group - ToolTip.text: "Tape Measure Tool" - ToolTip.visible: hovered - ToolTip.delay: Qt.styleHints.mousePressAndHoldInterval - contentItem: Image { - fillMode: Image.Pad - horizontalAlignment: Image.AlignHCenter - verticalAlignment: Image.AlignVCenter - source: "tape_measure.png" - sourceSize.width: 36; - sourceSize.height: 36; - } - onClicked: { - TapeMeasure.OnMeasure(); - } - } - ToolButton { - id: reset - checkable: true - checked: true - ButtonGroup.group: group - ToolTip.text: "Reset measurement" - ToolTip.visible: hovered - ToolTip.delay: Qt.styleHints.mousePressAndHoldInterval - contentItem: Image { - fillMode: Image.Pad - horizontalAlignment: Image.AlignHCenter - verticalAlignment: Image.AlignVCenter - source: "trashcan.png" - sourceSize.width: 36; - sourceSize.height: 36; - } - onClicked: { - TapeMeasure.OnReset(); - } - } - Text { - text: qsTr(" Distance (m): " + distance.toFixed(3)) - font.pointSize: 14 - color: Material.theme == Material.Light ? "#444444" : "#bbbbbb" - } - } -} diff --git a/src/gui/plugins/tape_measure/TapeMeasure.qrc b/src/gui/plugins/tape_measure/TapeMeasure.qrc deleted file mode 100644 index e87212d276..0000000000 --- a/src/gui/plugins/tape_measure/TapeMeasure.qrc +++ /dev/null @@ -1,7 +0,0 @@ - - - TapeMeasure.qml - tape_measure.png - trashcan.png - - diff --git a/src/gui/plugins/tape_measure/tape_measure.png b/src/gui/plugins/tape_measure/tape_measure.png deleted file mode 100644 index 228e5834424302df6434ad80b103cd54358a8baa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8586 zcmch7Wmr_v*Y6o(KvF{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Rkp-wI}3R8>sQ zEf#Pa?ejpnv_pl~Ue1Sr@fQoa_6}wzO<06xHQsUm3bX*?%beQtCY*c8hpNk^z|r5$ zk6th;&1dLYRegj+${mveWEc!IE&3YYr1l@%==F~y9hvrjjEt6jpzjU~>j4ENcXY@c zH*glG9|j-xv!Z-osP=aDbQhR4DF|{{Doa295Y(Ah<3MS9mioAbrqrM!{NxP(t3mSN7#>v@J!2^=0= zM_g2Xe2{lIu6%p(<%^+GodP#ee!Xf%%Ak?yMo^EdiNW5Pg=~p!wozdG1^^waD~5{@ zuVI_=2=3J6z_B1UT2SX+CFd2!v^V|sfa<1_X`%U@#cjfHeb*jV&N{WP3bDrvVi_as7fagmY2ohP;Fjm&#v9ZA z!L=$n(4T%5=u>Q1AFVp7pw*tc(mO3FrCUqYHr*%^gkGf!13;$D*t2FW?qYae!WB;o z9)3#`Y2m)vV^jibe~pQ9V=IMnqLFU~>lAPG(5gd+{^njSZ{=mcTtM9UlG_f-^w_AX zm93caFk?1gw`MQ?nrNiw)BHB@_SMYPHD?~1w=abC*=Wp=v!cE8J3l^{G{J^)n!NoG z08kEci-wOEfdHD<=BW`Z6NW1GvIb^gH~wbFpSc%H`$SHB73ApD4kKrCJj<{Io?3W{aK*$CAOaD7SU>~B6GOrF~XGa$=j~(*i;v+vR*4G1)MLF z%bFH_BoH=QxS?YwGR2|t6ruil$XNgK)2SVz~=wA=dL;A^YAsg-!8&JjDao{&~%(z2weaG z$^SbGK>1(xfAltG_IHVgC7l0h7Ya{Qv*} diff --git a/src/gui/plugins/tape_measure/trashcan.png b/src/gui/plugins/tape_measure/trashcan.png deleted file mode 100644 index 62edd38a51941951e7b9316181314cd45350480b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5374 zcmb_gi9gic_rISpV=Gw)A?A5XvV}+_Om-?fNS0)M6hcE;qD)dmmWq^wo(c&w$etxJ zBWt!~UxtJ%W8eMm^!&cB-yiV%&g(TZ_kQkj&OPUS-sjxU15;yt4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%ZPROdPZK`j59E}L^eXU=U1TF+ Date: Wed, 23 Jun 2021 12:29:05 -0700 Subject: [PATCH 2/2] =?UTF-8?q?Remove=20deprecations:=20tock=20?= =?UTF-8?q?=F0=9F=95=91=20(#875)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Louise Poubel --- examples/scripts/distributed/primary.sh | 9 -- examples/scripts/distributed/secondary.sh | 7 -- .../scripts/distributed_levels/primary.sh | 10 -- .../scripts/distributed_levels/secondary.sh | 7 -- include/ignition/gazebo/ServerConfig.hh | 10 -- include/ignition/gazebo/gui/GuiEvents.hh | 112 ------------------ include/ignition/gazebo/gui/TmpIface.hh | 80 ------------- .../ignition/gazebo/rendering/RenderUtil.hh | 4 - .../ignition/gazebo/rendering/SceneManager.hh | 19 --- src/ServerConfig.cc | 17 --- src/cmd/cmdgazebo.rb.in | 8 +- src/cmd/ign.cc | 2 +- src/gui/CMakeLists.txt | 5 - src/gui/Gui.cc | 30 +---- src/gui/GuiRunner.cc | 3 +- .../ignition/gazebo => src}/gui/GuiRunner.hh | 4 +- src/gui/TmpIface.cc | 102 ---------------- .../JointPositionController_TEST.cc | 9 +- src/gui/plugins/lights/Lights.cc | 1 - src/gui/plugins/modules/EntityContextMenu.cc | 2 +- .../playback_scrubber/PlaybackScrubber.cc | 1 - .../resource_spawner/ResourceSpawner.cc | 10 -- src/gui/plugins/scene3d/Scene3D.cc | 9 -- src/gui/plugins/shapes/Shapes.cc | 9 -- .../transform_control/TransformControl.cc | 11 -- src/network/NetworkConfig.cc | 8 +- src/rendering/RenderUtil.cc | 9 -- src/rendering/SceneManager.cc | 46 ------- 28 files changed, 13 insertions(+), 531 deletions(-) delete mode 100644 include/ignition/gazebo/gui/TmpIface.hh rename {include/ignition/gazebo => src}/gui/GuiRunner.hh (94%) delete mode 100644 src/gui/TmpIface.cc diff --git a/examples/scripts/distributed/primary.sh b/examples/scripts/distributed/primary.sh index 3bcd6d9060..d4c138ac6b 100755 --- a/examples/scripts/distributed/primary.sh +++ b/examples/scripts/distributed/primary.sh @@ -4,12 +4,3 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" ign gazebo -v 4 -z 100000000 --network-role primary --network-secondaries 3 $DIR/primary.sdf -# Ignition Gazebo 1.x.x and 2.x.x support using environment variables to -# configure distributed simulation. This capability is deprecated in -# version 2.x.x, and removed in verion 3.x.x of Inition Gazebo. Please use the -# --network-role and --network-secondaries command line options instead. - -# export IGN_GAZEBO_NETWORK_ROLE="PRIMARY" -# export IGN_GAZEBO_NETWORK_SECONDARIES=3 -# ign-gazebo -v 4 --distributed -f $DIR/primary.sdf - diff --git a/examples/scripts/distributed/secondary.sh b/examples/scripts/distributed/secondary.sh index cb60cf7c61..c3b1587981 100755 --- a/examples/scripts/distributed/secondary.sh +++ b/examples/scripts/distributed/secondary.sh @@ -4,10 +4,3 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" ign gazebo -s -v 4 -z 100000000 --network-role secondary $DIR/secondary.sdf -# Ignition Gazebo 1.x.x and 2.x.x support using environment variables to -# configure distributed simulation. This capability is deprecated in -# version 2.x.x, and removed in verion 3.x.x of Inition Gazebo. Please use the -# --network-role and --network-secondaries command line options instead. - -# export IGN_GAZEBO_NETWORK_ROLE="SECONDARY" -# ign-gazebo -v 4 --distributed -f $DIR/secondary.sdf diff --git a/examples/scripts/distributed_levels/primary.sh b/examples/scripts/distributed_levels/primary.sh index 0b0d231981..e402340b40 100755 --- a/examples/scripts/distributed_levels/primary.sh +++ b/examples/scripts/distributed_levels/primary.sh @@ -5,13 +5,3 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" # --levels is implied by --network-role ign gazebo -v 4 -z 100000000 --network-role primary --network-secondaries 2 $DIR/primary.sdf -# Ignition Gazebo 1.x.x and 2.x.x support using environment variables to -# configure distributed simulation. This capability is deprecated in -# version 2.x.x, and removed in verion 3.x.x of Inition Gazebo. Please use the -# --network-role and --network-secondaries command line options instead. - -# export IGN_GAZEBO_NETWORK_ROLE="PRIMARY" -# export IGN_GAZEBO_NETWORK_SECONDARIES=3 -# ign-gazebo -v 4 --distributed -f $DIR/primary.sdf - - diff --git a/examples/scripts/distributed_levels/secondary.sh b/examples/scripts/distributed_levels/secondary.sh index f1ba79cf3e..fb98c7a19f 100755 --- a/examples/scripts/distributed_levels/secondary.sh +++ b/examples/scripts/distributed_levels/secondary.sh @@ -5,10 +5,3 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" # --levels is implied by --network-role ign gazebo -s -v 4 -z 100000000 --network-role secondary $DIR/secondary.sdf -# Ignition Gazebo 1.x.x and 2.x.x support using environment variables to -# configure distributed simulation. This capability is deprecated in -# version 2.x.x, and removed in verion 3.x.x of Inition Gazebo. Please use the -# --network-role and --network-secondaries command line options instead. - -# export IGN_GAZEBO_NETWORK_ROLE="SECONDARY" -# ign-gazebo -v 4 --distributed -f $DIR/secondary.sdf diff --git a/include/ignition/gazebo/ServerConfig.hh b/include/ignition/gazebo/ServerConfig.hh index 199ccdee35..b0732dfa68 100644 --- a/include/ignition/gazebo/ServerConfig.hh +++ b/include/ignition/gazebo/ServerConfig.hh @@ -244,16 +244,6 @@ namespace ignition /// \param[in] _recordPath Path to place recorded states public: void SetLogRecordPath(const std::string &_recordPath); - /// \brief Get whether to ignore the path specified in SDF. - /// \return Whether to ignore the path specified in SDF - public: bool IGN_DEPRECATED(4) LogIgnoreSdfPath() const; - - /// \brief Set whether to ignore the path specified in SDF. Path in SDF - /// should be ignored if a record path is specified on the command line, - /// for example. - /// \param[in] _ignore Whether to ignore the path specified in SDF - public: void IGN_DEPRECATED(4) SetLogIgnoreSdfPath(bool _ignore); - /// \brief Add a topic to record. /// \param[in] _topic Topic name, which can include wildcards. public: void AddLogRecordTopic(const std::string &_topic); diff --git a/include/ignition/gazebo/gui/GuiEvents.hh b/include/ignition/gazebo/gui/GuiEvents.hh index 20002bd6b1..d206f728e2 100644 --- a/include/ignition/gazebo/gui/GuiEvents.hh +++ b/include/ignition/gazebo/gui/GuiEvents.hh @@ -36,56 +36,6 @@ inline namespace IGNITION_GAZEBO_VERSION_NAMESPACE { /// more information about events. namespace events { - /// \brief The class for sending and receiving custom snap value events. - class IGN_DEPRECATED(5) SnapIntervals : public QEvent - { - /// \brief Constructor - /// \param[in] _xyz XYZ snapping values. - /// \param[in] _rpy RPY snapping values. - /// \param[in] _scale Scale snapping values. - public: SnapIntervals( - const math::Vector3d &_xyz, - const math::Vector3d &_rpy, - const math::Vector3d &_scale) - : QEvent(kType), xyz(_xyz), rpy(_rpy), scale(_scale) - { - } - - /// \brief Get the XYZ snapping values. - /// \return The XYZ snapping values. - public: math::Vector3d XYZ() const - { - return this->xyz; - } - - /// \brief Get the RPY snapping values. - /// \return The RPY snapping values. - public: math::Vector3d RPY() const - { - return this->rpy; - } - - /// \brief Get the scale snapping values. - /// \return The scale snapping values. - public: math::Vector3d Scale() const - { - return this->scale; - } - - /// \brief The QEvent representing a snap event occurrence. - static const QEvent::Type kType = QEvent::Type(QEvent::User); - - /// \brief XYZ snapping values in meters, these values must be positive. - private: math::Vector3d xyz; - - /// \brief RPY snapping values in degrees, these values must be positive. - private: math::Vector3d rpy; - - /// \brief Scale snapping values - a multiplier of the current size, - /// these values must be positive. - private: math::Vector3d scale; - }; - /// \brief Event that notifies when new entities have been selected. class EntitiesSelected : public QEvent { @@ -148,68 +98,6 @@ namespace events /// \brief Whether the event was generated by the user, private: bool fromUser{false}; }; - - /// \brief Event called in the render thread of a 3D scene. - /// It's safe to make rendering calls in this event's callback. - class IGN_DEPRECATED(5) Render : public QEvent - { - public: Render() - : QEvent(kType) - { - } - /// \brief Unique type for this event. - static const QEvent::Type kType = QEvent::Type(QEvent::User + 3); - }; - - /// \brief Event called to spawn a preview model. - /// Used by plugins that spawn models. - class IGN_DEPRECATED(5) SpawnPreviewModel : public QEvent - { - /// \brief Constructor - /// \param[in] _modelSdfString The model's SDF file as a string. - public: explicit SpawnPreviewModel(const std::string &_modelSdfString) - : QEvent(kType), modelSdfString(_modelSdfString) - { - } - - /// \brief Unique type for this event. - static const QEvent::Type kType = QEvent::Type(QEvent::User + 4); - - /// \brief Get the sdf string of the model. - /// \return The model sdf string - public: std::string ModelSdfString() const - { - return this->modelSdfString; - } - - /// \brief The sdf string of the model to be previewed. - std::string modelSdfString; - }; - - /// \brief Event called to spawn a preview resource, which takes the path - /// to the SDF file. Used by plugins that spawn resources. - class IGN_DEPRECATED(5) SpawnPreviewPath : public QEvent - { - /// \brief Constructor - /// \param[in] _filePath The path to an SDF file. - public: explicit SpawnPreviewPath(const std::string &_filePath) - : QEvent(kType), filePath(_filePath) - { - } - - /// \brief Unique type for this event. - static const QEvent::Type kType = QEvent::Type(QEvent::User + 5); - - /// \brief Get the path of the SDF file. - /// \return The file path. - public: std::string FilePath() const - { - return this->filePath; - } - - /// \brief The path of SDF file to be previewed. - std::string filePath; - }; } // namespace events } } // namespace gui diff --git a/include/ignition/gazebo/gui/TmpIface.hh b/include/ignition/gazebo/gui/TmpIface.hh deleted file mode 100644 index c963505a09..0000000000 --- a/include/ignition/gazebo/gui/TmpIface.hh +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (C) 2018 Open Source Robotics Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * -*/ -#ifndef IGNITION_GAZEBO_GUI_TMPIFACE_HH_ -#define IGNITION_GAZEBO_GUI_TMPIFACE_HH_ - -#ifndef Q_MOC_RUN - #include -#endif - -#include -#include - -#include "ignition/gazebo/gui/Export.hh" - -namespace ignition -{ - namespace gazebo - { - /// \brief Temporary place to prototype transport interfaces while it's not - /// clear where they will live. - /// - /// Move API from here to their appropriate locations once that's known. - /// - /// This class should be removed before releasing! - class TmpIface : public QObject - { - Q_OBJECT - - /// \brief Constructor: advertize services and topics - public: IGN_DEPRECATED(5.0) TmpIface(); - - /// \brief Destructor - public: ~TmpIface() override = default; - - /// \brief Callback when user asks to start a new world. - /// This is the client-side logic which requests the server_control - /// service. - public slots: void OnNewWorld(); - - /// \brief Callback when user asks to load a world file. - /// This is the client-side logic which requests the server_control - /// service. - /// \param[in] _path Path to world file. - public slots: void OnLoadWorld(const QString &_path); - - /// \brief Callback when user asks to save a world file providing a path. - /// This is the client-side logic which requests the server_control - /// service. - /// \param[in] _path Path to world file. - public slots: void OnSaveWorldAs(const QString &_path); - - /// \brief Server control service callback - /// This is the server-side logic which provides the world_control - /// service. - /// \param[in] _req Request - /// \param[out] _res Response - /// \return True for success - private: bool OnServerControl(const msgs::ServerControl &_req, - msgs::Boolean &_res); - - /// \brief Communication node - private: transport::Node node; - }; - } -} -#endif diff --git a/include/ignition/gazebo/rendering/RenderUtil.hh b/include/ignition/gazebo/rendering/RenderUtil.hh index de91581ec8..fe60d03bfa 100644 --- a/include/ignition/gazebo/rendering/RenderUtil.hh +++ b/include/ignition/gazebo/rendering/RenderUtil.hh @@ -151,10 +151,6 @@ inline namespace IGNITION_GAZEBO_VERSION_NAMESPACE { /// \param[in] _node Node representing the selected entity public: void SetSelectedEntity(const rendering::NodePtr &_node); - /// \brief Get the entity being selected. This will only return the - /// last entity selected. - public: rendering::NodePtr IGN_DEPRECATED(4) SelectedEntity() const; - /// \brief Get the entities currently selected, in order of selection. /// \return Vector of currently selected entities public: const std::vector &SelectedEntities() const; diff --git a/include/ignition/gazebo/rendering/SceneManager.hh b/include/ignition/gazebo/rendering/SceneManager.hh index 8ff571d1e0..8ec14e44ee 100644 --- a/include/ignition/gazebo/rendering/SceneManager.hh +++ b/include/ignition/gazebo/rendering/SceneManager.hh @@ -216,17 +216,6 @@ inline namespace IGNITION_GAZEBO_VERSION_NAMESPACE { /// \return Pointer to requested entity's skeleton public: common::SkeletonPtr ActorSkeletonById(Entity _id) const; - /// \brief Get the animation of actor mesh given an id - /// Use this function if you are animating the actor manually by its - /// skeleton node pose. - /// \param[in] _id Entity's unique id - /// \param[in] _time Simulation time - /// \return Map from the skeleton node name to transforms - /// \deprecated see ActorSkeletonTransformAt - public: std::map IGN_DEPRECATED(4.0) - ActorMeshAnimationAt( - Entity _id, std::chrono::steady_clock::duration _time) const; - /// \brief Get the skeleton local transforms of actor mesh given an id. /// Use this function if you are animating the actor manually by its /// skeleton node pose. @@ -250,14 +239,6 @@ inline namespace IGNITION_GAZEBO_VERSION_NAMESPACE { /// \param[in] _id Entity's unique id public: void RemoveEntity(Entity _id); - /// \brief Get the entity for a given node. - /// \param[in] _node Node to get the entity for. - /// \return The entity for that node, or `kNullEntity` for no entity. - /// \todo(anyone) Deprecate in favour of - /// `ignition::rendering::Node::UserData` once that's available. - public: Entity IGN_DEPRECATED(4) - EntityFromNode(const rendering::NodePtr &_node) const; - /// \brief Load a geometry /// \param[in] _geom Geometry sdf dom /// \param[out] _scale Geometry scale that will be set based on sdf diff --git a/src/ServerConfig.cc b/src/ServerConfig.cc index 8c051d1914..ba8b2abefe 100644 --- a/src/ServerConfig.cc +++ b/src/ServerConfig.cc @@ -224,7 +224,6 @@ class ignition::gazebo::ServerConfigPrivate useLevels(_cfg->useLevels), useLogRecord(_cfg->useLogRecord), logRecordPath(_cfg->logRecordPath), - logIgnoreSdfPath(_cfg->logIgnoreSdfPath), logPlaybackPath(_cfg->logPlaybackPath), logRecordResources(_cfg->logRecordResources), logRecordCompressPath(_cfg->logRecordCompressPath), @@ -256,10 +255,6 @@ class ignition::gazebo::ServerConfigPrivate /// \brief Path to place recorded states public: std::string logRecordPath = ""; - /// TODO(anyone) Deprecate in public APIs in Ignition-D, remove in Ignition-E - /// \brief Whether log record path is specified from command line - public: bool logIgnoreSdfPath{false}; - /// \brief Path to recorded states to play back using logging system public: std::string logPlaybackPath = ""; @@ -441,18 +436,6 @@ void ServerConfig::SetLogRecordPath(const std::string &_recordPath) this->dataPtr->logRecordPath = _recordPath; } -///////////////////////////////////////////////// -bool ServerConfig::LogIgnoreSdfPath() const -{ - return this->dataPtr->logIgnoreSdfPath; -} - -///////////////////////////////////////////////// -void ServerConfig::SetLogIgnoreSdfPath(bool _ignore) -{ - this->dataPtr->logIgnoreSdfPath = _ignore; -} - ///////////////////////////////////////////////// const std::string ServerConfig::LogPlaybackPath() const { diff --git a/src/cmd/cmdgazebo.rb.in b/src/cmd/cmdgazebo.rb.in index 30f783c6eb..df815dfebf 100755 --- a/src/cmd/cmdgazebo.rb.in +++ b/src/cmd/cmdgazebo.rb.in @@ -158,13 +158,7 @@ COMMANDS = { 'gazebo' => " locate system plugins. \n\n"\ " IGN_GAZEBO_SERVER_CONFIG_PATH Path to server configuration file. \n\n"\ " IGN_GUI_PLUGIN_PATH Colon separated paths used to locate GUI \n"\ - " plugins. \n\n"\ - " IGN_GAZEBO_NETWORK_ROLE Participant role used in a distributed \n"\ - " simulation environment. Role is one of [PRIMARY, SECONDARY]. This is \n"\ - " deprecated in ign-gazebo2. Please use --network-role instead. \n\n"\ - " IGN_GAZEBO_NETWORK_SECONDARIES Number of secondary participants \n"\ - " expected to join a distributed simulation environment. (Primary only) \n"\ - " This is deprecated in ign-gazebo2. Please use --network-role instead. \n" + " plugins. \n"\ } # diff --git a/src/cmd/ign.cc b/src/cmd/ign.cc index ad8f7df4b7..f385112e8d 100644 --- a/src/cmd/ign.cc +++ b/src/cmd/ign.cc @@ -25,9 +25,9 @@ #include #include "ignition/gazebo/config.hh" -#include "ignition/gazebo/gui/GuiRunner.hh" #include "ignition/gazebo/Server.hh" #include "ignition/gazebo/ServerConfig.hh" +#include "gui/GuiRunner.hh" #include "ign.hh" ////////////////////////////////////////////////// diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index 9895753439..fa9d276b0f 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -4,7 +4,6 @@ set (gui_sources GuiFileHandler.cc GuiRunner.cc PathManager.cc - TmpIface.cc ) set (gtest_sources @@ -25,10 +24,6 @@ set(CMAKE_AUTORCC ON) # no need to add entries for Qt header files in `src/gui/`. qt5_wrap_cpp(gui_sources ${PROJECT_SOURCE_DIR}/include/ignition/gazebo/gui/GuiSystem.hh - # TODO (anyone) Remove when GuiRunner.hh is moved to `src` - ${PROJECT_SOURCE_DIR}/include/ignition/gazebo/gui/GuiRunner.hh - # TODO (anyone) Remove in v6 - ${PROJECT_SOURCE_DIR}/include/ignition/gazebo/gui/TmpIface.hh ) if (MSVC) diff --git a/src/gui/Gui.cc b/src/gui/Gui.cc index 58056f40cf..039b7a70c8 100644 --- a/src/gui/Gui.cc +++ b/src/gui/Gui.cc @@ -24,11 +24,11 @@ #include #include "ignition/gazebo/config.hh" -#include "ignition/gazebo/gui/GuiRunner.hh" - #include "ignition/gazebo/gui/Gui.hh" + #include "AboutDialogHandler.hh" #include "GuiFileHandler.hh" +#include "GuiRunner.hh" #include "PathManager.hh" namespace ignition @@ -169,20 +169,7 @@ std::unique_ptr createGui( // TODO(anyone) Most of ign-gazebo's transport API includes the world name, // which makes it complicated to mix configurations across worlds. // We could have a way to use world-agnostic topics like Gazebo-classic's ~ - // Remove warning suppression in v6 -#ifndef _WIN32 -# pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wdeprecated-declarations" -#else -# pragma warning(push) -# pragma warning(disable: 4996) -#endif auto runner = new ignition::gazebo::GuiRunner(worldsMsg.data(0)); -#ifndef _WIN32 -# pragma GCC diagnostic pop -#else -# pragma warning(pop) -#endif runner->connect(app.get(), &ignition::gui::Application::PluginAdded, runner, &ignition::gazebo::GuiRunner::OnPluginAdded); ++runnerCount; @@ -233,20 +220,7 @@ std::unique_ptr createGui( } // GUI runner - // Remove warning suppression in v6 -#ifndef _WIN32 -# pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wdeprecated-declarations" -#else -# pragma warning(push) -# pragma warning(disable: 4996) -#endif auto runner = new ignition::gazebo::GuiRunner(worldName); -#ifndef _WIN32 -# pragma GCC diagnostic pop -#else -# pragma warning(pop) -#endif runner->connect(app.get(), &ignition::gui::Application::PluginAdded, runner, &ignition::gazebo::GuiRunner::OnPluginAdded); runner->setParent(ignition::gui::App()); diff --git a/src/gui/GuiRunner.cc b/src/gui/GuiRunner.cc index d06032fa22..4db70b7774 100644 --- a/src/gui/GuiRunner.cc +++ b/src/gui/GuiRunner.cc @@ -26,9 +26,10 @@ #include "ignition/gazebo/components/components.hh" #include "ignition/gazebo/Conversions.hh" #include "ignition/gazebo/EntityComponentManager.hh" -#include "ignition/gazebo/gui/GuiRunner.hh" #include "ignition/gazebo/gui/GuiSystem.hh" +#include "GuiRunner.hh" + using namespace ignition; using namespace gazebo; diff --git a/include/ignition/gazebo/gui/GuiRunner.hh b/src/gui/GuiRunner.hh similarity index 94% rename from include/ignition/gazebo/gui/GuiRunner.hh rename to src/gui/GuiRunner.hh index e64b4e83fb..1a0e02ca71 100644 --- a/include/ignition/gazebo/gui/GuiRunner.hh +++ b/src/gui/GuiRunner.hh @@ -43,9 +43,7 @@ class IGNITION_GAZEBO_GUI_VISIBLE GuiRunner : public QObject /// \brief Constructor /// \param[in] _worldName World name. - /// \todo Move to src/gui on v6. - public: explicit IGN_DEPRECATED(5.0) GuiRunner( - const std::string &_worldName); + public: explicit GuiRunner(const std::string &_worldName); /// \brief Destructor public: ~GuiRunner() override; diff --git a/src/gui/TmpIface.cc b/src/gui/TmpIface.cc deleted file mode 100644 index e945569510..0000000000 --- a/src/gui/TmpIface.cc +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (C) 2018 Open Source Robotics Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * -*/ - -#include - -#include "ignition/gazebo/gui/TmpIface.hh" - -using namespace ignition; -using namespace gazebo; - -///////////////////////////////////////////////// -TmpIface::TmpIface() -{ - // Server control - this->node.Advertise("/server_control", - &TmpIface::OnServerControl, this); -} - -///////////////////////////////////////////////// -bool TmpIface::OnServerControl(const msgs::ServerControl &_req, - msgs::Boolean &_res) -{ - igndbg << "OnServerControl: request" << std::endl; - igndbg << _req.DebugString() << std::endl; - - _res.set_data(true); - - igndbg << "OnServerControl: response" << std::endl; - igndbg << _res.DebugString() << std::endl; - - return true; -} - -///////////////////////////////////////////////// -void TmpIface::OnNewWorld() -{ - std::function cb = - [](const ignition::msgs::Boolean &_res, const bool _result) - { - igndbg << "NewWorld callback: result: " << _result << std::endl; - igndbg << "NewWorld callback: response: " << _res.DebugString() - << std::endl; - }; - - msgs::ServerControl req; - req.set_new_world(true); - this->node.Request("/server_control", req, cb); -} - -///////////////////////////////////////////////// -void TmpIface::OnLoadWorld(const QString &_path) -{ - auto localPath = QUrl(_path).toLocalFile(); - if (localPath.isEmpty()) - localPath = _path; - - std::function cb = - [](const ignition::msgs::Boolean &_res, const bool _result) - { - igndbg << "LoadWorld callback: result: " << _result << std::endl; - igndbg << "LoadWorld callback: response: " << _res.DebugString() - << std::endl; - }; - - msgs::ServerControl req; - req.set_open_filename(localPath.toStdString()); - this->node.Request("/server_control", req, cb); -} - -///////////////////////////////////////////////// -void TmpIface::OnSaveWorldAs(const QString &_path) -{ - auto localPath = QUrl(_path).toLocalFile(); - if (localPath.isEmpty()) - localPath = _path; - - std::function cb = - [](const ignition::msgs::Boolean &_res, const bool _result) - { - igndbg << "SaveWorldAs callback: result: " << _result << std::endl; - igndbg << "SaveWorldAs callback: response: " << _res.DebugString() - << std::endl; - }; - - msgs::ServerControl req; - req.set_save_filename(localPath.toStdString()); - this->node.Request("/server_control", req, cb); -} diff --git a/src/gui/plugins/joint_position_controller/JointPositionController_TEST.cc b/src/gui/plugins/joint_position_controller/JointPositionController_TEST.cc index 66ceb93015..0d147f0d49 100644 --- a/src/gui/plugins/joint_position_controller/JointPositionController_TEST.cc +++ b/src/gui/plugins/joint_position_controller/JointPositionController_TEST.cc @@ -29,7 +29,6 @@ #include #include #include -#include #include "ignition/gazebo/components/Joint.hh" #include "ignition/gazebo/components/JointAxis.hh" @@ -38,10 +37,10 @@ #include "ignition/gazebo/components/Model.hh" #include "ignition/gazebo/components/Name.hh" #include "ignition/gazebo/components/ParentEntity.hh" -#include "ignition/gazebo/gui/GuiRunner.hh" #include "ignition/gazebo/EntityComponentManager.hh" #include "ignition/gazebo/test_config.hh" +#include "../../GuiRunner.hh" #include "JointPositionController.hh" int g_argc = 1; @@ -68,10 +67,7 @@ TEST_F(JointPositionControllerGui, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Load)) app->AddPluginPath(std::string(PROJECT_BINARY_PATH) + "/lib"); // Create GUI runner to handle gazebo::gui plugins - // TODO(anyone) Remove deprecation guard once GuiRunner becomes private - IGN_UTILS_WARN_IGNORE__DEPRECATED_DECLARATION auto runner = new gazebo::GuiRunner("test"); - IGN_UTILS_WARN_RESUME__DEPRECATED_DECLARATION runner->connect(app.get(), &gui::Application::PluginAdded, runner, &gazebo::GuiRunner::OnPluginAdded); runner->setParent(gui::App()); @@ -146,10 +142,7 @@ TEST_F(JointPositionControllerGui, app->AddPluginPath(std::string(PROJECT_BINARY_PATH) + "/lib"); // Create GUI runner to handle gazebo::gui plugins - // TODO(anyone) Remove deprecation guard once GuiRunner becomes private - IGN_UTILS_WARN_IGNORE__DEPRECATED_DECLARATION auto runner = new gazebo::GuiRunner("test"); - IGN_UTILS_WARN_RESUME__DEPRECATED_DECLARATION runner->connect(app.get(), &gui::Application::PluginAdded, runner, &gazebo::GuiRunner::OnPluginAdded); runner->setParent(gui::App()); diff --git a/src/gui/plugins/lights/Lights.cc b/src/gui/plugins/lights/Lights.cc index 0d5ee22949..929c773328 100644 --- a/src/gui/plugins/lights/Lights.cc +++ b/src/gui/plugins/lights/Lights.cc @@ -33,7 +33,6 @@ #include #include "ignition/gazebo/EntityComponentManager.hh" -#include "ignition/gazebo/gui/GuiEvents.hh" namespace ignition::gazebo { diff --git a/src/gui/plugins/modules/EntityContextMenu.cc b/src/gui/plugins/modules/EntityContextMenu.cc index c4f716f22e..911093eaa8 100644 --- a/src/gui/plugins/modules/EntityContextMenu.cc +++ b/src/gui/plugins/modules/EntityContextMenu.cc @@ -15,6 +15,7 @@ * */ +#include "../../GuiRunner.hh" #include "EntityContextMenu.hh" #include @@ -25,7 +26,6 @@ #include #include -#include #include #include #include diff --git a/src/gui/plugins/playback_scrubber/PlaybackScrubber.cc b/src/gui/plugins/playback_scrubber/PlaybackScrubber.cc index 5edadd3145..6a22b2c096 100644 --- a/src/gui/plugins/playback_scrubber/PlaybackScrubber.cc +++ b/src/gui/plugins/playback_scrubber/PlaybackScrubber.cc @@ -40,7 +40,6 @@ #include "ignition/gazebo/components/World.hh" #include "ignition/gazebo/components/Name.hh" #include "ignition/gazebo/EntityComponentManager.hh" -#include "ignition/gazebo/gui/GuiEvents.hh" namespace ignition::gazebo { diff --git a/src/gui/plugins/resource_spawner/ResourceSpawner.cc b/src/gui/plugins/resource_spawner/ResourceSpawner.cc index bae4adaa3d..7616d18a6e 100644 --- a/src/gui/plugins/resource_spawner/ResourceSpawner.cc +++ b/src/gui/plugins/resource_spawner/ResourceSpawner.cc @@ -36,12 +36,10 @@ #include #include #include -#include #include #include #include "ignition/gazebo/EntityComponentManager.hh" -#include "ignition/gazebo/gui/GuiEvents.hh" namespace ignition::gazebo { @@ -632,14 +630,6 @@ void ResourceSpawner::OnResourceSpawn(const QString &_sdfPath) ignition::gui::App()->sendEvent( ignition::gui::App()->findChild(), &event); - - IGN_UTILS_WARN_IGNORE__DEPRECATED_DECLARATION - ignition::gazebo::gui::events::SpawnPreviewPath oldEvent( - _sdfPath.toStdString()); - ignition::gui::App()->sendEvent( - ignition::gui::App()->findChild(), - &oldEvent); - IGN_UTILS_WARN_RESUME__DEPRECATED_DECLARATION } // Register this plugin diff --git a/src/gui/plugins/scene3d/Scene3D.cc b/src/gui/plugins/scene3d/Scene3D.cc index f0c904f47f..e8912046b1 100644 --- a/src/gui/plugins/scene3d/Scene3D.cc +++ b/src/gui/plugins/scene3d/Scene3D.cc @@ -57,8 +57,6 @@ #include -#include - #include #include #include @@ -891,13 +889,6 @@ void IgnRenderer::Render() ignition::gui::App()->sendEvent( ignition::gui::App()->findChild(), &event); - - IGN_UTILS_WARN_IGNORE__DEPRECATED_DECLARATION - ignition::gazebo::gui::events::Render oldEvent; - ignition::gui::App()->sendEvent( - ignition::gui::App()->findChild(), - &oldEvent); - IGN_UTILS_WARN_RESUME__DEPRECATED_DECLARATION } // only has an effect in video recording lockstep mode diff --git a/src/gui/plugins/shapes/Shapes.cc b/src/gui/plugins/shapes/Shapes.cc index 1012f77924..e4d524d997 100644 --- a/src/gui/plugins/shapes/Shapes.cc +++ b/src/gui/plugins/shapes/Shapes.cc @@ -31,10 +31,8 @@ #include #include #include -#include #include "ignition/gazebo/EntityComponentManager.hh" -#include "ignition/gazebo/gui/GuiEvents.hh" namespace ignition::gazebo { @@ -282,13 +280,6 @@ void Shapes::OnMode(const QString &_mode) ignition::gui::App()->sendEvent( ignition::gui::App()->findChild(), &event); - - IGN_UTILS_WARN_IGNORE__DEPRECATED_DECLARATION - ignition::gazebo::gui::events::SpawnPreviewModel oldEvent(modelSdfString); - ignition::gui::App()->sendEvent( - ignition::gui::App()->findChild(), - &oldEvent); - IGN_UTILS_WARN_RESUME__DEPRECATED_DECLARATION } // Register this plugin diff --git a/src/gui/plugins/transform_control/TransformControl.cc b/src/gui/plugins/transform_control/TransformControl.cc index f27e1d0719..656743721c 100644 --- a/src/gui/plugins/transform_control/TransformControl.cc +++ b/src/gui/plugins/transform_control/TransformControl.cc @@ -37,7 +37,6 @@ #include #include #include -#include #include "ignition/gazebo/components/Name.hh" #include "ignition/gazebo/components/ParentEntity.hh" @@ -119,16 +118,6 @@ void TransformControl::OnSnapUpdate( ignition::gui::App()->sendEvent( ignition::gui::App()->findChild(), &event); - IGN_UTILS_WARN_IGNORE__DEPRECATED_DECLARATION - ignition::gui::events::SnapIntervals oldEvent( - this->dataPtr->xyzSnapVals, - this->dataPtr->rpySnapVals, - this->dataPtr->scaleSnapVals); - ignition::gui::App()->sendEvent( - ignition::gui::App()->findChild(), - &oldEvent); - IGN_UTILS_WARN_RESUME__DEPRECATED_DECLARATION - this->newSnapValues(); } diff --git a/src/network/NetworkConfig.cc b/src/network/NetworkConfig.cc index c8e68e5369..9a51e5ca30 100644 --- a/src/network/NetworkConfig.cc +++ b/src/network/NetworkConfig.cc @@ -50,14 +50,14 @@ NetworkConfig NetworkConfig::FromValues(const std::string &_role, else { config.role = NetworkRole::None; - ignwarn << "Invalid setting for IGN_GAZEBO_NETWORK_ROLE: " << role + ignwarn << "Invalid setting for network role: " << role << "(expected: PRIMARY, SECONDARY, READONLY)" << ", distributed sim disabled" << std::endl; } } else { - ignwarn << "IGN_GAZEBO_NETWORK_ROLE not set" + ignwarn << "Network role not set" << ", distributed sim disabled" << std::endl; } @@ -68,8 +68,8 @@ NetworkConfig NetworkConfig::FromValues(const std::string &_role, if (config.numSecondariesExpected == 0) { config.role = NetworkRole::None; - ignwarn << "Detected IGN_GAZEBO_NETWORK_ROLE=PRIMARY, but " - << "IGN_GAZEBO_NETWORK_SECONDARIES not set, " + ignwarn << "Detected network role as PRIMARY, but " + << "network secondaries not set, " << "no distributed sim available" << std::endl; } } diff --git a/src/rendering/RenderUtil.cc b/src/rendering/RenderUtil.cc index 1213a6febe..837540ebb8 100644 --- a/src/rendering/RenderUtil.cc +++ b/src/rendering/RenderUtil.cc @@ -2147,15 +2147,6 @@ void RenderUtil::DeselectAllEntities() this->dataPtr->originalEmissive.clear(); } -///////////////////////////////////////////////// -rendering::NodePtr RenderUtil::SelectedEntity() const -{ - // Return most recently selected node - auto node = this->dataPtr->sceneManager.NodeById( - this->dataPtr->selectedEntities.back()); - return node; -} - ///////////////////////////////////////////////// const std::vector &RenderUtil::SelectedEntities() const { diff --git a/src/rendering/SceneManager.cc b/src/rendering/SceneManager.cc index e802951738..a5d3503e57 100644 --- a/src/rendering/SceneManager.cc +++ b/src/rendering/SceneManager.cc @@ -1496,13 +1496,6 @@ AnimationUpdateData SceneManager::ActorAnimationAt( return animData; } -///////////////////////////////////////////////// -std::map SceneManager::ActorMeshAnimationAt( - Entity _id, std::chrono::steady_clock::duration _time) const -{ - return this->ActorSkeletonTransformsAt(_id, _time); -} - ///////////////////////////////////////////////// std::map SceneManager::ActorSkeletonTransformsAt( Entity _id, std::chrono::steady_clock::duration _time) const @@ -1666,45 +1659,6 @@ rendering::NodePtr SceneManager::TopLevelNode( return node; } -///////////////////////////////////////////////// -Entity SceneManager::EntityFromNode(const rendering::NodePtr &_node) const -{ - // TODO(anyone) On Dome, set entity ID into node with SetUserData - auto visual = std::dynamic_pointer_cast(_node); - if (visual) - { - auto found = std::find_if(std::begin(this->dataPtr->visuals), - std::end(this->dataPtr->visuals), - [&](const std::pair &_item) - { - return _item.second == visual; - }); - - if (found != this->dataPtr->visuals.end()) - { - return found->first; - } - } - - auto light = std::dynamic_pointer_cast(_node); - if (light) - { - auto found = std::find_if(std::begin(this->dataPtr->lights), - std::end(this->dataPtr->lights), - [&](const std::pair &_item) - { - return _item.second == light; - }); - - if (found != this->dataPtr->lights.end()) - { - return found->first; - } - } - - return kNullEntity; -} - ///////////////////////////////////////////////// AnimationUpdateData SceneManagerPrivate::ActorTrajectoryAt( Entity _id,