Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2 ➡️ 3 #136

Merged
merged 157 commits into from
May 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
157 commits
Select commit Hold shift + click to select a range
7866695
Add SDFormat world generation
azeey Jan 30, 2020
1333dcc
Find custom physics engines
chapulina Feb 25, 2020
23b1f71
ign-physics version, remove ODE
chapulina Feb 25, 2020
ca1dd57
Physics engine from command line
chapulina Feb 26, 2020
01f296b
Use unversioned libraries
chapulina Feb 28, 2020
9388796
Merged ign-gazebo2 into find_physics_engined
chapulina Mar 2, 2020
1bfd6fd
add AxisAlignedBox component, conversion functions, and populate bbox…
iche033 Mar 4, 2020
42a21a5
GetBoundingBox
iche033 Mar 4, 2020
ce23a83
fix test
iche033 Mar 4, 2020
c97fa42
add comment
iche033 Mar 4, 2020
e418259
changelog
iche033 Mar 6, 2020
4eba855
merged from ign-physics1 and require ign-physics 1.6
chapulina Mar 6, 2020
c0ceb09
Pose commands from inspector
chapulina Mar 7, 2020
00b1382
Allow putting GUI headers in src/gui and move resources into src/gui
azeey Mar 10, 2020
9ef2b2d
Merge from allow_gui_headers_in_src
azeey Mar 10, 2020
8ef285d
Refactor runGui in ign.cc to src/gui/Gui.cc
azeey Mar 11, 2020
aa7d616
Refactor: Use ignition::gazebo::gui::runGui in gui_main.cc
azeey Mar 11, 2020
3e8ed2d
Merge from allow_gui_headers_in_src
azeey Mar 11, 2020
8c048ad
Add saving to file from GUI
azeey Mar 11, 2020
ebfc660
Move ign.cc to src, don't install Gui.hh
azeey Mar 17, 2020
76abf20
Example GUI system plugin
chapulina Mar 17, 2020
ea03759
Document why we are include moc_*.cpp files
azeey Mar 17, 2020
360fc47
Merge from ign-gazebo2
azeey Mar 17, 2020
27c6544
Apply change to moved file
azeey Mar 17, 2020
4d74c76
merge from ign-gazebo2
iche033 Mar 18, 2020
06ac0e5
merge from ign-gazebo2
iche033 Mar 18, 2020
3209f8a
Use qt5_wrap_cpp for Qt header files in include/ignition/gazebo/gui
azeey Mar 20, 2020
efef369
merge from ign-gazebo2
iche033 Mar 20, 2020
1bffa34
print missing features
chapulina Mar 20, 2020
ec272fe
fix msg
chapulina Mar 20, 2020
dc9339f
Merged ign-gazebo2 into allow_gui_headers_in_src
chapulina Mar 21, 2020
71b4512
Merged ign-gazebo2 into inspector_write_pose
chapulina Mar 21, 2020
4c9e4f1
merge from ign-gazebo2
iche033 Mar 23, 2020
48a2b6b
merged from ign-gazebo2
chapulina Mar 24, 2020
129779d
bump ign-physics version, check null bbox comp
iche033 Mar 24, 2020
c91a314
merge
iche033 Mar 24, 2020
b3610d5
merged from ign-gazebo2
chapulina Mar 24, 2020
2f5212d
Close branch model_bbox_2
iche033 Mar 24, 2020
4cdef0c
Merged in model_bbox_2 (pull request #546)
iche033 Mar 24, 2020
f3841d5
bump to 2.16, update changelog
iche033 Mar 24, 2020
473472b
Flaky RGBD test, no crash
chapulina Mar 24, 2020
b623fdb
Close branch flaky_rgbd
chapulina Mar 25, 2020
70674c0
Merged in flaky_rgbd (pull request #570)
chapulina Mar 25, 2020
ec07fd0
Merged ign-gazebo2 into bump_2.16
chapulina Mar 25, 2020
5c1cde2
merged from ign-gazebo2
chapulina Mar 25, 2020
809436e
Close branch bump_2.16
iche033 Mar 25, 2020
87af1ef
Merged in bump_2.16 (pull request #569)
iche033 Mar 25, 2020
2d0d1ff
Added tag ignition-gazebo2_2.16.0 for changeset 2e34ab4139a8
iche033 Mar 25, 2020
7ea568f
Merge from allow_gui_headers_in_src
azeey Mar 25, 2020
172f794
Removed test entry from gazebo.qrc
azeey Mar 25, 2020
c0d1d3f
Light icon
chapulina Mar 26, 2020
0348be6
Physics system doesn't need visuals
chapulina Mar 26, 2020
9fc5ec9
merged from ign-gazebo2
chapulina Mar 27, 2020
39bcbe8
Close branch no_physics_visual
chapulina Mar 27, 2020
a9b5c65
Merged in no_physics_visual (pull request #572)
chapulina Mar 27, 2020
7178b98
merged from ign-gazebo2
chapulina Mar 27, 2020
41b2b71
merged from ign-gazebo2
chapulina Mar 27, 2020
a827fcf
publish current value in boxes, and don't fight user when spin is sel…
chapulina Mar 27, 2020
e644ba9
Close branch light_icon
chapulina Mar 27, 2020
0c6e0c5
Merged in light_icon (pull request #571)
chapulina Mar 27, 2020
c8fe37b
Standalone example running a server
chapulina Mar 28, 2020
f499f20
tweaks
chapulina Mar 28, 2020
32b79ea
Merged ign-gazebo2 into inspector_write_pose
Mar 30, 2020
d650306
Merged ign-gazebo2 into example_gui_plugin
Mar 30, 2020
9582f5a
fix typos
Mar 30, 2020
d1ede98
Add cmd
Mar 30, 2020
9448a0b
Close branch custom_server
chapulina Mar 30, 2020
7cacb26
Merged in custom_server (pull request #578)
chapulina Mar 30, 2020
30867fb
calculate decimals
chapulina Mar 31, 2020
ce344db
merged heads
chapulina Mar 31, 2020
8c93673
set policy
chapulina Mar 31, 2020
3f5c461
merged from ign-gazebo2
chapulina Mar 31, 2020
42622c9
move light icon to new location
chapulina Mar 31, 2020
3564147
move light icon to new location
chapulina Mar 31, 2020
58aee8c
merged from allow_gui_headers_in_src
chapulina Mar 31, 2020
08f0ce5
policy for automoc
chapulina Mar 31, 2020
370d1a3
Close branch allow_gui_headers_in_src
chapulina Mar 31, 2020
c10562d
Merged in allow_gui_headers_in_src (pull request #554)
chapulina Mar 31, 2020
d492334
find Qt, don't assert in test
chapulina Mar 31, 2020
5170e6c
remove unnecessary bits
chapulina Mar 31, 2020
4cc5220
default constructor
chapulina Apr 1, 2020
2c0075e
@azeey's fix
chapulina Apr 1, 2020
14533dc
Use scoped model names
azeey Apr 1, 2020
5e19282
Codecheck, cleanup
azeey Apr 1, 2020
7528473
Merge from ign-gazebo2
azeey Apr 1, 2020
6a699dd
Close branch example_gui_plugin
chapulina Apr 1, 2020
2f4d226
Merged in example_gui_plugin (pull request #563)
chapulina Apr 1, 2020
0d67a1b
suggestions to pull request #545
chapulina Apr 2, 2020
4ce1396
more tweaks
chapulina Apr 2, 2020
5613e7b
larger inspector, no decimal changes for spin box
chapulina Apr 2, 2020
bcbff86
Merged ign-gazebo2 into find_physics_engined
chapulina Apr 3, 2020
ace151a
Close branch chapulina/sdf_world_gen
azeey Apr 3, 2020
9067485
Merged in chapulina/sdf_world_gen (pull request #581)
azeey Apr 3, 2020
7b7ec67
Address reviewer feedback
azeey Apr 3, 2020
4cb6ac4
Add support for saving models that use relative URIs for resources su…
azeey Apr 3, 2020
e3d6ba7
Merged ign-gazebo2 into sdf_world_gen
chapulina Apr 4, 2020
66fa05a
bring back automoc removed on pull request #563
chapulina Apr 4, 2020
97e7419
File path validator
chapulina Apr 4, 2020
0dcff1e
Close branch inspector_write_pose
chapulina Apr 7, 2020
d2dc71c
Merged in inspector_write_pose (pull request #551)
chapulina Apr 7, 2020
86547d8
Display error messages to user when saving world
azeey Apr 7, 2020
b3c7763
More permissive file paths
azeey Apr 7, 2020
68fa869
Use updated SdfGeneratorConfig message
azeey Apr 8, 2020
02eadef
Update changelog
azeey Apr 8, 2020
ca6cc39
Update param docs
azeey Apr 8, 2020
735587e
Merged from ign-gazebo2
azeey Apr 8, 2020
99201be
Merged ign-gazebo2 into find_physics_engined
chapulina Apr 10, 2020
09399e9
Close branch find_physics_engined
chapulina Apr 10, 2020
e555059
Merged in find_physics_engined (pull request #541)
chapulina Apr 10, 2020
d056346
Merged ign-gazebo2 into sdf_world_gen
azeey Apr 11, 2020
629a589
require msgs 4.8
chapulina Apr 13, 2020
c53a293
Close branch sdf_world_gen
chapulina Apr 13, 2020
70f9133
Merged in sdf_world_gen (pull request #545)
chapulina Apr 13, 2020
aef3626
mv hgignore
Apr 20, 2020
c03af76
add gitignore
Apr 20, 2020
52b3c05
Optional physics features (#62)
chapulina Apr 22, 2020
8d57112
[ign-gazebo2] Update BitBucket links (#63)
chapulina Apr 22, 2020
f6486f9
Move Gui.hh
azeey Apr 20, 2020
a60cc1f
Refactor Gui.hh so that the Gazebo GUI can be ran from other packages…
azeey Apr 20, 2020
b01b33a
Put runGui under inline namespace to fix macOS build
azeey Apr 27, 2020
d9e7c88
Fix crash when running the Gazebo GUI (#108)
azeey Apr 28, 2020
536a08d
New snap icon (#115)
chapulina Apr 30, 2020
9f913a2
Add force focus when mouse enters render window (#95)
May 1, 2020
dd5c72b
Add static pose publisher and support pose_v msg type in pose_publish…
iche033 May 5, 2020
a2e11b8
mv hgignore
Apr 20, 2020
72d7f2b
add gitignore
Apr 20, 2020
d623292
Optional physics features (#62)
chapulina Apr 22, 2020
1b98bf1
[ign-gazebo2] Update BitBucket links (#63)
chapulina Apr 22, 2020
7d3d21c
Move Gui.hh
azeey Apr 20, 2020
973fb01
Refactor Gui.hh so that the Gazebo GUI can be ran from other packages…
azeey Apr 20, 2020
344a023
Put runGui under inline namespace to fix macOS build
azeey Apr 27, 2020
e211e70
Fix crash when running the Gazebo GUI (#108)
azeey Apr 28, 2020
a139815
Exit early if deployments are not allowed
Apr 23, 2020
b3a1c08
Update PR link.
nkoenig Apr 23, 2020
c9536aa
Fix build
Apr 23, 2020
522fbb2
Added return
Apr 28, 2020
b8ac88b
Update documentation
May 6, 2020
ed7bf64
Exit early if deployments are not allowed
Apr 23, 2020
5390db9
Merge branch 'breadcrumbs_exit_early' of github.com:ignitionrobotics/…
May 6, 2020
8ba5e64
Merge branch 'ign-gazebo2' into breadcrumbs_exit_early
nkoenig May 7, 2020
9a3b42b
Merge pull request #88 from ignitionrobotics/breadcrumbs_exit_early
nkoenig May 7, 2020
2cc8e8f
Make breadcrumb static after specified time (#90)
iche033 May 7, 2020
4569d7f
[ign-gazebo2] Workflow updates (#128)
chapulina May 8, 2020
1ff39db
Fix for issue 55 (#120)
nkoenig May 13, 2020
2392a30
2.17.0 release (#135)
nkoenig May 13, 2020
fdd8c5d
fix build
chapulina May 13, 2020
80998c0
merged from ign-gazebo2
chapulina May 13, 2020
9ecee15
Fix some tests
chapulina May 13, 2020
2670ca9
more fixes
chapulina May 14, 2020
f33d639
Ian's fix for lidar destruction
chapulina May 14, 2020
8a8bedb
restore invalid URIs test
chapulina May 15, 2020
4ab83d0
remove sdf 1.7 TODOs
chapulina May 15, 2020
85e6acb
Bump msgs to 5.2
chapulina May 15, 2020
253289f
addressing test failures
chapulina May 15, 2020
ddb03de
try to fix Server_TEST on Ubuntu, and compilation on OSX
chapulina May 15, 2020
40e707d
More test and warning fixes
chapulina May 16, 2020
7f5bd7a
duh
chapulina May 16, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ set(IGN_TRANSPORT_VER ${ignition-transport8_VERSION_MAJOR})

#--------------------------------------
# Find ignition-msgs
ign_find_package(ignition-msgs5 REQUIRED)
ign_find_package(ignition-msgs5 REQUIRED VERSION 5.2)
set(IGN_MSGS_VER ${ignition-msgs5_VERSION_MAJOR})

#--------------------------------------
Expand Down Expand Up @@ -92,8 +92,6 @@ ign_find_package(ignition-physics2
COMPONENTS
mesh
sdf
dartsim
dartsim-plugin
REQUIRED
)
set(IGN_PHYSICS_VER ${ignition-physics2_VERSION_MAJOR})
Expand Down
71 changes: 69 additions & 2 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,37 @@

## Ignition Gazebo 2.x

### Ignition Gazebo 2.xx.xx (20XX-XX-XX)
### Ignition Gazebo 2.xx.xx (2020-xx-xx)

1. Add DetachableJoint: A system that initially attaches two models via a fixed joint and allows for the models to get detached during simulation via a topic.
### Ignition Gazebo 2.17.0 (2020-05-13)

1. Allow battery plugin to work with joint force systems.
* [Pull Request 120](https://github.com/ignitionrobotics/ign-gazebo/pull/120)

1. Make breadcrumb static after specified time
* [Pull Request 90](https://github.com/ignitionrobotics/ign-gazebo/pull/90)

1. Disable breadcrumbs if the `max_deployments` == 0.
* [Pull Request 88](https://github.com/ignitionrobotics/ign-gazebo/pull/88)

1. Add static pose publisher and support pose\_v msg type in pose publisher system
* [Pull Request 65](https://github.com/ignitionrobotics/ign-gazebo/pull/65)

1. Refactor Gui.hh so that the Gazebo GUI can be ran from other packages
* [Pull Request 79](https://github.com/ignitionrobotics/ign-gazebo/pull/79)

1. Add ability to save worlds to SDFormat
* [BitBucket pull request 545](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-gazebo/pull-requests/545)

1. Add window focus upon mouse entering the render window
* [Github pull request 95](https://github.com/ignitionrobotics/ign-gazebo/pull/95)

### Ignition Gazebo 2.16.0 (2020-03-24)

1. Add support for computing model bounding box in physics system
* [BitBucket pull request 546](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-gazebo/pull-requests/546)

1. Add DetachableJoint: A system that initially attaches two models via a fixed joint and allows for the models to get detached during simulation via a topic.
* [BitBucket pull request 440](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-gazebo/pull-requests/440)

1. Update physics state even when paused (not stepping)
Expand All @@ -90,6 +118,45 @@
1. Add `JointPositionReset` and `JointVelocityReset` components to reset the joint state.
* [BitBucket pull request 437](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-gazebo/pull-requests/437)

1. Logging meshes and materials
* [BitBucket pull request 367](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-gazebo/pull-requests/367)

1. List plugin env vars
* [BitBucket pull request 560](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-gazebo/pull-requests/560)

1. Fix protobuf / clang warnings
* [BitBucket pull request 555](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-gazebo/pull-requests/555)

1. Component inspector
* [BitBucket pull request 528](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-gazebo/pull-requests/528)

1. Log compress
* [BitBucket pull request 500](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-gazebo/pull-requests/500)

1. Set process titles
* [BitBucket pull request 530](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-gazebo/pull-requests/530)

1. Add custom user snapping
* [BitBucket pull request 493](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-gazebo/pull-requests/493)

1. Add GUI to configure grid
* [BitBucket pull request 507](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-gazebo/pull-requests/507)

1. Add multiple entity selection to view angle
* [BitBucket pull request 531](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-gazebo/pull-requests/531)

1. Highlight selected entities
* [BitBucket pull request 515](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-gazebo/pull-requests/515)

1. Log record overwrite
* [BitBucket pull request 497](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-gazebo/pull-requests/497)

1. Add copyright to QML files
* [BitBucket pull request 527](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-gazebo/pull-requests/527)

1. Fix shift translation bug
* [BitBucket pull request 529](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-gazebo/pull-requests/529)

### Ignition Gazebo 2.15.0 (2020-02-07)

1. Fix seeking back in time in log playback
Expand Down
21 changes: 21 additions & 0 deletions examples/plugin/gui_system_plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)

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

project(GuiSystemPlugin)

set(CMAKE_AUTOMOC ON)

find_package(ignition-gazebo3 REQUIRED COMPONENTS gui)

QT5_ADD_RESOURCES(resources_RCC ${PROJECT_NAME}.qrc)

add_library(${PROJECT_NAME} SHARED
${PROJECT_NAME}.cc
${resources_RCC}
)
target_link_libraries(${PROJECT_NAME}
PRIVATE ignition-gazebo3::gui
)
73 changes: 73 additions & 0 deletions examples/plugin/gui_system_plugin/GuiSystemPlugin.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
/*
* 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 <ignition/plugin/Register.hh>
#include <ignition/gazebo/components/Name.hh>
#include <ignition/gazebo/components/World.hh>
#include <ignition/gazebo/EntityComponentManager.hh>
#include <ignition/gazebo/gui/GuiEvents.hh>

#include "GuiSystemPlugin.hh"

/////////////////////////////////////////////////
GuiSystemPlugin::GuiSystemPlugin() = default;

/////////////////////////////////////////////////
GuiSystemPlugin::~GuiSystemPlugin() = default;

/////////////////////////////////////////////////
void GuiSystemPlugin::LoadConfig(const tinyxml2::XMLElement * /*_pluginElem*/)
{
if (this->title.empty())
this->title = "GUI system plugin";

// Here you can read configuration from _pluginElem, if it's not null.
}

//////////////////////////////////////////////////
void GuiSystemPlugin::Update(const ignition::gazebo::UpdateInfo & /*_info*/,
ignition::gazebo::EntityComponentManager &_ecm)
{
// In the update loop, you can for example get the name of the world and set
// it as a property that can be read from the QML.
_ecm.Each<ignition::gazebo::components::Name,
ignition::gazebo::components::World>(
[&](const ignition::gazebo::Entity &_entity,
const ignition::gazebo::components::Name *_name,
const ignition::gazebo::components::World *)->bool
{
this->SetCustomProperty(QString::fromStdString(_name->Data()));
return true;
});
}

/////////////////////////////////////////////////
QString GuiSystemPlugin::CustomProperty() const
{
return this->customProperty;
}

/////////////////////////////////////////////////
void GuiSystemPlugin::SetCustomProperty(const QString &_customProperty)
{
this->customProperty = _customProperty;
this->CustomPropertyChanged();
}

// Register this plugin
IGNITION_ADD_PLUGIN(GuiSystemPlugin,
ignition::gui::Plugin)
80 changes: 80 additions & 0 deletions examples/plugin/gui_system_plugin/GuiSystemPlugin.hh
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
/*
* 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_GUISYSTEMPLUGIN_HH_
#define IGNITION_GAZEBO_GUISYSTEMPLUGIN_HH_

#include <ignition/gazebo/gui/GuiSystem.hh>

/// \brief Example of a GUI plugin that has access to entities and components.
class GuiSystemPlugin : public ignition::gazebo::GuiSystem
{
Q_OBJECT

/// \brief Custom property. Use this to create properties that can be read
/// from the QML file. See the declarations below.
Q_PROPERTY(
QString customProperty
READ CustomProperty
WRITE SetCustomProperty
NOTIFY CustomPropertyChanged
)

/// \brief Constructor
public: GuiSystemPlugin();

/// \brief Destructor
public: ~GuiSystemPlugin() override;

/// \brief `ignition::gui::Plugin`s can overload this function to
/// receive custom configuration from an XML file. Here, it comes from the
/// SDF.
///
/// <gui>
/// <plugin ...> <!-- this is the plugin element -->
/// ...
/// </plugin>
/// </gui>
///
/// \param[in] _pluginElem SDF <plugin> element. Will be null if the plugin
/// is loaded without any XML configuration.
public: void LoadConfig(const tinyxml2::XMLElement *_pluginElem) override;

/// \brief GUI systems can overload this function to receive updated simulation
/// state. This is called whenever the server sends state updates to the GUI.
/// \param[in] _info Simulation information such as time.
/// \param[in] _ecm Entity component manager, which can be used to get the
/// latest information about entities and components.
public: void Update(const ignition::gazebo::UpdateInfo &_info,
ignition::gazebo::EntityComponentManager &_ecm) override;

/// \brief Get the custom property as a string.
/// \return Custom property
public: Q_INVOKABLE QString CustomProperty() const;

/// \brief Set the custom property from a string.
/// \param[in] _customProperty Custom property
public: Q_INVOKABLE void SetCustomProperty(const QString &_customProperty);

/// \brief Notify that custom property has changed
signals: void CustomPropertyChanged();

/// \brief Custom property
private: QString customProperty;
};

#endif
24 changes: 24 additions & 0 deletions examples/plugin/gui_system_plugin/GuiSystemPlugin.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* 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.2

// Display custom property text
Text {
width: 300
text: GuiSystemPlugin.customProperty
}
5 changes: 5 additions & 0 deletions examples/plugin/gui_system_plugin/GuiSystemPlugin.qrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource prefix="GuiSystemPlugin/">
<file>GuiSystemPlugin.qml</file>
</qresource>
</RCC>
41 changes: 41 additions & 0 deletions examples/plugin/gui_system_plugin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# GUI system plugin

This example shows how to create a GUI system plugin.

Ignition Gazebo supports any kind of Ignition GUI plugin
(`ignition::gui::Plugin`). Gazebo GUI plugins are a special type of Ignition
GUI plugin which also have access to entity and component updates coming from
the server.

See `GuiSystemPluginPlugin.hh` for more information.

## Build

From the root of the `ign-gazebo` repository, do the following to build the example:

~~~
cd ign-gazebo/examples/plugins/gui_system_plugin
mkdir build
cd build
cmake ..
make
~~~

This will generate the `libGuiSystemPlugin.so` library under `build`.

## Run

Add the library to the path:

~~~
cd ign-gazebo/examples/plugins/gui_system_plugin
export IGN_GUI_PLUGIN_PATH=`pwd`/build
~~~

Then run a world, for example:

ign gazebo -v 4 shapes.sdf

From the GUI plugin menu on the top-right, choose "Gui System Plugin".

You'll see your plugin, displaying the world name `shapes`.
11 changes: 11 additions & 0 deletions examples/standalone/custom_server/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)

if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
find_package(ignition-gazebo3 REQUIRED)
set(IGN_COMMON_VER ${ignition-gazebo3_VERSION_MAJOR})

add_executable(custom_server custom_server.cc)
target_link_libraries(custom_server
ignition-gazebo${IGN_COMMON_VER}::ignition-gazebo${IGN_COMMON_VER}
)
endif()
21 changes: 21 additions & 0 deletions examples/standalone/custom_server/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Custom server

This example demonstrates how to run a simulation server headless
using the C++ API, instead of using Ignition Gazebo from the command line.

## Build Instructions

From this directory:

cd ign-gazebo/examples/standalone/custom_server
mkdir build
cd build
cmake ..
make

## Execute Instructions

./custom_server

The server will run `shapes.sdf` for 100 iterations and exit. No GUI will
show up.
Loading