Skip to content

Commit

Permalink
Merge 8 into main
Browse files Browse the repository at this point in the history
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
  • Loading branch information
azeey committed Jul 31, 2024
2 parents 12b4dd0 + b26f652 commit fc8a366
Show file tree
Hide file tree
Showing 31 changed files with 979 additions and 113 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ labels: bug
---

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

## Environment
* OS Version: <!-- e.g, Ubuntu 20.04 -->
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ 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.-->
https://robotics.stackexchange.com instead.-->

## Desired behavior
<!-- Describe the current problem and the feature you want implemented.-->
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
name: Ubuntu CI

on: [push, pull_request]
on:
pull_request:
push:
branches:
- 'ign-gui[0-9]'
- 'gz-gui[0-9]?'
- 'main'

jobs:
jammy-ci:
runs-on: ubuntu-latest
name: Ubuntu Jammy CI
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Compile and test
id: ci
uses: gazebo-tooling/action-gz-ci@jammy
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/package_xml.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Validate package.xml

on:
pull_request:

jobs:
package-xml:
runs-on: ubuntu-latest
name: Validate package.xml
steps:
- uses: gazebo-tooling/action-gz-ci/validate_package_xml@jammy
43 changes: 43 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,49 @@

## Gazebo GUI 8

### Gazebo GUI 8.3.0 (2024-06-20)

