Skip to content

Commit

Permalink
6 ➡️ 7 (main)
Browse files Browse the repository at this point in the history
Signed-off-by: Louise Poubel <louise@openrobotics.org>
  • Loading branch information
chapulina committed Aug 2, 2022
2 parents 17c7302 + 011624a commit b64dc8c
Show file tree
Hide file tree
Showing 44 changed files with 2,377 additions and 818 deletions.
72 changes: 72 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
---
name: Bug report
about: Report a bug
labels: bug
---

<!-- If you're not sure whether your problem is a bug, please ask a question at
http://answers.gazebosim.org instead.-->

## Environment
* OS Version: <!-- e.g, Ubuntu 20.04 -->
* Source or binary build?
<!-- If binary, which version? -->
<!-- If source, which branch and what is the latest commit? -->
* If this is a GUI or sensor rendering bug, describe your GPU and rendering system. Otherwise delete this section. <!-- If you do not know some values, leave them out. But please, at least give a try to finding them - they are really helpful when debugging rendering errors. -->
- Rendering plugin: [ogre | ogre2]. <!-- You can find it in the logs of Gazebo it outputs to console when you launch it with `-v 3` or `-v 4` argument. -->
- [ ] Sensor rendering error. <!-- Search for message like "[Msg] Loading plugin [gz-rendering-ogre]" (not starting with "[GUI]"). -->
- [ ] GUI rendering error. <!-- Search for message like "[GUI] [Msg] Loading plugin [gz-rendering-ogre2] -->
- EGL headless mode:
- [ ] Running in EGL headless mode <!-- only available since Fortress, GPU display is specified as /dev/dri/card* instead of :0 -->
- Generally, mention all circumstances that might affect rendering capabilities: <!-- remove lines that do not apply to keep the list short -->
- [ ] running on a dual GPU machine (integrated GPU + discrete GPU)
- [ ] running on a multi-GPU machine (it has multiple discrete GPUs)
- [ ] running on real hardware
- [ ] running in virtual machine
- [ ] running in Docker/Singularity
- [ ] running remotely (e.g. via SSH)
- [ ] running in a cloud
- [ ] using VirtualGL, XVFB, Xdummy, XVNC or other indirect rendering utilities
- [ ] GPU is concurrently used for other tasks
- [ ] desktop acceleration
- [ ] video decoding (i.e. a playing Youtube video)
- [ ] video encoding
- [ ] CUDA/ROCm computations (Tensorflow, Torch, Caffe running)
- [ ] multiple simulators running at the same time
- [ ] other...
- Rendering system info:
- On Linux, provide the outputs of the following commands:
```bash
LANG=C lspci -nn | grep VGA # might require installing pciutils
echo "$DISPLAY"
LANG=C glxinfo -B | grep -i '\(direct rendering\|opengl\|profile\)' # might require installing mesa-utils package
ps aux | grep Xorg
sudo env LANG=C X -version # if you don't have root access, try to tell the version of Xorg e.g. via package manager
```
- On Windows, run `dxdiag` and report the GPU-related information.
- On Mac OS, open a terminal and type `system_profiler SPDisplaysDataType`. Copy the output here.
<!-- Please note that GUI rendering is not supported on macOS. -->
- [ ] Please, attach the ogre.log or ogre2.log file from `~/.gz/rendering` <!-- Choose the relevant version based on what you checked in the "Rendering plugin" question. -->

<details>

```
# paste log here
```
</details>
## Description
* Expected behavior: <!-- Tell us what you expected to happen -->
* Actual behavior: <!-- What happened instead -->
## Steps to reproduce
<!-- Provide steps so we can try to reproduce this issue -->
1.
2.
3.
## Output
<!-- Provide screenshots, console logs, backtraces, and/or anything that could
be useful to us resolving this issue -->
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Feature request
about: Request a new feature
labels: enhancement
---

<!-- If you're not sure on the specifics of the feature or would like a broader
discussion, please consider posting a proposal to
http://community.gazebosim.org/ instead.-->

## Desired behavior
<!-- Describe the current problem and the feature you want implemented.-->

## Alternatives considered
<!-- Describe alternate solutions or features you've considered.-->

## Implementation suggestion
<!-- Provide a suggestion on how to implement this feature, which could help us
expedite this implementation.-->

## Additional context
<!-- Provide any other additional context (e.g., screenshots) about your feature
request.-->
2 changes: 1 addition & 1 deletion .github/ci/after_make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export GZ_CONFIG_PATH=/usr/local/share/gz
export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH

