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

Merge 6 -> 7 #316

Merged
merged 18 commits into from
Nov 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
uses: ignition-tooling/action-ignition-ci@bionic
with:
codecov-enabled: true
doxygen-enabled: true
focal-ci:
runs-on: ubuntu-latest
name: Ubuntu Focal CI
Expand Down
15 changes: 8 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,15 @@ ign_create_docs(
API_MAINPAGE_MD "${CMAKE_BINARY_DIR}/api.md"
TUTORIALS_MAINPAGE_MD "${CMAKE_BINARY_DIR}/tutorials.md"
ADDITIONAL_INPUT_DIRS "${CMAKE_SOURCE_DIR}/src/plugins"
IMAGE_PATH_DIRS "${CMAKE_SOURCE_DIR}/tutorials/images"
TAGFILES
"${CMAKE_SOURCE_DIR}/doc/qt.tag.xml=http://doc.qt.io/qt-5/"
"${IGNITION-MATH_DOXYGEN_TAGFILE} = ${IGNITION-MATH_API_URL}"
"${IGNITION-MSGS_DOXYGEN_TAGFILE} = ${IGNITION-MSGS_API_URL}"
"${IGNITION-RENDERING_DOXYGEN_TAGFILE} = ${IGNITION-RENDERING_API_URL}"
"${IGNITION-TRANSPORT_DOXYGEN_TAGFILE} = ${IGNITION-TRANSPORT_API_URL}"
"${IGNITION-COMMON_DOXYGEN_TAGFILE} = ${IGNITION-COMMON_API_URL}"
)
"${CMAKE_SOURCE_DIR}/doc/qt.tag.xml=http://doc.qt.io/qt-5/"
"${IGNITION-MATH_DOXYGEN_TAGFILE} = ${IGNITION-MATH_API_URL}"
"${IGNITION-MSGS_DOXYGEN_TAGFILE} = ${IGNITION-MSGS_API_URL}"
"${IGNITION-RENDERING_DOXYGEN_TAGFILE} = ${IGNITION-RENDERING_API_URL}"
"${IGNITION-TRANSPORT_DOXYGEN_TAGFILE} = ${IGNITION-TRANSPORT_API_URL}"
"${IGNITION-COMMON_DOXYGEN_TAGFILE} = ${IGNITION-COMMON_API_URL}"
)

if(TARGET doc)
file(COPY ${CMAKE_SOURCE_DIR}/tutorials/images/ DESTINATION ${CMAKE_BINARY_DIR}/doxygen/html/images/)
Expand Down
66 changes: 62 additions & 4 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,32 @@
## Ignition Gui 6
## Ignition Gui 7

### Ignition Gui 7.X.X

### Ignition Gui 7.0.0 (202X-XX-XX)

### Ignition Gui 6.X.X
## Ignition Gui 6

### Ignition Gui 6.1.0 (2021-11-05)