1. Backport: Adding cone primitives.
* [Pull request #621](https://github.com/gazebosim/gz-gui/pull/621)

### Gazebo GUI 8.2.0 (2024-06-14)

1. Enhanced tracking camera and user visualization experience
* [Pull request #619](https://github.com/gazebosim/gz-gui/pull/619)

1. Add package.xml
* [Pull request #613](https://github.com/gazebosim/gz-gui/pull/613)

### Gazebo GUI 8.1.1 (2024-04-10)

1. Fix compiler warnings in GCC-13 (Noble)
* [Pull request #616](https://github.com/gazebosim/gz-gui/pull/616)

1. Use relative install paths for plugin shared libraries and gz-tools data
* [Pull request #614](https://github.com/gazebosim/gz-gui/pull/614)

### Gazebo GUI 8.1.0 (2024-03-14)

1. Update CI badges in README
* [Pull request #603](https://github.com/gazebosim/gz-gui/pull/603)

1. Fix plugin filter on Windows
* [Pull request #567](https://github.com/gazebosim/gz-gui/pull/567)

1. Tidy namespaces
* [Pull request #590](https://github.com/gazebosim/gz-gui/pull/590)

1. Infrastructure
* [Pull request #591](https://github.com/gazebosim/gz-gui/pull/591)
* [Pull request #597](https://github.com/gazebosim/gz-gui/pull/597)
* [Pull request #608](https://github.com/gazebosim/gz-gui/pull/608)

1. Add check for vulkan support in rendering
* [Pull request #589](https://github.com/gazebosim/gz-gui/pull/589)

1. Add optional binary relocatability
* [Pull request #580](https://github.com/gazebosim/gz-gui/pull/580)

### Gazebo GUI 8.0.0 (2023-09-29)

1. Use fully-qualified message names to avoid deprecation warning
Expand Down
2 changes: 1 addition & 1 deletion conf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ configure_file(

# Install the yaml configuration files in an unversioned location.
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${GZ_DESIGNATION}${PROJECT_VERSION_MAJOR}.yaml
DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/gz/)
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/gz/)
2 changes: 1 addition & 1 deletion doc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ if (DOXYGEN_FOUND)
COMMENT "Generating API documentation with Doxygen" VERBATIM)

install(FILES ${CMAKE_BINARY_DIR}/doc/${PROJECT_NAME_LOWER}.tag.xml
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/gz/${PROJECT_NAME_LOWER}_${PROJECT_VERSION_MINOR})
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/gz/${PROJECT_NAME_LOWER}_${PROJECT_VERSION_MINOR})
endif()
40 changes: 32 additions & 8 deletions examples/standalone/scene_provider/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugin to update the scene using Gazebo Transport.

## Build

```
```bash
cd examples/standalone/scene_provider
mkdir build
cd build
Expand All @@ -21,14 +21,14 @@ make

In one terminal, start the scene provider:

```
```bash
cd examples/standalone/scene_provider/build
./scene_provider
```

On another terminal, start the example config:

```
```bash
gz gui -c examples/config/scene3d.config
```

Expand All @@ -42,24 +42,48 @@ Some commands to test camera tracking with this demo:

Move to box:

```
```bash
gz service -s /gui/move_to --reqtype gz.msgs.StringMsg --reptype gz.msgs.Boolean --timeout 2000 --req 'data: "box_model"'
```

Echo camera pose:

```
```bash
gz topic -e -t /gui/camera/pose
```

Follow box:
Echo camera tracking information:

```bash
gz topic -e -t /gui/currently_tracked
```
gz service -s /gui/follow --reqtype gz.msgs.StringMsg --reptype gz.msgs.Boolean --timeout 2000 --req 'data: "box_model"'

Follow box from track topic:

```bash
gz topic -t /gui/track -m gz.msgs.CameraTrack -p 'track_mode: 2, follow_target: { name: "box_model"}'
```

Update follow offset:
Follow box from track topic:

```bash
gz topic -t /gui/track -m gz.msgs.CameraTrack -p 'track_mode: 2, follow_target: "box_model", follow_offset: {x: -1, y: 0, z: 1}'
```

Update follow offset from track topic:

```bash
gz topic -t /gui/track -m gz.msgs.CameraTrack -p 'track_mode: 2, follow_target: {name: "box_model"}, follow_offset: {x: -1, y: 0, z: 1}'
```

Follow box from service (deprecated):

```bash
gz service -s /gui/follow --reqtype gz.msgs.StringMsg --reptype gz.msgs.Boolean --timeout 2000 --req 'data: "box_model"'
```

Update follow offset from follow offset service (deprecated):

```bash
gz service -s /gui/follow/offset --reqtype gz.msgs.Vector3d --reptype gz.msgs.Boolean --timeout 2000 --req 'x: 5, y: 5, z: 5'
```
4 changes: 4 additions & 0 deletions include/gz/gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,8 @@ target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME}
TINYXML2::TINYXML2
)

target_compile_definitions(${PROJECT_LIBRARY_TARGET_NAME} PRIVATE
SHARED_LIBRARY_PREFIX=\"${CMAKE_SHARED_LIBRARY_PREFIX}\"
SHARED_LIBRARY_SUFFIX=\"${CMAKE_SHARED_LIBRARY_SUFFIX}\")

gz_install_all_headers()
6 changes: 3 additions & 3 deletions include/gz/gui/qml/Main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ ApplicationWindow
contentItem: Image {
fillMode: Image.Pad
horizontalAlignment: Image.AlignHCenter
verticalAlignment: Image.AlignVCenter
source: "images/drawer.png"
verticalAlignment: Image.AlignVCenter
source: Material.theme === Material.Light ? "images/drawer.png" : "images/drawer_dark.png"
}
onClicked: drawer.open()
}
Expand Down Expand Up @@ -221,7 +221,7 @@ ApplicationWindow
fillMode: Image.Pad
horizontalAlignment: Image.AlignHCenter
verticalAlignment: Image.AlignVCenter
source: "images/menu.png"
source: Material.theme === Material.Light ? "images/menu.png" : "images/menu_dark.png"
}
onClicked: pluginMenu.open()

Expand Down
Binary file added include/gz/gui/qml/images/drawer_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added include/gz/gui/qml/images/menu_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions include/gz/gui/resources.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@

<file>qml/images/gazebo_logo.png</file>
<file>qml/images/drawer.png</file>
<file>qml/images/drawer_dark.png</file>
<file>qml/images/menu.png</file>
<file>qml/images/menu_dark.png</file>
<file>qml/images/export_icon.png</file>
<file>qml/images/search.svg</file>
<file>qml/images/plottable_icon.svg</file>
Expand Down
53 changes: 53 additions & 0 deletions package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format2.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="2">
<name>gz-gui9</name>
<version>9.0.0</version>
<description>Gazebo GUI : Graphical interfaces for robotics applications</description>
<maintainer email="jennuine@google.com">Jenn Nguyen</maintainer>
<license>Apache License 2.0</license>
<url type="website">https://github.com/gazebosim/gz-rendering</url>

<buildtool_depend>cmake</buildtool_depend>

<build_depend>gz-cmake3</build_depend>

<depend>gz-common6</depend>
<depend>gz-math8</depend>
<depend>gz-msgs11</depend>
<depend>gz-plugin3</depend>
<depend>gz-rendering9</depend>
<depend>gz-tools2</depend>
<depend>gz-transport14</depend>
<depend>gz-utils3</depend>
<depend>libqt5-core</depend>
<depend>libqt5-qml</depend>
<depend>libqt5-quick</depend>
<depend>libqt5-widgets</depend>
<depend>protobuf-dev</depend>
<depend>qml-module-qt-labs-folderlistmodel</depend>
<depend>qml-module-qt-labs-platform</depend>
<depend>qml-module-qt-labs-settings</depend>
<depend>qml-module-qtcharts</depend>
<depend>qml-module-qtgraphicaleffects</depend>
<depend>qml-module-qtlocation</depend>
<depend>qml-module-qtpositioning</depend>
<depend>qml-module-qtquick-controls2</depend>
<depend>qml-module-qtquick-controls</depend>
<depend>qml-module-qtquick-dialogs</depend>
<depend>qml-module-qtquick-extras</depend>
<depend>qml-module-qtquick-layouts</depend>
<depend>qml-module-qtquick-templates2</depend>
<depend>qml-module-qtquick-window2</depend>
<depend>qml-module-qtquick2</depend>
<depend>qtbase5-dev</depend>
<depend>qtdeclarative5-dev</depend>
<depend>qtquickcontrols2-5-dev</depend>
<depend>tinyxml2</depend>

<test_depend>xvfb</test_depend>

<export>
<build_type>cmake</build_type>
</export>
</package>
15 changes: 12 additions & 3 deletions src/Application.cc
Original file line number Diff line number Diff line change
Expand Up @@ -843,10 +843,19 @@ std::vector<std::pair<std::string, std::vector<std::string>>>
{
auto plugin = common::basename(*dirIter);

// All we verify is that the file starts with "lib", any further
// checks would require loading the plugin.
// All we verify is that the file starts with shared library prefix and
// ends with shared library suffix, any further checks would require
// loading the plugin.

if (plugin.find("lib") == 0)
// TODO(anyone): Move this logic into gz-plugin to be reusable

// This computation could underflow the unsigned range, but that is okay
// as in such case we would check if the suffix is placed somewhere much
// further than allowed filename length.
const auto suffixPos = plugin.length() - strlen(SHARED_LIBRARY_SUFFIX);

if (plugin.find(SHARED_LIBRARY_PREFIX) == 0 &&
plugin.rfind(SHARED_LIBRARY_SUFFIX) == suffixPos)
ps.push_back(plugin);
}

Expand Down
9 changes: 7 additions & 2 deletions src/MainWindow.cc
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,13 @@ QStringList MainWindow::PluginListModel() const
{
for (auto const &plugin : path.second)
{
// Remove lib and .so
auto pluginName = plugin.substr(3, plugin.find(".") - 3);
// TODO(anyone): Move this into gz-plugin to be reusable

// Remove shared library prefix and shared library suffix
auto pluginName = plugin.substr(
strlen(SHARED_LIBRARY_PREFIX),
plugin.length() - strlen(SHARED_LIBRARY_PREFIX) -
strlen(SHARED_LIBRARY_SUFFIX));

// Split WWWCamelCase3D -> WWW Camel Case 3D
std::regex reg("(\\B[A-Z][a-z])|(\\B[0-9])");
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ install(
FILES
${CMAKE_CURRENT_BINARY_DIR}/gui${PROJECT_VERSION_MAJOR}.bash_completion.sh
DESTINATION
${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/gz/gz${GZ_TOOLS_VER}.completion.d)
${CMAKE_INSTALL_DATAROOTDIR}/gz/gz${GZ_TOOLS_VER}.completion.d)
3 changes: 2 additions & 1 deletion src/plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,13 @@ function(gz_gui_add_plugin plugin_name)
COMPILE_FLAGS "/wd4251")
endif()

install (TARGETS ${plugin_name} DESTINATION ${GZ_GUI_PLUGIN_INSTALL_DIR})
install (TARGETS ${plugin_name} DESTINATION ${GZ_GUI_PLUGIN_RELATIVE_INSTALL_DIR})
endfunction()

# Plugins
add_subdirectory(camera_fps)
add_subdirectory(camera_tracking)
add_subdirectory(camera_tracking_config)
add_subdirectory(grid_config)
add_subdirectory(image_display)
add_subdirectory(interactive_view_control)
Expand Down
Loading

0 comments on commit fc8a366

Please sign in to comment.