# For rendering / window tests
Xvfb :1 -screen 0 1280x1024x24 &
Xvfb :1 -ac -noreset -core -screen 0 1280x1024x24 &
export DISPLAY=:1.0
export RENDER_ENGINE_VALUES=ogre2
export MESA_GL_VERSION_OVERRIDE=3.3
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ set(GZ_MSGS_VER ${gz-msgs9_VERSION_MAJOR})
#--------------------------------------
# Find if gz command is available
find_program(HAVE_GZ_TOOLS gz)
set(GZ_TOOLS_VER 2)

#--------------------------------------
# Find QT
Expand Down
76 changes: 76 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,82 @@

## Gazebo GUI 3

### Gazebo GUI 3.11.0 (2022-08-02)

1. Dialog read attribute fixes
* [Pull request #450](https://github.com/gazebosim/gz-gui/pull/450)
* [Pull request #442](https://github.com/gazebosim/gz-gui/pull/442)

1. Fixed topic echo test
* [Pull request #448](https://github.com/gazebosim/gz-gui/pull/448)

1. Teleop: Refactor and support vertical
* [Pull request #440](https://github.com/gazebosim/gz-gui/pull/440)

1. Change `IGN_DESIGNATION` to `GZ_DESIGNATION`
* [Pull request #437](https://github.com/gazebosim/gz-gui/pull/437)

1. Ignition -> Gazebo
* [Pull request #435](https://github.com/gazebosim/gz-gui/pull/435)

### Gazebo GUI 3.10.0 (2022-07-13)

1. Add common widget for vector3
* [Pull request #427](https://github.com/gazebosim/gz-gui/pull/427)

1. Allow Dialogs to have a MainWindow independent config
* [Pull request #418](https://github.com/gazebosim/gz-gui/pull/418)

1. Add common widget for pose
* [Pull request #424](https://github.com/gazebosim/gz-gui/pull/424)
* [Pull request #431](https://github.com/gazebosim/gz-gui/pull/431)

1. Example running a dialog before the main window
* [Pull request #407](https://github.com/gazebosim/gz-gui/pull/407)

1. Common widget GzColor
* [Pull request #410](https://github.com/gazebosim/gz-gui/pull/410)

1. Fix ign_TEST
* [Pull request #420](https://github.com/gazebosim/gz-gui/pull/420)

1. Make display tests more robust
* [Pull request #419](https://github.com/gazebosim/gz-gui/pull/419)

1. Bash completion for flags
* [Pull request #392](https://github.com/gazebosim/gz-gui/pull/392)

1. Disable failing test on Citadel
* [Pull request #416](https://github.com/gazebosim/gz-gui/pull/416)

1. Search menu keyboard control
* [Pull request #403](https://github.com/gazebosim/gz-gui/pull/403)
* [Pull request #405](https://github.com/gazebosim/gz-gui/pull/405)

1. Add config relative path environment variable
* [Pull request #386](https://github.com/gazebosim/gz-gui/pull/386)

1. Sort plugin list in alphabetical order (including when filtering)
* [Pull request #387](https://github.com/gazebosim/gz-gui/pull/387)

1. Added array to snackbar qml
* [Pull request #370](https://github.com/gazebosim/gz-gui/pull/370)

1. Fix some Qt warnings
* [Pull request #376](https://github.com/gazebosim/gz-gui/pull/376)

1. Added Snackbar qtquick object
* [Pull request #369](https://github.com/gazebosim/gz-gui/pull/369)

1. Fix menu scrolling when a new plugin is added
* [Pull request #368](https://github.com/gazebosim/gz-gui/pull/368)

1. Improve KeyPublisher's usability
* [Pull request #362](https://github.com/gazebosim/gz-gui/pull/362)

1. Backport GridConfig improvements to Citadel's Grid3D
* [Pull request #363](https://github.com/gazebosim/gz-gui/pull/363)

### Gazebo GUI 3.9.0 (2022-01-14)

1. Added a button that allows shutting down both the client and server.
Expand Down
4 changes: 4 additions & 0 deletions Migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ release will remove the deprecated code.
Use `gz::msgs::Convert` to `std::chrono::steady_clock::time_point`
instead.

## Gazebo GUI 3.10 to 3.11

* `Dialog::ReadConfigAttribute` doesn't create a missing file anymore.

## Gazebo GUI 3.6 to 3.7

* The `Application::PluginAdded` signal used to send empty strings. Now it
Expand Down
25 changes: 25 additions & 0 deletions examples/standalone/start_dialog/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)

project(gz-gui-start-dialog)

if(POLICY CMP0100)
cmake_policy(SET CMP0100 NEW)
endif()

set(CMAKE_AUTOMOC ON)

find_package(gz-gui7 REQUIRED)
set(GZ_GUI_VER ${gz-gui7_VERSION_MAJOR})

set(EXEC_NAME "start_dialog")

QT5_ADD_RESOURCES(resources_RCC ${EXEC_NAME}.qrc)

add_executable(${EXEC_NAME}
${EXEC_NAME}.cc
${resources_RCC}
)
target_link_libraries(${EXEC_NAME}
gz-gui${GZ_GUI_VER}::gz-gui${GZ_GUI_VER}
)

16 changes: 16 additions & 0 deletions examples/standalone/start_dialog/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Example for how to run a start dialog before the main window.

## Build

cd <this directory>
mkdir build
cd build
cmake ..
make

## Run

cd <this directory>/build
./start_dialog

First the dialog shows up, and after that's closed, the main window shows up.
90 changes: 90 additions & 0 deletions examples/standalone/start_dialog/start_dialog.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
/*
* Copyright (C) 2022 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 <iostream>

#include <gz/gui/qt.h>
#include <gz/gui/Application.hh>
#include <gz/gui/Dialog.hh>
#include <gz/gui/MainWindow.hh>

//////////////////////////////////////////////////
int main(int _argc, char **_argv)
{
// Increase verboosity so we see all messages
gz::common::Console::SetVerbosity(4);

// Create app
gz::gui::Application app(_argc, _argv, gz::gui::WindowType::kDialog);

gzdbg << "Open dialog" << std::endl;

// Add and display a dialog
auto dialog = new gz::gui::Dialog();
dialog->QuickWindow();

std::string qmlFile(":start_dialog/start_dialog.qml");
if (!QFile(QString::fromStdString(qmlFile)).exists())
{
gzerr << "Can't find [" << qmlFile
<< "]. Are you sure it was added to the .qrc file?" << std::endl;
return -1;
}

QQmlComponent dialogComponent(gz::gui::App()->Engine(),
QString(QString::fromStdString(qmlFile)));
if (dialogComponent.isError())
{
std::stringstream errors;
errors << "Failed to instantiate QML file [" << qmlFile << "]."
<< std::endl;
for (auto error : dialogComponent.errors())
{
errors << "* " << error.toString().toStdString() << std::endl;
}
gzerr << errors.str();
return -1;
}

auto dialogItem = qobject_cast<QQuickItem *>(dialogComponent.create());
if (!dialogItem)
{
gzerr << "Failed to instantiate QML file [" << qmlFile << "]." << std::endl
<< "Are you sure the file is valid QML? "
<< "You can check with the `qmlscene` tool" << std::endl;
return -1;
}

dialogItem->setParentItem(dialog->RootItem());

// Execute start dialog
app.exec();

// After dialog is shut, display the main window
gzdbg << "Dialog closed, open main window" << std::endl;

// Create main window
app.CreateMainWindow();

// Run main window
app.exec();

gzdbg << "Main window closed" << std::endl;

return 0;
}

26 changes: 26 additions & 0 deletions examples/standalone/start_dialog/start_dialog.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Copyright (C) 2022 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.0
import QtQuick.Controls 2.0
Rectangle {
color: "green"
anchors.fill: parent
Text {
text: qsTr("Start\ndialog!")
font.pointSize: 30
}
}
5 changes: 5 additions & 0 deletions examples/standalone/start_dialog/start_dialog.qrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource prefix="start_dialog/">
<file>start_dialog.qml</file>
</qresource>
</RCC>
8 changes: 7 additions & 1 deletion include/gz/gui/Application.hh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ namespace gz
/// plugins
kMainWindow = 0,

/// \brief One independent dialog per plugin
/// \brief One independent dialog per plugin. Also useful to open a
/// startup dialog before the main window.
kDialog = 1
};

Expand Down Expand Up @@ -169,6 +170,11 @@ namespace gz
/// \brief Callback when user requests to close a plugin
public slots: void OnPluginClose();

/// \brief Create a main window. Just calls InitializeMainWindow.
/// \return True if successful
/// \sa InitializeMainWindow
public: bool CreateMainWindow();

/// \brief Create a main window, populate with previously loaded plugins
/// and apply previously loaded configuration.
/// An empty window will be created if no plugins have been loaded.
Expand Down
Loading

0 comments on commit b64dc8c

Please sign in to comment.