1. Improved doxygen
* [Pull request #275](https://github.com/ignitionrobotics/ign-gui/pull/275)

1. Fix mimimal scene deadlock on shutdown
* [Pull request #300](https://github.com/ignitionrobotics/ign-gui/pull/300)

1. Fix memory leak
* [Pull request #287](https://github.com/ignitionrobotics/ign-gui/pull/287)

1. Set near/far camera clipping distance
* [Pull request #309](https://github.com/ignitionrobotics/ign-gui/pull/309)

1. Support emitting an event on play/pause/step
* [Pull request #306](https://github.com/ignitionrobotics/ign-gui/pull/306)

### Ignition Gui 6.0.0 (2021-09-XX)

1. Render engine GUI name argument to be set in the minimal scene
* [Pull request #286](https://github.com/ignitionrobotics/ign-gui/pull/286)
1. Add a filter to the plugin menu
* [Pull request #277](https://github.com/ignitionrobotics/ign-gui/pull/277)

1. New events

Expand Down Expand Up @@ -39,6 +56,9 @@
1. PIMPL GUI events
* [Pull request #253](https://github.com/ignitionrobotics/ign-gui/pull/253)

1. Added winID to fix second windows in OGRE2.2
* [Pull request #292](https://github.com/ignitionrobotics/ign-gui/pull/292)

1. Added camera tracking
* [Pull request #226](https://github.com/ignitionrobotics/ign-gui/pull/226)
* [Pull request #254](https://github.com/ignitionrobotics/ign-gui/pull/254)
Expand All @@ -49,6 +69,10 @@
* [Pull request #285](https://github.com/ignitionrobotics/ign-gui/pull/285)
* [Pull request #268](https://github.com/ignitionrobotics/ign-gui/pull/268)
* [Pull request #224](https://github.com/ignitionrobotics/ign-gui/pull/224)
* [Pull request #282](https://github.com/ignitionrobotics/ign-gui/pull/282)
* [Pull request #273](https://github.com/ignitionrobotics/ign-gui/pull/273)
* [Pull request #286](https://github.com/ignitionrobotics/ign-gui/pull/286)
* [Pull request #295](https://github.com/ignitionrobotics/ign-gui/pull/295)

1. Remove deprecations: tock
* [Pull request #243](https://github.com/ignitionrobotics/ign-gui/pull/243)
Expand All @@ -66,6 +90,23 @@

### Ignition Gui 5.X.X (20XX-XX-XX)

### Ignition Gui 5.3.0 (2021-10-13)

1. Improved doxygen
* [Pull request #275](https://github.com/ignitionrobotics/ign-gui/pull/275)

1. Fix memory leak
* [Pull request #287](https://github.com/ignitionrobotics/ign-gui/pull/287)

1. Add a filter to the plugin menu
* [Pull request #277](https://github.com/ignitionrobotics/ign-gui/pull/277)

1. 👩‍🌾 Remove bitbucket-pipelines.yml
* [Pull request #274](https://github.com/ignitionrobotics/ign-gui/pull/274)

1. Fix doc build error
* [Pull request #266](https://github.com/ignitionrobotics/ign-gui/pull/266)

### Ignition Gui 5.2.0 (2021-07-27)

1. New teleop plugin implementation.
Expand Down Expand Up @@ -329,6 +370,23 @@

### Ignition Gui 3.X.X (202X-XX-XX)

### Ignition Gui 3.8.0 (2021-10-12)

1. Improved doxygen
* [Pull request #275](https://github.com/ignitionrobotics/ign-gui/pull/275)

1. Add a filter to the plugin menu
* [Pull request #277](https://github.com/ignitionrobotics/ign-gui/pull/277)

1. 👩‍🌾 Remove bitbucket-pipelines.yml
* [Pull request #274](https://github.com/ignitionrobotics/ign-gui/pull/274)

1. Require ign-rendering 3.5
* [Pull request #264](https://github.com/ignitionrobotics/ign-gui/pull/264)

1. New teleop plugin implementation.
* [Pull request #245](https://github.com/ignitionrobotics/ign-gui/pull/245)

### Ignition Gui 3.7.0 (2021-07-14)

1. Fix codeowners
Expand Down
4 changes: 2 additions & 2 deletions include/ignition/gui/Application.hh
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ namespace ignition
/// and plugins. This function doesn't instantiate the plugins, it just
/// keeps them in memory and they can be applied later by either
/// instantiating a window or several dialogs.
/// \param[in] _config Full path to configuration file.
/// \param[in] _path Full path to configuration file.
/// \return True if successful
/// \sa InitializeMainWindow
/// \sa InitializeDialogs
public: bool LoadConfig(const std::string &_config);
public: bool LoadConfig(const std::string &_path);

/// \brief Load the configuration from the default config file.
/// \return True if successful
Expand Down
24 changes: 22 additions & 2 deletions include/ignition/gui/GuiEvents.hh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <ignition/common/MouseEvent.hh>
#include <ignition/math/Vector2.hh>
#include <ignition/math/Vector3.hh>
#include <ignition/msgs/world_control.pb.h>
#include <ignition/utils/ImplPtr.hh>

#include "ignition/gui/Export.hh"
Expand Down Expand Up @@ -92,7 +93,7 @@ namespace ignition
class IGNITION_GUI_VISIBLE SpawnFromDescription : public QEvent
{
/// \brief Constructor
/// \param[in] _string The resource's description as a string, such
/// \param[in] _description The resource's description as a string, such
/// as an SDF file.
public: explicit SpawnFromDescription(const std::string &_description);

Expand Down Expand Up @@ -368,7 +369,7 @@ namespace ignition
class IGNITION_GUI_VISIBLE DropOnScene : public QEvent
{
/// \brief Constructor
/// \param[in] _drop Dropped string.
/// \param[in] _dropText Dropped string.
/// \param[in] _dropMouse x and y coordinate of mouse position.
public: explicit DropOnScene(
const std::string &_dropText,
Expand Down Expand Up @@ -449,6 +450,25 @@ namespace ignition
/// \brief Private data pointer
IGN_UTILS_IMPL_PTR(dataPtr)
};

/// \brief Event which is called to share WorldControl information.
class IGNITION_GUI_VISIBLE WorldControl : public QEvent
{
/// \brief Constructor
/// \param[in] _worldControl The WorldControl information
public: explicit WorldControl(const msgs::WorldControl &_worldControl);

/// \brief Unique type for this event.
static const QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 19);

/// \brief Get the WorldControl information
/// \return The WorldControl information
public: const msgs::WorldControl &WorldControlInfo() const;

/// \internal
/// \brief Private data pointer
IGN_UTILS_IMPL_PTR(dataPtr)
};
}
}
}
Expand Down
5 changes: 1 addition & 4 deletions include/ignition/gui/PlottingInterface.hh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class IGNITION_GUI_VISIBLE PlotData
public: double Value() const;

/// \brief Set the field arrival time
/// \param[in] _value arrival time to set it
/// \param[in] _time arrival time to set it
public: void SetTime(const double _time);

/// \brief Get the arrival time
Expand Down Expand Up @@ -273,7 +273,6 @@ class IGNITION_GUI_VISIBLE PlottingInterface : public QObject
/// \brief called by Qml to remove a chart from a component attribute
/// \param[in] _entity entity id which has the component
/// \param[in] _typeId component type id
/// \param[in] _type component data type
/// \param[in] _attribute component specefice attribte
/// \param[in] _chart chart id
public slots: void onComponentUnSubscribe(QString _entity,
Expand All @@ -296,7 +295,6 @@ class IGNITION_GUI_VISIBLE PlottingInterface : public QObject
/// \brief Notify the gazebo plugin to unsubscribe a component data
/// \param[in] _entity entity id which has the component
/// \param[in] _typeId component type id
/// \param[in] _type component data type
/// \param[in] _attribute component specefice attribte
/// \param[in] _chart chart id
signals: void ComponentUnSubscribe(uint64_t _entity,
Expand Down Expand Up @@ -338,4 +336,3 @@ class IGNITION_GUI_VISIBLE PlottingInterface : public QObject
}

#endif

5 changes: 4 additions & 1 deletion include/ignition/gui/Plugin.hh
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,10 @@ namespace ignition
/// \sa Load
/// \param[in] _pluginElem Element containing configuration
protected: virtual void LoadConfig(
const tinyxml2::XMLElement * /*_pluginElem*/) {}
const tinyxml2::XMLElement *_pluginElem)
{
(void)_pluginElem;
}

/// \brief Get title
/// \return Plugin title.
Expand Down
19 changes: 19 additions & 0 deletions src/GuiEvents.cc
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,12 @@ class ignition::gui::events::MousePressOnScene::Implementation
public: common::MouseEvent mouse;
};

class ignition::gui::events::WorldControl::Implementation
{
/// \brief WorldControl information.
public: msgs::WorldControl worldControl;
};

using namespace ignition;
using namespace gui;
using namespace events;
Expand Down Expand Up @@ -401,3 +407,16 @@ const common::MouseEvent &MousePressOnScene::Mouse() const
{
return this->dataPtr->mouse;
}

/////////////////////////////////////////////////
WorldControl::WorldControl(const msgs::WorldControl &_worldControl)
: QEvent(kType), dataPtr(utils::MakeImpl<Implementation>())
{
this->dataPtr->worldControl = _worldControl;
}

/////////////////////////////////////////////////
const msgs::WorldControl &WorldControl::WorldControlInfo() const
{
return this->dataPtr->worldControl;
}
29 changes: 29 additions & 0 deletions src/GuiEvents_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -254,3 +254,32 @@ TEST(GuiEventsTest, MousePressOnScene)
EXPECT_TRUE(event.Mouse().Alt());
EXPECT_FALSE(event.Mouse().Shift());
}

/////////////////////////////////////////////////
TEST(GuiEventsTest, WorldControl)
{
ignition::msgs::WorldControl worldControl;
worldControl.set_pause(true);
worldControl.set_step(true);
worldControl.set_multi_step(5u);
worldControl.mutable_reset()->set_all(true);
worldControl.mutable_reset()->set_time_only(true);
worldControl.mutable_reset()->set_model_only(false);
worldControl.set_seed(10u);
worldControl.mutable_run_to_sim_time()->set_sec(2);
worldControl.mutable_run_to_sim_time()->set_nsec(3);
events::WorldControl playEvent(worldControl);

EXPECT_LT(QEvent::User, playEvent.type());
EXPECT_FALSE(playEvent.WorldControlInfo().has_header());
EXPECT_TRUE(playEvent.WorldControlInfo().pause());
EXPECT_TRUE(playEvent.WorldControlInfo().step());
EXPECT_EQ(5u, playEvent.WorldControlInfo().multi_step());
EXPECT_FALSE(playEvent.WorldControlInfo().reset().has_header());
EXPECT_TRUE(playEvent.WorldControlInfo().reset().all());
EXPECT_TRUE(playEvent.WorldControlInfo().reset().time_only());
EXPECT_FALSE(playEvent.WorldControlInfo().reset().model_only());
EXPECT_EQ(10u, playEvent.WorldControlInfo().seed());
EXPECT_EQ(2, playEvent.WorldControlInfo().run_to_sim_time().sec());
EXPECT_EQ(3, playEvent.WorldControlInfo().run_to_sim_time().nsec());
}
1 change: 0 additions & 1 deletion src/plugins/grid_config/GridConfig.hh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ namespace gui
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
Expand Down
2 changes: 2 additions & 0 deletions src/plugins/image_display/ImageDisplay.cc
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,8 @@ void ImageDisplay::ProcessImage()
image.setPixel(i, j, value);
}
}

delete [] data;
}

this->dataPtr->provider->SetImage(image);
Expand Down
3 changes: 2 additions & 1 deletion src/plugins/key_publisher/KeyPublisher.hh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ namespace gui
public: virtual ~KeyPublisher();

// Documentation inherited
public: virtual void LoadConfig(const tinyxml2::XMLElement *) override;
public: virtual void LoadConfig(
const tinyxml2::XMLElement *_pluginElem) override;

/// \brief Filter events in Qt
/// \param[in] _obj The watched object
Expand Down
Loading