diff --git a/.github/ci/after_make.sh b/.github/ci/after_make.sh index e2801d7a5..917f84557 100644 --- a/.github/ci/after_make.sh +++ b/.github/ci/after_make.sh @@ -6,7 +6,7 @@ set -x make install # For ign-tools -export IGN_CONFIG_PATH=/usr/local/share/ignition +export GZ_CONFIG_PATH=/usr/local/share/ignition export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH # For rendering / window tests diff --git a/CMakeLists.txt b/CMakeLists.txt index aa5637b1a..6dbaea5fa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -90,7 +90,7 @@ ign_find_package (Qt5 PKGCONFIG "Qt5Core Qt5Quick Qt5QuickControls2 Qt5Widgets" ) -set(IGNITION_GUI_PLUGIN_INSTALL_DIR +set(GZ_GUI_PLUGIN_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/${IGN_LIB_INSTALL_DIR}/ign-${IGN_DESIGNATION}-${PROJECT_VERSION_MAJOR}/plugins ) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b3257a57e..f30b9db76 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1 +1 @@ -See the [Ignition contributing guide](https://ignitionrobotics.org/docs/all/contributing). +See the [Ignition contributing guide](https://gazebosim.org/docs/all/contributing). diff --git a/Changelog.md b/Changelog.md index 2d604a74d..4a409ad92 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,692 +1,692 @@ -## Ignition Gui 7 +## Gazebo GUI 7 -### Ignition Gui 7.X.X +### Gazebo GUI 7.X.X -### Ignition Gui 7.0.0 (202X-XX-XX) +### Gazebo GUI 7.0.0 (202X-XX-XX) -## Ignition Gui 6 +## Gazebo GUI 6 -### Ignition Gui 6.4.0 (2022-02-01) +### Gazebo GUI 6.4.0 (2022-02-01) 1. Improve inserting WorldControl and WorldStats from menu - * [Pull request #349](https://github.com/ignitionrobotics/ign-gui/pull/349) + * [Pull request #349](https://github.com/gazebosim/gz-gui/pull/349) 1. Added a button that allows shutting down both the client and server. - * [Pull request #335](https://github.com/ignitionrobotics/ign-gui/pull/335) + * [Pull request #335](https://github.com/gazebosim/gz-gui/pull/335) 1. Prevent Scene3D 💥 if another scene is already loaded - * [Pull request #347](https://github.com/ignitionrobotics/ign-gui/pull/347) + * [Pull request #347](https://github.com/gazebosim/gz-gui/pull/347) 1. Add project() to examples and remove hard-dependency on Ogre1 - * [Pull request #345](https://github.com/ignitionrobotics/ign-gui/pull/345) + * [Pull request #345](https://github.com/gazebosim/gz-gui/pull/345) -### Ignition Gui 6.3.0 (2022-01-06) +### Gazebo GUI 6.3.0 (2022-01-06) 1. NavSat (GPS) map plugin - * [Pull request #342](https://github.com/ignitionrobotics/ign-gui/pull/342) + * [Pull request #342](https://github.com/gazebosim/gz-gui/pull/342) -### Ignition Gui 6.2.0 (2021-12-08) +### Gazebo GUI 6.2.0 (2021-12-08) 1. Grid config: set values from startup and improve layout - * [Pull request #324](https://github.com/ignitionrobotics/ign-gui/pull/324) + * [Pull request #324](https://github.com/gazebosim/gz-gui/pull/324) 1. Fix codecheck - * [Pull request #332](https://github.com/ignitionrobotics/ign-gui/pull/332) - * [Pull request #329](https://github.com/ignitionrobotics/ign-gui/pull/329) + * [Pull request #332](https://github.com/gazebosim/gz-gui/pull/332) + * [Pull request #329](https://github.com/gazebosim/gz-gui/pull/329) 1. Offer a way to disable warnings on marker manager - * [Pull request #326](https://github.com/ignitionrobotics/ign-gui/pull/326) + * [Pull request #326](https://github.com/gazebosim/gz-gui/pull/326) 1. Add PreRender event to MinimalScene - * [Pull request #325](https://github.com/ignitionrobotics/ign-gui/pull/325) + * [Pull request #325](https://github.com/gazebosim/gz-gui/pull/325) 1. Use qmldir to define QML module with IgnSpinBox - * [Pull request #319](https://github.com/ignitionrobotics/ign-gui/pull/319) + * [Pull request #319](https://github.com/gazebosim/gz-gui/pull/319) 1. Fix TopicEcho plugin message display - * [Pull request #322](https://github.com/ignitionrobotics/ign-gui/pull/322) + * [Pull request #322](https://github.com/gazebosim/gz-gui/pull/322) 1. Don't set visual scale for point markers - * [Pull request #321](https://github.com/ignitionrobotics/ign-gui/pull/321) + * [Pull request #321](https://github.com/gazebosim/gz-gui/pull/321) 1. Set marker point size from message - * [Pull request #317](https://github.com/ignitionrobotics/ign-gui/pull/317) + * [Pull request #317](https://github.com/gazebosim/gz-gui/pull/317) 1. Don't crash if a plugin has invalid QML - * [Pull request #315](https://github.com/ignitionrobotics/ign-gui/pull/315) + * [Pull request #315](https://github.com/gazebosim/gz-gui/pull/315) 1. Added log storing for ign-gui - * [Pull request #272](https://github.com/ignitionrobotics/ign-gui/pull/272) + * [Pull request #272](https://github.com/gazebosim/gz-gui/pull/272) -### Ignition Gui 6.1.0 (2021-11-05) +### Gazebo GUI 6.1.0 (2021-11-05) 1. Improved doxygen - * [Pull request #275](https://github.com/ignitionrobotics/ign-gui/pull/275) + * [Pull request #275](https://github.com/gazebosim/gz-gui/pull/275) 1. Fix mimimal scene deadlock on shutdown - * [Pull request #300](https://github.com/ignitionrobotics/ign-gui/pull/300) + * [Pull request #300](https://github.com/gazebosim/gz-gui/pull/300) 1. Fix memory leak - * [Pull request #287](https://github.com/ignitionrobotics/ign-gui/pull/287) + * [Pull request #287](https://github.com/gazebosim/gz-gui/pull/287) 1. Set near/far camera clipping distance - * [Pull request #309](https://github.com/ignitionrobotics/ign-gui/pull/309) + * [Pull request #309](https://github.com/gazebosim/gz-gui/pull/309) 1. Support emitting an event on play/pause/step - * [Pull request #306](https://github.com/ignitionrobotics/ign-gui/pull/306) + * [Pull request #306](https://github.com/gazebosim/gz-gui/pull/306) -### Ignition Gui 6.0.0 (2021-09-XX) +### Gazebo GUI 6.0.0 (2021-09-XX) 1. Add a filter to the plugin menu - * [Pull request #277](https://github.com/ignitionrobotics/ign-gui/pull/277) + * [Pull request #277](https://github.com/gazebosim/gz-gui/pull/277) 1. New events 1. Drop - * [Pull request #282](https://github.com/ignitionrobotics/ign-gui/pull/282) + * [Pull request #282](https://github.com/gazebosim/gz-gui/pull/282) 1. SpawnCloneFromName - * [Pull request #278](https://github.com/ignitionrobotics/ign-gui/pull/278) + * [Pull request #278](https://github.com/gazebosim/gz-gui/pull/278) 1. HoverOnScene - * [Pull request #273](https://github.com/ignitionrobotics/ign-gui/pull/273) + * [Pull request #273](https://github.com/gazebosim/gz-gui/pull/273) 1. Mouse Events based on ignition::common - * [Pull request #228](https://github.com/ignitionrobotics/ign-gui/pull/228) + * [Pull request #228](https://github.com/gazebosim/gz-gui/pull/228) 1. New plugins 1. Interactive view control - * [Pull request #231](https://github.com/ignitionrobotics/ign-gui/pull/231) + * [Pull request #231](https://github.com/gazebosim/gz-gui/pull/231) 1. Marker Manager - * [Pull request #247](https://github.com/ignitionrobotics/ign-gui/pull/247) + * [Pull request #247](https://github.com/gazebosim/gz-gui/pull/247) 1. Moved tape measure and grid config from ign-gazebo to ign-gui - * [Pull request #236](https://github.com/ignitionrobotics/ign-gui/pull/236) + * [Pull request #236](https://github.com/gazebosim/gz-gui/pull/236) 1. PIMPL GUI events - * [Pull request #253](https://github.com/ignitionrobotics/ign-gui/pull/253) + * [Pull request #253](https://github.com/gazebosim/gz-gui/pull/253) 1. Added winID to fix second windows in OGRE2.2 - * [Pull request #292](https://github.com/ignitionrobotics/ign-gui/pull/292) + * [Pull request #292](https://github.com/gazebosim/gz-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) + * [Pull request #226](https://github.com/gazebosim/gz-gui/pull/226) + * [Pull request #254](https://github.com/gazebosim/gz-gui/pull/254) 1. Split transport scene manager into a plugin outside Scene3D. Adds MinimalScene - * [Pull request #221](https://github.com/ignitionrobotics/ign-gui/pull/221) - * [Pull request #284](https://github.com/ignitionrobotics/ign-gui/pull/284) - * [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) + * [Pull request #221](https://github.com/gazebosim/gz-gui/pull/221) + * [Pull request #284](https://github.com/gazebosim/gz-gui/pull/284) + * [Pull request #285](https://github.com/gazebosim/gz-gui/pull/285) + * [Pull request #268](https://github.com/gazebosim/gz-gui/pull/268) + * [Pull request #224](https://github.com/gazebosim/gz-gui/pull/224) + * [Pull request #282](https://github.com/gazebosim/gz-gui/pull/282) + * [Pull request #273](https://github.com/gazebosim/gz-gui/pull/273) + * [Pull request #286](https://github.com/gazebosim/gz-gui/pull/286) + * [Pull request #295](https://github.com/gazebosim/gz-gui/pull/295) 1. Remove deprecations: tock - * [Pull request #243](https://github.com/ignitionrobotics/ign-gui/pull/243) + * [Pull request #243](https://github.com/gazebosim/gz-gui/pull/243) 1. Depend on ign-msgs8, ign-transport11, ign-rendering6 - * [Pull request #210](https://github.com/ignitionrobotics/ign-gui/pull/210) + * [Pull request #210](https://github.com/gazebosim/gz-gui/pull/210) 1. Infrastructure - * [Pull request #207](https://github.com/ignitionrobotics/ign-gui/pull/207) - * [Pull request #219](https://github.com/ignitionrobotics/ign-gui/pull/219) - * [Pull request #266](https://github.com/ignitionrobotics/ign-gui/pull/266) - * [Pull request #274](https://github.com/ignitionrobotics/ign-gui/pull/274) + * [Pull request #207](https://github.com/gazebosim/gz-gui/pull/207) + * [Pull request #219](https://github.com/gazebosim/gz-gui/pull/219) + * [Pull request #266](https://github.com/gazebosim/gz-gui/pull/266) + * [Pull request #274](https://github.com/gazebosim/gz-gui/pull/274) -## Ignition Gui 5 +## Gazebo GUI 5 -### Ignition Gui 5.5.0 (2022-03-28) +### Gazebo GUI 5.5.0 (2022-03-28) 1. Fix some Qt warnings - * [Pull request #376](https://github.com/ignitionrobotics/ign-gui/pull/376) + * [Pull request #376](https://github.com/gazebosim/gz-gui/pull/376) 1. Added Snackbar QtQuick object - * [Pull request #369](https://github.com/ignitionrobotics/ign-gui/pull/369) - * [Pull request #370](https://github.com/ignitionrobotics/ign-gui/pull/370) + * [Pull request #369](https://github.com/gazebosim/gz-gui/pull/369) + * [Pull request #370](https://github.com/gazebosim/gz-gui/pull/370) 1. Fix menu scrolling when a new plugin is added - * [Pull request #368](https://github.com/ignitionrobotics/ign-gui/pull/368) + * [Pull request #368](https://github.com/gazebosim/gz-gui/pull/368) 1. Improve KeyPublisher's usability - * [Pull request #362](https://github.com/ignitionrobotics/ign-gui/pull/362) + * [Pull request #362](https://github.com/gazebosim/gz-gui/pull/362) 1. Backport GridConfig improvements to Grid3D - * [Pull request #363](https://github.com/ignitionrobotics/ign-gui/pull/363) + * [Pull request #363](https://github.com/gazebosim/gz-gui/pull/363) -### Ignition Gui 5.4.0 (2022-01-31) +### Gazebo GUI 5.4.0 (2022-01-31) 1. Improve inserting WorldControl and WorldStats from menu - * [Pull request #349](https://github.com/ignitionrobotics/ign-gui/pull/349) + * [Pull request #349](https://github.com/gazebosim/gz-gui/pull/349) 1. Added a button that allows shutting down both the client and server. - * [Pull request #335](https://github.com/ignitionrobotics/ign-gui/pull/335) + * [Pull request #335](https://github.com/gazebosim/gz-gui/pull/335) 1. Prevent Scene3D 💥 if another scene is already loaded - * [Pull request #347](https://github.com/ignitionrobotics/ign-gui/pull/347) + * [Pull request #347](https://github.com/gazebosim/gz-gui/pull/347) 1. Add project() to examples and remove hard-dependency on Ogre1 - * [Pull request #345](https://github.com/ignitionrobotics/ign-gui/pull/345) + * [Pull request #345](https://github.com/gazebosim/gz-gui/pull/345) 1. Fix codecheck - * [Pull request #329](https://github.com/ignitionrobotics/ign-gui/pull/329) + * [Pull request #329](https://github.com/gazebosim/gz-gui/pull/329) 1. Use qmldir to define QML module with IgnSpinBox - * [Pull request #319](https://github.com/ignitionrobotics/ign-gui/pull/319) + * [Pull request #319](https://github.com/gazebosim/gz-gui/pull/319) 1. Fix TopicEcho plugin message display - * [Pull request #322](https://github.com/ignitionrobotics/ign-gui/pull/322) + * [Pull request #322](https://github.com/gazebosim/gz-gui/pull/322) 1. Don't crash if a plugin has invalid QML - * [Pull request #315](https://github.com/ignitionrobotics/ign-gui/pull/315) + * [Pull request #315](https://github.com/gazebosim/gz-gui/pull/315) 1. Added log storing for ign-gui - * [Pull request #272](https://github.com/ignitionrobotics/ign-gui/pull/272) + * [Pull request #272](https://github.com/gazebosim/gz-gui/pull/272) -### Ignition Gui 5.3.0 (2021-10-13) +### Gazebo GUI 5.3.0 (2021-10-13) 1. Improved doxygen - * [Pull request #275](https://github.com/ignitionrobotics/ign-gui/pull/275) + * [Pull request #275](https://github.com/gazebosim/gz-gui/pull/275) 1. Fix memory leak - * [Pull request #287](https://github.com/ignitionrobotics/ign-gui/pull/287) + * [Pull request #287](https://github.com/gazebosim/gz-gui/pull/287) 1. Add a filter to the plugin menu - * [Pull request #277](https://github.com/ignitionrobotics/ign-gui/pull/277) + * [Pull request #277](https://github.com/gazebosim/gz-gui/pull/277) 1. 👩‍🌾 Remove bitbucket-pipelines.yml - * [Pull request #274](https://github.com/ignitionrobotics/ign-gui/pull/274) + * [Pull request #274](https://github.com/gazebosim/gz-gui/pull/274) 1. Fix doc build error - * [Pull request #266](https://github.com/ignitionrobotics/ign-gui/pull/266) + * [Pull request #266](https://github.com/gazebosim/gz-gui/pull/266) -### Ignition Gui 5.2.0 (2021-07-27) +### Gazebo GUI 5.2.0 (2021-07-27) 1. New teleop plugin implementation. - * [Pull request #245](https://github.com/ignitionrobotics/ign-gui/pull/245) + * [Pull request #245](https://github.com/gazebosim/gz-gui/pull/245) 1. Fix plugin added signal, add PluginByName - * [Pull request #249](https://github.com/ignitionrobotics/ign-gui/pull/249) + * [Pull request #249](https://github.com/gazebosim/gz-gui/pull/249) 1. Fixed tests by passing valid argv - * [Pull request #244](https://github.com/ignitionrobotics/ign-gui/pull/244) + * [Pull request #244](https://github.com/gazebosim/gz-gui/pull/244) 1. Screenshot plugin fixed dbg message - * [Pull request #246](https://github.com/ignitionrobotics/ign-gui/pull/246) + * [Pull request #246](https://github.com/gazebosim/gz-gui/pull/246) 1. Detect ign instead of using cmake module to check for ignition-tools - * [Pull request #240](https://github.com/ignitionrobotics/ign-gui/pull/240) + * [Pull request #240](https://github.com/gazebosim/gz-gui/pull/240) -### Ignition Gui 5.1.0 (2021-06-23) +### Gazebo GUI 5.1.0 (2021-06-23) 1. Depend on common 4.1 and rendering 5.1 - * [Pull request #238](https://github.com/ignitionrobotics/ign-gui/pull/238) + * [Pull request #238](https://github.com/gazebosim/gz-gui/pull/238) 1. Update codeowners - * [Pull request #232](https://github.com/ignitionrobotics/ign-gui/pull/232) + * [Pull request #232](https://github.com/gazebosim/gz-gui/pull/232) 1. Confirmation dialog when closing main window - * [Pull request #225](https://github.com/ignitionrobotics/ign-gui/pull/225) + * [Pull request #225](https://github.com/gazebosim/gz-gui/pull/225) 1. Avoid Grid3D crash - * [Pull request #227](https://github.com/ignitionrobotics/ign-gui/pull/227) + * [Pull request #227](https://github.com/gazebosim/gz-gui/pull/227) 1. Emit more events from Scene3D - * [Pull request #213](https://github.com/ignitionrobotics/ign-gui/pull/213) + * [Pull request #213](https://github.com/gazebosim/gz-gui/pull/213) 1. Removed duplicated code with `rendering::sceneFromFirstRenderEngine` - * [Pull request #223](https://github.com/ignitionrobotics/ign-gui/pull/223) + * [Pull request #223](https://github.com/gazebosim/gz-gui/pull/223) 1. Remove `tools/code_check` and update codecov - * [Pull request #222](https://github.com/ignitionrobotics/ign-gui/pull/222) + * [Pull request #222](https://github.com/gazebosim/gz-gui/pull/222) 1. Refactor Image Display to use ConvertToRGB function - * [Pull request #212](https://github.com/ignitionrobotics/ign-gui/pull/212) + * [Pull request #212](https://github.com/gazebosim/gz-gui/pull/212) 1. Fixed material specular in Scene3D - * [Pull request #218](https://github.com/ignitionrobotics/ign-gui/pull/218) + * [Pull request #218](https://github.com/gazebosim/gz-gui/pull/218) 1. Updated scale for capsule in Scene3D - * [Pull request #215](https://github.com/ignitionrobotics/ign-gui/pull/215) + * [Pull request #215](https://github.com/gazebosim/gz-gui/pull/215) 1. Support Capsule and Ellipsoid in Scene3D - * [Pull request #214](https://github.com/ignitionrobotics/ign-gui/pull/214) + * [Pull request #214](https://github.com/gazebosim/gz-gui/pull/214) 1. `check_test_ran.py`: remove grep/xsltproc - * [Pull request #203](https://github.com/ignitionrobotics/ign-gui/pull/203) + * [Pull request #203](https://github.com/gazebosim/gz-gui/pull/203) -### Ignition Gui 5.0.0 (2021-03-31) +### Gazebo GUI 5.0.0 (2021-03-31) 1. Bump in edifice: ign-common4 - * [Pull request #169](https://github.com/ignitionrobotics/ign-gui/pull/169) + * [Pull request #169](https://github.com/gazebosim/gz-gui/pull/169) 1. Bump in edifice: ign-msgs7 and ign-transport10 - * [Pull request #167](https://github.com/ignitionrobotics/ign-gui/pull/167) + * [Pull request #167](https://github.com/gazebosim/gz-gui/pull/167) 1. Bump in edifice: ign-rendering5 - * [Pull request #141](https://github.com/ignitionrobotics/ign-gui/pull/141) + * [Pull request #141](https://github.com/gazebosim/gz-gui/pull/141) 1. Documentation updates - * [Pull request #202](https://github.com/ignitionrobotics/ign-gui/pull/202) - * [Pull request #204](https://github.com/ignitionrobotics/ign-gui/pull/204) + * [Pull request #202](https://github.com/gazebosim/gz-gui/pull/202) + * [Pull request #204](https://github.com/gazebosim/gz-gui/pull/204) -## Ignition Gui 4 +## Gazebo GUI 4 -### Ignition Gui 4.X.X +### Gazebo GUI 4.X.X -### Ignition Gui 4.X.X (20XX-XX-XX) +### Gazebo GUI 4.X.X (20XX-XX-XX) -### Ignition Gui 4.5.0 (2021-07-26) +### Gazebo GUI 4.5.0 (2021-07-26) 1. New teleop plugin implementation. - * [Pull request #245](https://github.com/ignitionrobotics/ign-gui/pull/245) + * [Pull request #245](https://github.com/gazebosim/gz-gui/pull/245) 1. Fix codeowners - * [Pull request #251](https://github.com/ignitionrobotics/ign-gui/pull/251) + * [Pull request #251](https://github.com/gazebosim/gz-gui/pull/251) 1. Fix plugin added signal, add PluginByName - * [Pull request #249](https://github.com/ignitionrobotics/ign-gui/pull/249) + * [Pull request #249](https://github.com/gazebosim/gz-gui/pull/249) 1. Fixed tests by passing valid argv - * [Pull request #244](https://github.com/ignitionrobotics/ign-gui/pull/244) + * [Pull request #244](https://github.com/gazebosim/gz-gui/pull/244) 1. Screenshot plugin fixed dbg message - * [Pull request #246](https://github.com/ignitionrobotics/ign-gui/pull/246) + * [Pull request #246](https://github.com/gazebosim/gz-gui/pull/246) 1. Detect ign instead of using cmake module to check for ignition-tools - * [Pull request #240](https://github.com/ignitionrobotics/ign-gui/pull/240) + * [Pull request #240](https://github.com/gazebosim/gz-gui/pull/240) -### Ignition Gui 4.4.0 (2021-06-21) +### Gazebo GUI 4.4.0 (2021-06-21) 1. Bump required ign-rendering version to 4.8 - * [Pull request #234](https://github.com/ignitionrobotics/ign-gui/pull/234) + * [Pull request #234](https://github.com/gazebosim/gz-gui/pull/234) 1. Update codeowners - * [Pull request #232](https://github.com/ignitionrobotics/ign-gui/pull/232) + * [Pull request #232](https://github.com/gazebosim/gz-gui/pull/232) 1. Confirmation dialog when closing main window - * [Pull request #225](https://github.com/ignitionrobotics/ign-gui/pull/225) + * [Pull request #225](https://github.com/gazebosim/gz-gui/pull/225) 1. Avoid grid3D crash - * [Pull request #227](https://github.com/ignitionrobotics/ign-gui/pull/227) + * [Pull request #227](https://github.com/gazebosim/gz-gui/pull/227) 1. Emit more events from Scene3D - * [Pull request #213](https://github.com/ignitionrobotics/ign-gui/pull/213) + * [Pull request #213](https://github.com/gazebosim/gz-gui/pull/213) 1. Removed duplicated code with rendering::sceneFromFirstRenderEngine - * [Pull request #223](https://github.com/ignitionrobotics/ign-gui/pull/223) + * [Pull request #223](https://github.com/gazebosim/gz-gui/pull/223) 1. Remove `tools/code_check` and update codecov - * [Pull request #222](https://github.com/ignitionrobotics/ign-gui/pull/222) + * [Pull request #222](https://github.com/gazebosim/gz-gui/pull/222) 1. Refactor Image Display to use ConvertToRGB function - * [Pull request #212](https://github.com/ignitionrobotics/ign-gui/pull/212) + * [Pull request #212](https://github.com/gazebosim/gz-gui/pull/212) 1. Fixed material specular in scene3D - * [Pull request #218](https://github.com/ignitionrobotics/ign-gui/pull/218) + * [Pull request #218](https://github.com/gazebosim/gz-gui/pull/218) 1. `check_test_ran.py`: remove grep/xsltproc - * [Pull request #203](https://github.com/ignitionrobotics/ign-gui/pull/203) + * [Pull request #203](https://github.com/gazebosim/gz-gui/pull/203) 1. Improve the height of plugins in the right split - * [Pull request #194](https://github.com/ignitionrobotics/ign-gui/pull/194) + * [Pull request #194](https://github.com/gazebosim/gz-gui/pull/194) 1. Scene3D: port mesh material fixes from ign-gazebo - * [Pull request #191](https://github.com/ignitionrobotics/ign-gui/pull/191) + * [Pull request #191](https://github.com/gazebosim/gz-gui/pull/191) -### Ignition Gui 4.3.0 (2021-03-11) +### Gazebo GUI 4.3.0 (2021-03-11) 1. Screenshot plugin - * [Pull request #170](https://github.com/ignitionrobotics/ign-gui/pull/170) + * [Pull request #170](https://github.com/gazebosim/gz-gui/pull/170) 1. Master branch updates - * [Pull request #187](https://github.com/ignitionrobotics/ign-gui/pull/187) + * [Pull request #187](https://github.com/gazebosim/gz-gui/pull/187) 1. 👩‍🌾 Disable tests that initialize App on macOS: they're all flaky - * [Pull request #184](https://github.com/ignitionrobotics/ign-gui/pull/184) + * [Pull request #184](https://github.com/gazebosim/gz-gui/pull/184) 1. Remove issue & PR templates - * [Pull request #181](https://github.com/ignitionrobotics/ign-gui/pull/181) + * [Pull request #181](https://github.com/gazebosim/gz-gui/pull/181) 1. Backport Publisher test from v4 - * [Pull request #173](https://github.com/ignitionrobotics/ign-gui/pull/173) + * [Pull request #173](https://github.com/gazebosim/gz-gui/pull/173) 1. Fix version number - * [Pull request #179](https://github.com/ignitionrobotics/ign-gui/pull/179) + * [Pull request #179](https://github.com/gazebosim/gz-gui/pull/179) 1. Better error messages when component can't be loaded - * [Pull request #175](https://github.com/ignitionrobotics/ign-gui/pull/175) + * [Pull request #175](https://github.com/gazebosim/gz-gui/pull/175) 1. Make Grid3D plugin more flexible - * [Pull request #172](https://github.com/ignitionrobotics/ign-gui/pull/172) + * [Pull request #172](https://github.com/gazebosim/gz-gui/pull/172) 1. Add Windows Installation - * [Pull request #168](https://github.com/ignitionrobotics/ign-gui/pull/168) + * [Pull request #168](https://github.com/gazebosim/gz-gui/pull/168) -### Ignition Gui 4.2.0 (2021-02-09) +### Gazebo GUI 4.2.0 (2021-02-09) 1. Added issue and PR templates - * [Pull request 174](https://github.com/ignitionrobotics/ign-gui/pull/174) + * [Pull request 174](https://github.com/gazebosim/gz-gui/pull/174) 1. Visualize single channel 8 bit image data - * [Pull request 176](https://github.com/ignitionrobotics/ign-gui/pull/176) + * [Pull request 176](https://github.com/gazebosim/gz-gui/pull/176) -### Ignition Gui 4.1.1 (2021-01-05) +### Gazebo GUI 4.1.1 (2021-01-05) 1. Use default value of double ptr argv for CLI - * [Pull request 165](https://github.com/ignitionrobotics/ign-gui/pull/165) + * [Pull request 165](https://github.com/gazebosim/gz-gui/pull/165) 1. Generate valid topics depending on world name - * [Pull request 164](https://github.com/ignitionrobotics/ign-gui/pull/164) + * [Pull request 164](https://github.com/gazebosim/gz-gui/pull/164) -### Ignition Gui 4.1.0 (2020-12-18) +### Gazebo GUI 4.1.0 (2020-12-18) 1. Publish plugin API docs - * [Pull request 128](https://github.com/ignitionrobotics/ign-gui/pull/128) + * [Pull request 128](https://github.com/gazebosim/gz-gui/pull/128) 1. Tutorial tweaks - * [Pull request 132](https://github.com/ignitionrobotics/ign-gui/pull/132) + * [Pull request 132](https://github.com/gazebosim/gz-gui/pull/132) 1. Floating and standalone plugins respect minimum dimensions - * [Pull request 135](https://github.com/ignitionrobotics/ign-gui/pull/135) + * [Pull request 135](https://github.com/gazebosim/gz-gui/pull/135) 1. Add scrollable indicator for plugin menu - * [Pull request 134](https://github.com/ignitionrobotics/ign-gui/pull/134) + * [Pull request 134](https://github.com/gazebosim/gz-gui/pull/134) 1. Add qml-module-qtcharts dependency - * [Pull request 136](https://github.com/ignitionrobotics/ign-gui/pull/136) + * [Pull request 136](https://github.com/gazebosim/gz-gui/pull/136) 1. Re-enable image.config test - * [Pull request 140](https://github.com/ignitionrobotics/ign-gui/pull/140) + * [Pull request 140](https://github.com/gazebosim/gz-gui/pull/140) 1. Improve fork experience - * [Pull request 139](https://github.com/ignitionrobotics/ign-gui/pull/139) + * [Pull request 139](https://github.com/gazebosim/gz-gui/pull/139) 1. Resolve updated codecheck issues - * [Pull request 144](https://github.com/ignitionrobotics/ign-gui/pull/144) - * [Pull request 157](https://github.com/ignitionrobotics/ign-gui/pull/157) + * [Pull request 144](https://github.com/gazebosim/gz-gui/pull/144) + * [Pull request 157](https://github.com/gazebosim/gz-gui/pull/157) -1. Port Gazebo GUI events to Ignition GUI - * [Pull request 148](https://github.com/ignitionrobotics/ign-gui/pull/148) +1. Port Gazebo GUI events to Gazebo GUI + * [Pull request 148](https://github.com/gazebosim/gz-gui/pull/148) 1. Change deprecated Qt::MidButton - * [Pull request 153](https://github.com/ignitionrobotics/ign-gui/pull/153) + * [Pull request 153](https://github.com/gazebosim/gz-gui/pull/153) 1. Add right mouse events and tests - * [Pull request 154](https://github.com/ignitionrobotics/ign-gui/pull/154) + * [Pull request 154](https://github.com/gazebosim/gz-gui/pull/154) 1. Avoid crash on macOS - * [Pull request 155](https://github.com/ignitionrobotics/ign-gui/pull/155) + * [Pull request 155](https://github.com/gazebosim/gz-gui/pull/155) -### Ignition Gui 4.0.0 (2020-09-29) +### Gazebo GUI 4.0.0 (2020-09-29) 1. GitHub migration - * [Pull request 59](https://github.com/ignitionrobotics/ign-gui/pull/59) + * [Pull request 59](https://github.com/gazebosim/gz-gui/pull/59) 1. Fixed ImageDisplay in Ubuntu 20.04 - * [Pull request 88](https://github.com/ignitionrobotics/ign-gui/pull/88) + * [Pull request 88](https://github.com/gazebosim/gz-gui/pull/88) 1. Re-enable publisher test - * [Pull request 85](https://github.com/ignitionrobotics/ign-gui/pull/85) + * [Pull request 85](https://github.com/gazebosim/gz-gui/pull/85) 1. Disable TopicViewer test on Windows and macOS - * [Pull request 85](https://github.com/ignitionrobotics/ign-gui/pull/85) + * [Pull request 85](https://github.com/gazebosim/gz-gui/pull/85) 1. Documentation updates - * [Pull request 106](https://github.com/ignitionrobotics/ign-gui/pull/106) - * [Pull request 130](https://github.com/ignitionrobotics/ign-gui/pull/130) - * [Pull request 127](https://github.com/ignitionrobotics/ign-gui/pull/127) + * [Pull request 106](https://github.com/gazebosim/gz-gui/pull/106) + * [Pull request 130](https://github.com/gazebosim/gz-gui/pull/130) + * [Pull request 127](https://github.com/gazebosim/gz-gui/pull/127) 1. Fix qt anchor warnings - * [Pull request 126](https://github.com/ignitionrobotics/ign-gui/pull/126) + * [Pull request 126](https://github.com/gazebosim/gz-gui/pull/126) 1. Plotting: transport plotting and interface - * [Pull request 115](https://github.com/ignitionrobotics/ign-gui/pull/115) - * [Pull request 125](https://github.com/ignitionrobotics/ign-gui/pull/125) - * [Pull request 124](https://github.com/ignitionrobotics/ign-gui/pull/124) - * [Pull request 89](https://github.com/ignitionrobotics/ign-gui/pull/89) + * [Pull request 115](https://github.com/gazebosim/gz-gui/pull/115) + * [Pull request 125](https://github.com/gazebosim/gz-gui/pull/125) + * [Pull request 124](https://github.com/gazebosim/gz-gui/pull/124) + * [Pull request 89](https://github.com/gazebosim/gz-gui/pull/89) 1. Use std::chrono instead of common::Time - * [Pull request 116](https://github.com/ignitionrobotics/ign-gui/pull/116) + * [Pull request 116](https://github.com/gazebosim/gz-gui/pull/116) 1. Depend on QtCharts and change application base class to QApplication * [BitBucket pull request 252](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-gui/pull-requests/252) 1. Depend on ign-msgs6 and ign-transport9 - * [Pull request 92](https://github.com/ignitionrobotics/ign-gui/pull/92) + * [Pull request 92](https://github.com/gazebosim/gz-gui/pull/92) 1. Depend on ign-rendering4 * [BitBucket pull request 243](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-gui/pull-requests/243) -## Ignition Gui 3 +## Gazebo GUI 3 -### Ignition Gui 3.9.0 (2022-01-14) +### Gazebo GUI 3.9.0 (2022-01-14) 1. Added a button that allows shutting down both the client and server. - * [Pull request #335](https://github.com/ignitionrobotics/ign-gui/pull/335) + * [Pull request #335](https://github.com/gazebosim/gz-gui/pull/335) 1. Prevent Scene3D 💥 if another scene is already loaded - * [Pull request #347](https://github.com/ignitionrobotics/ign-gui/pull/347) + * [Pull request #347](https://github.com/gazebosim/gz-gui/pull/347) 1. Add project() to examples and remove hard-dependency on Ogre1 - * [Pull request #345](https://github.com/ignitionrobotics/ign-gui/pull/345) + * [Pull request #345](https://github.com/gazebosim/gz-gui/pull/345) 1. Fix codecheck - * [Pull request #329](https://github.com/ignitionrobotics/ign-gui/pull/329) + * [Pull request #329](https://github.com/gazebosim/gz-gui/pull/329) 1. Use `qmldir` to define QML module with `IgnSpinBox` - * [Pull request #319](https://github.com/ignitionrobotics/ign-gui/pull/319) + * [Pull request #319](https://github.com/gazebosim/gz-gui/pull/319) 1. Fix `TopicEcho` plugin message display - * [Pull request #322](https://github.com/ignitionrobotics/ign-gui/pull/322) + * [Pull request #322](https://github.com/gazebosim/gz-gui/pull/322) 1. Don't crash if a plugin has invalid QML - * [Pull request #315](https://github.com/ignitionrobotics/ign-gui/pull/315) + * [Pull request #315](https://github.com/gazebosim/gz-gui/pull/315) 1. Added log storing for `ign gui` CLI - * [Pull request #272](https://github.com/ignitionrobotics/ign-gui/pull/272) + * [Pull request #272](https://github.com/gazebosim/gz-gui/pull/272) -### Ignition Gui 3.8.0 (2021-10-12) +### Gazebo GUI 3.8.0 (2021-10-12) 1. Improved doxygen - * [Pull request #275](https://github.com/ignitionrobotics/ign-gui/pull/275) + * [Pull request #275](https://github.com/gazebosim/gz-gui/pull/275) 1. Add a filter to the plugin menu - * [Pull request #277](https://github.com/ignitionrobotics/ign-gui/pull/277) + * [Pull request #277](https://github.com/gazebosim/gz-gui/pull/277) 1. 👩‍🌾 Remove bitbucket-pipelines.yml - * [Pull request #274](https://github.com/ignitionrobotics/ign-gui/pull/274) + * [Pull request #274](https://github.com/gazebosim/gz-gui/pull/274) 1. Require ign-rendering 3.5 - * [Pull request #264](https://github.com/ignitionrobotics/ign-gui/pull/264) + * [Pull request #264](https://github.com/gazebosim/gz-gui/pull/264) 1. New teleop plugin implementation. - * [Pull request #245](https://github.com/ignitionrobotics/ign-gui/pull/245) + * [Pull request #245](https://github.com/gazebosim/gz-gui/pull/245) -### Ignition Gui 3.7.0 (2021-07-14) +### Gazebo GUI 3.7.0 (2021-07-14) 1. Fix codeowners - * [Pull request #251](https://github.com/ignitionrobotics/ign-gui/pull/251) + * [Pull request #251](https://github.com/gazebosim/gz-gui/pull/251) 1. Fix plugin added signal, add PluginByName - * [Pull request #249](https://github.com/ignitionrobotics/ign-gui/pull/249) + * [Pull request #249](https://github.com/gazebosim/gz-gui/pull/249) 1. Fixed tests by passing valid argv - * [Pull request #244](https://github.com/ignitionrobotics/ign-gui/pull/244) + * [Pull request #244](https://github.com/gazebosim/gz-gui/pull/244) 1. Screenshot plugin fixed dbg message - * [Pull request #246](https://github.com/ignitionrobotics/ign-gui/pull/246) + * [Pull request #246](https://github.com/gazebosim/gz-gui/pull/246) 1. Detect ign instead of using cmake module to check for ignition-tools - * [Pull request #240](https://github.com/ignitionrobotics/ign-gui/pull/240) + * [Pull request #240](https://github.com/gazebosim/gz-gui/pull/240) -### Ignition Gui 3.6.0 (2021-06-17) +### Gazebo GUI 3.6.0 (2021-06-17) 1. Update codeowners - * [Pull request #232](https://github.com/ignitionrobotics/ign-gui/pull/232) + * [Pull request #232](https://github.com/gazebosim/gz-gui/pull/232) 1. Confirmation dialog when closing main window - * [Pull request #225](https://github.com/ignitionrobotics/ign-gui/pull/225) + * [Pull request #225](https://github.com/gazebosim/gz-gui/pull/225) 1. Avoid grid3D crash - * [Pull request #227](https://github.com/ignitionrobotics/ign-gui/pull/227) + * [Pull request #227](https://github.com/gazebosim/gz-gui/pull/227) 1. Emit more events from Scene3D - * [Pull request #213](https://github.com/ignitionrobotics/ign-gui/pull/213) + * [Pull request #213](https://github.com/gazebosim/gz-gui/pull/213) 1. Removed duplicated code with rendering::sceneFromFirstRenderEngine - * [Pull request #223](https://github.com/ignitionrobotics/ign-gui/pull/223) + * [Pull request #223](https://github.com/gazebosim/gz-gui/pull/223) 1. Remove `tools/code_check` and update codecov - * [Pull request #222](https://github.com/ignitionrobotics/ign-gui/pull/222) + * [Pull request #222](https://github.com/gazebosim/gz-gui/pull/222) 1. Fixed material specular in `Scene3D` - * [Pull request #218](https://github.com/ignitionrobotics/ign-gui/pull/218) + * [Pull request #218](https://github.com/gazebosim/gz-gui/pull/218) 1. `check_test_ran.py`: remove grep/xsltproc - * [Pull request #203](https://github.com/ignitionrobotics/ign-gui/pull/203) + * [Pull request #203](https://github.com/gazebosim/gz-gui/pull/203) -### Ignition Gui 3.5.1 (2021-03-18) +### Gazebo GUI 3.5.1 (2021-03-18) 1. Scene3D: port mesh material fixes from ign-gazebo - * [Pull request #191](https://github.com/ignitionrobotics/ign-gui/pull/191) + * [Pull request #191](https://github.com/gazebosim/gz-gui/pull/191) 1. Improve the height of plugins in the right split - * [Pull request #194](https://github.com/ignitionrobotics/ign-gui/pull/194) + * [Pull request #194](https://github.com/gazebosim/gz-gui/pull/194) -### Ignition Gui 3.5.0 (2021-03-10) +### Gazebo GUI 3.5.0 (2021-03-10) 1. Screenshot plugin - * [Pull request #170](https://github.com/ignitionrobotics/ign-gui/pull/170) + * [Pull request #170](https://github.com/gazebosim/gz-gui/pull/170) 1. Master branch updates - * [Pull request #187](https://github.com/ignitionrobotics/ign-gui/pull/187) + * [Pull request #187](https://github.com/gazebosim/gz-gui/pull/187) 1. Backport Publisher test from v4 - * [Pull request #173](https://github.com/ignitionrobotics/ign-gui/pull/173) + * [Pull request #173](https://github.com/gazebosim/gz-gui/pull/173) 1. Better error messages when component can't be loaded - * [Pull request #175](https://github.com/ignitionrobotics/ign-gui/pull/175) + * [Pull request #175](https://github.com/gazebosim/gz-gui/pull/175) 1. Make Grid3D plugin more flexible - * [Pull request #172](https://github.com/ignitionrobotics/ign-gui/pull/172) + * [Pull request #172](https://github.com/gazebosim/gz-gui/pull/172) 1. Add Windows Installation - * [Pull request #168](https://github.com/ignitionrobotics/ign-gui/pull/168) + * [Pull request #168](https://github.com/gazebosim/gz-gui/pull/168) 1. Fix codecheck - * [Pull request #157](https://github.com/ignitionrobotics/ign-gui/pull/157) + * [Pull request #157](https://github.com/gazebosim/gz-gui/pull/157) -### Ignition Gui 3.4.0 (2020-12-10) +### Gazebo GUI 3.4.0 (2020-12-10) 1. Publish plugin API docs - * [Pull request 128](https://github.com/ignitionrobotics/ign-gui/pull/128) + * [Pull request 128](https://github.com/gazebosim/gz-gui/pull/128) 1. Tutorial tweaks - * [Pull request 132](https://github.com/ignitionrobotics/ign-gui/pull/132) + * [Pull request 132](https://github.com/gazebosim/gz-gui/pull/132) 1. Floating and standalone plugins respect minimum dimensions - * [Pull request 135](https://github.com/ignitionrobotics/ign-gui/pull/135) + * [Pull request 135](https://github.com/gazebosim/gz-gui/pull/135) 1. Add scrollable indicator for plugin menu - * [Pull request 134](https://github.com/ignitionrobotics/ign-gui/pull/134) + * [Pull request 134](https://github.com/gazebosim/gz-gui/pull/134) 1. Re-enable image.config test - * [Pull request 140](https://github.com/ignitionrobotics/ign-gui/pull/140) + * [Pull request 140](https://github.com/gazebosim/gz-gui/pull/140) 1. Improve fork experience - * [Pull request 139](https://github.com/ignitionrobotics/ign-gui/pull/139) + * [Pull request 139](https://github.com/gazebosim/gz-gui/pull/139) 1. Resolve updated codecheck issues - * [Pull request 144](https://github.com/ignitionrobotics/ign-gui/pull/144) + * [Pull request 144](https://github.com/gazebosim/gz-gui/pull/144) -1. Port Gazebo GUI events to Ignition GUI - * [Pull request 148](https://github.com/ignitionrobotics/ign-gui/pull/148) +1. Port Gazebo GUI events to Gazebo GUI + * [Pull request 148](https://github.com/gazebosim/gz-gui/pull/148) 1. Change deprecated Qt::MidButton - * [Pull request 153](https://github.com/ignitionrobotics/ign-gui/pull/153) + * [Pull request 153](https://github.com/gazebosim/gz-gui/pull/153) 1. Add right mouse events and tests - * [Pull request 154](https://github.com/ignitionrobotics/ign-gui/pull/154) + * [Pull request 154](https://github.com/gazebosim/gz-gui/pull/154) -### Ignition Gui 3.3.0 (2020-08-31) +### Gazebo GUI 3.3.0 (2020-08-31) 1. rename key publisher plugin - * [Pull request 93](https://github.com/ignitionrobotics/ign-gui/pull/93) + * [Pull request 93](https://github.com/gazebosim/gz-gui/pull/93) 1. Add shift + drag to rotate camera - * [Pull request 96](https://github.com/ignitionrobotics/ign-gui/pull/96) + * [Pull request 96](https://github.com/gazebosim/gz-gui/pull/96) 1. Scroll bar adjustment - * [Pull request 97](https://github.com/ignitionrobotics/ign-gui/pull/97) + * [Pull request 97](https://github.com/gazebosim/gz-gui/pull/97) 1. Minimize GUI plugin - * [Pull request 84](https://github.com/ignitionrobotics/ign-gui/pull/84) - * [Pull request 99](https://github.com/ignitionrobotics/ign-gui/pull/99) - * [Pull request 102](https://github.com/ignitionrobotics/ign-gui/pull/102) + * [Pull request 84](https://github.com/gazebosim/gz-gui/pull/84) + * [Pull request 99](https://github.com/gazebosim/gz-gui/pull/99) + * [Pull request 102](https://github.com/gazebosim/gz-gui/pull/102) 1. Fix tests on actions - * [Pull request 98](https://github.com/ignitionrobotics/ign-gui/pull/98) + * [Pull request 98](https://github.com/gazebosim/gz-gui/pull/98) 1. Disable failing tests - * [Pull request 76](https://github.com/ignitionrobotics/ign-gui/pull/76) + * [Pull request 76](https://github.com/gazebosim/gz-gui/pull/76) 1. Use world name in default topics - * [Pull request 104](https://github.com/ignitionrobotics/ign-gui/pull/104) + * [Pull request 104](https://github.com/gazebosim/gz-gui/pull/104) 1. Fix running plugins with bad world name - * [Pull request 107](https://github.com/ignitionrobotics/ign-gui/pull/107) - * [Pull request 110](https://github.com/ignitionrobotics/ign-gui/pull/110) - * [Pull request 111](https://github.com/ignitionrobotics/ign-gui/pull/111) + * [Pull request 107](https://github.com/gazebosim/gz-gui/pull/107) + * [Pull request 110](https://github.com/gazebosim/gz-gui/pull/110) + * [Pull request 111](https://github.com/gazebosim/gz-gui/pull/111) 1. Disable more tests known to fail on macOS and Windows - * [Pull request 112](https://github.com/ignitionrobotics/ign-gui/pull/112) + * [Pull request 112](https://github.com/gazebosim/gz-gui/pull/112) 1. Add render event - * [Pull request 70](https://github.com/ignitionrobotics/ign-gui/pull/70) + * [Pull request 70](https://github.com/gazebosim/gz-gui/pull/70) 1. Fixed left menu events - * [Pull request 85](https://github.com/ignitionrobotics/ign-gui/pull/85) + * [Pull request 85](https://github.com/gazebosim/gz-gui/pull/85) 1. Added Topic Viewer plugin, list all transport topics - * [Pull request 69](https://github.com/ignitionrobotics/ign-gui/pull/69) + * [Pull request 69](https://github.com/gazebosim/gz-gui/pull/69) 1. Fix ImageDisplay in Ubuntu 20.04 - * [Pull request 96](https://github.com/ignitionrobotics/ign-gui/pull/96) + * [Pull request 96](https://github.com/gazebosim/gz-gui/pull/96) -### Ignition Gui 3.2.0 (2020-06-22) +### Gazebo GUI 3.2.0 (2020-06-22) 1. Sort GUI plugins alphabetically - * [Pull request 71](https://github.com/ignitionrobotics/ign-gui/pull/71) + * [Pull request 71](https://github.com/gazebosim/gz-gui/pull/71) 1. Add color palette to plugin settings to change background color - * [Pull request 62](https://github.com/ignitionrobotics/ign-gui/pull/62) + * [Pull request 62](https://github.com/gazebosim/gz-gui/pull/62) 1. Close plugin menu after a plugin has been added - * [Pull request 60](https://github.com/ignitionrobotics/ign-gui/pull/60) + * [Pull request 60](https://github.com/gazebosim/gz-gui/pull/60) 1. Resize undocked plugins by dragging corners - * [Pull request 78](https://github.com/ignitionrobotics/ign-gui/pull/78) + * [Pull request 78](https://github.com/gazebosim/gz-gui/pull/78) 1. Move each plugin to its own directory - * [Pull request 64](https://github.com/ignitionrobotics/ign-gui/pull/64) + * [Pull request 64](https://github.com/gazebosim/gz-gui/pull/64) 1. Add Key Publisher plugin - * [Pull request 81](https://github.com/ignitionrobotics/ign-gui/pull/81) + * [Pull request 81](https://github.com/gazebosim/gz-gui/pull/81) 1. GitHub migration - * [Pull request 46](https://github.com/ignitionrobotics/ign-gui/pull/46) - * [Pull request 47](https://github.com/ignitionrobotics/ign-gui/pull/47) - * [Pull request 56](https://github.com/ignitionrobotics/ign-gui/pull/56) - * [Pull request 57](https://github.com/ignitionrobotics/ign-gui/pull/57) + * [Pull request 46](https://github.com/gazebosim/gz-gui/pull/46) + * [Pull request 47](https://github.com/gazebosim/gz-gui/pull/47) + * [Pull request 56](https://github.com/gazebosim/gz-gui/pull/56) + * [Pull request 57](https://github.com/gazebosim/gz-gui/pull/57) -### Ignition Gui 3.1.0 (2020-03-27) +### Gazebo GUI 3.1.0 (2020-03-27) 1. Remove old ign-gui0 stuff * [BitBucket pull request 248](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-gui/pull-requests/248) @@ -738,7 +738,7 @@ * [BitBucket pull request 228](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-gui/pull-requests/228) * [BitBucket pull request 230](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-gui/pull-requests/230) -### Ignition Gui 3.0.0 (2019-12-10) +### Gazebo GUI 3.0.0 (2019-12-10) 1. Depend on ign-transport8 and ign-msgs5 * [BitBucket pull request 225](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-gui/pull-requests/225) @@ -746,73 +746,73 @@ 1. Depend on ign-rendering3 * [BitBucket pull request 221](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-gui/pull-requests/221) -## Ignition Gui 2 +## Gazebo GUI 2 -### Ignition Gui 2.3.3 (2020-08-31) +### Gazebo GUI 2.3.3 (2020-08-31) 1. Fix running plugins with bad world names. - * [Pull request 111](https://github.com/ignitionrobotics/ign-gui/pull/111) + * [Pull request 111](https://github.com/gazebosim/gz-gui/pull/111) 1. Disable more tests known to fail on macOS and Windows. - * [Pull request 112](https://github.com/ignitionrobotics/ign-gui/pull/112) + * [Pull request 112](https://github.com/gazebosim/gz-gui/pull/112) -### Ignition Gui 2.3.2 (2020-08-19) +### Gazebo GUI 2.3.2 (2020-08-19) 1. Revert pull request #107 - * [Pull request 110](https://github.com/ignitionrobotics/ign-gui/pull/110) + * [Pull request 110](https://github.com/gazebosim/gz-gui/pull/110) -### Ignition Gui 2.3.1 (2020-08-17) +### Gazebo GUI 2.3.1 (2020-08-17) 1. Fix running plugins with bad world name - * [Pull request 107](https://github.com/ignitionrobotics/ign-gui/pull/107) + * [Pull request 107](https://github.com/gazebosim/gz-gui/pull/107) -### Ignition Gui 2.3.0 (2020-08-11) +### Gazebo GUI 2.3.0 (2020-08-11) 1. Add shift + drag to rotate camera - * [Pull request 96](https://github.com/ignitionrobotics/ign-gui/pull/96) + * [Pull request 96](https://github.com/gazebosim/gz-gui/pull/96) 1. Scroll bar adjustment - * [Pull request 97](https://github.com/ignitionrobotics/ign-gui/pull/97) + * [Pull request 97](https://github.com/gazebosim/gz-gui/pull/97) 1. Minimize GUI plugin - * [Pull request 84](https://github.com/ignitionrobotics/ign-gui/pull/84) - * [Pull request 99](https://github.com/ignitionrobotics/ign-gui/pull/99) + * [Pull request 84](https://github.com/gazebosim/gz-gui/pull/84) + * [Pull request 99](https://github.com/gazebosim/gz-gui/pull/99) 1. Fix tests on actions - * [Pull request 98](https://github.com/ignitionrobotics/ign-gui/pull/98) + * [Pull request 98](https://github.com/gazebosim/gz-gui/pull/98) 1. Disable failing tests - * [Pull request 76](https://github.com/ignitionrobotics/ign-gui/pull/76) + * [Pull request 76](https://github.com/gazebosim/gz-gui/pull/76) 1. Use world name in default topics - * [Pull request 104](https://github.com/ignitionrobotics/ign-gui/pull/104) + * [Pull request 104](https://github.com/gazebosim/gz-gui/pull/104) -### Ignition Gui 2.2.0 (2020-06-17) +### Gazebo GUI 2.2.0 (2020-06-17) 1. Sort GUI plugins alphabetically - * [Pull request 71](https://github.com/ignitionrobotics/ign-gui/pull/71) + * [Pull request 71](https://github.com/gazebosim/gz-gui/pull/71) 1. Add color palette to plugin settings to change background color - * [Pull request 62](https://github.com/ignitionrobotics/ign-gui/pull/62) + * [Pull request 62](https://github.com/gazebosim/gz-gui/pull/62) 1. Close plugin menu after a plugin has been added - * [Pull request 60](https://github.com/ignitionrobotics/ign-gui/pull/60) + * [Pull request 60](https://github.com/gazebosim/gz-gui/pull/60) 1. Resize undocked plugins by dragging corners - * [Pull request 78](https://github.com/ignitionrobotics/ign-gui/pull/78) + * [Pull request 78](https://github.com/gazebosim/gz-gui/pull/78) 1. Move each plugin to its own directory - * [Pull request 64](https://github.com/ignitionrobotics/ign-gui/pull/64) + * [Pull request 64](https://github.com/gazebosim/gz-gui/pull/64) 1. GitHub migration - * [Pull request 46](https://github.com/ignitionrobotics/ign-gui/pull/46) - * [Pull request 56](https://github.com/ignitionrobotics/ign-gui/pull/56) + * [Pull request 46](https://github.com/gazebosim/gz-gui/pull/46) + * [Pull request 56](https://github.com/gazebosim/gz-gui/pull/56) 1. Fix homebrew warnings * [BitBucket pull request 249](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-gui/pull-requests/249) -### Ignition Gui 2.1.0 (2020-03-04) +### Gazebo GUI 2.1.0 (2020-03-04) 1. Add space for pausing sim * [BitBucket pull request 245](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-gui/pull-requests/245) @@ -841,7 +841,7 @@ 1. Fix changing topics in ImageDisplay * [BitBucket pull request 224](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-gui/pull-requests/224) -### Ignition Gui 2.0.1 +### Gazebo GUI 2.0.1 1. Made image display responsive. * [BitBucket pull request 223](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-gui/pull-requests/223) @@ -849,7 +849,7 @@ 1. Downstream applications can override this using MainWindow::setIcon once they get the window. * [BitBucket pull request 222](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-gui/pull-requests/222) -### Ignition Gui 2.0.0 +### Gazebo GUI 2.0.0 1. Delete QmlApplicationEngine later. * [BitBucket pull request 209](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-gui/pull-requests/209) @@ -878,9 +878,9 @@ 1. Fix topic echo test and make msgs visible. * [BitBucket pull request 201](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-gui/pull-requests/201) -## Ignition Gui 1 +## Gazebo GUI 1 -### Ignition Gui 1.X.X +### Gazebo GUI 1.X.X 1. Move files not ported to v1 to a separate dir for clarity. * [BitBucket pull request 196](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-gui/pull-requests/196) @@ -888,4 +888,4 @@ 1. Get ign-gui plugin interface in case there are others. * [BitBucket pull request 186](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-gui/pull-requests/186) -### Ignition Gui 1.0.0 +### Gazebo GUI 1.0.0 diff --git a/Migration.md b/Migration.md index 3215d2aa1..baaedefcf 100644 --- a/Migration.md +++ b/Migration.md @@ -5,59 +5,62 @@ 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 GUI 6.X to 7.X +## Gazebo GUI 6.X to 7.X * The environment variable `IGN_GUI_PLUGIN_PATH` is deprecated. Use `GZ_GUI_PLUGIN_PATH` instead. +* The `ignition` namespace is deprecated and will be removed in future versions. Use `gz` instead. -## Ignition GUI 6.2 to 6.3 +* Header files under `ignition/...` are deprecated and will be removed in future versions. + Use `gz/...` instead. + +## Gazebo GUI 6.2 to 6.3 * New QML dependencies, only needed for the NavSatMap plugin: `qml-module-qtlocation`, `qml-module-qtpositioning` -## Ignition GUI 6.1 to 6.2 +## Gazebo GUI 6.1 to 6.2 -* All features from `Grid3D` have been incorportated into `GridConfig`. The code +* All features from `Grid3D` have been incorporated into `GridConfig`. The code for the original `Grid3D` has been removed and now the installed library is just a copy of `GridConfig`. Existing `Grid3D` users shouldn't be affected and may continue to use `Grid3D` as before. -## Ignition GUI 5.x to 6.x +## Gazebo GUI 5.x to 6.x * The `Scene3D` plugin is deprecated, use `MinimalScene` with `TransportSceneManager` instead. -## Ignition GUI 5.1 to 5.2 +## Gazebo GUI 5.1 to 5.2 * The `Application::PluginAdded` signal used to send empty strings. Now it sends the plugin's unique name. -## Ignition GUI 4.4 to 4.5 +## Gazebo GUI 4.4 to 4.5 * The `Application::PluginAdded` signal used to send empty strings. Now it sends the plugin's unique name. -## Ignition GUI 3.x to 4.x +## Gazebo GUI 3.x to 4.x * Use rendering4, transport9 and msgs6. * Deprecated `ignition::gui::convert` to `ignition::common::Time`. Use `ignition::msgs::Convert` to `std::chrono::steady_clock::time_point` instead. -## Ignition GUI 3.6 to 3.7 +## Gazebo GUI 3.6 to 3.7 * The `Application::PluginAdded` signal used to send empty strings. Now it sends the plugin's unique name. -## Ignition GUI 2.x to 3.x +## Gazebo GUI 2.x to 3.x * Use rendering3, transport8 and msgs5. -## Ignition GUI 1.x to 2.x +## Gazebo GUI 1.x to 2.x * Plugin headers are no longer installed. * Use ignition msgs4, rendering2, and transport7. -## Ignition GUI 0.1.0 to 1.0.0 - -* Ignition GUI v1 uses QtQuick and it is not compatible with v0, which uses QWidgets. +## Gazebo GUI 0.1.0 to 1.0.0 +* Gazebo GUI v1 uses QtQuick and it is not compatible with v0, which uses QWidgets. diff --git a/NEWS b/NEWS index 604eba665..a73d9b7c1 100644 --- a/NEWS +++ b/NEWS @@ -1 +1 @@ -http://ignitionrobotics.org +http://gazebosim.org diff --git a/README.md b/README.md index ea1bf1bf4..d5109948e 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,24 @@ -# Ignition GUI : Graphical interfaces for robotics applications +# Gazebo GUI : Graphical interfaces for robotics applications **Maintainer:** louise [AT] openrobotics [DOT] org -[![GitHub open issues](https://img.shields.io/github/issues-raw/ignitionrobotics/ign-gui.svg)](https://github.com/ignitionrobotics/ign-gui/issues) -[![GitHub open pull requests](https://img.shields.io/github/issues-pr-raw/ignitionrobotics/ign-gui.svg)](https://github.com/ignitionrobotics/ign-gui/pulls) +[![GitHub open issues](https://img.shields.io/github/issues-raw/gazebosim/gz-gui.svg)](https://github.com/gazebosim/gz-gui/issues) +[![GitHub open pull requests](https://img.shields.io/github/issues-pr-raw/gazebosim/gz-gui.svg)](https://github.com/gazebosim/gz-gui/pulls) [![Discourse topics](https://img.shields.io/discourse/https/community.gazebosim.org/topics.svg)](https://community.gazebosim.org) [![Hex.pm](https://img.shields.io/hexpm/l/plug.svg)](https://www.apache.org/licenses/LICENSE-2.0) Build | Status -- | -- -Test coverage | [![codecov](https://codecov.io/gh/ignitionrobotics/ign-gui/branch/main/graph/badge.svg)](https://codecov.io/gh/ignitionrobotics/ign-gui/branch/main) +Test coverage | [![codecov](https://codecov.io/gh/gazebosim/gz-gui/branch/main/graph/badge.svg)](https://codecov.io/gh/gazebosim/gz-gui/branch/main) Ubuntu Focal | [![Build Status](https://build.osrfoundation.org/buildStatus/icon?job=ignition_gui-ci-main-focal-amd64)](https://build.osrfoundation.org/job/ignition_gui-ci-main-focal-amd64) Homebrew | [![Build Status](https://build.osrfoundation.org/buildStatus/icon?job=ignition_gui-ci-main-homebrew-amd64)](https://build.osrfoundation.org/job/ignition_gui-ci-main-homebrew-amd64) Windows | [![Build Status](https://build.osrfoundation.org/buildStatus/icon?job=ign_gui-ci-win)](https://build.osrfoundation.org/job/ign_gui-ci-win) -Ignition GUI builds on top of [Qt](https://www.qt.io/) to provide widgets which are +Gazebo GUI builds on top of [Qt](https://www.qt.io/) to provide widgets which are useful when developing robotics applications, such as a 3D view, plots, dashboard, etc, and can be used together in a convenient unified interface. -Ignition GUI ships with several widgets ready to use and offers a plugin interface +Gazebo GUI ships with several widgets ready to use and offers a plugin interface which can be used to add custom widgets. # Table of Contents @@ -46,16 +46,16 @@ which can be used to add custom widgets. * Qt-based widgets, with support for both Qt5 widgets and QtQuick * Plugin-based interface, so it's easy to add new widgets * Several plugins ready to be used -* 3D scene integration using [Ignition Rendering](https://github.com/ignitionrobotics/ign-rendering/) +* 3D scene integration using [Gazebo Rendering](https://github.com/gazebosim/gz-rendering/) # Install -See the [installation tutorial](https://ignitionrobotics.org/api/gui/5.0/install.html). +See the [installation tutorial](https://gazebosim.org/api/gui/5.0/install.html). # Usage Take a look at the -[tutorials](https://ignitionrobotics.org/api/gui/5.0/tutorials.html) +[tutorials](https://gazebosim.org/api/gui/5.0/tutorials.html) for usage instructions and API documentation. ## Known issue of command line tools @@ -64,15 +64,15 @@ In the event that the installation is a mix of Debian and from source, command line tools from `ign-tools` may not work correctly. A workaround for a single package is to define the environment variable -`IGN_CONFIG_PATH` to point to the location of the Ignition library installation, +`GZ_CONFIG_PATH` to point to the location of the Ignition library installation, where the YAML file for the package is found, such as ``` -export IGN_CONFIG_PATH=/usr/local/share/ignition +export GZ_CONFIG_PATH=/usr/local/share/ignition ``` Multiple paths can be specified using the `:` delimiter. For example, ``` -export IGN_CONFIG_PATH=/user/local/share/ignition/:/path/to/some/other/location +export GZ_CONFIG_PATH=/user/local/share/ignition/:/path/to/some/other/location ``` # Folder Structure @@ -88,35 +88,35 @@ export IGN_CONFIG_PATH=/user/local/share/ignition/:/path/to/some/other/location * `test`: All integration, performance and regression tests go here, under their specific folders. -* `examples/standalone`: Example code for standalone applications using Ignition GUI +* `examples/standalone`: Example code for standalone applications using Gazebo GUI as a library. Each example has instructions in a README file. * `examples/config`: Example configuration files which can be loaded using `ign gui -c ` * `examples/plugin`: Example plugins which can be compiled and loaded as explained - in [this tutorial](https://ignitionrobotics.org/api/gui/5.0/plugins.html). + in [this tutorial](https://gazebosim.org/api/gui/5.0/plugins.html). -* `tutorials`: Markdown files for the [tutorials](https://ignitionrobotics.org/api/gui/5.0/tutorials.html). +* `tutorials`: Markdown files for the [tutorials](https://gazebosim.org/api/gui/5.0/tutorials.html). -* `conf`: Files needed by [ign-tools](https://github.com/ignitionrobotics/ign-tools). +* `conf`: Files needed by [ign-tools](https://github.com/gazebosim/gz-tools). * `doc`: Files used by Doxygen when generating documentation. # Contributing Please see -[CONTRIBUTING.md](https://ignitionrobotics.org/docs/all/contributing). +[CONTRIBUTING.md](https://gazebosim.org/docs/all/contributing). # Code of Conduct Please see -[CODE\_OF\_CONDUCT.md](https://github.com/ignitionrobotics/ign-gazebo/blob/main/CODE_OF_CONDUCT.md). +[CODE\_OF\_CONDUCT.md](https://github.com/gazebosim/gz-sim/blob/main/CODE_OF_CONDUCT.md). # Versioning -This library uses [Semantic Versioning](https://semver.org/). Additionally, this library is part of the [Ignition project](https://ignitionrobotics.org) which periodically releases a versioned set of compatible and complimentary libraries. See the [Ignition website](https://ignitionrobotics.org) for version and release information. +This library uses [Semantic Versioning](https://semver.org/). Additionally, this library is part of the [Ignition project](https://gazebosim.org) which periodically releases a versioned set of compatible and complimentary libraries. See the [Ignition website](https://gazebosim.org) for version and release information. # License -This library is licensed under [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0). See also the [LICENSE](https://github.com/ignitionrobotics/ign-gui/blob/main/LICENSE) file. +This library is licensed under [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0). See also the [LICENSE](https://github.com/gazebosim/gz-gui/blob/main/LICENSE) file. diff --git a/examples/plugin/custom_context_menu/CustomContext.cc b/examples/plugin/custom_context_menu/CustomContext.cc index 5cba53224..45679e963 100644 --- a/examples/plugin/custom_context_menu/CustomContext.cc +++ b/examples/plugin/custom_context_menu/CustomContext.cc @@ -20,7 +20,7 @@ #include "CustomContext.hh" -using namespace ignition; +using namespace gz; using namespace gui; ///////////////////////////////////////////////// @@ -35,5 +35,5 @@ CustomContext::~CustomContext() } // Register this plugin -IGNITION_ADD_PLUGIN(ignition::gui::CustomContext, - ignition::gui::Plugin); +IGNITION_ADD_PLUGIN(gz::gui::CustomContext, + gz::gui::Plugin); diff --git a/examples/plugin/custom_context_menu/CustomContext.hh b/examples/plugin/custom_context_menu/CustomContext.hh index fa229eb57..e87989f5b 100644 --- a/examples/plugin/custom_context_menu/CustomContext.hh +++ b/examples/plugin/custom_context_menu/CustomContext.hh @@ -23,7 +23,7 @@ #include #endif -namespace ignition +namespace gz { namespace gui { diff --git a/examples/plugin/dialog_from_plugin/DialogFromPlugin.cc b/examples/plugin/dialog_from_plugin/DialogFromPlugin.cc index 2bbf5d381..7184fe0dd 100644 --- a/examples/plugin/dialog_from_plugin/DialogFromPlugin.cc +++ b/examples/plugin/dialog_from_plugin/DialogFromPlugin.cc @@ -20,7 +20,7 @@ #include "DialogFromPlugin.hh" -using namespace ignition; +using namespace gz; using namespace gui; ///////////////////////////////////////////////// @@ -35,5 +35,5 @@ DialogFromPlugin::~DialogFromPlugin() } // Register this plugin -IGNITION_ADD_PLUGIN(ignition::gui::DialogFromPlugin, - ignition::gui::Plugin); +IGNITION_ADD_PLUGIN(gz::gui::DialogFromPlugin, + gz::gui::Plugin); diff --git a/examples/plugin/dialog_from_plugin/DialogFromPlugin.hh b/examples/plugin/dialog_from_plugin/DialogFromPlugin.hh index 60d98120d..e800d7732 100644 --- a/examples/plugin/dialog_from_plugin/DialogFromPlugin.hh +++ b/examples/plugin/dialog_from_plugin/DialogFromPlugin.hh @@ -23,7 +23,7 @@ #include #endif -namespace ignition +namespace gz { namespace gui { diff --git a/examples/plugin/gz_components/GzComponents.cc b/examples/plugin/gz_components/GzComponents.cc index 06cbfe70a..e52ff1253 100644 --- a/examples/plugin/gz_components/GzComponents.cc +++ b/examples/plugin/gz_components/GzComponents.cc @@ -19,5 +19,5 @@ #include "GzComponents.hh" // Register this plugin -IGNITION_ADD_PLUGIN(ignition::gui::GzComponents, - ignition::gui::Plugin); +IGNITION_ADD_PLUGIN(gz::gui::GzComponents, + gz::gui::Plugin); diff --git a/examples/plugin/gz_components/GzComponents.hh b/examples/plugin/gz_components/GzComponents.hh index 1ba75af93..6137c87b2 100644 --- a/examples/plugin/gz_components/GzComponents.hh +++ b/examples/plugin/gz_components/GzComponents.hh @@ -20,7 +20,7 @@ #include -namespace ignition +namespace gz { namespace gui { diff --git a/examples/plugin/hello_plugin/HelloPlugin.cc b/examples/plugin/hello_plugin/HelloPlugin.cc index c49cb886d..5b95c38b1 100644 --- a/examples/plugin/hello_plugin/HelloPlugin.cc +++ b/examples/plugin/hello_plugin/HelloPlugin.cc @@ -20,7 +20,7 @@ #include "HelloPlugin.hh" -using namespace ignition; +using namespace gz; using namespace gui; ///////////////////////////////////////////////// @@ -53,5 +53,5 @@ void HelloPlugin::OnButton() } // Register this plugin -IGNITION_ADD_PLUGIN(ignition::gui::HelloPlugin, - ignition::gui::Plugin); +IGNITION_ADD_PLUGIN(gz::gui::HelloPlugin, + gz::gui::Plugin); diff --git a/examples/plugin/hello_plugin/HelloPlugin.hh b/examples/plugin/hello_plugin/HelloPlugin.hh index 5b4f105cb..4e545be2a 100644 --- a/examples/plugin/hello_plugin/HelloPlugin.hh +++ b/examples/plugin/hello_plugin/HelloPlugin.hh @@ -23,7 +23,7 @@ #include #include -namespace ignition +namespace gz { namespace gui { diff --git a/examples/plugin/multiple_qml/MultipleQml.cc b/examples/plugin/multiple_qml/MultipleQml.cc index 8869c9820..8a51a03d3 100644 --- a/examples/plugin/multiple_qml/MultipleQml.cc +++ b/examples/plugin/multiple_qml/MultipleQml.cc @@ -20,7 +20,7 @@ #include "MultipleQml.hh" -using namespace ignition; +using namespace gz; using namespace gui; ///////////////////////////////////////////////// @@ -41,5 +41,5 @@ void MultipleQml::OnButton(const QString &_text) } // Register this plugin -IGNITION_ADD_PLUGIN(ignition::gui::MultipleQml, - ignition::gui::Plugin); +IGNITION_ADD_PLUGIN(gz::gui::MultipleQml, + gz::gui::Plugin); diff --git a/examples/plugin/multiple_qml/MultipleQml.hh b/examples/plugin/multiple_qml/MultipleQml.hh index 489b53b2f..ae0d9114f 100644 --- a/examples/plugin/multiple_qml/MultipleQml.hh +++ b/examples/plugin/multiple_qml/MultipleQml.hh @@ -23,7 +23,7 @@ #include #endif -namespace ignition +namespace gz { namespace gui { diff --git a/examples/standalone/custom_drawer/custom_drawer.cc b/examples/standalone/custom_drawer/custom_drawer.cc index 64bbc2fa7..af975095b 100644 --- a/examples/standalone/custom_drawer/custom_drawer.cc +++ b/examples/standalone/custom_drawer/custom_drawer.cc @@ -28,16 +28,16 @@ int main(int _argc, char **_argv) { // Increase verboosity so we see all messages - ignition::common::Console::SetVerbosity(4); + gz::common::Console::SetVerbosity(4); // Initialize app - ignition::gui::Application app(_argc, _argv); + gz::gui::Application app(_argc, _argv); // Hide original panel app.LoadConfig("../custom_drawer.config"); // Let QML files use CustomActions' functions and properties - ignition::gui::CustomActions actions; + gz::gui::CustomActions actions; auto context = new QQmlContext(app.Engine()->rootContext()); context->setContextProperty("CustomActions", &actions); @@ -46,7 +46,7 @@ int main(int _argc, char **_argv) auto item = qobject_cast(component.create(context)); if (!item) { - ignerr << "Failed to initialize custom panel" << std::endl; + gzerr << "Failed to initialize custom panel" << std::endl; return 1; } @@ -54,7 +54,7 @@ int main(int _argc, char **_argv) QQmlEngine::setObjectOwnership(item, QQmlEngine::CppOwnership); // Add to main window - auto win = app.findChild()->QuickWindow(); + auto win = app.findChild()->QuickWindow(); auto drawerItem = win->findChild("sideDrawer"); item->setParentItem(drawerItem); diff --git a/examples/standalone/custom_drawer/custom_drawer.hh b/examples/standalone/custom_drawer/custom_drawer.hh index 64a7edd25..e062afa69 100644 --- a/examples/standalone/custom_drawer/custom_drawer.hh +++ b/examples/standalone/custom_drawer/custom_drawer.hh @@ -24,7 +24,7 @@ #include #endif -namespace ignition +namespace gz { namespace gui { diff --git a/examples/standalone/dialogs/dialogs.cc b/examples/standalone/dialogs/dialogs.cc index 07ee0c3d9..fbe091d76 100644 --- a/examples/standalone/dialogs/dialogs.cc +++ b/examples/standalone/dialogs/dialogs.cc @@ -31,11 +31,11 @@ int main(int _argc, char **_argv) std::cout << "Hello, GUI!" << std::endl; // Increase verboosity so we see all messages - ignition::common::Console::SetVerbosity(4); + gz::common::Console::SetVerbosity(4); // Initialize app - ignition::gui::Application app(_argc, _argv, - ignition::gui::WindowType::kDialog); + gz::gui::Application app(_argc, _argv, + gz::gui::WindowType::kDialog); // Load plugins / config app.LoadPlugin("Publisher"); diff --git a/examples/standalone/marker/marker.cc b/examples/standalone/marker/marker.cc index 0ad086b80..70a52bd73 100644 --- a/examples/standalone/marker/marker.cc +++ b/examples/standalone/marker/marker.cc @@ -24,16 +24,16 @@ ///////////////////////////////////////////////// int main(int _argc, char **_argv) { - ignition::transport::Node node; + gz::transport::Node node; // Create the marker message - ignition::msgs::Marker markerMsg; - ignition::msgs::Material matMsg; + gz::msgs::Marker markerMsg; + gz::msgs::Material matMsg; markerMsg.set_ns("default"); markerMsg.set_id(0); - markerMsg.set_action(ignition::msgs::Marker::ADD_MODIFY); - markerMsg.set_type(ignition::msgs::Marker::SPHERE); - markerMsg.set_visibility(ignition::msgs::Marker::GUI); + markerMsg.set_action(gz::msgs::Marker::ADD_MODIFY); + markerMsg.set_type(gz::msgs::Marker::SPHERE); + markerMsg.set_visibility(gz::msgs::Marker::GUI); // Set color to Blue markerMsg.mutable_material()->mutable_ambient()->set_r(0); @@ -46,16 +46,16 @@ int main(int _argc, char **_argv) markerMsg.mutable_material()->mutable_diffuse()->set_a(1); markerMsg.mutable_lifetime()->set_sec(2); markerMsg.mutable_lifetime()->set_nsec(0); - ignition::msgs::Set(markerMsg.mutable_scale(), - ignition::math::Vector3d(1.0, 1.0, 1.0)); + gz::msgs::Set(markerMsg.mutable_scale(), + gz::math::Vector3d(1.0, 1.0, 1.0)); // The rest of this function adds different shapes and/or modifies shapes. // Read the terminal statements to figure out what each node.Request // call accomplishes. std::cout << "Spawning a blue sphere with lifetime 2s\n"; std::this_thread::sleep_for(std::chrono::seconds(4)); - ignition::msgs::Set(markerMsg.mutable_pose(), - ignition::math::Pose3d(2, 2, 0, 0, 0, 0)); + gz::msgs::Set(markerMsg.mutable_pose(), + gz::math::Pose3d(2, 2, 0, 0, 0, 0)); node.Request("/marker", markerMsg); std::cout << "Sleeping for 2 seconds\n"; std::this_thread::sleep_for(std::chrono::seconds(2)); @@ -63,8 +63,8 @@ int main(int _argc, char **_argv) std::cout << "Spawning a black sphere at the origin with no lifetime\n"; std::this_thread::sleep_for(std::chrono::seconds(4)); markerMsg.set_id(1); - ignition::msgs::Set(markerMsg.mutable_pose(), - ignition::math::Pose3d::Zero); + gz::msgs::Set(markerMsg.mutable_pose(), + gz::math::Pose3d::Zero); markerMsg.mutable_material()->mutable_ambient()->set_b(0); markerMsg.mutable_material()->mutable_diffuse()->set_b(0); markerMsg.mutable_lifetime()->set_sec(0); @@ -72,14 +72,14 @@ int main(int _argc, char **_argv) std::cout << "Moving the black sphere to x=0, y=1, z=1\n"; std::this_thread::sleep_for(std::chrono::seconds(4)); - ignition::msgs::Set(markerMsg.mutable_pose(), - ignition::math::Pose3d(0, 1, 1, 0, 0, 0)); + gz::msgs::Set(markerMsg.mutable_pose(), + gz::math::Pose3d(0, 1, 1, 0, 0, 0)); node.Request("/marker", markerMsg); std::cout << "Shrinking the black sphere\n"; std::this_thread::sleep_for(std::chrono::seconds(4)); - ignition::msgs::Set(markerMsg.mutable_scale(), - ignition::math::Vector3d(0.2, 0.2, 0.2)); + gz::msgs::Set(markerMsg.mutable_scale(), + gz::math::Vector3d(0.2, 0.2, 0.2)); node.Request("/marker", markerMsg); std::cout << "Changing the black sphere to red\n"; @@ -101,67 +101,67 @@ int main(int _argc, char **_argv) markerMsg.mutable_material()->mutable_diffuse()->set_b(0); std::this_thread::sleep_for(std::chrono::seconds(4)); markerMsg.set_id(2); - markerMsg.set_action(ignition::msgs::Marker::ADD_MODIFY); - markerMsg.set_type(ignition::msgs::Marker::SPHERE); - ignition::msgs::Set(markerMsg.mutable_scale(), - ignition::math::Vector3d(0.5, 1.0, 1.5)); - ignition::msgs::Set(markerMsg.mutable_pose(), - ignition::math::Pose3d(2, 0, .5, 0, 0, 0)); + markerMsg.set_action(gz::msgs::Marker::ADD_MODIFY); + markerMsg.set_type(gz::msgs::Marker::SPHERE); + gz::msgs::Set(markerMsg.mutable_scale(), + gz::math::Vector3d(0.5, 1.0, 1.5)); + gz::msgs::Set(markerMsg.mutable_pose(), + gz::math::Pose3d(2, 0, .5, 0, 0, 0)); node.Request("/marker", markerMsg); std::cout << "Changing the green ellipsoid to a cylinder\n"; std::this_thread::sleep_for(std::chrono::seconds(4)); - markerMsg.set_type(ignition::msgs::Marker::CYLINDER); - ignition::msgs::Set(markerMsg.mutable_scale(), - ignition::math::Vector3d(0.5, 0.5, 1.5)); + markerMsg.set_type(gz::msgs::Marker::CYLINDER); + gz::msgs::Set(markerMsg.mutable_scale(), + gz::math::Vector3d(0.5, 0.5, 1.5)); node.Request("/marker", markerMsg); std::cout << "Connecting the sphere and cylinder with a line\n"; std::this_thread::sleep_for(std::chrono::seconds(4)); markerMsg.set_id(3); - ignition::msgs::Set(markerMsg.mutable_pose(), - ignition::math::Pose3d(0, 0, 0, 0, 0, 0)); - ignition::msgs::Set(markerMsg.mutable_scale(), - ignition::math::Vector3d(1.0, 1.0, 1.0)); - markerMsg.set_action(ignition::msgs::Marker::ADD_MODIFY); - markerMsg.set_type(ignition::msgs::Marker::LINE_LIST); - ignition::msgs::Set(markerMsg.add_point(), - ignition::math::Vector3d(0.0, 1.0, 1.0)); - ignition::msgs::Set(markerMsg.add_point(), - ignition::math::Vector3d(2, 0, 0.5)); + gz::msgs::Set(markerMsg.mutable_pose(), + gz::math::Pose3d(0, 0, 0, 0, 0, 0)); + gz::msgs::Set(markerMsg.mutable_scale(), + gz::math::Vector3d(1.0, 1.0, 1.0)); + markerMsg.set_action(gz::msgs::Marker::ADD_MODIFY); + markerMsg.set_type(gz::msgs::Marker::LINE_LIST); + gz::msgs::Set(markerMsg.add_point(), + gz::math::Vector3d(0.0, 1.0, 1.0)); + gz::msgs::Set(markerMsg.add_point(), + gz::math::Vector3d(2, 0, 0.5)); node.Request("/marker", markerMsg); std::cout << "Adding a square around the origin\n"; std::this_thread::sleep_for(std::chrono::seconds(4)); markerMsg.set_id(4); - markerMsg.set_action(ignition::msgs::Marker::ADD_MODIFY); - markerMsg.set_type(ignition::msgs::Marker::LINE_STRIP); - ignition::msgs::Set(markerMsg.mutable_point(0), - ignition::math::Vector3d(0.5, 0.5, 0.05)); - ignition::msgs::Set(markerMsg.mutable_point(1), - ignition::math::Vector3d(0.5, -0.5, 0.05)); - ignition::msgs::Set(markerMsg.add_point(), - ignition::math::Vector3d(-0.5, -0.5, 0.05)); - ignition::msgs::Set(markerMsg.add_point(), - ignition::math::Vector3d(-0.5, 0.5, 0.05)); - ignition::msgs::Set(markerMsg.add_point(), - ignition::math::Vector3d(0.5, 0.5, 0.05)); + markerMsg.set_action(gz::msgs::Marker::ADD_MODIFY); + markerMsg.set_type(gz::msgs::Marker::LINE_STRIP); + gz::msgs::Set(markerMsg.mutable_point(0), + gz::math::Vector3d(0.5, 0.5, 0.05)); + gz::msgs::Set(markerMsg.mutable_point(1), + gz::math::Vector3d(0.5, -0.5, 0.05)); + gz::msgs::Set(markerMsg.add_point(), + gz::math::Vector3d(-0.5, -0.5, 0.05)); + gz::msgs::Set(markerMsg.add_point(), + gz::math::Vector3d(-0.5, 0.5, 0.05)); + gz::msgs::Set(markerMsg.add_point(), + gz::math::Vector3d(0.5, 0.5, 0.05)); node.Request("/marker", markerMsg); std::cout << "Adding 100 green points inside the square\n"; std::this_thread::sleep_for(std::chrono::seconds(4)); markerMsg.set_id(5); - markerMsg.set_action(ignition::msgs::Marker::ADD_MODIFY); - markerMsg.set_type(ignition::msgs::Marker::POINTS); - ignition::msgs::Set(markerMsg.mutable_scale(), - ignition::math::Vector3d(5.0, 1.0, 1.0)); + markerMsg.set_action(gz::msgs::Marker::ADD_MODIFY); + markerMsg.set_type(gz::msgs::Marker::POINTS); + gz::msgs::Set(markerMsg.mutable_scale(), + gz::math::Vector3d(5.0, 1.0, 1.0)); markerMsg.clear_point(); for (int i = 0; i < 100; ++i) { - ignition::msgs::Set(markerMsg.add_point(), - ignition::math::Vector3d( - ignition::math::Rand::DblUniform(-0.49, 0.49), - ignition::math::Rand::DblUniform(-0.49, 0.49), + gz::msgs::Set(markerMsg.add_point(), + gz::math::Vector3d( + gz::math::Rand::DblUniform(-0.49, 0.49), + gz::math::Rand::DblUniform(-0.49, 0.49), 0.05)); } node.Request("/marker", markerMsg); @@ -169,94 +169,94 @@ int main(int _argc, char **_argv) std::cout << "Adding 100 colored points next to the square\n"; std::this_thread::sleep_for(std::chrono::seconds(4)); markerMsg.set_id(6); - markerMsg.set_action(ignition::msgs::Marker::ADD_MODIFY); - markerMsg.set_type(ignition::msgs::Marker::POINTS); + markerMsg.set_action(gz::msgs::Marker::ADD_MODIFY); + markerMsg.set_type(gz::msgs::Marker::POINTS); markerMsg.clear_point(); for (int i = 0; i < 100; ++i) { - ignition::msgs::Set(markerMsg.add_point(), - ignition::math::Vector3d( - ignition::math::Rand::DblUniform(-1.0, 1.0), - ignition::math::Rand::DblUniform(0.5, 1.0), + gz::msgs::Set(markerMsg.add_point(), + gz::math::Vector3d( + gz::math::Rand::DblUniform(-1.0, 1.0), + gz::math::Rand::DblUniform(0.5, 1.0), 0.05)); - ignition::msgs::Set(markerMsg.add_materials()->mutable_diffuse(), - ignition::math::Color( - ignition::math::Rand::DblUniform(0.0, 1.0), - ignition::math::Rand::DblUniform(0.0, 1.0), - ignition::math::Rand::DblUniform(0.0, 1.0))); + gz::msgs::Set(markerMsg.add_materials()->mutable_diffuse(), + gz::math::Color( + gz::math::Rand::DblUniform(0.0, 1.0), + gz::math::Rand::DblUniform(0.0, 1.0), + gz::math::Rand::DblUniform(0.0, 1.0))); } node.Request("/marker", markerMsg); std::cout << "Adding a semi-circular triangle fan\n"; std::this_thread::sleep_for(std::chrono::seconds(4)); markerMsg.set_id(7); - markerMsg.set_action(ignition::msgs::Marker::ADD_MODIFY); - markerMsg.set_type(ignition::msgs::Marker::TRIANGLE_FAN); + markerMsg.set_action(gz::msgs::Marker::ADD_MODIFY); + markerMsg.set_type(gz::msgs::Marker::TRIANGLE_FAN); markerMsg.clear_point(); - ignition::msgs::Set(markerMsg.mutable_pose(), - ignition::math::Pose3d(0, 1.5, 0, 0, 0, 0)); - ignition::msgs::Set(markerMsg.add_point(), - ignition::math::Vector3d(0, 0, 0.05)); + gz::msgs::Set(markerMsg.mutable_pose(), + gz::math::Pose3d(0, 1.5, 0, 0, 0, 0)); + gz::msgs::Set(markerMsg.add_point(), + gz::math::Vector3d(0, 0, 0.05)); double radius = 2; for (double t = 0; t <= M_PI; t+= 0.01) { - ignition::msgs::Set(markerMsg.add_point(), - ignition::math::Vector3d(radius * cos(t), radius * sin(t), 0.05)); + gz::msgs::Set(markerMsg.add_point(), + gz::math::Vector3d(radius * cos(t), radius * sin(t), 0.05)); } node.Request("/marker", markerMsg); std::cout << "Adding two triangles using a triangle list\n"; std::this_thread::sleep_for(std::chrono::seconds(4)); markerMsg.set_id(8); - markerMsg.set_action(ignition::msgs::Marker::ADD_MODIFY); - markerMsg.set_type(ignition::msgs::Marker::TRIANGLE_LIST); + markerMsg.set_action(gz::msgs::Marker::ADD_MODIFY); + markerMsg.set_type(gz::msgs::Marker::TRIANGLE_LIST); markerMsg.clear_point(); - ignition::msgs::Set(markerMsg.mutable_pose(), - ignition::math::Pose3d(0, -1.5, 0, 0, 0, 0)); - ignition::msgs::Set(markerMsg.add_point(), - ignition::math::Vector3d(0, 0, 0.05)); - ignition::msgs::Set(markerMsg.add_point(), - ignition::math::Vector3d(1, 0, 0.05)); - ignition::msgs::Set(markerMsg.add_point(), - ignition::math::Vector3d(1, 1, 0.05)); - - ignition::msgs::Set(markerMsg.add_point(), - ignition::math::Vector3d(1, 1, 0.05)); - ignition::msgs::Set(markerMsg.add_point(), - ignition::math::Vector3d(2, 1, 0.05)); - ignition::msgs::Set(markerMsg.add_point(), - ignition::math::Vector3d(2, 2, 0.05)); + gz::msgs::Set(markerMsg.mutable_pose(), + gz::math::Pose3d(0, -1.5, 0, 0, 0, 0)); + gz::msgs::Set(markerMsg.add_point(), + gz::math::Vector3d(0, 0, 0.05)); + gz::msgs::Set(markerMsg.add_point(), + gz::math::Vector3d(1, 0, 0.05)); + gz::msgs::Set(markerMsg.add_point(), + gz::math::Vector3d(1, 1, 0.05)); + + gz::msgs::Set(markerMsg.add_point(), + gz::math::Vector3d(1, 1, 0.05)); + gz::msgs::Set(markerMsg.add_point(), + gz::math::Vector3d(2, 1, 0.05)); + gz::msgs::Set(markerMsg.add_point(), + gz::math::Vector3d(2, 2, 0.05)); node.Request("/marker", markerMsg); std::cout << "Adding a rectangular triangle strip\n"; std::this_thread::sleep_for(std::chrono::seconds(4)); markerMsg.set_id(9); - markerMsg.set_action(ignition::msgs::Marker::ADD_MODIFY); - markerMsg.set_type(ignition::msgs::Marker::TRIANGLE_STRIP); + markerMsg.set_action(gz::msgs::Marker::ADD_MODIFY); + markerMsg.set_type(gz::msgs::Marker::TRIANGLE_STRIP); markerMsg.clear_point(); - ignition::msgs::Set(markerMsg.mutable_pose(), - ignition::math::Pose3d(-2, -2, 0, 0, 0, 0)); - ignition::msgs::Set(markerMsg.add_point(), - ignition::math::Vector3d(0, 0, 0.05)); - ignition::msgs::Set(markerMsg.add_point(), - ignition::math::Vector3d(1, 0, 0.05)); - ignition::msgs::Set(markerMsg.add_point(), - ignition::math::Vector3d(0, 1, 0.05)); - - ignition::msgs::Set(markerMsg.add_point(), - ignition::math::Vector3d(1, 1, 0.05)); - ignition::msgs::Set(markerMsg.add_point(), - ignition::math::Vector3d(0, 2, 0.05)); - ignition::msgs::Set(markerMsg.add_point(), - ignition::math::Vector3d(1, 2, 0.05)); + gz::msgs::Set(markerMsg.mutable_pose(), + gz::math::Pose3d(-2, -2, 0, 0, 0, 0)); + gz::msgs::Set(markerMsg.add_point(), + gz::math::Vector3d(0, 0, 0.05)); + gz::msgs::Set(markerMsg.add_point(), + gz::math::Vector3d(1, 0, 0.05)); + gz::msgs::Set(markerMsg.add_point(), + gz::math::Vector3d(0, 1, 0.05)); + + gz::msgs::Set(markerMsg.add_point(), + gz::math::Vector3d(1, 1, 0.05)); + gz::msgs::Set(markerMsg.add_point(), + gz::math::Vector3d(0, 2, 0.05)); + gz::msgs::Set(markerMsg.add_point(), + gz::math::Vector3d(1, 2, 0.05)); node.Request("/marker", markerMsg); std::cout << "Adding multiple markers via /marker_array\n"; std::this_thread::sleep_for(std::chrono::seconds(4)); - ignition::msgs::Marker_V markerMsgs; - ignition::msgs::Boolean res; + gz::msgs::Marker_V markerMsgs; + gz::msgs::Boolean res; bool result; unsigned int timeout = 5000; @@ -264,9 +264,9 @@ int main(int _argc, char **_argv) auto markerMsg1 = markerMsgs.add_marker(); markerMsg1->set_ns("default"); markerMsg1->set_id(0); - markerMsg1->set_action(ignition::msgs::Marker::ADD_MODIFY); - markerMsg1->set_type(ignition::msgs::Marker::SPHERE); - markerMsg1->set_visibility(ignition::msgs::Marker::GUI); + markerMsg1->set_action(gz::msgs::Marker::ADD_MODIFY); + markerMsg1->set_type(gz::msgs::Marker::SPHERE); + markerMsg1->set_visibility(gz::msgs::Marker::GUI); // Set color to Blue markerMsg1->mutable_material()->mutable_ambient()->set_r(0); @@ -277,18 +277,18 @@ int main(int _argc, char **_argv) markerMsg1->mutable_material()->mutable_diffuse()->set_g(0); markerMsg1->mutable_material()->mutable_diffuse()->set_b(1); markerMsg1->mutable_material()->mutable_diffuse()->set_a(1); - ignition::msgs::Set(markerMsg1->mutable_scale(), - ignition::math::Vector3d(1.0, 1.0, 1.0)); - ignition::msgs::Set(markerMsg1->mutable_pose(), - ignition::math::Pose3d(3, 3, 0, 0, 0, 0)); + gz::msgs::Set(markerMsg1->mutable_scale(), + gz::math::Vector3d(1.0, 1.0, 1.0)); + gz::msgs::Set(markerMsg1->mutable_pose(), + gz::math::Pose3d(3, 3, 0, 0, 0, 0)); // Create second red box marker auto markerMsg2 = markerMsgs.add_marker(); markerMsg2->set_ns("default"); markerMsg2->set_id(0); - markerMsg2->set_action(ignition::msgs::Marker::ADD_MODIFY); - markerMsg2->set_type(ignition::msgs::Marker::BOX); - markerMsg2->set_visibility(ignition::msgs::Marker::GUI); + markerMsg2->set_action(gz::msgs::Marker::ADD_MODIFY); + markerMsg2->set_type(gz::msgs::Marker::BOX); + markerMsg2->set_visibility(gz::msgs::Marker::GUI); // Set color to Red markerMsg2->mutable_material()->mutable_ambient()->set_r(1); @@ -301,18 +301,18 @@ int main(int _argc, char **_argv) markerMsg2->mutable_material()->mutable_diffuse()->set_a(1); markerMsg2->mutable_lifetime()->set_sec(2); markerMsg2->mutable_lifetime()->set_nsec(0); - ignition::msgs::Set(markerMsg2->mutable_scale(), - ignition::math::Vector3d(1.0, 1.0, 1.0)); - ignition::msgs::Set(markerMsg2->mutable_pose(), - ignition::math::Pose3d(3, 3, 2, 0, 0, 0)); + gz::msgs::Set(markerMsg2->mutable_scale(), + gz::math::Vector3d(1.0, 1.0, 1.0)); + gz::msgs::Set(markerMsg2->mutable_pose(), + gz::math::Pose3d(3, 3, 2, 0, 0, 0)); // Create green capsule marker auto markerMsg3 = markerMsgs.add_marker(); markerMsg3->set_ns("default"); markerMsg3->set_id(0); - markerMsg3->set_action(ignition::msgs::Marker::ADD_MODIFY); - markerMsg3->set_type(ignition::msgs::Marker::CAPSULE); - markerMsg3->set_visibility(ignition::msgs::Marker::GUI); + markerMsg3->set_action(gz::msgs::Marker::ADD_MODIFY); + markerMsg3->set_type(gz::msgs::Marker::CAPSULE); + markerMsg3->set_visibility(gz::msgs::Marker::GUI); // Set color to Green markerMsg3->mutable_material()->mutable_ambient()->set_r(0); @@ -325,16 +325,16 @@ int main(int _argc, char **_argv) markerMsg3->mutable_material()->mutable_diffuse()->set_a(1); markerMsg3->mutable_lifetime()->set_sec(2); markerMsg3->mutable_lifetime()->set_nsec(0); - ignition::msgs::Set(markerMsg3->mutable_scale(), - ignition::math::Vector3d(1.0, 1.0, 1.0)); - ignition::msgs::Set(markerMsg3->mutable_pose(), - ignition::math::Pose3d(3, 3, 4, 0, 0, 0)); + gz::msgs::Set(markerMsg3->mutable_scale(), + gz::math::Vector3d(1.0, 1.0, 1.0)); + gz::msgs::Set(markerMsg3->mutable_pose(), + gz::math::Pose3d(3, 3, 4, 0, 0, 0)); // Publish the three created markers above simultaneously node.Request("/marker_array", markerMsgs, timeout, res, result); std::cout << "Deleting all the markers\n"; std::this_thread::sleep_for(std::chrono::seconds(4)); - markerMsg.set_action(ignition::msgs::Marker::DELETE_ALL); + markerMsg.set_action(gz::msgs::Marker::DELETE_ALL); node.Request("/marker", markerMsg); } diff --git a/examples/standalone/point_cloud/README.md b/examples/standalone/point_cloud/README.md index b0c5c0b8b..1bdf81d34 100644 --- a/examples/standalone/point_cloud/README.md +++ b/examples/standalone/point_cloud/README.md @@ -3,9 +3,9 @@ This example publishes a point cloud that can be visualized with the `PointCloud` plugin. The example publishes: -* `ignition::msgs::PointCloudPacked` messages on `/point_cloud` with XYZ +* `gz::msgs::PointCloudPacked` messages on `/point_cloud` with XYZ positions of points. -* `ignition::msgs::FloatV` messages on 3 different topics: +* `gz::msgs::FloatV` messages on 3 different topics: * `/flat`: Array of 1s * `/sum`: Each value in the array corresponds to the sum of its point's coordinates (X + Y + Z). diff --git a/examples/standalone/point_cloud/point_cloud.cc b/examples/standalone/point_cloud/point_cloud.cc index 34d86e5f7..686f2a537 100644 --- a/examples/standalone/point_cloud/point_cloud.cc +++ b/examples/standalone/point_cloud/point_cloud.cc @@ -44,9 +44,9 @@ int main(int _argc, char **_argv) std::signal(SIGTERM, signalHandler); // Create messages - ignition::msgs::PointCloudPacked pcMsg; - ignition::msgs::InitPointCloudPacked(pcMsg, "some_frame", true, - {{"xyz", ignition::msgs::PointCloudPacked::Field::FLOAT32}}); + gz::msgs::PointCloudPacked pcMsg; + gz::msgs::InitPointCloudPacked(pcMsg, "some_frame", true, + {{"xyz", gz::msgs::PointCloudPacked::Field::FLOAT32}}); int numberOfPoints{1000}; unsigned int dataSize{numberOfPoints * pcMsg.point_step()}; @@ -54,14 +54,14 @@ int main(int _argc, char **_argv) pcMsg.set_height(1); pcMsg.set_width(1000); - ignition::msgs::Float_V flatMsg; - ignition::msgs::Float_V sumMsg; - ignition::msgs::Float_V productMsg; + gz::msgs::Float_V flatMsg; + gz::msgs::Float_V sumMsg; + gz::msgs::Float_V productMsg; // Populate messages - ignition::msgs::PointCloudPackedIterator xIter(pcMsg, "x"); - ignition::msgs::PointCloudPackedIterator yIter(pcMsg, "y"); - ignition::msgs::PointCloudPackedIterator zIter(pcMsg, "z"); + gz::msgs::PointCloudPackedIterator xIter(pcMsg, "x"); + gz::msgs::PointCloudPackedIterator yIter(pcMsg, "y"); + gz::msgs::PointCloudPackedIterator zIter(pcMsg, "z"); for (float x = 0.0, y = 0.0, z = 0.0; xIter != xIter.End(); @@ -88,11 +88,11 @@ int main(int _argc, char **_argv) } // Publish messages at 1Hz until interrupted. - ignition::transport::Node node; - auto flatPub = node.Advertise("/flat"); - auto sumPub = node.Advertise("/sum"); - auto productPub = node.Advertise("/product"); - auto pcPub = node.Advertise("/point_cloud"); + gz::transport::Node node; + auto flatPub = node.Advertise("/flat"); + auto sumPub = node.Advertise("/sum"); + auto productPub = node.Advertise("/product"); + auto pcPub = node.Advertise("/point_cloud"); while (!g_terminatePub) { diff --git a/examples/standalone/scene_provider/README.md b/examples/standalone/scene_provider/README.md index d434dd970..b40eab9f3 100644 --- a/examples/standalone/scene_provider/README.md +++ b/examples/standalone/scene_provider/README.md @@ -43,7 +43,7 @@ Some commands to test camera tracking with this demo: Move to box: ``` -ign service -s /gui/move_to --reqtype ignition.msgs.StringMsg --reptype ignition.msgs.Boolean --timeout 2000 --req 'data: "box_model"' +ign service -s /gui/move_to --reqtype gz.msgs.StringMsg --reptype gz.msgs.Boolean --timeout 2000 --req 'data: "box_model"' ``` Echo camera pose: @@ -55,11 +55,11 @@ ign topic -e -t /gui/camera/pose Follow box: ``` -ign service -s /gui/follow --reqtype ignition.msgs.StringMsg --reptype ignition.msgs.Boolean --timeout 2000 --req 'data: "box_model"' +ign service -s /gui/follow --reqtype gz.msgs.StringMsg --reptype gz.msgs.Boolean --timeout 2000 --req 'data: "box_model"' ``` Update follow offset: ``` -ign service -s /gui/follow/offset --reqtype ignition.msgs.Vector3d --reptype ignition.msgs.Boolean --timeout 2000 --req 'x: 5, y: 5, z: 5' +ign service -s /gui/follow/offset --reqtype gz.msgs.Vector3d --reptype gz.msgs.Boolean --timeout 2000 --req 'x: 5, y: 5, z: 5' ``` diff --git a/examples/standalone/scene_provider/scene_provider.cc b/examples/standalone/scene_provider/scene_provider.cc index 830b0c9df..12dfba7c2 100644 --- a/examples/standalone/scene_provider/scene_provider.cc +++ b/examples/standalone/scene_provider/scene_provider.cc @@ -28,7 +28,7 @@ using namespace std::chrono_literals; ////////////////////////////////////////////////// -bool sceneService(ignition::msgs::Scene &_rep) +bool sceneService(gz::msgs::Scene &_rep) { std::cout << "Returning scene" << std::endl; @@ -72,19 +72,19 @@ bool sceneService(ignition::msgs::Scene &_rep) ////////////////////////////////////////////////// int main(int argc, char **argv) { - ignition::transport::Node node; + gz::transport::Node node; // Scene service node.Advertise("/example/scene", sceneService); // Periodic pose updated auto statsPub = - node.Advertise("/example/stats"); + node.Advertise("/example/stats"); // Periodic pose updated - auto posePub = node.Advertise("/example/pose"); + auto posePub = node.Advertise("/example/pose"); - ignition::msgs::Pose_V poseVMsg; + gz::msgs::Pose_V poseVMsg; auto poseMsg = poseVMsg.add_pose(); poseMsg->set_id(1); poseMsg->set_name("box_model"); @@ -98,15 +98,15 @@ int main(int argc, char **argv) std::chrono::steady_clock::duration timePoint = std::chrono::steady_clock::duration::zero(); - ignition::msgs::WorldStatistics msgWorldStatistics; + gz::msgs::WorldStatistics msgWorldStatistics; while (true) { std::this_thread::sleep_for(100ms); - x += ignition::math::Rand::DblUniform(-change, change); - y += ignition::math::Rand::DblUniform(-change, change); - z += ignition::math::Rand::DblUniform(-change, change); + x += gz::math::Rand::DblUniform(-change, change); + y += gz::math::Rand::DblUniform(-change, change); + z += gz::math::Rand::DblUniform(-change, change); positionMsg->set_x(x); positionMsg->set_y(y); @@ -124,5 +124,5 @@ int main(int argc, char **argv) statsPub.Publish(msgWorldStatistics); } - ignition::transport::waitForShutdown(); + gz::transport::waitForShutdown(); } diff --git a/examples/standalone/window/window.cc b/examples/standalone/window/window.cc index 5c67481e0..031dcbcbb 100644 --- a/examples/standalone/window/window.cc +++ b/examples/standalone/window/window.cc @@ -29,10 +29,10 @@ int main(int _argc, char **_argv) std::cout << "Hello, GUI!" << std::endl; // Increase verboosity so we see all messages - ignition::common::Console::SetVerbosity(4); + gz::common::Console::SetVerbosity(4); // Create app - ignition::gui::Application app(_argc, _argv); + gz::gui::Application app(_argc, _argv); // Load plugins / config if (!app.LoadPlugin("Publisher")) @@ -41,7 +41,7 @@ int main(int _argc, char **_argv) } // Customize main window - auto win = app.findChild()->QuickWindow(); + auto win = app.findChild()->QuickWindow(); win->setProperty("title", "Hello Window!"); // Run window diff --git a/include/gz/gui/Application.hh b/include/gz/gui/Application.hh index 334a5ef85..5dc46f68e 100644 --- a/include/gz/gui/Application.hh +++ b/include/gz/gui/Application.hh @@ -37,7 +37,7 @@ namespace tinyxml2 class XMLElement; } -namespace ignition +namespace gz { namespace gui { @@ -61,7 +61,7 @@ namespace ignition /// provides an API to load plugins and configuration files. The application /// supports either running a single main window or several plugins as /// standalone dialogs. - class IGNITION_GUI_VISIBLE Application : public QApplication + class GZ_GUI_VISIBLE Application : public QApplication { Q_OBJECT @@ -206,7 +206,7 @@ namespace ignition /// \brief Get current running application, this is a cast of qGuiApp. /// \return Pointer to running application, or nullptr if none is running. - IGNITION_GUI_VISIBLE + GZ_GUI_VISIBLE Application *App(); } } diff --git a/include/gz/gui/Conversions.hh b/include/gz/gui/Conversions.hh index f32bd6652..cc8b0d07a 100644 --- a/include/gz/gui/Conversions.hh +++ b/include/gz/gui/Conversions.hh @@ -34,7 +34,7 @@ #include "gz/gui/qt.h" #include "gz/gui/Export.hh" -namespace ignition +namespace gz { namespace common { @@ -46,37 +46,37 @@ namespace ignition /// \brief Return the equivalent Qt color /// \param[in] _color Gazebo color to convert /// \return Qt color value - IGNITION_GUI_VISIBLE + GZ_GUI_VISIBLE QColor convert(const math::Color &_color); /// \brief Return the equivalent Gazebo color /// \param[in] _color Qt color to convert - /// \return Gazebo color value - IGNITION_GUI_VISIBLE + /// \return Ignition color value + GZ_GUI_VISIBLE math::Color convert(const QColor &_color); /// \brief Return the equivalent QPointF. /// \param[in] _pt Gazebo vector to convert. /// \return QPointF. - IGNITION_GUI_VISIBLE + GZ_GUI_VISIBLE QPointF convert(const math::Vector2d &_pt); /// \brief Return the equivalent Gazebo vector. /// \param[in] _pt QPointF to convert /// \return Gazebo Vector2d. - IGNITION_GUI_VISIBLE + GZ_GUI_VISIBLE math::Vector2d convert(const QPointF &_pt); /// \brief Return the equivalent Qt vector 3d. /// \param[in] _vec Gazebo vector 3d to convert. /// \return Qt vector 3d value. - IGNITION_GUI_VISIBLE + GZ_GUI_VISIBLE QVector3D convert(const math::Vector3d &_vec); /// \brief Return the equivalent Gazebo vector 3d. /// \param[in] _vec Qt vector 3d to convert. - /// \return Gazebo vector 3d value - IGNITION_GUI_VISIBLE + /// \return Ignition vector 3d value + GZ_GUI_VISIBLE math::Vector3d convert(const QVector3D &_vec); /// \brief Return the equivalent Gazebo mouse event. @@ -84,23 +84,23 @@ namespace ignition /// Note that there isn't a 1-1 mapping between these types, so fields such /// as common::MouseEvent::PressPos need to be set afterwards. /// \param[in] _e Qt mouse event - /// \return Gazebo mouse event - IGNITION_GUI_VISIBLE + /// \return Ignition mouse event + GZ_GUI_VISIBLE common::MouseEvent convert(const QMouseEvent &_e); /// \brief Return the equivalent Gazebo mouse event. /// /// Note that there isn't a 1-1 mapping between these types. /// \param[in] _e Qt wheel event - /// \return Gazebo mouse event - IGNITION_GUI_VISIBLE + /// \return Ignition mouse event + GZ_GUI_VISIBLE common::MouseEvent convert(const QWheelEvent &_e); /// \brief Return the equivalent Gazebo key event. /// /// \param[in] _e Qt key event - /// \return Gazebo key event - IGNITION_GUI_VISIBLE + /// \return Ignition key event + GZ_GUI_VISIBLE common::KeyEvent convert(const QKeyEvent &_e); } } diff --git a/include/gz/gui/Dialog.hh b/include/gz/gui/Dialog.hh index 6572cc4c2..679aaebfb 100644 --- a/include/gz/gui/Dialog.hh +++ b/include/gz/gui/Dialog.hh @@ -30,14 +30,14 @@ #pragma warning(disable: 4251) #endif -namespace ignition +namespace gz { namespace gui { class DialogPrivate; /// \brief Gui plugin - class IGNITION_GUI_VISIBLE Dialog : public QObject + class GZ_GUI_VISIBLE Dialog : public QObject { Q_OBJECT diff --git a/include/gz/gui/DragDropModel.hh b/include/gz/gui/DragDropModel.hh index cffe3be44..b4ffa0271 100644 --- a/include/gz/gui/DragDropModel.hh +++ b/include/gz/gui/DragDropModel.hh @@ -20,13 +20,13 @@ #include "gz/gui/Export.hh" #include "gz/gui/qt.h" -namespace ignition +namespace gz { namespace gui { /// \brief Customized item model so that we can pass along an URI query as /// MIME information during a drag-drop. - class IGNITION_GUI_VISIBLE DragDropModel : public QStandardItemModel + class GZ_GUI_VISIBLE DragDropModel : public QStandardItemModel { /// \brief Overloaded from Qt. Custom MIME data function. /// \param[in] _indexes List of selected items. diff --git a/include/gz/gui/Enums.hh b/include/gz/gui/Enums.hh index 9fc2ab9ab..b612fe6ea 100644 --- a/include/gz/gui/Enums.hh +++ b/include/gz/gui/Enums.hh @@ -20,7 +20,7 @@ #include "gz/gui/qt.h" -namespace ignition +namespace gz { namespace gui { diff --git a/include/gz/gui/GuiEvents.hh b/include/gz/gui/GuiEvents.hh index aa9be8541..a588f4eaa 100644 --- a/include/gz/gui/GuiEvents.hh +++ b/include/gz/gui/GuiEvents.hh @@ -32,7 +32,7 @@ #include "gz/gui/Export.hh" -namespace ignition +namespace gz { namespace gui { @@ -58,7 +58,7 @@ namespace ignition /// \brief The class for sending and receiving custom snap value events. /// This event is used in the Transform Control plugin tool when the /// user manually alters their snapping values. - class IGNITION_GUI_VISIBLE SnapIntervals : public QEvent + class GZ_GUI_VISIBLE SnapIntervals : public QEvent { /// \brief Constructor /// \param[in] _xyz XYZ snapping values. @@ -91,7 +91,7 @@ namespace ignition /// \brief Event called to spawn a resource, given its description as a /// string. - class IGNITION_GUI_VISIBLE SpawnFromDescription : public QEvent + class GZ_GUI_VISIBLE SpawnFromDescription : public QEvent { /// \brief Constructor /// \param[in] _description The resource's description as a string, such @@ -112,7 +112,7 @@ namespace ignition /// \brief Event called to spawn a resource, which takes the path /// to its file. - class IGNITION_GUI_VISIBLE SpawnFromPath : public QEvent + class GZ_GUI_VISIBLE SpawnFromPath : public QEvent { /// \brief Constructor /// \param[in] _filePath The path to a file. @@ -132,7 +132,7 @@ namespace ignition /// \brief Event which is called to broadcast the 3D coordinates of a /// user's mouse hover within the scene. - class IGNITION_GUI_VISIBLE HoverToScene : public QEvent + class GZ_GUI_VISIBLE HoverToScene : public QEvent { /// \brief Constructor /// \param[in] _point The point at which the mouse is hovering within @@ -155,7 +155,7 @@ namespace ignition /// \brief Event which is called to broadcast the 3D coordinates of a /// user's releasing the left button within the scene. /// \sa LeftClickOnScene - class IGNITION_GUI_VISIBLE LeftClickToScene : public QEvent + class GZ_GUI_VISIBLE LeftClickToScene : public QEvent { /// \brief Constructor /// \param[in] _point The point which the user has left clicked within @@ -177,7 +177,7 @@ namespace ignition /// \brief Event which is called to broadcast the 3D coordinates of a /// user's releasing the right button within the scene. /// \sa RightClickOnScene - class IGNITION_GUI_VISIBLE RightClickToScene : public QEvent + class GZ_GUI_VISIBLE RightClickToScene : public QEvent { /// \brief Constructor /// \param[in] _point The point which the user has right clicked @@ -199,7 +199,7 @@ namespace ignition /// \brief Event which is called to enable or disable the dropdown menu. /// This is primarily used by plugins which also use the right click /// mouse event to cancel any actions currently in progress. - class IGNITION_GUI_VISIBLE DropdownMenuEnabled : public QEvent + class GZ_GUI_VISIBLE DropdownMenuEnabled : public QEvent { /// \brief Constructor /// \param[in] _menuEnabled The boolean indicating whether the dropdown @@ -220,7 +220,7 @@ namespace ignition /// \brief Event which is called to broadcast the key release within /// the scene. - class IGNITION_GUI_VISIBLE KeyReleaseOnScene : public QEvent + class GZ_GUI_VISIBLE KeyReleaseOnScene : public QEvent { /// \brief Constructor /// \param[in] _key The key released event within the scene @@ -240,7 +240,7 @@ namespace ignition /// \brief Event which is called to broadcast the key press within /// the scene. - class IGNITION_GUI_VISIBLE KeyPressOnScene : public QEvent + class GZ_GUI_VISIBLE KeyPressOnScene : public QEvent { /// \brief Constructor /// \param[in] _key The pressed key within the scene @@ -263,7 +263,7 @@ namespace ignition /// For the 3D coordinates of that point on the scene, see /// `LeftClickToScene`. /// \sa LeftClickToScene - class IGNITION_GUI_VISIBLE LeftClickOnScene : public QEvent + class GZ_GUI_VISIBLE LeftClickOnScene : public QEvent { /// \brief Constructor /// \param[in] _mouse The left mouse event on the scene @@ -286,7 +286,7 @@ namespace ignition /// For the 3D coordinates of that point on the scene, see /// `RightClickToScene`. /// \sa RightClickToScene - class IGNITION_GUI_VISIBLE RightClickOnScene : public QEvent + class GZ_GUI_VISIBLE RightClickOnScene : public QEvent { /// \brief Constructor /// \param[in] _mouse The right mouse event on the scene @@ -307,7 +307,7 @@ namespace ignition /// \brief Event that block the Interactive View control when some of the /// other plugins require it. For example: When the transform control is /// active we should block the movements of the camera. - class IGNITION_GUI_VISIBLE BlockOrbit : public QEvent + class GZ_GUI_VISIBLE BlockOrbit : public QEvent { /// \brief Constructor /// \param[in] _block True to block otherwise False @@ -328,7 +328,7 @@ namespace ignition /// \brief Event which is called to broadcast the 2D coordinates of a /// user's mouse hover within the scene. - class IGNITION_GUI_VISIBLE HoverOnScene : public QEvent + class GZ_GUI_VISIBLE HoverOnScene : public QEvent { /// \brief Constructor /// \param[in] _mouse The hover mouse event on the scene @@ -348,7 +348,7 @@ namespace ignition }; /// \brief Event called to clone a resource, given its name as a string. - class IGNITION_GUI_VISIBLE SpawnCloneFromName : public QEvent + class GZ_GUI_VISIBLE SpawnCloneFromName : public QEvent { /// \brief Constructor /// \param[in] _name The name of the resource to clone @@ -367,14 +367,14 @@ namespace ignition }; /// \brief Event called to clone a resource, given its name as a string. - class IGNITION_GUI_VISIBLE DropOnScene : public QEvent + class GZ_GUI_VISIBLE DropOnScene : public QEvent { /// \brief Constructor /// \param[in] _dropText Dropped string. /// \param[in] _dropMouse x and y coordinate of mouse position. public: explicit DropOnScene( const std::string &_dropText, - const ignition::math::Vector2i &_dropMouse); + const gz::math::Vector2i &_dropMouse); /// \brief Get the text of the dropped thing on the scene /// \return The name of the dropped thing on the scene @@ -382,7 +382,7 @@ namespace ignition /// \brief Get X and Y position /// \return Get X and Y position - public: const ignition::math::Vector2i &Mouse() const; + public: const gz::math::Vector2i &Mouse() const; /// \brief Unique type for this event. static const QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 15); @@ -394,7 +394,7 @@ namespace ignition /// \brief Event which is called to broadcast information about mouse /// scrolls on the scene. - class IGNITION_GUI_VISIBLE ScrollOnScene : public QEvent + class GZ_GUI_VISIBLE ScrollOnScene : public QEvent { /// \brief Constructor /// \param[in] _mouse The scroll mouse event on the scene @@ -413,7 +413,7 @@ namespace ignition /// \brief Event which is called to broadcast information about mouse /// drags on the scene. - class IGNITION_GUI_VISIBLE DragOnScene : public QEvent + class GZ_GUI_VISIBLE DragOnScene : public QEvent { /// \brief Constructor /// \param[in] _mouse The drag mouse event on the scene @@ -434,7 +434,7 @@ namespace ignition /// \brief Event which is called to broadcast information about mouse /// presses on the scene, with right, left or middle buttons. - class IGNITION_GUI_VISIBLE MousePressOnScene : public QEvent + class GZ_GUI_VISIBLE MousePressOnScene : public QEvent { /// \brief Constructor /// \param[in] _mouse The mouse event on the scene @@ -453,7 +453,7 @@ namespace ignition }; /// \brief Event which is called to share WorldControl information. - class IGNITION_GUI_VISIBLE WorldControl : public QEvent + class GZ_GUI_VISIBLE WorldControl : public QEvent { /// \brief Constructor /// \param[in] _worldControl The WorldControl information @@ -474,7 +474,7 @@ namespace ignition /// \brief Event called in the render thread of a 3D scene, before the /// user camera is rendered. /// It's safe to make rendering calls in this event's callback. - class IGNITION_GUI_VISIBLE PreRender : public QEvent + class GZ_GUI_VISIBLE PreRender : public QEvent { /// \brief Constructor public: PreRender(); diff --git a/include/gz/gui/Helpers.hh b/include/gz/gui/Helpers.hh index 72e95912f..fcc16a7be 100644 --- a/include/gz/gui/Helpers.hh +++ b/include/gz/gui/Helpers.hh @@ -22,7 +22,7 @@ #include "gz/gui/Enums.hh" #include "gz/gui/Export.hh" -namespace ignition +namespace gz { namespace gui { @@ -30,7 +30,7 @@ namespace ignition /// and removing characters like "_". /// \param[in] _key Non-human-readable key. /// \return Human-readable key. - IGNITION_GUI_VISIBLE + GZ_GUI_VISIBLE std::string humanReadable(const std::string &_key); /// \brief Returns the unit for a given key. For example, the key "mass" @@ -40,7 +40,7 @@ namespace ignition /// must be given too. For example, a prismatic joint will have different /// units from a revolute joint. /// \return The unit. - IGNITION_GUI_VISIBLE + GZ_GUI_VISIBLE std::string unitFromKey(const std::string &_key, const std::string &_type = ""); @@ -49,14 +49,14 @@ namespace ignition /// \param[in] _key The key. /// \param[out] _min The minimum value. /// \param[out] _max The maximum value. - IGNITION_GUI_VISIBLE + GZ_GUI_VISIBLE void rangeFromKey(const std::string &_key, double &_min, double &_max); /// \brief Returns the string type for a given key. For example, the key /// "innerxml" has a PLAIN_TEXT type while "name" is a LINE. /// \param[in] _key The key. /// \return The string type. - IGNITION_GUI_VISIBLE + GZ_GUI_VISIBLE StringType stringTypeFromKey(const std::string &_key); /// \brief Generates a path for a file which doesn't collide with existing @@ -66,7 +66,7 @@ namespace ignition /// \param[in] _extension File extension, such as "pdf". /// \return Full path, with name and extension, which doesn't collide with /// existing files - IGNITION_GUI_VISIBLE + GZ_GUI_VISIBLE std::string uniqueFilePath(const std::string &_pathAndName, const std::string &_extension); @@ -76,7 +76,7 @@ namespace ignition /// This helper function provides a handy access to the world names list. /// \return List of world names, as stored in the `MainWindow`'s /// "worldNames" property. - IGNITION_GUI_VISIBLE + GZ_GUI_VISIBLE QStringList worldNames(); /// \brief The main window's "renderEngine" property may be filled with @@ -86,7 +86,7 @@ namespace ignition /// name /// \return Name of render engine used on the GUI, as stored in the /// `MainWindow`'s "renderEngine" property. - IGNITION_GUI_VISIBLE + GZ_GUI_VISIBLE std::string renderEngineName(); /// \brief Import path for ign-gui QML modules added to the Qt resource @@ -95,7 +95,7 @@ namespace ignition /// module, add this path to the QML engine's import path list before /// attempting to load a QML file that imports Gazebo QML modules. /// \return Resousrce path prefix as a string - IGNITION_GUI_VISIBLE + GZ_GUI_VISIBLE const QString qmlQrcImportPath(); /// \brief Returns the first element on a QList which matches the given diff --git a/include/gz/gui/MainWindow.hh b/include/gz/gui/MainWindow.hh index ddece5981..4ea01d9b5 100644 --- a/include/gz/gui/MainWindow.hh +++ b/include/gz/gui/MainWindow.hh @@ -35,7 +35,7 @@ #pragma warning(disable: 4251) #endif -namespace ignition +namespace gz { namespace gui { @@ -58,7 +58,7 @@ namespace ignition /// \brief The main window class creates a QQuickWindow and acts as an /// interface which provides properties and functions which can be called /// from Main.qml - class IGNITION_GUI_VISIBLE MainWindow : public QObject + class GZ_GUI_VISIBLE MainWindow : public QObject { Q_OBJECT @@ -589,7 +589,7 @@ namespace ignition }; /// \brief Holds configurations related to a MainWindow. - struct IGNITION_GUI_VISIBLE WindowConfig + struct GZ_GUI_VISIBLE WindowConfig { /// \brief Update this config from an XML string. Only fields present on /// the XML will be overriden / appended / created. diff --git a/include/gz/gui/PlottingInterface.hh b/include/gz/gui/PlottingInterface.hh index f67a7cda1..d00b9d67f 100644 --- a/include/gz/gui/PlottingInterface.hh +++ b/include/gz/gui/PlottingInterface.hh @@ -37,7 +37,7 @@ #include "gz/gui/Export.hh" -namespace ignition +namespace gz { namespace gui { @@ -46,7 +46,7 @@ class PlotDataPrivate; /// \brief Plot Data containter to hold value and registered charts /// Can be a Field or a PlotComponent /// Used by PlottingInterface and Gazebo Plotting -class IGNITION_GUI_VISIBLE PlotData +class GZ_GUI_VISIBLE PlotData { /// \brief Constructor public: PlotData(); @@ -92,7 +92,7 @@ class IGNITION_GUI_VISIBLE PlotData class TopicPrivate; /// \brief Plotting Topic to handle published topics & their registered fields -class IGNITION_GUI_VISIBLE Topic : public QObject +class GZ_GUI_VISIBLE Topic : public QObject { Q_OBJECT @@ -156,7 +156,7 @@ class IGNITION_GUI_VISIBLE Topic : public QObject class TransportPrivate; /// \brief Handle transport topics subscribing for one object (Chart) -class IGNITION_GUI_VISIBLE Transport : public QObject +class GZ_GUI_VISIBLE Transport : public QObject { Q_OBJECT @@ -214,7 +214,7 @@ class PlottingIfacePrivate; /// Responsible for plotting transport msgs-fields /// Used by TransportPlotting Plugin & GazeboPlotting Plugin /// Accepts dragged items from TopicViewer Plugin & ComponentInspector Plugin -class IGNITION_GUI_VISIBLE PlottingInterface : public QObject +class GZ_GUI_VISIBLE PlottingInterface : public QObject { Q_OBJECT diff --git a/include/gz/gui/Plugin.hh b/include/gz/gui/Plugin.hh index ed15ebfbe..e0fa35188 100644 --- a/include/gz/gui/Plugin.hh +++ b/include/gz/gui/Plugin.hh @@ -31,7 +31,7 @@ #pragma warning(disable: 4251) #endif -namespace ignition +namespace gz { namespace gui { @@ -51,7 +51,7 @@ namespace ignition /// /// * The QML file is prefixed by the library's name in the QRC file /// (i.e. the file's resource is found at ':/Publisher/Publisher.qml') - class IGNITION_GUI_VISIBLE Plugin : public QObject + class GZ_GUI_VISIBLE Plugin : public QObject { Q_OBJECT diff --git a/include/gz/gui/SearchModel.hh b/include/gz/gui/SearchModel.hh index df75295fb..02996911b 100644 --- a/include/gz/gui/SearchModel.hh +++ b/include/gz/gui/SearchModel.hh @@ -20,7 +20,7 @@ #include "gz/gui/Export.hh" #include "gz/gui/qt.h" -namespace ignition +namespace gz { namespace gui { @@ -33,7 +33,7 @@ namespace gui /// applicable /// * Items with DataRole::TYPE == "title" are ignored /// - class IGNITION_GUI_VISIBLE SearchModel : public QSortFilterProxyModel + class GZ_GUI_VISIBLE SearchModel : public QSortFilterProxyModel { /// \brief Overloaded Qt method. Customize so we accept rows where: /// 1. Each of the words can be found in its ancestors or itself, but not diff --git a/include/gz/gui/config.hh.in b/include/gz/gui/config.hh.in index ad0b28a6e..66f7bedbd 100644 --- a/include/gz/gui/config.hh.in +++ b/include/gz/gui/config.hh.in @@ -1,17 +1,35 @@ +/* + * 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. + * + */ + /* Config.hh. Generated by CMake for @PROJECT_NAME@. */ +#ifndef GZ_GUI_CONFIG_HH_ +#define GZ_GUI_CONFIG_HH_ + /* Version number */ -#define IGNITION_GUI_MAJOR_VERSION ${PROJECT_VERSION_MAJOR} -#define IGNITION_GUI_MINOR_VERSION ${PROJECT_VERSION_MINOR} -#define IGNITION_GUI_PATCH_VERSION ${PROJECT_VERSION_PATCH} +#define GZ_GUI_MAJOR_VERSION ${PROJECT_VERSION_MAJOR} +#define GZ_GUI_MINOR_VERSION ${PROJECT_VERSION_MINOR} +#define GZ_GUI_PATCH_VERSION ${PROJECT_VERSION_PATCH} -#define IGNITION_GUI_VERSION "${PROJECT_VERSION}" -#define IGNITION_GUI_VERSION_FULL "${PROJECT_VERSION_FULL}" +#define GZ_GUI_VERSION "${PROJECT_VERSION}" +#define GZ_GUI_VERSION_FULL "${PROJECT_VERSION_FULL}" -#define IGNITION_GUI_VERSION_HEADER "Gazebo ${IGN_DESIGNATION}, version ${PROJECT_VERSION_FULL}\nCopyright (C) 2017 Open Source Robotics Foundation.\nReleased under the Apache 2.0 License.\n\n" +#define GZ_GUI_VERSION_HEADER "Gazebo GUI, version ${PROJECT_VERSION_FULL}\nCopyright (C) 2017 Open Source Robotics Foundation.\nReleased under the Apache 2.0 License.\n\n" -#cmakedefine BUILD_TYPE_PROFILE 1 -#cmakedefine BUILD_TYPE_DEBUG 1 -#cmakedefine BUILD_TYPE_RELEASE 1 +#define GZ_GUI_PLUGIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${IGN_LIB_INSTALL_DIR}/ign-${IGN_DESIGNATION}-${PROJECT_VERSION_MAJOR}/plugins" -#define IGN_GUI_PLUGIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${IGN_LIB_INSTALL_DIR}/ign-${IGN_DESIGNATION}-${PROJECT_VERSION_MAJOR}/plugins" +#endif diff --git a/include/gz/gui/gz.hh b/include/gz/gui/gz.hh index 397d94542..ae016dff5 100644 --- a/include/gz/gui/gz.hh +++ b/include/gz/gui/gz.hh @@ -22,24 +22,24 @@ /// \brief External hook to read the library version. /// \return C-string representing the version. Ex.: 0.1.2 -extern "C" IGNITION_GUI_VISIBLE char *ignitionVersion(); +extern "C" GZ_GUI_VISIBLE char *ignitionVersion(); /// \brief External hook to execute 'ign gui -l' from the command line. -extern "C" IGNITION_GUI_VISIBLE void cmdPluginList(); +extern "C" GZ_GUI_VISIBLE void cmdPluginList(); /// \brief External hook to execute 'ign gui -s' from the command line. /// \param[in] _filename Name of a plugin file. -extern "C" IGNITION_GUI_VISIBLE void cmdStandalone(const char *_filename); +extern "C" GZ_GUI_VISIBLE void cmdStandalone(const char *_filename); /// \brief External hook to execute 'ign gui -c' from the command line. /// \param[in] _config Path to a config file. -extern "C" IGNITION_GUI_VISIBLE void cmdConfig(const char *_config); +extern "C" GZ_GUI_VISIBLE void cmdConfig(const char *_config); /// \brief External hook to execute 'ign gui' from the command line. -extern "C" IGNITION_GUI_VISIBLE void cmdEmptyWindow(); +extern "C" GZ_GUI_VISIBLE void cmdEmptyWindow(); /// \brief External hook when executing 'ign gui -t' from the command line. /// \param[in] _filename Path to a QSS file. -extern "C" IGNITION_GUI_VISIBLE void cmdSetStyleFromFile(const char *_filename); +extern "C" GZ_GUI_VISIBLE void cmdSetStyleFromFile(const char *_filename); #endif diff --git a/include/ignition/gui.hh b/include/ignition/gui.hh index 93bc53865..432d7aabc 100644 --- a/include/ignition/gui.hh +++ b/include/ignition/gui.hh @@ -16,3 +16,4 @@ */ #include +#include diff --git a/include/ignition/gui/Application.hh b/include/ignition/gui/Application.hh index 212530eb8..1d849cfce 100644 --- a/include/ignition/gui/Application.hh +++ b/include/ignition/gui/Application.hh @@ -16,3 +16,4 @@ */ #include +#include diff --git a/include/ignition/gui/Conversions.hh b/include/ignition/gui/Conversions.hh index bef1ed03f..37f72d5f8 100644 --- a/include/ignition/gui/Conversions.hh +++ b/include/ignition/gui/Conversions.hh @@ -16,3 +16,4 @@ */ #include +#include diff --git a/include/ignition/gui/Dialog.hh b/include/ignition/gui/Dialog.hh index c3ae6e816..54c40a248 100644 --- a/include/ignition/gui/Dialog.hh +++ b/include/ignition/gui/Dialog.hh @@ -16,3 +16,4 @@ */ #include +#include diff --git a/include/ignition/gui/DragDropModel.hh b/include/ignition/gui/DragDropModel.hh index dca307f4f..13f2d4ccd 100644 --- a/include/ignition/gui/DragDropModel.hh +++ b/include/ignition/gui/DragDropModel.hh @@ -16,3 +16,4 @@ */ #include +#include diff --git a/include/ignition/gui/Enums.hh b/include/ignition/gui/Enums.hh index 998c59bd3..92c85a03f 100644 --- a/include/ignition/gui/Enums.hh +++ b/include/ignition/gui/Enums.hh @@ -16,3 +16,4 @@ */ #include +#include diff --git a/include/ignition/gui/Export.hh b/include/ignition/gui/Export.hh index 968a92aed..145530e06 100644 --- a/include/ignition/gui/Export.hh +++ b/include/ignition/gui/Export.hh @@ -16,3 +16,4 @@ */ #include +#include diff --git a/include/ignition/gui/GuiEvents.hh b/include/ignition/gui/GuiEvents.hh index ab3bee6dd..4b02367f2 100644 --- a/include/ignition/gui/GuiEvents.hh +++ b/include/ignition/gui/GuiEvents.hh @@ -16,3 +16,4 @@ */ #include +#include diff --git a/include/ignition/gui/Helpers.hh b/include/ignition/gui/Helpers.hh index 95c589be9..41ee8fcf1 100644 --- a/include/ignition/gui/Helpers.hh +++ b/include/ignition/gui/Helpers.hh @@ -16,3 +16,4 @@ */ #include +#include diff --git a/include/ignition/gui/MainWindow.hh b/include/ignition/gui/MainWindow.hh index 14d96ba33..9d307fe68 100644 --- a/include/ignition/gui/MainWindow.hh +++ b/include/ignition/gui/MainWindow.hh @@ -16,3 +16,4 @@ */ #include +#include diff --git a/include/ignition/gui/PlottingInterface.hh b/include/ignition/gui/PlottingInterface.hh index 46b8ce427..9861f1902 100644 --- a/include/ignition/gui/PlottingInterface.hh +++ b/include/ignition/gui/PlottingInterface.hh @@ -16,3 +16,4 @@ */ #include +#include diff --git a/include/ignition/gui/Plugin.hh b/include/ignition/gui/Plugin.hh index 49a95eef7..9a44df350 100644 --- a/include/ignition/gui/Plugin.hh +++ b/include/ignition/gui/Plugin.hh @@ -16,3 +16,4 @@ */ #include +#include diff --git a/include/ignition/gui/SearchModel.hh b/include/ignition/gui/SearchModel.hh index 1bd7afe24..80a3bd141 100644 --- a/include/ignition/gui/SearchModel.hh +++ b/include/ignition/gui/SearchModel.hh @@ -16,3 +16,4 @@ */ #include +#include diff --git a/include/ignition/gui/config.hh b/include/ignition/gui/config.hh index 75005186e..f73a89e14 100644 --- a/include/ignition/gui/config.hh +++ b/include/ignition/gui/config.hh @@ -15,4 +15,32 @@ * */ +#ifndef IGNITION_GUI__CONFIG_HH_ +#define IGNITION_GUI__CONFIG_HH_ + #include + +#define IGNITION_GUI_MAJOR_VERSION GZ_GUI_MAJOR_VERSION +#define IGNITION_GUI_MINOR_VERSION GZ_GUI_MINOR_VERSION +#define IGNITION_GUI_PATCH_VERSION GZ_GUI_PATCH_VERSION + +#define IGNITION_GUI_VERSION GZ_GUI_VERSION +#define IGNITION_GUI_VERSION_FULL GZ_GUI_VERSION_FULL + +#define IGNITION_GUI_VERSION_HEADER GZ_GUI_VERSION_HEADER + +#define IGN_GUI_PLUGIN_INSTALL_DIR GZ_GUI_PLUGIN_INSTALL_DIR + +namespace gz +{ +} + +namespace ignition +{ + #ifndef SUPPRESS_IGNITION_HEADER_DEPRECATION + #pragma message("ignition namespace is deprecated! Use gz instead!") + #endif + using namespace gz; +} + +#endif diff --git a/include/ignition/gui/ign.hh b/include/ignition/gui/ign.hh index 5231fcac5..8542b4f91 100644 --- a/include/ignition/gui/ign.hh +++ b/include/ignition/gui/ign.hh @@ -16,3 +16,4 @@ */ #include +#include diff --git a/include/ignition/gui/ign_auto_headers.hh b/include/ignition/gui/ign_auto_headers.hh index 45d9db296..c1117d775 100644 --- a/include/ignition/gui/ign_auto_headers.hh +++ b/include/ignition/gui/ign_auto_headers.hh @@ -16,3 +16,4 @@ */ #include +#include diff --git a/include/ignition/gui/qt.h b/include/ignition/gui/qt.h index 1ec9c44b5..ed8b0a01a 100644 --- a/include/ignition/gui/qt.h +++ b/include/ignition/gui/qt.h @@ -16,3 +16,4 @@ */ #include +#include diff --git a/src/Application.cc b/src/Application.cc index 188a9daa5..79d2063ba 100644 --- a/src/Application.cc +++ b/src/Application.cc @@ -18,23 +18,23 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include -#include +#include -#include "ignition/gui/Application.hh" -#include "ignition/gui/config.hh" -#include "ignition/gui/Dialog.hh" -#include "ignition/gui/Helpers.hh" -#include "ignition/gui/MainWindow.hh" -#include "ignition/gui/Plugin.hh" +#include "gz/gui/Application.hh" +#include "gz/gui/config.hh" +#include "gz/gui/Dialog.hh" +#include "gz/gui/Helpers.hh" +#include "gz/gui/MainWindow.hh" +#include "gz/gui/Plugin.hh" -#include "ignition/transport/TopicUtils.hh" +#include "gz/transport/TopicUtils.hh" -namespace ignition +namespace gz { namespace gui { @@ -84,14 +84,14 @@ namespace ignition } } -using namespace ignition; +using namespace gz; using namespace gui; ///////////////////////////////////////////////// Application::Application(int &_argc, char **_argv, const WindowType _type) : QApplication(_argc, _argv), dataPtr(new ApplicationPrivate) { - igndbg << "Initializing application." << std::endl; + gzdbg << "Initializing application." << std::endl; this->setOrganizationName("Gazebo"); this->setOrganizationDomain("gazebosim.org"); @@ -99,7 +99,7 @@ Application::Application(int &_argc, char **_argv, const WindowType _type) #if __APPLE__ // Use the Metal graphics API on macOS. - igndbg << "Qt using Metal graphics interface" << std::endl; + gzdbg << "Qt using Metal graphics interface" << std::endl; QQuickWindow::setSceneGraphBackend(QSGRendererInterface::MetalRhi); // TODO(srmainwaring): implement facility for overriding the default @@ -117,7 +117,7 @@ Application::Application(int &_argc, char **_argv, const WindowType _type) // QSurfaceFormat::setDefaultFormat(format); #else // Otherwise use OpenGL - igndbg << "Qt using OpenGL graphics interface" << std::endl; + gzdbg << "Qt using OpenGL graphics interface" << std::endl; #endif // Configure console @@ -147,7 +147,7 @@ Application::Application(int &_argc, char **_argv, const WindowType _type) if (_type == WindowType::kMainWindow) { if (!this->InitializeMainWindow()) - ignerr << "Failed to initialize main window." << std::endl; + gzerr << "Failed to initialize main window." << std::endl; } else if (_type == WindowType::kDialog) { @@ -155,14 +155,14 @@ Application::Application(int &_argc, char **_argv, const WindowType _type) } else { - ignerr << "Unknown WindowType [" << static_cast(_type) << "]\n"; + gzerr << "Unknown WindowType [" << static_cast(_type) << "]\n"; } } ///////////////////////////////////////////////// Application::~Application() { - igndbg << "Terminating application." << std::endl; + gzdbg << "Terminating application." << std::endl; if (this->dataPtr->mainWin && this->dataPtr->mainWin->QuickWindow()) { @@ -206,7 +206,7 @@ QQmlApplicationEngine *Application::Engine() const } ///////////////////////////////////////////////// -Application *ignition::gui::App() +Application *gz::gui::App() { return qobject_cast(qGuiApp); } @@ -245,7 +245,7 @@ bool Application::LoadConfig(const std::string &_config) { if (_config.empty()) { - ignerr << "Missing config file" << std::endl; + gzerr << "Missing config file" << std::endl; return false; } @@ -259,14 +259,14 @@ bool Application::LoadConfig(const std::string &_config) // presses "Save configuration". if (_config != this->DefaultConfigPath()) { - ignerr << "Failed to load file [" << _config << "]: XMLError" + gzerr << "Failed to load file [" << _config << "]: XMLError" << std::endl; } return false; } - ignmsg << "Loading config [" << _config << "]" << std::endl; + gzmsg << "Loading config [" << _config << "]" << std::endl; // Clear all previous plugins auto plugins = this->dataPtr->mainWin->findChildren(); @@ -277,7 +277,7 @@ bool Application::LoadConfig(const std::string &_config) } if (this->dataPtr->pluginsAdded.size() > 0) { - ignerr << "The plugin list was not properly cleaned up." << std::endl; + gzerr << "The plugin list was not properly cleaned up." << std::endl; } this->dataPtr->pluginsAdded.clear(); @@ -292,12 +292,12 @@ bool Application::LoadConfig(const std::string &_config) // Process window properties if (auto winElem = doc.FirstChildElement("window")) { - igndbg << "Loading window config" << std::endl; + gzdbg << "Loading window config" << std::endl; tinyxml2::XMLPrinter printer; if (!winElem->Accept(&printer)) { - ignwarn << "There was an error parsing the element" + gzwarn << "There was an error parsing the element" << std::endl; return false; } @@ -315,7 +315,7 @@ bool Application::LoadConfig(const std::string &_config) } else if (value != "close_gui" && !value.empty()) { - ignwarn << "Value '" << value << "' of is " + gzwarn << "Value '" << value << "' of is " << "invalid. Allowed values are CLOSE_GUI and SHUTDOWN_SERVER. " << "Selecting CLOSE_GUI as fallback." << std::endl; } @@ -379,11 +379,11 @@ bool Application::LoadConfig(const std::string &_config) if (serverControlService.empty()) { - ignerr << "Failed to create valid server control service" << std::endl; + gzerr << "Failed to create valid server control service" << std::endl; } else { - ignmsg << "Using server control service [" << serverControlService + gzmsg << "Using server control service [" << serverControlService << "]" << std::endl; this->dataPtr->mainWin->SetServerControlService(serverControlService); } @@ -418,11 +418,11 @@ bool Application::LoadPlugin(const std::string &_filename, { if (_filename.empty()) { - ignerr << "Trying to load plugin with empty filename." << std::endl; + gzerr << "Trying to load plugin with empty filename." << std::endl; return false; } - igndbg << "Loading plugin [" << _filename << "]" << std::endl; + gzdbg << "Loading plugin [" << _filename << "]" << std::endl; common::SystemPaths systemPaths; systemPaths.SetPluginPathEnv(this->dataPtr->pluginPathEnv); @@ -434,7 +434,7 @@ bool Application::LoadPlugin(const std::string &_filename, std::string home; common::env(IGN_HOMEDIR, home); systemPaths.AddPluginPaths(home + "/.ignition/gui/plugins:" + - IGN_GUI_PLUGIN_INSTALL_DIR); + GZ_GUI_PLUGIN_INSTALL_DIR); auto pathToLib = systemPaths.FindSharedLibrary(_filename); if (pathToLib.empty()) @@ -445,13 +445,13 @@ bool Application::LoadPlugin(const std::string &_filename, pathToLib = systemPathsDep.FindSharedLibrary(_filename); if (pathToLib.empty()) { - ignerr << "Failed to load plugin [" << _filename << + gzerr << "Failed to load plugin [" << _filename << "] : couldn't find shared library." << std::endl; return false; } else { - ignwarn << "Found plugin [" << _filename + gzwarn << "Found plugin [" << _filename << "] using deprecated environment variable [" << this->dataPtr->pluginPathEnvDeprecated << "]. Please use [" << this->dataPtr->pluginPathEnv << "] instead." << std::endl; @@ -464,14 +464,14 @@ bool Application::LoadPlugin(const std::string &_filename, auto pluginNames = pluginLoader.LoadLib(pathToLib); if (pluginNames.empty()) { - ignerr << "Failed to load plugin [" << _filename << + gzerr << "Failed to load plugin [" << _filename << "] : couldn't load library on path [" << pathToLib << "]." << std::endl; return false; } // Go over all plugin names and get the first one that implements the - // ignition::gui::Plugin interface + // gz::gui::Plugin interface plugin::PluginPtr commonPlugin; std::shared_ptr plugin{nullptr}; for (auto pluginName : pluginNames) @@ -480,28 +480,28 @@ bool Application::LoadPlugin(const std::string &_filename, if (!commonPlugin) continue; - plugin = commonPlugin->QueryInterfaceSharedPtr(); + plugin = commonPlugin->QueryInterfaceSharedPtr(); if (plugin) break; } if (!commonPlugin) { - ignerr << "Failed to load plugin [" << _filename << + gzerr << "Failed to load plugin [" << _filename << "] : couldn't instantiate plugin on path [" << pathToLib << "]. Tried plugin names: " << std::endl; for (auto pluginName : pluginNames) { - ignerr << " * " << pluginName << std::endl; + gzerr << " * " << pluginName << std::endl; } return false; } if (!plugin) { - ignerr << "Failed to load plugin [" << _filename << - "] : couldn't get [ignition::gui::Plugin] interface." + gzerr << "Failed to load plugin [" << _filename << + "] : couldn't get [gz::gui::Plugin] interface." << std::endl; return false; } @@ -532,7 +532,7 @@ bool Application::LoadPlugin(const std::string &_filename, this->InitializeDialogs(); this->PluginAdded(plugin->CardItem()->objectName()); - ignmsg << "Loaded plugin [" << _filename << "] from path [" << pathToLib + gzmsg << "Loaded plugin [" << _filename << "] from path [" << pathToLib << "]" << std::endl; return true; @@ -559,7 +559,7 @@ std::shared_ptr Application::PluginByName( ///////////////////////////////////////////////// bool Application::InitializeMainWindow() { - igndbg << "Create main window" << std::endl; + gzdbg << "Create main window" << std::endl; this->dataPtr->mainWin = new MainWindow(); if (!this->dataPtr->mainWin->QuickWindow()) @@ -573,7 +573,7 @@ bool Application::InitializeMainWindow() ///////////////////////////////////////////////// bool Application::ApplyConfig() { - igndbg << "Applying config" << std::endl; + gzdbg << "Applying config" << std::endl; if (!this->dataPtr->mainWin) return false; @@ -592,7 +592,7 @@ bool Application::AddPluginsToWindow() ->findChild("background"); if (!this->dataPtr->pluginsToAdd.empty() && !bgItem) { - ignerr << "Null background QQuickItem!" << std::endl; + gzerr << "Null background QQuickItem!" << std::endl; return false; } @@ -623,7 +623,7 @@ bool Application::AddPluginsToWindow() splitName.toString()); if (!splitItem) { - ignerr << "Internal error: failed to create split [" + gzerr << "Internal error: failed to create split [" << splitName.toString().toStdString() << "]" << std::endl; return false; } @@ -640,7 +640,7 @@ bool Application::AddPluginsToWindow() this->dataPtr->mainWin->connect(cardItem, SIGNAL(close()), this, SLOT(OnPluginClose())); - ignmsg << "Added plugin [" << plugin->Title() << "] to main window" << + gzmsg << "Added plugin [" << plugin->Title() << "] to main window" << std::endl; } @@ -652,7 +652,7 @@ bool Application::AddPluginsToWindow() ///////////////////////////////////////////////// bool Application::InitializeDialogs() { - igndbg << "Initialize dialogs" << std::endl; + gzdbg << "Initialize dialogs" << std::endl; while (!this->dataPtr->pluginsToAdd.empty()) { @@ -689,7 +689,7 @@ bool Application::InitializeDialogs() this->dataPtr->pluginsAdded.push_back(plugin); auto title = QString::fromStdString(plugin->Title()); - igndbg << "Initialized dialog [" << title.toStdString() << "]" << std::endl; + gzdbg << "Initialized dialog [" << title.toStdString() << "]" << std::endl; } if (this->dataPtr->pluginsAdded.empty()) @@ -734,7 +734,7 @@ std::vector>> paths.push_back(home + "/.ignition/gui/plugins"); // 4. Install path - paths.push_back(IGN_GUI_PLUGIN_INSTALL_DIR); + paths.push_back(GZ_GUI_PLUGIN_INSTALL_DIR); // Populate map std::vector>> plugins; @@ -802,20 +802,20 @@ void ApplicationPrivate::MessageHandler(QtMsgType _type, switch (_type) { case QtDebugMsg: - igndbg << msg << std::endl; + gzdbg << msg << std::endl; break; case QtInfoMsg: - ignmsg << msg << std::endl; + gzmsg << msg << std::endl; break; case QtWarningMsg: - ignwarn << msg << std::endl; + gzwarn << msg << std::endl; break; case QtFatalMsg: case QtCriticalMsg: - ignerr << msg << std::endl; + gzerr << msg << std::endl; break; default: - ignwarn << "Unknown QT Message type[" << _type << "]: " + gzwarn << "Unknown QT Message type[" << _type << "]: " << msg << std::endl; break; } diff --git a/src/Application_TEST.cc b/src/Application_TEST.cc index 40c162e4b..fb9537513 100644 --- a/src/Application_TEST.cc +++ b/src/Application_TEST.cc @@ -17,14 +17,14 @@ #include #include -#include -#include +#include +#include #include "test_config.h" // NOLINT(build/include) -#include "ignition/gui/Application.hh" -#include "ignition/gui/Dialog.hh" -#include "ignition/gui/MainWindow.hh" -#include "ignition/gui/Plugin.hh" +#include "gz/gui/Application.hh" +#include "gz/gui/Dialog.hh" +#include "gz/gui/MainWindow.hh" +#include "gz/gui/Plugin.hh" int g_argc = 1; char* g_argv[] = @@ -32,14 +32,14 @@ char* g_argv[] = reinterpret_cast(const_cast("./Application_TEST")), }; -using namespace ignition; +using namespace gz; using namespace gui; -// See https://github.com/ignitionrobotics/ign-gui/issues/75 +// See https://github.com/gazebosim/gz-gui/issues/75 ////////////////////////////////////////////////// TEST(ApplicationTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Constructor)) { - ignition::common::Console::SetVerbosity(4); + gz::common::Console::SetVerbosity(4); // No Qt app EXPECT_EQ(nullptr, qGuiApp); @@ -65,7 +65,7 @@ TEST(ApplicationTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Constructor)) ////////////////////////////////////////////////// TEST(ApplicationTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(LoadPlugin)) { - ignition::common::Console::SetVerbosity(4); + gz::common::Console::SetVerbosity(4); // No Qt app EXPECT_EQ(nullptr, qGuiApp); @@ -121,7 +121,7 @@ TEST(ApplicationTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(LoadPlugin)) EXPECT_TRUE(app.LoadPlugin("TestPlugin")); } - // Plugin which doesn't inherit from ignition::gui::Plugin + // Plugin which doesn't inherit from gz::gui::Plugin { Application app(g_argc, g_argv); app.AddPluginPath(std::string(PROJECT_BINARY_PATH) + "/lib"); @@ -149,7 +149,7 @@ TEST(ApplicationTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(LoadPlugin)) ////////////////////////////////////////////////// TEST(ApplicationTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(LoadConfig)) { - ignition::common::Console::SetVerbosity(4); + gz::common::Console::SetVerbosity(4); EXPECT_EQ(nullptr, qGuiApp); @@ -177,7 +177,7 @@ TEST(ApplicationTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(LoadConfig)) ////////////////////////////////////////////////// TEST(ApplicationTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(LoadDefaultConfig)) { - ignition::common::Console::SetVerbosity(4); + gz::common::Console::SetVerbosity(4); EXPECT_EQ(nullptr, qGuiApp); @@ -186,12 +186,12 @@ TEST(ApplicationTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(LoadDefaultConfig)) Application app(g_argc, g_argv); // Add test plugin to path (referenced in config) - auto testBuildPath = ignition::common::joinPaths( + auto testBuildPath = gz::common::joinPaths( std::string(PROJECT_BINARY_PATH), "lib"); app.AddPluginPath(testBuildPath); // Set default config file - auto configPath = ignition::common::joinPaths( + auto configPath = gz::common::joinPaths( std::string(PROJECT_SOURCE_PATH), "test", "config", "test.config"); app.SetDefaultConfigPath(configPath); @@ -203,7 +203,7 @@ TEST(ApplicationTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(LoadDefaultConfig)) TEST(ApplicationTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(InitializeMainWindow)) { - ignition::common::Console::SetVerbosity(4); + gz::common::Console::SetVerbosity(4); EXPECT_EQ(nullptr, qGuiApp); @@ -273,7 +273,7 @@ TEST(ApplicationTest, ////////////////////////////////////////////////// TEST(ApplicationTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Dialog)) { - ignition::common::Console::SetVerbosity(4); + gz::common::Console::SetVerbosity(4); EXPECT_EQ(nullptr, qGuiApp); @@ -348,13 +348,13 @@ TEST(ApplicationTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Dialog)) ///////////////////////////////////////////////// TEST(ApplicationTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(messageHandler)) { - ignition::common::Console::SetVerbosity(4); + gz::common::Console::SetVerbosity(4); EXPECT_EQ(nullptr, qGuiApp); Application app(g_argc, g_argv); - // \todo Verify output, see ignition::commmon::Console_TEST for example + // \todo Verify output, see gz::commmon::Console_TEST for example qDebug("This came from qDebug"); qInfo("This came from qInfo"); qWarning("This came from qWarning"); diff --git a/src/Conversions.cc b/src/Conversions.cc index aa6869f81..050d0000e 100644 --- a/src/Conversions.cc +++ b/src/Conversions.cc @@ -15,14 +15,14 @@ * */ -#include -#include -#include +#include +#include +#include -#include "ignition/gui/Conversions.hh" +#include "gz/gui/Conversions.hh" ////////////////////////////////////////////////// -QColor ignition::gui::convert(const ignition::math::Color &_color) +QColor gz::gui::convert(const gz::math::Color &_color) { return QColor(_color.R()*255.0, _color.G()*255.0, @@ -31,40 +31,40 @@ QColor ignition::gui::convert(const ignition::math::Color &_color) } ////////////////////////////////////////////////// -ignition::math::Color ignition::gui::convert(const QColor &_color) +gz::math::Color gz::gui::convert(const QColor &_color) { - return ignition::math::Color(_color.red() / 255.0, + return gz::math::Color(_color.red() / 255.0, _color.green() / 255.0, _color.blue() / 255.0, _color.alpha() / 255.0); } ////////////////////////////////////////////////// -QPointF ignition::gui::convert(const ignition::math::Vector2d &_pt) +QPointF gz::gui::convert(const gz::math::Vector2d &_pt) { return QPointF(_pt.X(), _pt.Y()); } ////////////////////////////////////////////////// -ignition::math::Vector2d ignition::gui::convert(const QPointF &_pt) +gz::math::Vector2d gz::gui::convert(const QPointF &_pt) { - return ignition::math::Vector2d(_pt.x(), _pt.y()); + return gz::math::Vector2d(_pt.x(), _pt.y()); } ////////////////////////////////////////////////// -QVector3D ignition::gui::convert(const ignition::math::Vector3d &_vec) +QVector3D gz::gui::convert(const gz::math::Vector3d &_vec) { return QVector3D(_vec.X(), _vec.Y(), _vec.Z()); } ////////////////////////////////////////////////// -ignition::math::Vector3d ignition::gui::convert(const QVector3D &_vec) +gz::math::Vector3d gz::gui::convert(const QVector3D &_vec) { - return ignition::math::Vector3d(_vec.x(), _vec.y(), _vec.z()); + return gz::math::Vector3d(_vec.x(), _vec.y(), _vec.z()); } ////////////////////////////////////////////////// -ignition::common::MouseEvent ignition::gui::convert(const QMouseEvent &_e) +gz::common::MouseEvent gz::gui::convert(const QMouseEvent &_e) { common::MouseEvent event; event.SetPos(_e.pos().x(), _e.pos().y()); @@ -115,7 +115,7 @@ ignition::common::MouseEvent ignition::gui::convert(const QMouseEvent &_e) } ////////////////////////////////////////////////// -ignition::common::MouseEvent ignition::gui::convert(const QWheelEvent &_e) +gz::common::MouseEvent gz::gui::convert(const QWheelEvent &_e) { common::MouseEvent event; @@ -152,7 +152,7 @@ ignition::common::MouseEvent ignition::gui::convert(const QWheelEvent &_e) } ////////////////////////////////////////////////// -ignition::common::KeyEvent ignition::gui::convert(const QKeyEvent &_e) +gz::common::KeyEvent gz::gui::convert(const QKeyEvent &_e) { common::KeyEvent event; event.SetKey(_e.key()); diff --git a/src/Conversions_TEST.cc b/src/Conversions_TEST.cc index 1f87a2de4..2ea34842a 100644 --- a/src/Conversions_TEST.cc +++ b/src/Conversions_TEST.cc @@ -17,14 +17,14 @@ #include -#include -#include -#include +#include +#include +#include #include "test_config.h" // NOLINT(build/include) -#include "ignition/gui/Conversions.hh" +#include "gz/gui/Conversions.hh" -using namespace ignition; +using namespace gz; using namespace gui; ///////////////////////////////////////////////// diff --git a/src/Dialog.cc b/src/Dialog.cc index 7463a7394..3d857dca1 100644 --- a/src/Dialog.cc +++ b/src/Dialog.cc @@ -15,11 +15,11 @@ * */ -#include -#include "ignition/gui/Application.hh" -#include "ignition/gui/Dialog.hh" +#include +#include "gz/gui/Application.hh" +#include "gz/gui/Dialog.hh" -namespace ignition +namespace gz { namespace gui { @@ -31,7 +31,7 @@ namespace ignition } } -using namespace ignition; +using namespace gz; using namespace gui; ///////////////////////////////////////////////// @@ -46,7 +46,7 @@ Dialog::Dialog() App()->Engine()->rootObjects().value(0)); if (!this->dataPtr->quickWindow) { - ignerr << "Internal error: Failed to instantiate QML file [" << qmlFile + gzerr << "Internal error: Failed to instantiate QML file [" << qmlFile << "]" << std::endl; return; } @@ -69,7 +69,7 @@ QQuickItem *Dialog::RootItem() const auto dialogItem = this->dataPtr->quickWindow->findChild(); if (!dialogItem) { - ignerr << "Internal error: Null dialog root item!" << std::endl; + gzerr << "Internal error: Null dialog root item!" << std::endl; } return dialogItem; diff --git a/src/DragDropModel.cc b/src/DragDropModel.cc index 5e1708c25..73a645c0d 100644 --- a/src/DragDropModel.cc +++ b/src/DragDropModel.cc @@ -15,10 +15,10 @@ * */ -#include "ignition/gui/Enums.hh" -#include "ignition/gui/DragDropModel.hh" +#include "gz/gui/Enums.hh" +#include "gz/gui/DragDropModel.hh" -using namespace ignition; +using namespace gz; using namespace gui; ///////////////////////////////////////////////// diff --git a/src/DragDropModel_TEST.cc b/src/DragDropModel_TEST.cc index a23f1c9b4..c8df59927 100644 --- a/src/DragDropModel_TEST.cc +++ b/src/DragDropModel_TEST.cc @@ -17,20 +17,20 @@ #include -#include +#include #include "test_config.h" // NOLINT(build/include) -#include "ignition/gui/Enums.hh" -#include "ignition/gui/DragDropModel.hh" +#include "gz/gui/Enums.hh" +#include "gz/gui/DragDropModel.hh" -using namespace ignition; +using namespace gz; using namespace gui; ///////////////////////////////////////////////// TEST(DragDropModelTest, Mime) { - ignition::common::Console::SetVerbosity(4); + gz::common::Console::SetVerbosity(4); auto model = new DragDropModel(); ASSERT_TRUE(model != nullptr); diff --git a/src/GuiEvents.cc b/src/GuiEvents.cc index 7734d8d4c..053e306c4 100644 --- a/src/GuiEvents.cc +++ b/src/GuiEvents.cc @@ -15,9 +15,9 @@ * */ -#include "ignition/gui/GuiEvents.hh" +#include "gz/gui/GuiEvents.hh" -class ignition::gui::events::SnapIntervals::Implementation +class gz::gui::events::SnapIntervals::Implementation { /// \brief XYZ snapping values in meters, these values must be positive. public: math::Vector3d xyz; @@ -31,122 +31,122 @@ class ignition::gui::events::SnapIntervals::Implementation public: math::Vector3d scale; }; -class ignition::gui::events::SpawnFromDescription::Implementation +class gz::gui::events::SpawnFromDescription::Implementation { /// \brief The string of the resource to be spawned. public: std::string description; }; -class ignition::gui::events::SpawnFromPath::Implementation +class gz::gui::events::SpawnFromPath::Implementation { /// \brief The path of file to be previewed. public: std::string filePath; }; -class ignition::gui::events::HoverToScene::Implementation +class gz::gui::events::HoverToScene::Implementation { /// \brief The 3D point over which the user is hovering. public: math::Vector3d point; }; -class ignition::gui::events::HoverOnScene::Implementation +class gz::gui::events::HoverOnScene::Implementation { /// \brief The 2D point over which the user is hovering. public: common::MouseEvent mouse; }; -class ignition::gui::events::LeftClickToScene::Implementation +class gz::gui::events::LeftClickToScene::Implementation { /// \brief The 3D point that the user clicked within the scene. public: math::Vector3d point; }; -class ignition::gui::events::RightClickToScene::Implementation +class gz::gui::events::RightClickToScene::Implementation { /// \brief The 3D point that the user clicked within the scene. public: math::Vector3d point; }; -class ignition::gui::events::DropdownMenuEnabled::Implementation +class gz::gui::events::DropdownMenuEnabled::Implementation { /// \brief The boolean indicating whether the menu is disabled or not /// for this event. public: bool menuEnabled; }; -class ignition::gui::events::LeftClickOnScene::Implementation +class gz::gui::events::LeftClickOnScene::Implementation { /// \brief Mouse event public: common::MouseEvent mouse; }; -class ignition::gui::events::RightClickOnScene::Implementation +class gz::gui::events::RightClickOnScene::Implementation { /// \brief Mouse event public: common::MouseEvent mouse; }; -class ignition::gui::events::BlockOrbit::Implementation +class gz::gui::events::BlockOrbit::Implementation { public: bool block; }; -class ignition::gui::events::KeyReleaseOnScene::Implementation +class gz::gui::events::KeyReleaseOnScene::Implementation { /// \brief Key event public: common::KeyEvent key; }; -class ignition::gui::events::KeyPressOnScene::Implementation +class gz::gui::events::KeyPressOnScene::Implementation { /// \brief Key event public: common::KeyEvent key; }; -class ignition::gui::events::SpawnCloneFromName::Implementation +class gz::gui::events::SpawnCloneFromName::Implementation { /// \brief The name of the resource to be cloned public: std::string name; }; -class ignition::gui::events::DropOnScene::Implementation +class gz::gui::events::DropOnScene::Implementation { /// \brief The name of the dropped thing public: std::string dropText; /// \brief X and Y position of the mouse - public: ignition::math::Vector2i mouse; + public: gz::math::Vector2i mouse; }; -class ignition::gui::events::ScrollOnScene::Implementation +class gz::gui::events::ScrollOnScene::Implementation { /// \brief Mouse event with scroll information. public: common::MouseEvent mouse; }; -class ignition::gui::events::DragOnScene::Implementation +class gz::gui::events::DragOnScene::Implementation { /// \brief Mouse event with drag information. public: common::MouseEvent mouse; }; -class ignition::gui::events::MousePressOnScene::Implementation +class gz::gui::events::MousePressOnScene::Implementation { /// \brief Mouse event with press information. public: common::MouseEvent mouse; }; -class ignition::gui::events::WorldControl::Implementation +class gz::gui::events::WorldControl::Implementation { /// \brief WorldControl information. public: msgs::WorldControl worldControl; }; -class ignition::gui::events::PreRender::Implementation +class gz::gui::events::PreRender::Implementation { }; -using namespace ignition; +using namespace gz; using namespace gui; using namespace events; @@ -354,7 +354,7 @@ const std::string &SpawnCloneFromName::Name() const ///////////////////////////////////////////////// DropOnScene::DropOnScene( - const std::string &_dropText, const ignition::math::Vector2i &_dropMouse) + const std::string &_dropText, const gz::math::Vector2i &_dropMouse) : QEvent(kType), dataPtr(utils::MakeImpl()) { this->dataPtr->dropText = _dropText; @@ -368,7 +368,7 @@ const std::string &DropOnScene::DropText() const } ///////////////////////////////////////////////// -const ignition::math::Vector2i &DropOnScene::Mouse() const +const gz::math::Vector2i &DropOnScene::Mouse() const { return this->dataPtr->mouse; } diff --git a/src/GuiEvents_TEST.cc b/src/GuiEvents_TEST.cc index adcec46da..9924534b4 100644 --- a/src/GuiEvents_TEST.cc +++ b/src/GuiEvents_TEST.cc @@ -18,9 +18,9 @@ #include #include "test_config.h" // NOLINT(build/include) -#include "ignition/gui/GuiEvents.hh" +#include "gz/gui/GuiEvents.hh" -using namespace ignition; +using namespace gz; using namespace gui; ///////////////////////////////////////////////// @@ -73,7 +73,7 @@ TEST(GuiEventsTest, HoverToScene) TEST(GuiEventsTest, HoverOnScene) { - ignition::common::MouseEvent mouse; + gz::common::MouseEvent mouse; mouse.SetAlt(true); mouse.SetShift(true); mouse.SetDragging(false); @@ -100,7 +100,7 @@ TEST(GuiEventsTest, LeftClickToScene) ///////////////////////////////////////////////// TEST(GuiEventsTest, LeftClickOnScene) { - ignition::common::MouseEvent mouse; + gz::common::MouseEvent mouse; mouse.SetAlt(true); mouse.SetShift(true); events::LeftClickOnScene event(mouse); @@ -123,7 +123,7 @@ TEST(GuiEventsTest, RightClickToScene) ///////////////////////////////////////////////// TEST(GuiEventsTest, RightClickOnScene) { - ignition::common::MouseEvent mouse; + gz::common::MouseEvent mouse; mouse.SetControl(true); mouse.SetAlt(true); events::RightClickOnScene event(mouse); @@ -137,7 +137,7 @@ TEST(GuiEventsTest, RightClickOnScene) ///////////////////////////////////////////////// TEST(GuiEventsTest, KeyPressOnScene) { - ignition::common::KeyEvent key; + gz::common::KeyEvent key; key.SetKey(49); key.SetControl(true); key.SetAlt(false); @@ -154,7 +154,7 @@ TEST(GuiEventsTest, KeyPressOnScene) ///////////////////////////////////////////////// TEST(GuiEventsTest, KeyReleaseOnScene) { - ignition::common::KeyEvent key; + gz::common::KeyEvent key; key.SetKey(49); key.SetControl(true); key.SetAlt(true); @@ -206,17 +206,17 @@ TEST(GuiEventsTest, SpawnCloneFromName) ///////////////////////////////////////////////// TEST(GuiEventsTest, DropOnScene) { - events::DropOnScene dropOnScene("text", ignition::math::Vector2i(3, 100)); + events::DropOnScene dropOnScene("text", gz::math::Vector2i(3, 100)); EXPECT_LT(QEvent::User, dropOnScene.type()); - EXPECT_EQ(ignition::math::Vector2i(3, 100), dropOnScene.Mouse()); + EXPECT_EQ(gz::math::Vector2i(3, 100), dropOnScene.Mouse()); EXPECT_EQ("text", dropOnScene.DropText()); } ///////////////////////////////////////////////// TEST(GuiEventsTest, ScrollOnScene) { - ignition::common::MouseEvent mouse; + gz::common::MouseEvent mouse; mouse.SetControl(true); mouse.SetAlt(true); events::ScrollOnScene event(mouse); @@ -230,7 +230,7 @@ TEST(GuiEventsTest, ScrollOnScene) ///////////////////////////////////////////////// TEST(GuiEventsTest, DragOnScene) { - ignition::common::MouseEvent mouse; + gz::common::MouseEvent mouse; mouse.SetControl(true); mouse.SetAlt(true); events::DragOnScene event(mouse); @@ -244,7 +244,7 @@ TEST(GuiEventsTest, DragOnScene) ///////////////////////////////////////////////// TEST(GuiEventsTest, MousePressOnScene) { - ignition::common::MouseEvent mouse; + gz::common::MouseEvent mouse; mouse.SetControl(true); mouse.SetAlt(true); events::MousePressOnScene event(mouse); @@ -258,7 +258,7 @@ TEST(GuiEventsTest, MousePressOnScene) ///////////////////////////////////////////////// TEST(GuiEventsTest, WorldControl) { - ignition::msgs::WorldControl worldControl; + gz::msgs::WorldControl worldControl; worldControl.set_pause(true); worldControl.set_step(true); worldControl.set_multi_step(5u); diff --git a/src/Helpers.cc b/src/Helpers.cc index 286b45f56..0e58169cc 100644 --- a/src/Helpers.cc +++ b/src/Helpers.cc @@ -18,15 +18,15 @@ #include #include #include -#include +#include -#include "ignition/gui/Application.hh" -#include "ignition/gui/Enums.hh" -#include "ignition/gui/Helpers.hh" -#include "ignition/gui/MainWindow.hh" +#include "gz/gui/Application.hh" +#include "gz/gui/Enums.hh" +#include "gz/gui/Helpers.hh" +#include "gz/gui/MainWindow.hh" ///////////////////////////////////////////////// -std::string ignition::gui::humanReadable(const std::string &_key) +std::string gz::gui::humanReadable(const std::string &_key) { std::string humanKey = _key; humanKey[0] = toupper(humanKey[0]); @@ -35,7 +35,7 @@ std::string ignition::gui::humanReadable(const std::string &_key) } ///////////////////////////////////////////////// -std::string ignition::gui::unitFromKey(const std::string &_key, +std::string gz::gui::unitFromKey(const std::string &_key, const std::string &_type) { if (_key == "pos" || _key == "length" || _key == "min_depth") @@ -110,7 +110,7 @@ std::string ignition::gui::unitFromKey(const std::string &_key, } ///////////////////////////////////////////////// -void ignition::gui::rangeFromKey(const std::string &_key, double &_min, +void gz::gui::rangeFromKey(const std::string &_key, double &_min, double &_max) { // Maximum range by default @@ -139,19 +139,19 @@ void ignition::gui::rangeFromKey(const std::string &_key, double &_min, } ///////////////////////////////////////////////// -ignition::gui::StringType ignition::gui::stringTypeFromKey( +gz::gui::StringType gz::gui::stringTypeFromKey( const std::string &_key) { if (_key == "innerxml") { - return ignition::gui::StringType::PLAIN_TEXT; + return gz::gui::StringType::PLAIN_TEXT; } return StringType::LINE; } ///////////////////////////////////////////////// -std::string ignition::gui::uniqueFilePath(const std::string &_pathAndName, +std::string gz::gui::uniqueFilePath(const std::string &_pathAndName, const std::string &_extension) { std::string result = _pathAndName + "." + _extension; @@ -168,7 +168,7 @@ std::string ignition::gui::uniqueFilePath(const std::string &_pathAndName, } ///////////////////////////////////////////////// -QStringList ignition::gui::worldNames() +QStringList gz::gui::worldNames() { auto win = App()->findChild(); if (nullptr == win) @@ -182,7 +182,7 @@ QStringList ignition::gui::worldNames() } ///////////////////////////////////////////////// -std::string ignition::gui::renderEngineName() +std::string gz::gui::renderEngineName() { auto win = App()->findChild(); if (nullptr == win) @@ -196,7 +196,7 @@ std::string ignition::gui::renderEngineName() } ///////////////////////////////////////////////// -const QString ignition::gui::qmlQrcImportPath() +const QString gz::gui::qmlQrcImportPath() { return "qrc:/ign-gui-qml/"; } diff --git a/src/Helpers_TEST.cc b/src/Helpers_TEST.cc index d0c30d55b..776058c67 100644 --- a/src/Helpers_TEST.cc +++ b/src/Helpers_TEST.cc @@ -18,13 +18,13 @@ #include #include -#include -#include +#include +#include #include "test_config.h" // NOLINT(build/include) -#include "ignition/gui/Application.hh" -#include "ignition/gui/MainWindow.hh" -#include "ignition/gui/Helpers.hh" +#include "gz/gui/Application.hh" +#include "gz/gui/MainWindow.hh" +#include "gz/gui/Helpers.hh" int gg_argc = 1; char* gg_argv[] = @@ -32,7 +32,7 @@ char* gg_argv[] = reinterpret_cast(const_cast("./Helpers_TEST")), }; -using namespace ignition; +using namespace gz; using namespace gui; ///////////////////////////////////////////////// @@ -122,7 +122,7 @@ TEST(HelpersTest, stringTypeFromKey) } ///////////////////////////////////////////////// -// See https://github.com/ignitionrobotics/ign-gui/issues/75 +// See https://github.com/gazebosim/gz-gui/issues/75 TEST(HelpersTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(findFirstByProperty)) { Application app(gg_argc, gg_argv); @@ -152,7 +152,7 @@ TEST(HelpersTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(findFirstByProperty)) } ///////////////////////////////////////////////// -// See https://github.com/ignitionrobotics/ign-gui/issues/75 +// See https://github.com/gazebosim/gz-gui/issues/75 TEST(HelpersTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(worldNames)) { // No app, no window, no names diff --git a/src/MainWindow.cc b/src/MainWindow.cc index ed3927e71..d238e38c5 100644 --- a/src/MainWindow.cc +++ b/src/MainWindow.cc @@ -19,17 +19,17 @@ #include #include -#include -#include -#include "ignition/gui/Application.hh" -#include "ignition/gui/MainWindow.hh" -#include "ignition/gui/Plugin.hh" -#include "ignition/gui/qt.h" -#include "ignition/msgs/boolean.pb.h" -#include "ignition/msgs/server_control.pb.h" -#include "ignition/transport/Node.hh" - -namespace ignition +#include +#include +#include "gz/gui/Application.hh" +#include "gz/gui/MainWindow.hh" +#include "gz/gui/Plugin.hh" +#include "gz/gui/qt.h" +#include "gz/msgs/boolean.pb.h" +#include "gz/msgs/server_control.pb.h" +#include "gz/transport/Node.hh" + +namespace gz { namespace gui { @@ -76,17 +76,17 @@ namespace ignition public: std::string controlService{"/server_control"}; /// \brief Communication node - public: ignition::transport::Node node; + public: gz::transport::Node node; }; } } -using namespace ignition; +using namespace gz; using namespace gui; /// \brief Strip last component from a path. /// \return Original path without its last component. -/// \ToDo: Move this function to ignition::common::Filesystem +/// \ToDo: Move this function to gz::common::Filesystem std::string dirName(const std::string &_path) { std::size_t found = _path.find_last_of("/\\"); @@ -99,7 +99,7 @@ MainWindow::MainWindow() { // Expose the ExitAction enum to QML via ExitAction 1.0 module qRegisterMetaType("ExitAction"); - qmlRegisterUncreatableMetaObject(ignition::gui::staticMetaObject, + qmlRegisterUncreatableMetaObject(gz::gui::staticMetaObject, "ExitAction", 1, 0, "ExitAction", "Error: namespace enum"); // Make MainWindow functions available from all QML files (using root) @@ -113,7 +113,7 @@ MainWindow::MainWindow() App()->Engine()->rootObjects().value(0)); if (!this->dataPtr->quickWindow) { - ignerr << "Internal error: Failed to instantiate QML file [" << qmlFile + gzerr << "Internal error: Failed to instantiate QML file [" << qmlFile << "]" << std::endl; return; } @@ -159,7 +159,7 @@ QStringList MainWindow::PluginListModel() const { if (!pluginNames.contains(QString::fromStdString(plugin))) { - ignwarn << "Requested to show plugin [" << plugin << + gzwarn << "Requested to show plugin [" << plugin << "] but it doesn't exist." << std::endl; } } @@ -196,34 +196,34 @@ void MainWindow::OnSaveConfigAs(const QString &_path) ///////////////////////////////////////////////// void MainWindow::OnStopServer() { - std::function cb = - [](const ignition::msgs::Boolean &_rep, const bool _result) + std::function cb = + [](const gz::msgs::Boolean &_rep, const bool _result) { if (_rep.data() && _result) { - ignmsg << "Simulation server received shutdown request." + gzmsg << "Simulation server received shutdown request." << std::endl; } else { - ignerr << "There was a problem instructing the simulation server to " + gzerr << "There was a problem instructing the simulation server to " << "shutdown. It may keep running." << std::endl; } }; - ignition::msgs::ServerControl req; + gz::msgs::ServerControl req; req.set_stop(true); const auto success = this->dataPtr->node.Request( this->dataPtr->controlService, req, cb); if (success) { - ignmsg << "Request to shutdown the simulation server sent. " + gzmsg << "Request to shutdown the simulation server sent. " "Stopping client now." << std::endl; } else { - ignerr << "Calling service [" << this->dataPtr->controlService << "] to " + gzerr << "Calling service [" << this->dataPtr->controlService << "] to " << "stop the server failed. Please check that the " << " of the GUI is configured correctly and " << "that the server is running in the same IGN_PARTITION and with " @@ -240,7 +240,7 @@ void MainWindow::SaveConfig(const std::string &_path) // Create the intermediate directories if needed. // We check for errors when we try to open the file. auto dirname = dirName(_path); - ignition::common::createDirectories(dirname); + gz::common::createDirectories(dirname); // Open the file std::ofstream out(_path.c_str(), std::ios::out); @@ -256,7 +256,7 @@ void MainWindow::SaveConfig(const std::string &_path) std::string msg("Saved configuration to " + _path + ""); this->notify(QString::fromStdString(msg)); - ignmsg << msg << std::endl; + gzmsg << msg << std::endl; } ///////////////////////////////////////////////// @@ -267,7 +267,7 @@ void MainWindow::OnAddPlugin(QString _plugin) // Remove spaces plugin.erase(remove_if(plugin.begin(), plugin.end(), isspace), plugin.end()); - ignlog << "Add [" << plugin << "] via menu" << std::endl; + gzlog << "Add [" << plugin << "] via menu" << std::endl; App()->LoadPlugin(plugin); } @@ -300,7 +300,7 @@ bool MainWindow::ApplyConfig(const WindowConfig &_config) if (!_config.IsIgnoring("state") && !_config.state.isEmpty()) { // if (!this->restoreState(_config.state)) -// ignwarn << "Failed to restore state" << std::endl; +// gzwarn << "Failed to restore state" << std::endl; } // Style diff --git a/src/MainWindow_TEST.cc b/src/MainWindow_TEST.cc index 036327066..c0d508d7a 100644 --- a/src/MainWindow_TEST.cc +++ b/src/MainWindow_TEST.cc @@ -21,16 +21,16 @@ #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "test_config.h" // NOLINT(build/include) -#include "ignition/gui/Application.hh" -#include "ignition/gui/MainWindow.hh" -#include "ignition/gui/Plugin.hh" +#include "gz/gui/Application.hh" +#include "gz/gui/MainWindow.hh" +#include "gz/gui/Plugin.hh" std::string kTestConfigFile = "/tmp/ign-gui-test.config"; // NOLINT(*) int g_argc = 1; @@ -39,15 +39,15 @@ char* g_argv[] = reinterpret_cast(const_cast("./MainWindow_TEST")), }; -using namespace ignition; +using namespace gz; using namespace gui; using namespace std::chrono_literals; ///////////////////////////////////////////////// -// See https://github.com/ignitionrobotics/ign-gui/issues/75 +// See https://github.com/gazebosim/gz-gui/issues/75 TEST(MainWindowTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Constructor)) { - ignition::common::Console::SetVerbosity(4); + gz::common::Console::SetVerbosity(4); Application app(g_argc, g_argv); // Constructor @@ -60,7 +60,7 @@ TEST(MainWindowTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Constructor)) ///////////////////////////////////////////////// TEST(MainWindowTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(OnSaveConfig)) { - ignition::common::Console::SetVerbosity(4); + gz::common::Console::SetVerbosity(4); Application app(g_argc, g_argv); // Change default config path @@ -97,7 +97,7 @@ TEST(MainWindowTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(OnSaveConfig)) ///////////////////////////////////////////////// TEST(MainWindowTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(SaveConfigAs)) { - ignition::common::Console::SetVerbosity(4); + gz::common::Console::SetVerbosity(4); Application app(g_argc, g_argv); auto mainWindow = new MainWindow; @@ -133,7 +133,7 @@ TEST(MainWindowTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(SaveConfigAs)) ///////////////////////////////////////////////// TEST(MainWindowTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(OnLoadConfig)) { - ignition::common::Console::SetVerbosity(4); + gz::common::Console::SetVerbosity(4); Application app(g_argc, g_argv); // Add test plugins to path @@ -175,7 +175,7 @@ TEST(MainWindowTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(OnLoadConfig)) ///////////////////////////////////////////////// TEST(MainWindowTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(OnAddPlugin)) { - ignition::common::Console::SetVerbosity(4); + gz::common::Console::SetVerbosity(4); Application app(g_argc, g_argv); // Add test plugins to path @@ -207,7 +207,7 @@ TEST(MainWindowTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(OnAddPlugin)) ///////////////////////////////////////////////// TEST(WindowConfigTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(defaultValues)) { - ignition::common::Console::SetVerbosity(4); + gz::common::Console::SetVerbosity(4); WindowConfig c; @@ -242,7 +242,7 @@ TEST(WindowConfigTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(defaultValues)) ///////////////////////////////////////////////// TEST(WindowConfigTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(mergeFromXML)) { - ignition::common::Console::SetVerbosity(4); + gz::common::Console::SetVerbosity(4); WindowConfig c; @@ -280,7 +280,7 @@ TEST(WindowConfigTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(mergeFromXML)) ///////////////////////////////////////////////// TEST(WindowConfigTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(MenusToString)) { - ignition::common::Console::SetVerbosity(4); + gz::common::Console::SetVerbosity(4); WindowConfig c; @@ -310,7 +310,7 @@ TEST(WindowConfigTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(MenusToString)) ///////////////////////////////////////////////// TEST(WindowConfigTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(IgnoreToString)) { - ignition::common::Console::SetVerbosity(4); + gz::common::Console::SetVerbosity(4); WindowConfig c; @@ -337,7 +337,7 @@ TEST(WindowConfigTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(IgnoreToString)) TEST(MainWindowTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(CloseWithoutSavingChanges)) { - ignition::common::Console::SetVerbosity(4); + gz::common::Console::SetVerbosity(4); Application app(g_argc, g_argv); // Access window after it's open @@ -385,7 +385,7 @@ TEST(MainWindowTest, TEST(MainWindowTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(DefaultExitActionAutoShutdown)) { - ignition::common::Console::SetVerbosity(4); + gz::common::Console::SetVerbosity(4); Application app(g_argc, g_argv); app.LoadConfig(common::joinPaths( @@ -398,8 +398,8 @@ TEST(MainWindowTest, bool shutdownCalled{false}; transport::Node node; std::string serverControlService{"/server_control"}; - std::function - cb = [&](const ignition::msgs::ServerControl &_req, msgs::Boolean &_rep) { + std::function + cb = [&](const gz::msgs::ServerControl &_req, msgs::Boolean &_rep) { shutdownCalled = _req.stop(); _rep.set_data(true); return true; @@ -417,7 +417,7 @@ TEST(MainWindowTest, TEST(MainWindowTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(ExitActionCustomShutdownService)) { - ignition::common::Console::SetVerbosity(4); + gz::common::Console::SetVerbosity(4); Application app(g_argc, g_argv); app.LoadConfig(common::joinPaths( @@ -433,8 +433,8 @@ TEST(MainWindowTest, transport::Node node; std::string serverControlService{"/test_service"}; - std::function - cb = [&](const ignition::msgs::ServerControl &_req, msgs::Boolean &_rep) { + std::function + cb = [&](const gz::msgs::ServerControl &_req, msgs::Boolean &_rep) { shutdownCalled = _req.stop(); _rep.set_data(true); return true; @@ -442,8 +442,8 @@ TEST(MainWindowTest, node.Advertise(serverControlService, cb); std::string wrongServerControlService{"/server_control"}; - std::function - cb2 = [&](const ignition::msgs::ServerControl &, msgs::Boolean &_rep) { + std::function + cb2 = [&](const gz::msgs::ServerControl &, msgs::Boolean &_rep) { wrongShutdownCalled = true; _rep.set_data(true); return true; @@ -462,7 +462,7 @@ TEST(MainWindowTest, TEST(MainWindowTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(DefaultExitActionAutoCloseGui)) { - ignition::common::Console::SetVerbosity(4); + gz::common::Console::SetVerbosity(4); Application app(g_argc, g_argv); // Add test plugins to path @@ -477,8 +477,8 @@ TEST(MainWindowTest, bool shutdownCalled{false}; transport::Node node; std::string serverControlService{"/server_control"}; - std::function - cb = [&](const ignition::msgs::ServerControl &, msgs::Boolean &_rep) { + std::function + cb = [&](const gz::msgs::ServerControl &, msgs::Boolean &_rep) { shutdownCalled = true; _rep.set_data(true); return true; @@ -564,7 +564,7 @@ void FindExitDialogButtons( TEST(MainWindowTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(ExitDialogShutdownButton)) { - ignition::common::Console::SetVerbosity(4); + gz::common::Console::SetVerbosity(4); Application app(g_argc, g_argv); app.LoadConfig(common::joinPaths( @@ -596,8 +596,8 @@ TEST(MainWindowTest, bool shutdownCalled{false}; transport::Node node; std::string serverControlService{"/server_control"}; - std::function - cb = [&](const ignition::msgs::ServerControl &, msgs::Boolean &_rep) { + std::function + cb = [&](const gz::msgs::ServerControl &, msgs::Boolean &_rep) { shutdownCalled = true; _rep.set_data(true); return true; @@ -624,7 +624,7 @@ TEST(MainWindowTest, TEST(MainWindowTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(ExitDialogDefaultButtons)) { - ignition::common::Console::SetVerbosity(4); + gz::common::Console::SetVerbosity(4); Application app(g_argc, g_argv); app.LoadConfig(common::joinPaths( @@ -655,8 +655,8 @@ TEST(MainWindowTest, bool shutdownCalled{false}; transport::Node node; std::string serverControlService{"/server_control"}; - std::function - cb = [&](const ignition::msgs::ServerControl &, msgs::Boolean &_rep) { + std::function + cb = [&](const gz::msgs::ServerControl &, msgs::Boolean &_rep) { shutdownCalled = true; _rep.set_data(true); return true; @@ -672,7 +672,7 @@ TEST(MainWindowTest, TEST(MainWindowTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(ExitDialogButtonsText)) { - ignition::common::Console::SetVerbosity(4); + gz::common::Console::SetVerbosity(4); Application app(g_argc, g_argv); app.LoadConfig(common::joinPaths( @@ -713,7 +713,7 @@ TEST(MainWindowTest, ///////////////////////////////////////////////// TEST(MainWindowTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(ApplyConfig)) { - ignition::common::Console::SetVerbosity(4); + gz::common::Console::SetVerbosity(4); Application app(g_argc, g_argv); // Main window diff --git a/src/PlottingInterface.cc b/src/PlottingInterface.cc index 12eabab4e..ae158f2b7 100644 --- a/src/PlottingInterface.cc +++ b/src/PlottingInterface.cc @@ -16,20 +16,20 @@ */ #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include -#include "ignition/gui/PlottingInterface.hh" -#include "ignition/gui/Application.hh" +#include "gz/gui/PlottingInterface.hh" +#include "gz/gui/Application.hh" #define DEFAULT_TIME (INT_MIN) // 1/60 Period like the GuiSystem frequency (60Hz) #define MAX_PERIOD_DIFF (0.0166666667) -namespace ignition +namespace gz { namespace gui { @@ -65,16 +65,16 @@ class TopicPrivate public: double lastHeaderTime = 0; /// \brief Plotting fields to update its values - public: std::map fields; + public: std::map fields; }; class TransportPrivate { /// \brief Node for Commincation - public: ignition::transport::Node node; + public: gz::transport::Node node; /// \brief subscribed topics - public: std::map topics; + public: std::map topics; }; class PlottingIfacePrivate @@ -95,7 +95,7 @@ class PlottingIfacePrivate } } -using namespace ignition; +using namespace gz; using namespace gui; ////////////////////////////////////////////////////// @@ -246,7 +246,7 @@ void Topic::Callback(const google::protobuf::Message &_msg) google::protobuf::Message *valueMsg = nullptr; - auto fieldFullPath = ignition::common::Split(fieldIt.first, '-'); + auto fieldFullPath = gz::common::Split(fieldIt.first, '-'); int pathSize = fieldFullPath.size(); // loop until you reach the last field in the path @@ -273,7 +273,7 @@ void Topic::Callback(const google::protobuf::Message &_msg) ref = valueMsg->GetReflection(); else { - ignwarn << "Invalid topic msg" << std::endl; + gzwarn << "Invalid topic msg" << std::endl; return; } } @@ -395,7 +395,7 @@ double TopicPrivate::FieldData(const google::protobuf::Message &_msg, return ref->GetUInt64(_msg, _field); else { - ignwarn << "Non Plotting Type" << std::endl; + gzwarn << "Non Plotting Type" << std::endl; return 0; } } @@ -601,7 +601,7 @@ std::string PlottingInterface::FilePath(QString _path, std::string _name, if (_path.toStdString().size() < 8) { - ignwarn << "Couldn't parse file path" << std::endl; + gzwarn << "Couldn't parse file path" << std::endl; return ""; } else @@ -629,7 +629,7 @@ bool PlottingInterface::exportCSV(QString _path, int _chart, auto key = series.key().toStdString(); // check if it is a component - auto seriesKeys = ignition::common::Split(key, ','); + auto seriesKeys = gz::common::Split(key, ','); if (seriesKeys.size() == 3) { // convert from string to uint64_t @@ -655,13 +655,13 @@ bool PlottingInterface::exportCSV(QString _path, int _chart, if (!filePath.size()) { - ignwarn << "[Couldn't parse file: " << filePath << "]" << std::endl; + gzwarn << "[Couldn't parse file: " << filePath << "]" << std::endl; return false; } file.open(filePath); if (!file.is_open()) - ignwarn << "[Couldn't open file: " << filePath << "]" << std::endl; + gzwarn << "[Couldn't open file: " << filePath << "]" << std::endl; file << "time, " << key << std::endl; diff --git a/src/PlottingInterface_TEST.cc b/src/PlottingInterface_TEST.cc index 74c19322a..fa1309e6b 100644 --- a/src/PlottingInterface_TEST.cc +++ b/src/PlottingInterface_TEST.cc @@ -19,19 +19,19 @@ #ifdef _MSC_VER #pragma warning(push, 0) #endif -#include +#include #ifdef _MSC_VER #pragma warning(pop) #endif -#include -#include -#include +#include +#include +#include #include "test_config.h" // NOLINT(build/include) -#include "ignition/gui/Enums.hh" -#include "ignition/gui/PlottingInterface.hh" +#include "gz/gui/Enums.hh" +#include "gz/gui/PlottingInterface.hh" -using namespace ignition; +using namespace gz; using namespace gui; ////////////////////////////////////////////////// @@ -45,8 +45,8 @@ TEST(PlottingInterfaceTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(Topic)) // prepare the msg msgs::Collision msg; - auto pose = new ignition::msgs::Pose(); - auto vector3d = new ignition::msgs::Vector3d(); + auto pose = new gz::msgs::Pose(); + auto vector3d = new gz::msgs::Vector3d(); vector3d->set_x(10); vector3d->set_z(15); pose->set_allocated_position(vector3d); @@ -180,8 +180,8 @@ TEST(PlottingInterfaceTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(Transport)) // prepare the msg msgs::Collision msg; - auto pose = new ignition::msgs::Pose(); - auto vector3d = new ignition::msgs::Vector3d(); + auto pose = new gz::msgs::Pose(); + auto vector3d = new gz::msgs::Vector3d(); vector3d->set_x(10); vector3d->set_z(15); pose->set_allocated_position(vector3d); diff --git a/src/Plugin.cc b/src/Plugin.cc index b6c58d292..e01173003 100644 --- a/src/Plugin.cc +++ b/src/Plugin.cc @@ -17,11 +17,11 @@ #include -#include -#include "ignition/gui/Application.hh" -#include "ignition/gui/Helpers.hh" -#include "ignition/gui/MainWindow.hh" -#include "ignition/gui/Plugin.hh" +#include +#include "gz/gui/Application.hh" +#include "gz/gui/Helpers.hh" +#include "gz/gui/MainWindow.hh" +#include "gz/gui/Plugin.hh" /// \brief Used to store information about anchors set by the user. struct Anchors @@ -51,7 +51,7 @@ static const std::unordered_set kIgnoredProps{ "pluginName", "anchored"}; -class ignition::gui::PluginPrivate +class gz::gui::PluginPrivate { /// \brief Set this to true if the plugin should be deleted as soon as it has /// a parent. @@ -80,7 +80,7 @@ class ignition::gui::PluginPrivate public: Anchors anchors; }; -using namespace ignition; +using namespace gz; using namespace gui; ///////////////////////////////////////////////// @@ -100,7 +100,7 @@ void Plugin::Load(const tinyxml2::XMLElement *_pluginElem) { if (!_pluginElem) { - ignerr << "Failed to load plugin with a NULL element." << std::endl; + gzerr << "Failed to load plugin with a NULL element." << std::endl; return; } @@ -109,7 +109,7 @@ void Plugin::Load(const tinyxml2::XMLElement *_pluginElem) tinyxml2::XMLPrinter printer; if (!_pluginElem->Accept(&printer)) { - ignwarn << "There was an error parsing the plugin element for " << + gzwarn << "There was an error parsing the plugin element for " << "[" << this->title << "]." << std::endl; } else @@ -129,7 +129,7 @@ void Plugin::Load(const tinyxml2::XMLElement *_pluginElem) std::string qmlFile(":/" + filename + "/" + filename + ".qml"); if (!QFile(QString::fromStdString(qmlFile)).exists()) { - ignerr << "Can't find [" << qmlFile + gzerr << "Can't find [" << qmlFile << "]. Are you sure it was added to the .qrc file?" << std::endl; return; } @@ -144,12 +144,12 @@ void Plugin::Load(const tinyxml2::XMLElement *_pluginElem) { errors << "* " << error.toString().toStdString() << std::endl; } - ignerr << errors.str(); + gzerr << errors.str(); return; } if (!component.isReady()) { - ignerr << "Component from QML file [" << qmlFile + gzerr << "Component from QML file [" << qmlFile << "] is not ready. Progress: " << component.progress() << " / 1.0" << std::endl; return; @@ -160,7 +160,7 @@ void Plugin::Load(const tinyxml2::XMLElement *_pluginElem) qobject_cast(component.create(this->dataPtr->context)); if (!this->dataPtr->pluginItem) { - ignerr << "Failed to instantiate QML file [" << qmlFile << "]." << std::endl + 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; @@ -228,7 +228,7 @@ void Plugin::LoadCommonConfig(const tinyxml2::XMLElement *_ignGuiElem) { if (nullptr == propElem->GetText()) { - ignerr << "Invalid string inside [" << key << "]" << std::endl; + gzerr << "Invalid string inside [" << key << "]" << std::endl; continue; } std::string value = propElem->GetText(); @@ -236,7 +236,7 @@ void Plugin::LoadCommonConfig(const tinyxml2::XMLElement *_ignGuiElem) } else { - ignwarn << "Property type [" << type << "] not supported." << std::endl; + gzwarn << "Property type [" << type << "] not supported." << std::endl; continue; } @@ -258,13 +258,13 @@ void Plugin::LoadCommonConfig(const tinyxml2::XMLElement *_ignGuiElem) if (kAnchorLineSet.find(ownLine) == kAnchorLineSet.end()) { - ignwarn << "Invalid anchor line [" << ownLine << "]" << std::endl; + gzwarn << "Invalid anchor line [" << ownLine << "]" << std::endl; continue; } if (kAnchorLineSet.find(targetLine) == kAnchorLineSet.end()) { - ignwarn << "Invalid anchor target line [" << targetLine << "]" + gzwarn << "Invalid anchor target line [" << targetLine << "]" << std::endl; continue; } @@ -289,7 +289,7 @@ std::string Plugin::ConfigStr() auto pluginElem = doc.FirstChildElement("plugin"); if (!pluginElem) { - ignerr << "Missing element, not updating config string." + gzerr << "Missing element, not updating config string." << std::endl; return this->configStr; } @@ -360,7 +360,7 @@ std::string Plugin::ConfigStr() tinyxml2::XMLPrinter printer; if (!pluginElem->Accept(&printer)) { - ignwarn << "There was an error parsing the plugin element for " << + gzwarn << "There was an error parsing the plugin element for " << "[" << this->title << "]." << std::endl; } else @@ -414,7 +414,7 @@ QQuickItem *Plugin::CardItem() const auto cardItem = qobject_cast(cardComp.create()); if (!cardItem) { - ignerr << "Internal error: Failed to instantiate QML file [" << qmlFile + gzerr << "Internal error: Failed to instantiate QML file [" << qmlFile << "]" << std::endl; return nullptr; } @@ -426,14 +426,14 @@ QQuickItem *Plugin::CardItem() const auto cardContentItem = cardItem->findChild("content"); if (!cardContentItem) { - ignerr << "Null card content QQuickItem!" << std::endl; + gzerr << "Null card content QQuickItem!" << std::endl; return nullptr; } auto cardToolbarItem = cardItem->findChild("cardToolbar"); if (!cardToolbarItem) { - ignerr << "Null toolbar content QQuickItem!" << std::endl; + gzerr << "Null toolbar content QQuickItem!" << std::endl; return nullptr; } @@ -519,7 +519,7 @@ void Plugin::ApplyAnchors() // Only floating plugins can be anchored if (this->CardItem()->property("state") != "floating") { - ignwarn << "Anchors can only be applied on floating state." << std::endl; + gzwarn << "Anchors can only be applied on floating state." << std::endl; return; } @@ -531,14 +531,14 @@ void Plugin::ApplyAnchors() auto win = App()->findChild(); if (!win) { - ignerr << "Internal error: missing window" << std::endl; + gzerr << "Internal error: missing window" << std::endl; return; } auto bgItem = win->QuickWindow()->findChild("background"); if (!bgItem) { - ignerr << "Internal error: missing background item" << std::endl; + gzerr << "Internal error: missing background item" << std::endl; return; } @@ -554,7 +554,7 @@ void Plugin::ApplyAnchors() if (!target) { - ignwarn << "Failed to find anchor target [" << this->dataPtr->anchors.target + gzwarn << "Failed to find anchor target [" << this->dataPtr->anchors.target << "]" << std::endl; return; } diff --git a/src/Plugin_TEST.cc b/src/Plugin_TEST.cc index bb6048132..1a069cb39 100644 --- a/src/Plugin_TEST.cc +++ b/src/Plugin_TEST.cc @@ -17,13 +17,13 @@ #include -#include -#include +#include +#include #include "test_config.h" // NOLINT(build/include) -#include "ignition/gui/Application.hh" -#include "ignition/gui/MainWindow.hh" -#include "ignition/gui/Plugin.hh" +#include "gz/gui/Application.hh" +#include "gz/gui/MainWindow.hh" +#include "gz/gui/Plugin.hh" int g_argc = 1; char* g_argv[] = @@ -31,13 +31,13 @@ char* g_argv[] = reinterpret_cast(const_cast("./Plugin_TEST")), }; -using namespace ignition; +using namespace gz; using namespace gui; -// See https://github.com/ignitionrobotics/ign-gui/issues/75 +// See https://github.com/gazebosim/gz-gui/issues/75 TEST(PluginTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(DeleteLater)) { - ignition::common::Console::SetVerbosity(4); + gz::common::Console::SetVerbosity(4); Application app(g_argc, g_argv); app.AddPluginPath(std::string(PROJECT_BINARY_PATH) + "/lib"); @@ -76,7 +76,7 @@ TEST(PluginTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(DeleteLater)) ///////////////////////////////////////////////// TEST(PluginTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(InvalidXmlText)) { - ignition::common::Console::SetVerbosity(4); + gz::common::Console::SetVerbosity(4); Application app(g_argc, g_argv); app.AddPluginPath(std::string(PROJECT_BINARY_PATH) + "/lib"); @@ -106,7 +106,7 @@ TEST(PluginTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(InvalidXmlText)) ///////////////////////////////////////////////// TEST(PluginTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Getters)) { - ignition::common::Console::SetVerbosity(4); + gz::common::Console::SetVerbosity(4); Application app(g_argc, g_argv); app.AddPluginPath(std::string(PROJECT_BINARY_PATH) + "/lib"); diff --git a/src/SearchModel.cc b/src/SearchModel.cc index 720eee80c..3ccf2bbe3 100644 --- a/src/SearchModel.cc +++ b/src/SearchModel.cc @@ -15,12 +15,12 @@ * */ -#include +#include -#include "ignition/gui/Enums.hh" -#include "ignition/gui/SearchModel.hh" +#include "gz/gui/Enums.hh" +#include "gz/gui/SearchModel.hh" -using namespace ignition; +using namespace gz; using namespace gui; ///////////////////////////////////////////////// diff --git a/src/SearchModel_TEST.cc b/src/SearchModel_TEST.cc index 48c1318c2..db1af4c70 100644 --- a/src/SearchModel_TEST.cc +++ b/src/SearchModel_TEST.cc @@ -17,14 +17,14 @@ #include -#include +#include #include "test_config.h" // NOLINT(build/include) -#include "ignition/gui/Enums.hh" -#include "ignition/gui/SearchModel.hh" +#include "gz/gui/Enums.hh" +#include "gz/gui/SearchModel.hh" -using namespace ignition; +using namespace gz; using namespace gui; ///////////////////////////////////////////////// @@ -43,7 +43,7 @@ int countRowsOfIndex(const QModelIndex &_index = QModelIndex()) ///////////////////////////////////////////////// TEST(SearchModelTest, FlatStructure) { - ignition::common::Console::SetVerbosity(4); + gz::common::Console::SetVerbosity(4); // A source model auto sourceModel = new QStandardItemModel(); @@ -99,7 +99,7 @@ TEST(SearchModelTest, FlatStructure) ///////////////////////////////////////////////// TEST(SearchModelTest, NestedStructure) { - ignition::common::Console::SetVerbosity(4); + gz::common::Console::SetVerbosity(4); // A source model auto sourceModel = new QStandardItemModel(); diff --git a/src/ign.cc b/src/ign.cc index faba5dcc3..4b2e110f9 100644 --- a/src/ign.cc +++ b/src/ign.cc @@ -19,13 +19,13 @@ #include -#include +#include -#include "ignition/gui/Application.hh" -#include "ignition/gui/config.hh" -#include "ignition/gui/Export.hh" -#include "ignition/gui/ign.hh" -#include "ignition/gui/MainWindow.hh" +#include "gz/gui/Application.hh" +#include "gz/gui/config.hh" +#include "gz/gui/Export.hh" +#include "gz/gui/gz.hh" +#include "gz/gui/MainWindow.hh" int g_argc = 1; char* g_argv[] = @@ -37,26 +37,26 @@ char* g_argv[] = void startConsoleLog() { std::string home; - ignition::common::env(IGN_HOMEDIR, home); + gz::common::env(IGN_HOMEDIR, home); - std::string logPathMod = ignition::common::joinPaths(home, + std::string logPathMod = gz::common::joinPaths(home, ".ignition", "gui", "log", - ignition::common::timeToIso(IGN_SYSTEM_TIME())); - ignLogInit(logPathMod, "console.log"); + gz::common::timeToIso(IGN_SYSTEM_TIME())); + gzLogInit(logPathMod, "console.log"); } ////////////////////////////////////////////////// -extern "C" IGNITION_GUI_VISIBLE char *ignitionVersion() +extern "C" GZ_GUI_VISIBLE char *ignitionVersion() { - return strdup(IGNITION_GUI_VERSION_FULL); + return strdup(GZ_GUI_VERSION_FULL); } ////////////////////////////////////////////////// -extern "C" IGNITION_GUI_VISIBLE void cmdPluginList() +extern "C" GZ_GUI_VISIBLE void cmdPluginList() { startConsoleLog(); - ignition::gui::Application app(g_argc, g_argv); + gz::gui::Application app(g_argc, g_argv); auto pluginsList = app.PluginList(); for (auto const &path : pluginsList) @@ -77,12 +77,12 @@ extern "C" IGNITION_GUI_VISIBLE void cmdPluginList() } ////////////////////////////////////////////////// -extern "C" IGNITION_GUI_VISIBLE void cmdStandalone(const char *_filename) +extern "C" GZ_GUI_VISIBLE void cmdStandalone(const char *_filename) { startConsoleLog(); - ignition::gui::Application app(g_argc, g_argv, - ignition::gui::WindowType::kDialog); + gz::gui::Application app(g_argc, g_argv, + gz::gui::WindowType::kDialog); if (!app.LoadPlugin(_filename)) { @@ -93,13 +93,13 @@ extern "C" IGNITION_GUI_VISIBLE void cmdStandalone(const char *_filename) } ////////////////////////////////////////////////// -extern "C" IGNITION_GUI_VISIBLE void cmdConfig(const char *_config) +extern "C" GZ_GUI_VISIBLE void cmdConfig(const char *_config) { startConsoleLog(); - ignition::gui::Application app(g_argc, g_argv); + gz::gui::Application app(g_argc, g_argv); - if (!app.findChild()) + if (!app.findChild()) { return; } @@ -113,19 +113,19 @@ extern "C" IGNITION_GUI_VISIBLE void cmdConfig(const char *_config) } ////////////////////////////////////////////////// -extern "C" IGNITION_GUI_VISIBLE void cmdVerbose(const char *_verbosity) +extern "C" GZ_GUI_VISIBLE void cmdVerbose(const char *_verbosity) { - ignition::common::Console::SetVerbosity(std::atoi(_verbosity)); + gz::common::Console::SetVerbosity(std::atoi(_verbosity)); } ////////////////////////////////////////////////// -extern "C" IGNITION_GUI_VISIBLE void cmdEmptyWindow() +extern "C" GZ_GUI_VISIBLE void cmdEmptyWindow() { startConsoleLog(); - ignition::gui::Application app(g_argc, g_argv); + gz::gui::Application app(g_argc, g_argv); - if (!app.findChild()) + if (!app.findChild()) { return; } @@ -136,8 +136,8 @@ extern "C" IGNITION_GUI_VISIBLE void cmdEmptyWindow() } ////////////////////////////////////////////////// -extern "C" IGNITION_GUI_VISIBLE void cmdSetStyleFromFile( +extern "C" GZ_GUI_VISIBLE void cmdSetStyleFromFile( const char * /*_filename*/) { -// ignition::gui::setStyleFromFile(std::string(_filename)); +// gz::gui::setStyleFromFile(std::string(_filename)); } diff --git a/src/ign_TEST.cc b/src/ign_TEST.cc index 24a1ad3d6..5ba2f3a0f 100644 --- a/src/ign_TEST.cc +++ b/src/ign_TEST.cc @@ -21,9 +21,9 @@ #include -#include -#include -#include +#include +#include +#include #include "test_config.h" // NOLINT(build/include) @@ -54,7 +54,7 @@ std::string custom_exec_str(std::string _cmd) return result; } -using namespace ignition; +using namespace gz; class CmdLine : public ::testing::Test { @@ -81,7 +81,7 @@ class CmdLine : public ::testing::Test public: std::string realHome; }; -// See https://github.com/ignitionrobotics/ign-gui/issues/75 +// See https://github.com/gazebosim/gz-gui/issues/75 TEST_F(CmdLine, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(list)) { // Clear home if it exists diff --git a/src/plugins/CMakeLists.txt b/src/plugins/CMakeLists.txt index 4882f2237..486abef17 100644 --- a/src/plugins/CMakeLists.txt +++ b/src/plugins/CMakeLists.txt @@ -108,7 +108,7 @@ function(gz_gui_add_plugin plugin_name) COMPILE_FLAGS "/wd4251") endif() - install (TARGETS ${plugin_name} DESTINATION ${IGNITION_GUI_PLUGIN_INSTALL_DIR}) + install (TARGETS ${plugin_name} DESTINATION ${GZ_GUI_PLUGIN_INSTALL_DIR}) endfunction() # Plugins diff --git a/src/plugins/camera_tracking/CameraTracking.cc b/src/plugins/camera_tracking/CameraTracking.cc index 7a01746af..f24db0586 100644 --- a/src/plugins/camera_tracking/CameraTracking.cc +++ b/src/plugins/camera_tracking/CameraTracking.cc @@ -18,38 +18,38 @@ #include #include -#include -#include -#include +#include +#include +#include // TODO(anyone) Remove these pragmas once ign-rendering and ign-msgs // are disabling the warnings #ifdef _MSC_VER #pragma warning(push, 0) #endif -#include -#include +#include +#include -#include -#include -#include -#include +#include +#include +#include +#include #ifdef _MSC_VER #pragma warning(pop) #endif -#include "ignition/gui/Application.hh" -#include "ignition/gui/Conversions.hh" -#include "ignition/gui/GuiEvents.hh" -#include "ignition/gui/MainWindow.hh" +#include "gz/gui/Application.hh" +#include "gz/gui/Conversions.hh" +#include "gz/gui/GuiEvents.hh" +#include "gz/gui/MainWindow.hh" -#include +#include #include "CameraTracking.hh" /// \brief Private data class for CameraTracking -class ignition::gui::plugins::CameraTrackingPrivate +class gz::gui::plugins::CameraTrackingPrivate { /// \brief Perform rendering calls in the rendering thread. public: void OnRender(); @@ -133,7 +133,7 @@ class ignition::gui::plugins::CameraTrackingPrivate public: std::string moveToTarget; /// \brief Helper object to move user camera - public: ignition::rendering::MoveToHelper moveToHelper; + public: gz::rendering::MoveToHelper moveToHelper; /// \brief Transport node public: transport::Node node; @@ -163,7 +163,7 @@ class ignition::gui::plugins::CameraTrackingPrivate public: QTimer *timer{nullptr}; }; -using namespace ignition; +using namespace gz; using namespace gui; using namespace plugins; @@ -178,14 +178,14 @@ void CameraTrackingPrivate::Initialize() if (cam) { this->camera = cam; - igndbg << "CameraTrackingPrivate plugin is moving camera [" + gzdbg << "CameraTrackingPrivate plugin is moving camera [" << this->camera->Name() << "]" << std::endl; break; } } if (!this->camera) { - ignerr << "Camera is not available" << std::endl; + gzerr << "Camera is not available" << std::endl; return; } @@ -193,14 +193,14 @@ void CameraTrackingPrivate::Initialize() this->moveToService = "/gui/move_to"; this->node.Advertise(this->moveToService, &CameraTrackingPrivate::OnMoveTo, this); - ignmsg << "Move to service on [" + gzmsg << "Move to service on [" << this->moveToService << "]" << std::endl; // follow this->followService = "/gui/follow"; this->node.Advertise(this->followService, &CameraTrackingPrivate::OnFollow, this); - ignmsg << "Follow service on [" + gzmsg << "Follow service on [" << this->followService << "]" << std::endl; // move to pose service @@ -208,21 +208,21 @@ void CameraTrackingPrivate::Initialize() "/gui/move_to/pose"; this->node.Advertise(this->moveToPoseService, &CameraTrackingPrivate::OnMoveToPose, this); - ignmsg << "Move to pose service on [" + gzmsg << "Move to pose service on [" << this->moveToPoseService << "]" << std::endl; // camera position topic this->cameraPoseTopic = "/gui/camera/pose"; this->cameraPosePub = this->node.Advertise(this->cameraPoseTopic); - ignmsg << "Camera pose topic advertised on [" + gzmsg << "Camera pose topic advertised on [" << this->cameraPoseTopic << "]" << std::endl; // follow offset this->followOffsetService = "/gui/follow/offset"; this->node.Advertise(this->followOffsetService, &CameraTrackingPrivate::OnFollowOffset, this); - ignmsg << "Follow offset service on [" + gzmsg << "Follow offset service on [" << this->followOffsetService << "]" << std::endl; } @@ -336,7 +336,7 @@ void CameraTrackingPrivate::OnRender() } else { - ignerr << "Unable to move to target. Target: '" + gzerr << "Unable to move to target. Target: '" << this->moveToTarget << "' not found" << std::endl; this->moveToTarget.clear(); } @@ -424,7 +424,7 @@ void CameraTrackingPrivate::OnRender() } else if (!this->followTargetWait) { - ignerr << "Unable to follow target. Target: '" + gzerr << "Unable to follow target. Target: '" << this->followTarget << "' not found" << std::endl; this->followTarget.clear(); } @@ -505,5 +505,5 @@ bool CameraTracking::eventFilter(QObject *_obj, QEvent *_event) } // Register this plugin -IGNITION_ADD_PLUGIN(ignition::gui::plugins::CameraTracking, - ignition::gui::Plugin) +IGNITION_ADD_PLUGIN(gz::gui::plugins::CameraTracking, + gz::gui::Plugin) diff --git a/src/plugins/camera_tracking/CameraTracking.hh b/src/plugins/camera_tracking/CameraTracking.hh index 111b4f1bb..2e2b38904 100644 --- a/src/plugins/camera_tracking/CameraTracking.hh +++ b/src/plugins/camera_tracking/CameraTracking.hh @@ -15,14 +15,14 @@ * */ -#ifndef IGNITION_GUI_PLUGINS_CAMERATRACKING_HH_ -#define IGNITION_GUI_PLUGINS_CAMERATRACKING_HH_ +#ifndef GZ_GUI_PLUGINS_CAMERATRACKING_HH_ +#define GZ_GUI_PLUGINS_CAMERATRACKING_HH_ #include -#include "ignition/gui/Plugin.hh" +#include "gz/gui/Plugin.hh" -namespace ignition +namespace gz { namespace gui { diff --git a/src/plugins/grid_config/CMakeLists.txt b/src/plugins/grid_config/CMakeLists.txt index 99f52d057..96859e985 100644 --- a/src/plugins/grid_config/CMakeLists.txt +++ b/src/plugins/grid_config/CMakeLists.txt @@ -11,4 +11,4 @@ gz_gui_add_plugin(GridConfig install ( FILES $ RENAME ${CMAKE_SHARED_LIBRARY_PREFIX}Grid3D${CMAKE_SHARED_LIBRARY_SUFFIX} - DESTINATION ${IGNITION_GUI_PLUGIN_INSTALL_DIR}) + DESTINATION ${GZ_GUI_PLUGIN_INSTALL_DIR}) diff --git a/src/plugins/grid_config/GridConfig.cc b/src/plugins/grid_config/GridConfig.cc index 42e7142b2..5ed9b5e74 100644 --- a/src/plugins/grid_config/GridConfig.cc +++ b/src/plugins/grid_config/GridConfig.cc @@ -18,19 +18,19 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include "GridConfig.hh" -namespace ignition::gui +namespace gz::gui { struct GridParam { @@ -81,12 +81,12 @@ namespace ignition::gui }; } -using namespace ignition; +using namespace gz; using namespace gui; ///////////////////////////////////////////////// GridConfig::GridConfig() - : ignition::gui::Plugin(), dataPtr(std::make_unique()) + : gz::gui::Plugin(), dataPtr(std::make_unique()) { } @@ -146,14 +146,14 @@ void GridConfig::LoadConfig(const tinyxml2::XMLElement *_pluginElem) } } - ignition::gui::App()->findChild< - ignition::gui::MainWindow *>()->installEventFilter(this); + gz::gui::App()->findChild< + gz::gui::MainWindow *>()->installEventFilter(this); } ///////////////////////////////////////////////// bool GridConfig::eventFilter(QObject *_obj, QEvent *_event) { - if (_event->type() == ignition::gui::events::Render::kType) + if (_event->type() == gz::gui::events::Render::kType) { if (nullptr == this->dataPtr->scene) this->dataPtr->scene = rendering::sceneFromFirstRenderEngine(); @@ -201,7 +201,7 @@ void GridConfig::CreateGrids() this->dataPtr->dirty = true; - igndbg << "Created grid [" << grid->Name() << "]" << std::endl; + gzdbg << "Created grid [" << grid->Name() << "]" << std::endl; } this->dataPtr->startupGrids.clear(); } @@ -241,14 +241,14 @@ void GridConfig::UpdateGrid() } else { - ignerr << "Grid visual missing material" << std::endl; + gzerr << "Grid visual missing material" << std::endl; } visual->SetVisible(this->dataPtr->visible); } else { - ignerr << "Grid missing parent visual" << std::endl; + gzerr << "Grid missing parent visual" << std::endl; } this->dataPtr->dirty = false; @@ -276,7 +276,7 @@ void GridConfig::ConnectToGrid() { this->dataPtr->grid = grid; - igndbg << "Connected to grid [" << grid->Name() << "]" << std::endl; + gzdbg << "Connected to grid [" << grid->Name() << "]" << std::endl; // TODO(chapulina) Set to the grid's visible state when that's available // through ign-rendering's API @@ -409,5 +409,5 @@ void GridConfig::RefreshList() } // Register this plugin -IGNITION_ADD_PLUGIN(ignition::gui::GridConfig, - ignition::gui::Plugin) +IGNITION_ADD_PLUGIN(gz::gui::GridConfig, + gz::gui::Plugin) diff --git a/src/plugins/grid_config/GridConfig.hh b/src/plugins/grid_config/GridConfig.hh index a9b71d8b0..adc04308e 100644 --- a/src/plugins/grid_config/GridConfig.hh +++ b/src/plugins/grid_config/GridConfig.hh @@ -15,21 +15,21 @@ * */ -#ifndef IGNITION_GAZEBO_GUI_GRIDCONFIG_HH_ -#define IGNITION_GAZEBO_GUI_GRIDCONFIG_HH_ +#ifndef GZ_GAZEBO_GUI_GRIDCONFIG_HH_ +#define GZ_GAZEBO_GUI_GRIDCONFIG_HH_ #include -#include -#include +#include +#include -namespace ignition +namespace gz { namespace gui { class GridConfigPrivate; - /// \brief Manages grids in an Gazebo Rendering scene. This plugin can be + /// \brief Manages grids in a Gazebo Rendering scene. This plugin can be /// used for: /// * Introspecting grids /// * Editing grids @@ -45,7 +45,7 @@ namespace gui /// * \ : Length of each cell, defaults to 1. /// * \ : Grid pose, defaults to the origin. /// * \ : Grid color, defaults to (0.7, 0.7, 0.7, 1.0) - class GridConfig : public ignition::gui::Plugin + class GridConfig : public gz::gui::Plugin { Q_OBJECT diff --git a/src/plugins/image_display/ImageDisplay.cc b/src/plugins/image_display/ImageDisplay.cc index c0c0feed9..7f8b401d6 100644 --- a/src/plugins/image_display/ImageDisplay.cc +++ b/src/plugins/image_display/ImageDisplay.cc @@ -25,15 +25,15 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include -#include "ignition/gui/Application.hh" -#include "ignition/gui/MainWindow.hh" +#include "gz/gui/Application.hh" +#include "gz/gui/MainWindow.hh" -namespace ignition +namespace gz { namespace gui { @@ -91,7 +91,7 @@ namespace plugins } } -using namespace ignition; +using namespace gz; using namespace gui; using namespace plugins; @@ -130,7 +130,7 @@ void ImageDisplay::LoadConfig(const tinyxml2::XMLElement *_pluginElem) if (topic.empty() && !topicPicker) { - ignwarn << "Can't hide topic picker without a default topic." << std::endl; + gzwarn << "Can't hide topic picker without a default topic." << std::endl; topicPicker = true; } @@ -183,7 +183,7 @@ void ImageDisplay::ProcessImage() break; default: { - ignwarn << "Unsupported image type: " + gzwarn << "Unsupported image type: " << this->dataPtr->imageMsg.pixel_format_type() << std::endl; return; } @@ -247,7 +247,7 @@ void ImageDisplay::OnTopic(const QString _topic) if (!this->dataPtr->node.Subscribe(topic, &ImageDisplay::OnImageMsg, this)) { - ignerr << "Unable to subscribe to topic [" << topic << "]" << std::endl; + gzerr << "Unable to subscribe to topic [" << topic << "]" << std::endl; return; } App()->findChild()->notifyWithDuration( @@ -269,7 +269,7 @@ void ImageDisplay::OnRefresh() this->dataPtr->node.TopicInfo(topic, publishers); for (auto pub : publishers) { - if (pub.MsgTypeName() == "ignition.msgs.Image") + if (pub.MsgTypeName() == "gz.msgs.Image") { this->dataPtr->topicList.push_back(QString::fromStdString(topic)); break; @@ -297,5 +297,5 @@ void ImageDisplay::SetTopicList(const QStringList &_topicList) } // Register this plugin -IGNITION_ADD_PLUGIN(ignition::gui::plugins::ImageDisplay, - ignition::gui::Plugin) +IGNITION_ADD_PLUGIN(gz::gui::plugins::ImageDisplay, + gz::gui::Plugin) diff --git a/src/plugins/image_display/ImageDisplay.hh b/src/plugins/image_display/ImageDisplay.hh index 88f68ab81..30e4f8fda 100644 --- a/src/plugins/image_display/ImageDisplay.hh +++ b/src/plugins/image_display/ImageDisplay.hh @@ -15,21 +15,21 @@ * */ -#ifndef IGNITION_GUI_PLUGINS_IMAGEDISPLAY_HH_ -#define IGNITION_GUI_PLUGINS_IMAGEDISPLAY_HH_ +#ifndef GZ_GUI_PLUGINS_IMAGEDISPLAY_HH_ +#define GZ_GUI_PLUGINS_IMAGEDISPLAY_HH_ #include #ifdef _MSC_VER #pragma warning(push, 0) #endif -#include +#include #ifdef _MSC_VER #pragma warning(pop) #endif -#include "ignition/gui/Plugin.hh" +#include "gz/gui/Plugin.hh" -namespace ignition +namespace gz { namespace gui { @@ -37,7 +37,7 @@ namespace plugins { class ImageDisplayPrivate; - /// \brief Display images coming through an Gazebo Transport topic. + /// \brief Display images coming through a Gazebo Transport topic. /// /// ## Configuration /// @@ -72,12 +72,12 @@ namespace plugins public slots: void OnTopic(const QString _topic); /// \brief Get the topic list as a string, for example - /// 'ignition.msgs.StringMsg' + /// 'gz.msgs.StringMsg' /// \return Message type public: Q_INVOKABLE QStringList TopicList() const; /// \brief Set the topic list from a string, for example - /// 'ignition.msgs.StringMsg' + /// 'gz.msgs.StringMsg' /// \param[in] _topicList Message type public: Q_INVOKABLE void SetTopicList(const QStringList &_topicList); @@ -92,7 +92,7 @@ namespace plugins /// \brief Subscriber callback when new image is received /// \param[in] _msg New image - private: void OnImageMsg(const ignition::msgs::Image &_msg); + private: void OnImageMsg(const gz::msgs::Image &_msg); /// \internal /// \brief Pointer to private data. diff --git a/src/plugins/image_display/ImageDisplay_TEST.cc b/src/plugins/image_display/ImageDisplay_TEST.cc index e20b5b53d..2ebf1beab 100644 --- a/src/plugins/image_display/ImageDisplay_TEST.cc +++ b/src/plugins/image_display/ImageDisplay_TEST.cc @@ -16,15 +16,15 @@ */ #include -#include -#include -#include +#include +#include +#include -#include "ignition/gui/Iface.hh" -#include "ignition/gui/Plugin.hh" -#include "ignition/gui/MainWindow.hh" +#include "gz/gui/Iface.hh" +#include "gz/gui/Plugin.hh" +#include "gz/gui/MainWindow.hh" -using namespace ignition; +using namespace gz; using namespace gui; ///////////////////////////////////////////////// diff --git a/src/plugins/interactive_view_control/InteractiveViewControl.cc b/src/plugins/interactive_view_control/InteractiveViewControl.cc index 9dfecceae..7f394f6cd 100644 --- a/src/plugins/interactive_view_control/InteractiveViewControl.cc +++ b/src/plugins/interactive_view_control/InteractiveViewControl.cc @@ -18,27 +18,27 @@ #include #include -#include +#include -#include -#include -#include +#include +#include +#include -#include +#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include -#include +#include #include "InteractiveViewControl.hh" /// \brief Private data class for InteractiveViewControl -class ignition::gui::plugins::InteractiveViewControlPrivate +class gz::gui::plugins::InteractiveViewControlPrivate { /// \brief Perform rendering calls in the rendering thread. public: void OnRender(); @@ -96,7 +96,7 @@ class ignition::gui::plugins::InteractiveViewControlPrivate public: transport::Node node; }; -using namespace ignition; +using namespace gz; using namespace gui; using namespace plugins; @@ -127,7 +127,7 @@ void InteractiveViewControlPrivate::OnRender() if (isUserCamera) { this->camera = cam; - igndbg << "InteractiveViewControl plugin is moving camera [" + gzdbg << "InteractiveViewControl plugin is moving camera [" << this->camera->Name() << "]" << std::endl; break; } @@ -136,7 +136,7 @@ void InteractiveViewControlPrivate::OnRender() if (!this->camera) { - ignerr << "InteractiveViewControl camera is not available" << std::endl; + gzerr << "InteractiveViewControl camera is not available" << std::endl; return; } this->rayQuery = this->camera->Scene()->CreateRayQuery(); @@ -166,7 +166,7 @@ void InteractiveViewControlPrivate::OnRender() } else { - ignerr << "Unknown view controller: " << this->viewController + gzerr << "Unknown view controller: " << this->viewController << ". Defaulting to orbit view controller" << std::endl; this->viewController = "orbit"; this->viewControl = &this->orbitViewControl; @@ -229,7 +229,7 @@ bool InteractiveViewControlPrivate::OnViewControl(const msgs::StringMsg &_msg, if (_msg.data() != "orbit" && _msg.data() != "ortho") { - ignwarn << "View controller type not supported [" << _msg.data() << "]" + gzwarn << "View controller type not supported [" << _msg.data() << "]" << std::endl; _res.set_data(false); return true; @@ -265,11 +265,11 @@ void InteractiveViewControl::LoadConfig( this->dataPtr->cameraViewControlService = "/gui/camera/view_control"; this->dataPtr->node.Advertise(this->dataPtr->cameraViewControlService, &InteractiveViewControlPrivate::OnViewControl, this->dataPtr.get()); - ignmsg << "Camera view controller topic advertised on [" + gzmsg << "Camera view controller topic advertised on [" << this->dataPtr->cameraViewControlService << "]" << std::endl; - ignition::gui::App()->findChild< - ignition::gui::MainWindow *>()->installEventFilter(this); + gz::gui::App()->findChild< + gz::gui::MainWindow *>()->installEventFilter(this); } ///////////////////////////////////////////////// @@ -282,7 +282,7 @@ bool InteractiveViewControl::eventFilter(QObject *_obj, QEvent *_event) else if (_event->type() == events::LeftClickOnScene::kType) { auto leftClickOnScene = - reinterpret_cast(_event); + reinterpret_cast(_event); this->dataPtr->mouseDirty = true; this->dataPtr->drag = math::Vector2d::Zero; @@ -291,7 +291,7 @@ bool InteractiveViewControl::eventFilter(QObject *_obj, QEvent *_event) else if (_event->type() == events::MousePressOnScene::kType) { auto pressOnScene = - reinterpret_cast(_event); + reinterpret_cast(_event); this->dataPtr->mouseDirty = true; this->dataPtr->drag = math::Vector2d::Zero; @@ -300,7 +300,7 @@ bool InteractiveViewControl::eventFilter(QObject *_obj, QEvent *_event) else if (_event->type() == events::DragOnScene::kType) { auto dragOnScene = - reinterpret_cast(_event); + reinterpret_cast(_event); this->dataPtr->mouseDirty = true; auto dragStart = this->dataPtr->mouseEvent.Pos(); @@ -314,7 +314,7 @@ bool InteractiveViewControl::eventFilter(QObject *_obj, QEvent *_event) else if (_event->type() == events::ScrollOnScene::kType) { auto scrollOnScene = - reinterpret_cast(_event); + reinterpret_cast(_event); this->dataPtr->mouseDirty = true; this->dataPtr->drag += math::Vector2d( @@ -323,9 +323,9 @@ bool InteractiveViewControl::eventFilter(QObject *_obj, QEvent *_event) this->dataPtr->mouseEvent = scrollOnScene->Mouse(); } - else if (_event->type() == ignition::gui::events::BlockOrbit::kType) + else if (_event->type() == gz::gui::events::BlockOrbit::kType) { - auto blockOrbit = reinterpret_cast( + auto blockOrbit = reinterpret_cast( _event); this->dataPtr->blockOrbit = blockOrbit->Block(); } @@ -335,5 +335,5 @@ bool InteractiveViewControl::eventFilter(QObject *_obj, QEvent *_event) } // Register this plugin -IGNITION_ADD_PLUGIN(ignition::gui::plugins::InteractiveViewControl, - ignition::gui::Plugin) +IGNITION_ADD_PLUGIN(gz::gui::plugins::InteractiveViewControl, + gz::gui::Plugin) diff --git a/src/plugins/interactive_view_control/InteractiveViewControl.hh b/src/plugins/interactive_view_control/InteractiveViewControl.hh index 5b8b83eb2..1d31b7f6d 100644 --- a/src/plugins/interactive_view_control/InteractiveViewControl.hh +++ b/src/plugins/interactive_view_control/InteractiveViewControl.hh @@ -15,14 +15,14 @@ * */ -#ifndef IGNITION_GUI_PLUGINS_INTERACTIVEVIEWCONTROL_HH_ -#define IGNITION_GUI_PLUGINS_INTERACTIVEVIEWCONTROL_HH_ +#ifndef GZ_GUI_PLUGINS_INTERACTIVEVIEWCONTROL_HH_ +#define GZ_GUI_PLUGINS_INTERACTIVEVIEWCONTROL_HH_ #include -#include "ignition/gui/Plugin.hh" +#include "gz/gui/Plugin.hh" -namespace ignition +namespace gz { namespace gui { @@ -41,8 +41,8 @@ namespace plugins /// projection is used by default. For example: /// /// ign service -s /gui/camera/view_control - /// --reqtype ignition.msgs.StringMsg - /// --reptype ignition.msgs.Boolean + /// --reqtype gz.msgs.StringMsg + /// --reptype gz.msgs.Boolean /// --timeout 2000 --req 'data: "ortho"' /// /// Supported options are: diff --git a/src/plugins/key_publisher/KeyPublisher.cc b/src/plugins/key_publisher/KeyPublisher.cc index 49194d915..7e61710b0 100644 --- a/src/plugins/key_publisher/KeyPublisher.cc +++ b/src/plugins/key_publisher/KeyPublisher.cc @@ -18,30 +18,30 @@ #ifdef _MSC_VER #pragma warning(push, 0) #endif -#include +#include #ifdef _MSC_VER #pragma warning(pop) #endif #include -#include -#include -#include +#include +#include +#include #include "KeyPublisher.hh" -namespace ignition +namespace gz { namespace gui { class KeyPublisherPrivate { /// \brief Node for communication - public: ignition::transport::Node node; + public: gz::transport::Node node; /// \brief Publisher - public: ignition::transport::Node::Publisher pub; + public: gz::transport::Node::Publisher pub; /// \brief Topic public: std::string topic = "keyboard/keypress"; @@ -50,7 +50,7 @@ namespace gui /// \param[in] key_press Pointer to the keyevent public: void KeyPub(QKeyEvent *_keyPress) { - ignition::msgs::Int32 Msg; + gz::msgs::Int32 Msg; Msg.set_data(_keyPress->key()); pub.Publish(Msg); } @@ -58,14 +58,14 @@ namespace gui } } -using namespace ignition; +using namespace gz; using namespace gui; ///////////////////////////////////////////////// KeyPublisher::KeyPublisher(): Plugin(), dataPtr(new KeyPublisherPrivate) { // Advertise publisher node - this->dataPtr->pub = this->dataPtr->node.Advertise + this->dataPtr->pub = this->dataPtr->node.Advertise (this->dataPtr->topic); } @@ -80,8 +80,8 @@ void KeyPublisher::LoadConfig(const tinyxml2::XMLElement *) if (this->title.empty()) this->title = "Key publisher"; - ignition::gui::App()->findChild - ()->QuickWindow()->installEventFilter(this); + gz::gui::App()->findChild + ()->QuickWindow()->installEventFilter(this); } ///////////////////////////////////////////////// @@ -96,5 +96,5 @@ bool KeyPublisher::eventFilter(QObject *_obj, QEvent *_event) } // Register this plugin -IGNITION_ADD_PLUGIN(ignition::gui::KeyPublisher, - ignition::gui::Plugin) +IGNITION_ADD_PLUGIN(gz::gui::KeyPublisher, + gz::gui::Plugin) diff --git a/src/plugins/key_publisher/KeyPublisher.hh b/src/plugins/key_publisher/KeyPublisher.hh index 38ecdd2e5..67106ab21 100644 --- a/src/plugins/key_publisher/KeyPublisher.hh +++ b/src/plugins/key_publisher/KeyPublisher.hh @@ -15,17 +15,17 @@ * */ -#ifndef IGNITION_GUI_PLUGINS_KEYPUBLISHER_HH_ -#define IGNITION_GUI_PLUGINS_KEYPUBLISHER_HH_ +#ifndef GZ_GUI_PLUGINS_KEYPUBLISHER_HH_ +#define GZ_GUI_PLUGINS_KEYPUBLISHER_HH_ -#include +#include #include -#include -#include +#include +#include -namespace ignition +namespace gz { namespace gui { @@ -35,7 +35,7 @@ namespace gui /// /// ## Configuration /// This plugin doesn't accept any custom configuration. - class KeyPublisher : public ignition::gui::Plugin + class KeyPublisher : public gz::gui::Plugin { Q_OBJECT diff --git a/src/plugins/marker_manager/MarkerManager.cc b/src/plugins/marker_manager/MarkerManager.cc index cb98c67f2..26e28f48a 100644 --- a/src/plugins/marker_manager/MarkerManager.cc +++ b/src/plugins/marker_manager/MarkerManager.cc @@ -22,37 +22,37 @@ #include -#include -#include -#include +#include +#include +#include -#include +#include #ifdef _MSC_VER #pragma warning(push, 0) #endif -#include +#include #ifdef _MSC_VER #pragma warning(pop) #endif -#include +#include -#include "ignition/rendering/Marker.hh" -#include -#include +#include "gz/rendering/Marker.hh" +#include +#include -#include +#include -#include "ignition/gui/Application.hh" -#include "ignition/gui/GuiEvents.hh" -#include "ignition/gui/Helpers.hh" -#include "ignition/gui/MainWindow.hh" +#include "gz/gui/Application.hh" +#include "gz/gui/GuiEvents.hh" +#include "gz/gui/Helpers.hh" +#include "gz/gui/MainWindow.hh" #include "MarkerManager.hh" /// \brief Private data class for MarkerManager -class ignition::gui::plugins::MarkerManagerPrivate +class gz::gui::plugins::MarkerManagerPrivate { /// \brief Update markers based on msgs received public: void OnRender(); @@ -63,37 +63,37 @@ class ignition::gui::plugins::MarkerManagerPrivate /// \brief Processes a marker message. /// \param[in] _msg The message data. /// \return True if the marker was processed successfully. - public: bool ProcessMarkerMsg(const ignition::msgs::Marker &_msg); + public: bool ProcessMarkerMsg(const gz::msgs::Marker &_msg); /// \brief Services callback that returns a list of markers. /// \param[out] _rep Service reply /// \return True on success. - public: bool OnList(ignition::msgs::Marker_V &_rep); + public: bool OnList(gz::msgs::Marker_V &_rep); /// \brief Callback that receives marker messages. /// \param[in] _req The marker message. - public: void OnMarkerMsg(const ignition::msgs::Marker &_req); + public: void OnMarkerMsg(const gz::msgs::Marker &_req); /// \brief Callback that receives multiple marker messages. /// \param[in] _req The vector of marker messages /// \param[in] _res Response data /// \return True if the request is received - public: bool OnMarkerMsgArray(const ignition::msgs::Marker_V &_req, - ignition::msgs::Boolean &_res); + public: bool OnMarkerMsgArray(const gz::msgs::Marker_V &_req, + gz::msgs::Boolean &_res); /// \brief Subscriber callback when new world statistics are received - public: void OnWorldStatsMsg(const ignition::msgs::WorldStatistics &_msg); + public: void OnWorldStatsMsg(const gz::msgs::WorldStatistics &_msg); /// \brief Sets Visual from marker message. /// \param[in] _msg The message data. /// \param[out] _visualPtr The visual pointer to set. - public: void SetVisual(const ignition::msgs::Marker &_msg, + public: void SetVisual(const gz::msgs::Marker &_msg, const rendering::VisualPtr &_visualPtr); /// \brief Sets Marker from marker message. /// \param[in] _msg The message data. /// \param[out] _markerPtr The message pointer to set. - public: void SetMarker(const ignition::msgs::Marker &_msg, + public: void SetMarker(const gz::msgs::Marker &_msg, const rendering::MarkerPtr &_markerPtr); /// \brief Converts an ignition msg material to ignition rendering @@ -101,13 +101,13 @@ class ignition::gui::plugins::MarkerManagerPrivate // \param[in] _msg The message data. // \return Converted rendering material, if any. public: rendering::MaterialPtr MsgToMaterial( - const ignition::msgs::Marker &_msg); + const gz::msgs::Marker &_msg); /// \brief Converts an ignition msg render type to ignition rendering /// \param[in] _msg The message data /// \return Converted rendering type, if any. - public: ignition::rendering::MarkerType MsgToType( - const ignition::msgs::Marker &_msg); + public: gz::rendering::MarkerType MsgToType( + const gz::msgs::Marker &_msg); //// \brief Pointer to the rendering scene public: rendering::ScenePtr scene{nullptr}; @@ -116,14 +116,14 @@ class ignition::gui::plugins::MarkerManagerPrivate public: std::mutex mutex; /// \brief List of marker message to process. - public: std::list markerMsgs; + public: std::list markerMsgs; /// \brief Map of visuals public: std::map> visuals; + std::map> visuals; - /// \brief Gazebo node - public: ignition::transport::Node node; + /// \brief Ignition node + public: gz::transport::Node node; /// \brief Topic name for the marker service public: std::string topicName = "/marker"; @@ -135,14 +135,14 @@ class ignition::gui::plugins::MarkerManagerPrivate public: std::chrono::steady_clock::duration lastSimTime; /// \brief The last marker message received - public: ignition::msgs::Marker msg; + public: gz::msgs::Marker msg; /// \brief True to print console warnings if the user tries to perform an /// action with an inexistent marker. public: bool warnOnActionFailure{true}; }; -using namespace ignition; +using namespace gz; using namespace gui; using namespace plugins; @@ -151,13 +151,13 @@ void MarkerManagerPrivate::Initialize() { if (!this->scene) { - ignerr << "Scene pointer is invalid" << std::endl; + gzerr << "Scene pointer is invalid" << std::endl; return; } if (this->topicName.empty()) { - ignerr << "Unable to advertise marker service. Topic name empty." + gzerr << "Unable to advertise marker service. Topic name empty." << std::endl; return; } @@ -166,31 +166,31 @@ void MarkerManagerPrivate::Initialize() if (!this->node.Advertise(this->topicName + "/list", &MarkerManagerPrivate::OnList, this)) { - ignerr << "Unable to advertise to the " << this->topicName + gzerr << "Unable to advertise to the " << this->topicName << "/list service.\n"; } - igndbg << "Advertise " << this->topicName << "/list service.\n"; + gzdbg << "Advertise " << this->topicName << "/list service.\n"; // Advertise to the marker service if (!this->node.Advertise(this->topicName, &MarkerManagerPrivate::OnMarkerMsg, this)) { - ignerr << "Unable to advertise to the " << this->topicName + gzerr << "Unable to advertise to the " << this->topicName << " service.\n"; } - igndbg << "Advertise " << this->topicName << "/list.\n"; + gzdbg << "Advertise " << this->topicName << "/list.\n"; // Advertise to the marker_array service if (!this->node.Advertise(this->topicName + "_array", &MarkerManagerPrivate::OnMarkerMsgArray, this)) { - ignerr << "Unable to advertise to the " << this->topicName + gzerr << "Unable to advertise to the " << this->topicName << "_array service.\n"; } - igndbg << "Advertise " << this->topicName << "_array.\n"; + gzdbg << "Advertise " << this->topicName << "_array.\n"; } ///////////////////////////////////////////////// @@ -224,8 +224,8 @@ void MarkerManagerPrivate::OnRender() if (it->second->GeometryCount() == 0u) continue; - ignition::rendering::MarkerPtr markerPtr = - std::dynamic_pointer_cast + gz::rendering::MarkerPtr markerPtr = + std::dynamic_pointer_cast (it->second->GeometryByIndex(0u)); if (markerPtr != nullptr) { @@ -250,7 +250,7 @@ void MarkerManagerPrivate::OnRender() } ///////////////////////////////////////////////// -bool MarkerManagerPrivate::OnList(ignition::msgs::Marker_V &_rep) +bool MarkerManagerPrivate::OnList(gz::msgs::Marker_V &_rep) { std::lock_guard lock(this->mutex); _rep.clear_marker(); @@ -260,7 +260,7 @@ bool MarkerManagerPrivate::OnList(ignition::msgs::Marker_V &_rep) { for (auto iter : mIter.second) { - ignition::msgs::Marker *markerMsg = _rep.add_marker(); + gz::msgs::Marker *markerMsg = _rep.add_marker(); markerMsg->set_ns(mIter.first); markerMsg->set_id(iter.first); } @@ -270,7 +270,7 @@ bool MarkerManagerPrivate::OnList(ignition::msgs::Marker_V &_rep) } ///////////////////////////////////////////////// -void MarkerManagerPrivate::OnMarkerMsg(const ignition::msgs::Marker &_req) +void MarkerManagerPrivate::OnMarkerMsg(const gz::msgs::Marker &_req) { std::lock_guard lock(this->mutex); this->markerMsgs.push_back(_req); @@ -278,7 +278,7 @@ void MarkerManagerPrivate::OnMarkerMsg(const ignition::msgs::Marker &_req) ///////////////////////////////////////////////// bool MarkerManagerPrivate::OnMarkerMsgArray( - const ignition::msgs::Marker_V&_req, ignition::msgs::Boolean &_res) + const gz::msgs::Marker_V&_req, gz::msgs::Boolean &_res) { std::lock_guard lock(this->mutex); std::copy(_req.marker().begin(), _req.marker().end(), @@ -288,7 +288,7 @@ bool MarkerManagerPrivate::OnMarkerMsgArray( } ////////////////////////////////////////////////// -bool MarkerManagerPrivate::ProcessMarkerMsg(const ignition::msgs::Marker &_msg) +bool MarkerManagerPrivate::ProcessMarkerMsg(const gz::msgs::Marker &_msg) { // Get the namespace, if it exists. Otherwise, use the global namespace std::string ns; @@ -309,14 +309,14 @@ bool MarkerManagerPrivate::ProcessMarkerMsg(const ignition::msgs::Marker &_msg) // Otherwise generate unique id else { - id = ignition::math::Rand::IntUniform(0, ignition::math::MAX_I32); + id = gz::math::Rand::IntUniform(0, gz::math::MAX_I32); // Make sure it's unique if namespace is given if (nsIter != this->visuals.end()) { while (nsIter->second.find(id) != nsIter->second.end()) - id = ignition::math::Rand::IntUniform(ignition::math::MIN_UI32, - ignition::math::MAX_UI32); + id = gz::math::Rand::IntUniform(gz::math::MIN_UI32, + gz::math::MAX_UI32); } } @@ -326,7 +326,7 @@ bool MarkerManagerPrivate::ProcessMarkerMsg(const ignition::msgs::Marker &_msg) visualIter = nsIter->second.find(id); // Add/modify a marker - if (_msg.action() == ignition::msgs::Marker::ADD_MODIFY) + if (_msg.action() == gz::msgs::Marker::ADD_MODIFY) { // Modify an existing marker, identified by namespace and id if (nsIter != this->visuals.end() && @@ -336,8 +336,8 @@ bool MarkerManagerPrivate::ProcessMarkerMsg(const ignition::msgs::Marker &_msg) { // TODO(anyone): Update so that multiple markers can // be attached to one visual - ignition::rendering::MarkerPtr markerPtr = - std::dynamic_pointer_cast + gz::rendering::MarkerPtr markerPtr = + std::dynamic_pointer_cast (visualIter->second->GeometryByIndex(0)); visualIter->second->RemoveGeometryByIndex(0); @@ -384,7 +384,7 @@ bool MarkerManagerPrivate::ProcessMarkerMsg(const ignition::msgs::Marker &_msg) } } // Remove a single marker - else if (_msg.action() == ignition::msgs::Marker::DELETE_MARKER) + else if (_msg.action() == gz::msgs::Marker::DELETE_MARKER) { // Remove the marker if it can be found. if (nsIter != this->visuals.end() && @@ -401,21 +401,21 @@ bool MarkerManagerPrivate::ProcessMarkerMsg(const ignition::msgs::Marker &_msg) { if (this->warnOnActionFailure) { - ignwarn << "Unable to delete marker with id[" << id << "] " + gzwarn << "Unable to delete marker with id[" << id << "] " << "in namespace[" << ns << "]" << std::endl; } return false; } } // Remove all markers, or all markers in a namespace - else if (_msg.action() == ignition::msgs::Marker::DELETE_ALL) + else if (_msg.action() == gz::msgs::Marker::DELETE_ALL) { // If given namespace doesn't exist if (!ns.empty() && nsIter == this->visuals.end()) { if (this->warnOnActionFailure) { - ignwarn << "Unable to delete all markers in namespace[" << ns + gzwarn << "Unable to delete all markers in namespace[" << ns << "], namespace can't be found." << std::endl; } return false; @@ -446,7 +446,7 @@ bool MarkerManagerPrivate::ProcessMarkerMsg(const ignition::msgs::Marker &_msg) } else { - ignerr << "Unknown marker action[" << _msg.action() << "]\n"; + gzerr << "Unknown marker action[" << _msg.action() << "]\n"; return false; } @@ -454,12 +454,12 @@ bool MarkerManagerPrivate::ProcessMarkerMsg(const ignition::msgs::Marker &_msg) } ///////////////////////////////////////////////// -void MarkerManagerPrivate::SetVisual(const ignition::msgs::Marker &_msg, +void MarkerManagerPrivate::SetVisual(const gz::msgs::Marker &_msg, const rendering::VisualPtr &_visualPtr) { // Set Visual Scale // The scale for points is used as the size of each point, so skip it here. - if (_msg.has_scale() && _msg.type() != ignition::msgs::Marker::POINTS) + if (_msg.has_scale() && _msg.type() != gz::msgs::Marker::POINTS) { _visualPtr->SetLocalScale(_msg.scale().x(), _msg.scale().y(), @@ -496,7 +496,7 @@ void MarkerManagerPrivate::SetVisual(const ignition::msgs::Marker &_msg, } else { - ignerr << "No visual with the name[" << _msg.parent() << "]\n"; + gzerr << "No visual with the name[" << _msg.parent() << "]\n"; } } @@ -504,7 +504,7 @@ void MarkerManagerPrivate::SetVisual(const ignition::msgs::Marker &_msg, } ///////////////////////////////////////////////// -void MarkerManagerPrivate::SetMarker(const ignition::msgs::Marker &_msg, +void MarkerManagerPrivate::SetMarker(const gz::msgs::Marker &_msg, const rendering::MarkerPtr &_markerPtr) { _markerPtr->SetLayer(_msg.layer()); @@ -523,7 +523,7 @@ void MarkerManagerPrivate::SetMarker(const ignition::msgs::Marker &_msg, _markerPtr->SetLifetime(std::chrono::seconds(0)); } // Set Marker Render Type - ignition::rendering::MarkerType markerType = MsgToType(_msg); + gz::rendering::MarkerType markerType = MsgToType(_msg); _markerPtr->SetType(markerType); // Set Marker Material @@ -565,7 +565,7 @@ void MarkerManagerPrivate::SetMarker(const ignition::msgs::Marker &_msg, ///////////////////////////////////////////////// rendering::MaterialPtr MarkerManagerPrivate::MsgToMaterial( - const ignition::msgs::Marker &_msg) + const gz::msgs::Marker &_msg) { rendering::MaterialPtr material = this->scene->CreateMaterial(); @@ -599,49 +599,49 @@ rendering::MaterialPtr MarkerManagerPrivate::MsgToMaterial( } ///////////////////////////////////////////////// -ignition::rendering::MarkerType MarkerManagerPrivate::MsgToType( - const ignition::msgs::Marker &_msg) +gz::rendering::MarkerType MarkerManagerPrivate::MsgToType( + const gz::msgs::Marker &_msg) { - ignition::msgs::Marker_Type marker = this->msg.type(); - if (marker != _msg.type() && _msg.type() != ignition::msgs::Marker::NONE) + gz::msgs::Marker_Type marker = this->msg.type(); + if (marker != _msg.type() && _msg.type() != gz::msgs::Marker::NONE) { marker = _msg.type(); this->msg.set_type(_msg.type()); } switch (marker) { - case ignition::msgs::Marker::BOX: - return ignition::rendering::MarkerType::MT_BOX; - case ignition::msgs::Marker::CAPSULE: - return ignition::rendering::MarkerType::MT_CAPSULE; - case ignition::msgs::Marker::CYLINDER: - return ignition::rendering::MarkerType::MT_CYLINDER; - case ignition::msgs::Marker::LINE_STRIP: - return ignition::rendering::MarkerType::MT_LINE_STRIP; - case ignition::msgs::Marker::LINE_LIST: - return ignition::rendering::MarkerType::MT_LINE_LIST; - case ignition::msgs::Marker::POINTS: - return ignition::rendering::MarkerType::MT_POINTS; - case ignition::msgs::Marker::SPHERE: - return ignition::rendering::MarkerType::MT_SPHERE; - case ignition::msgs::Marker::TEXT: - return ignition::rendering::MarkerType::MT_TEXT; - case ignition::msgs::Marker::TRIANGLE_FAN: - return ignition::rendering::MarkerType::MT_TRIANGLE_FAN; - case ignition::msgs::Marker::TRIANGLE_LIST: - return ignition::rendering::MarkerType::MT_TRIANGLE_LIST; - case ignition::msgs::Marker::TRIANGLE_STRIP: - return ignition::rendering::MarkerType::MT_TRIANGLE_STRIP; + case gz::msgs::Marker::BOX: + return gz::rendering::MarkerType::MT_BOX; + case gz::msgs::Marker::CAPSULE: + return gz::rendering::MarkerType::MT_CAPSULE; + case gz::msgs::Marker::CYLINDER: + return gz::rendering::MarkerType::MT_CYLINDER; + case gz::msgs::Marker::LINE_STRIP: + return gz::rendering::MarkerType::MT_LINE_STRIP; + case gz::msgs::Marker::LINE_LIST: + return gz::rendering::MarkerType::MT_LINE_LIST; + case gz::msgs::Marker::POINTS: + return gz::rendering::MarkerType::MT_POINTS; + case gz::msgs::Marker::SPHERE: + return gz::rendering::MarkerType::MT_SPHERE; + case gz::msgs::Marker::TEXT: + return gz::rendering::MarkerType::MT_TEXT; + case gz::msgs::Marker::TRIANGLE_FAN: + return gz::rendering::MarkerType::MT_TRIANGLE_FAN; + case gz::msgs::Marker::TRIANGLE_LIST: + return gz::rendering::MarkerType::MT_TRIANGLE_LIST; + case gz::msgs::Marker::TRIANGLE_STRIP: + return gz::rendering::MarkerType::MT_TRIANGLE_STRIP; default: - ignerr << "Unable to create marker of type[" << _msg.type() << "]\n"; + gzerr << "Unable to create marker of type[" << _msg.type() << "]\n"; break; } - return ignition::rendering::MarkerType::MT_NONE; + return gz::rendering::MarkerType::MT_NONE; } ///////////////////////////////////////////////// void MarkerManagerPrivate::OnWorldStatsMsg( - const ignition::msgs::WorldStatistics &_msg) + const gz::msgs::WorldStatistics &_msg) { std::lock_guard lock(this->mutex); std::chrono::steady_clock::duration timePoint; @@ -692,7 +692,7 @@ void MarkerManager::LoadConfig(const tinyxml2::XMLElement * _pluginElem) } else { - ignerr << "the provided topic is no allowed. Using default [" + gzerr << "the provided topic is no allowed. Using default [" << this->dataPtr->topicName << "]"<< std::endl; } } @@ -702,7 +702,7 @@ void MarkerManager::LoadConfig(const tinyxml2::XMLElement * _pluginElem) if (elem->QueryBoolText(&this->dataPtr->warnOnActionFailure) != tinyxml2::XML_SUCCESS) { - ignerr << "Faild to parse value: " + gzerr << "Faild to parse value: " << elem->GetText() << std::endl; } } @@ -729,7 +729,7 @@ void MarkerManager::LoadConfig(const tinyxml2::XMLElement * _pluginElem) parts[2] != worldName && parts[3] == "stats") { - ignwarn << "Ignoring topic [" << statsTopic + gzwarn << "Ignoring topic [" << statsTopic << "], world name different from [" << worldName << "]. Fix or remove your tag." << std::endl; @@ -748,16 +748,16 @@ void MarkerManager::LoadConfig(const tinyxml2::XMLElement * _pluginElem) if (!this->dataPtr->node.Subscribe(statsTopic, &MarkerManagerPrivate::OnWorldStatsMsg, this->dataPtr.get())) { - ignerr << "Failed to subscribe to [" << statsTopic << "]" << std::endl; + gzerr << "Failed to subscribe to [" << statsTopic << "]" << std::endl; } else { - ignmsg << "Listening to stats on [" << statsTopic << "]" << std::endl; + gzmsg << "Listening to stats on [" << statsTopic << "]" << std::endl; } } else { - ignerr << "Failed to create valid topic for world [" << worldName << "]" + gzerr << "Failed to create valid topic for world [" << worldName << "]" << std::endl; } @@ -781,5 +781,5 @@ bool MarkerManager::eventFilter(QObject *_obj, QEvent *_event) } // Register this plugin -IGNITION_ADD_PLUGIN(ignition::gui::plugins::MarkerManager, - ignition::gui::Plugin) +IGNITION_ADD_PLUGIN(gz::gui::plugins::MarkerManager, + gz::gui::Plugin) diff --git a/src/plugins/marker_manager/MarkerManager.hh b/src/plugins/marker_manager/MarkerManager.hh index ad11254a2..e47369dcd 100644 --- a/src/plugins/marker_manager/MarkerManager.hh +++ b/src/plugins/marker_manager/MarkerManager.hh @@ -15,14 +15,14 @@ * */ -#ifndef IGNITION_GUI_PLUGINS_MARKERMANAGER_HH_ -#define IGNITION_GUI_PLUGINS_MARKERMANAGER_HH_ +#ifndef GZ_GUI_PLUGINS_MARKERMANAGER_HH_ +#define GZ_GUI_PLUGINS_MARKERMANAGER_HH_ #include -#include "ignition/gui/Plugin.hh" +#include "gz/gui/Plugin.hh" -namespace ignition +namespace gz { namespace gui { diff --git a/src/plugins/minimal_scene/MinimalScene.cc b/src/plugins/minimal_scene/MinimalScene.cc index 1c17e8f25..24ea2198a 100644 --- a/src/plugins/minimal_scene/MinimalScene.cc +++ b/src/plugins/minimal_scene/MinimalScene.cc @@ -26,12 +26,12 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include // TODO(louise) Remove these pragmas once ign-rendering // is disabling the warnings @@ -39,27 +39,27 @@ #pragma warning(push, 0) #endif -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #ifdef _MSC_VER #pragma warning(pop) #endif -#include "ignition/gui/Application.hh" -#include "ignition/gui/Conversions.hh" -#include "ignition/gui/GuiEvents.hh" -#include "ignition/gui/Helpers.hh" -#include "ignition/gui/MainWindow.hh" +#include "gz/gui/Application.hh" +#include "gz/gui/Conversions.hh" +#include "gz/gui/GuiEvents.hh" +#include "gz/gui/Helpers.hh" +#include "gz/gui/MainWindow.hh" -Q_DECLARE_METATYPE(ignition::gui::plugins::RenderSync*) +Q_DECLARE_METATYPE(gz::gui::plugins::RenderSync*) /// \brief Private data class for IgnRenderer -class ignition::gui::plugins::IgnRenderer::Implementation +class gz::gui::plugins::IgnRenderer::Implementation { /// \brief Flag to indicate if mouse event is dirty public: bool mouseDirty{false}; @@ -139,8 +139,8 @@ class ignition::gui::plugins::IgnRenderer::Implementation /// /// /// For more info see -/// https://github.com/ignitionrobotics/ign-rendering/issues/304 -class ignition::gui::plugins::RenderSync +/// https://github.com/gazebosim/gz-rendering/issues/304 +class gz::gui::plugins::RenderSync { /// \brief Cond. variable to synchronize rendering on specific events /// (e.g. texture resize) or for debugging (e.g. keep @@ -188,7 +188,7 @@ class ignition::gui::plugins::RenderSync }; /// \brief Private data class for RenderWindowItem -class ignition::gui::plugins::RenderWindowItem::Implementation +class gz::gui::plugins::RenderWindowItem::Implementation { /// \brief Keep latest mouse event public: common::MouseEvent mouseEvent; @@ -200,7 +200,7 @@ class ignition::gui::plugins::RenderWindowItem::Implementation public: bool initializing = false; /// \brief Graphics API. The default is platform specific. - public: ignition::rendering::GraphicsAPI graphicsAPI = + public: gz::rendering::GraphicsAPI graphicsAPI = #ifdef __APPLE__ rendering::GraphicsAPI::METAL; #else @@ -221,11 +221,11 @@ class ignition::gui::plugins::RenderWindowItem::Implementation }; /// \brief Private data class for MinimalScene -class ignition::gui::plugins::MinimalScene::Implementation +class gz::gui::plugins::MinimalScene::Implementation { }; -using namespace ignition; +using namespace gz; using namespace gui; using namespace plugins; @@ -331,20 +331,20 @@ void IgnRenderer::Render(RenderSync *_renderSync) // view control this->HandleMouseEvent(); - if (ignition::gui::App()) + if (gz::gui::App()) { - ignition::gui::App()->sendEvent( - ignition::gui::App()->findChild(), + gz::gui::App()->sendEvent( + gz::gui::App()->findChild(), new gui::events::PreRender()); } // update and render to texture this->dataPtr->camera->Update(); - if (ignition::gui::App()) + if (gz::gui::App()) { - ignition::gui::App()->sendEvent( - ignition::gui::App()->findChild(), + gz::gui::App()->sendEvent( + gz::gui::App()->findChild(), new gui::events::Render()); } _renderSync->ReleaseQtThreadFromBlock(lock); @@ -551,7 +551,7 @@ std::string IgnRenderer::Initialize() if (loadedEngines.empty()) { this->dataPtr->rhiParams["winID"] = std::to_string( - ignition::gui::App()->findChild()-> + gz::gui::App()->findChild()-> QuickWindow()->winId()); engine = rendering::engine(this->engineName, this->dataPtr->rhiParams); } @@ -559,7 +559,7 @@ std::string IgnRenderer::Initialize() { if (!this->engineName.empty() && loadedEngines.front() != this->engineName) { - ignwarn << "Failed to load engine [" << this->engineName + gzwarn << "Failed to load engine [" << this->engineName << "]. Using engine [" << loadedEngines.front() << "], which is already loaded. Currently only one engine is " << "supported at a time." << std::endl; @@ -580,7 +580,7 @@ std::string IgnRenderer::Initialize() "time."; } - igndbg << "Create scene [" << this->sceneName << "]" << std::endl; + gzdbg << "Create scene [" << this->sceneName << "]" << std::endl; auto scene = engine->CreateScene(this->sceneName); if (nullptr == scene) { @@ -631,14 +631,14 @@ void IgnRenderer::SetGraphicsAPI(const rendering::GraphicsAPI &_graphicsAPI) if (_graphicsAPI == rendering::GraphicsAPI::OPENGL) { - igndbg << "Creating ign-rendering interface for OpenGL" << std::endl; + gzdbg << "Creating ign-rendering interface for OpenGL" << std::endl; this->dataPtr->rhiParams["useCurrentGLContext"] = "1"; this->dataPtr->rhi = std::make_unique(); } #ifdef __APPLE__ else if (_graphicsAPI == rendering::GraphicsAPI::METAL) { - igndbg << "Creating ign-renderering interface for Metal" << std::endl; + gzdbg << "Creating ign-renderering interface for Metal" << std::endl; this->dataPtr->rhiParams["metal"] = "1"; this->dataPtr->rhi = std::make_unique(); } @@ -659,7 +659,7 @@ void IgnRenderer::Destroy() // If that was the last sensor, destroy scene if (scene->SensorCount() == 0) { - igndbg << "Destroy scene [" << scene->Name() << "]" << std::endl; + gzdbg << "Destroy scene [" << scene->Name() << "]" << std::endl; engine->DestroyScene(scene); // TODO(anyone) If that was the last scene, terminate engine? @@ -741,7 +741,7 @@ void RenderThread::SizeChanged() auto item = qobject_cast(this->sender()); if (!item) { - ignerr << "Internal error, sender is not QQuickItem." << std::endl; + gzerr << "Internal error, sender is not QQuickItem." << std::endl; return; } @@ -785,13 +785,13 @@ void RenderThread::SetGraphicsAPI(const rendering::GraphicsAPI &_graphicsAPI) // Create the render interface if (_graphicsAPI == rendering::GraphicsAPI::OPENGL) { - igndbg << "Creating render thread interface for OpenGL" << std::endl; + gzdbg << "Creating render thread interface for OpenGL" << std::endl; this->rhi = std::make_unique(&this->ignRenderer); } #ifdef __APPLE__ else if (_graphicsAPI == rendering::GraphicsAPI::METAL) { - igndbg << "Creating render thread interface for Metal" << std::endl; + gzdbg << "Creating render thread interface for Metal" << std::endl; this->rhi = std::make_unique(&this->ignRenderer); } #endif @@ -817,13 +817,13 @@ TextureNode::TextureNode( { if (_graphicsAPI == rendering::GraphicsAPI::OPENGL) { - igndbg << "Creating texture node render interface for OpenGL" << std::endl; + gzdbg << "Creating texture node render interface for OpenGL" << std::endl; this->rhi = std::make_unique(_window); } #ifdef __APPLE__ else if (_graphicsAPI == rendering::GraphicsAPI::METAL) { - igndbg << "Creating texture node render interface for Metal" << std::endl; + gzdbg << "Creating texture node render interface for Metal" << std::endl; this->rhi = std::make_unique(_window); } #endif @@ -866,7 +866,7 @@ void TextureNode::PrepareNode() // However we need to synchronize the threads when resolution changes, // and we're also currently doing everything in lockstep (i.e. both Qt // and worker thread are serialized, - // see https://github.com/ignitionrobotics/ign-rendering/issues/304 ) + // see https://github.com/gazebosim/gz-rendering/issues/304 ) // // We need to emit even if newId == 0 because it's safe as long as both // threads are forcefully serialized and otherwise we may get a @@ -1003,7 +1003,7 @@ QSGNode *RenderWindowItem::updatePaintNode(QSGNode *_node, } else { - ignerr << "GraphicsAPI [" + gzerr << "GraphicsAPI [" << rendering::GraphicsAPIUtils::Str(this->dataPtr->graphicsAPI) << "] is not supported" << std::endl; @@ -1127,7 +1127,7 @@ void MinimalScene::LoadConfig(const tinyxml2::XMLElement *_pluginElem) this->PluginItem()->findChild(); if (!renderWindow) { - ignerr << "Unable to find Render Window item. " + gzerr << "Unable to find Render Window item. " << "Render window will not be created" << std::endl; return; } @@ -1197,7 +1197,7 @@ void MinimalScene::LoadConfig(const tinyxml2::XMLElement *_pluginElem) nearStr >> n; if (nearStr.fail()) { - ignerr << "Unable to set to '" << nearStr.str() + gzerr << "Unable to set to '" << nearStr.str() << "' using default near clip distance" << std::endl; } else @@ -1215,7 +1215,7 @@ void MinimalScene::LoadConfig(const tinyxml2::XMLElement *_pluginElem) farStr >> f; if (farStr.fail()) { - ignerr << "Unable to set to '" << farStr.str() + gzerr << "Unable to set to '" << farStr.str() << "' using default far clip distance" << std::endl; } else @@ -1230,7 +1230,7 @@ void MinimalScene::LoadConfig(const tinyxml2::XMLElement *_pluginElem) { renderWindow->SetSkyEnabled(true); if (!elem->NoChildren()) - ignwarn << "Child elements of are not supported yet" + gzwarn << "Child elements of are not supported yet" << std::endl; } @@ -1253,14 +1253,14 @@ void MinimalScene::LoadConfig(const tinyxml2::XMLElement *_pluginElem) } ///////////////////////////////////////////////// -void RenderWindowItem::OnHovered(const ignition::math::Vector2i &_hoverPos) +void RenderWindowItem::OnHovered(const gz::math::Vector2i &_hoverPos) { this->dataPtr->renderThread->ignRenderer.NewHoverEvent(_hoverPos); } ///////////////////////////////////////////////// void RenderWindowItem::OnDropped(const QString &_drop, - const ignition::math::Vector2i &_dropPos) + const gz::math::Vector2i &_dropPos) { this->dataPtr->renderThread->ignRenderer.NewDropEvent( _drop.toStdString(), _dropPos); @@ -1395,5 +1395,5 @@ void MinimalScene::SetLoadingError(const QString &_loadingError) } // Register this plugin -IGNITION_ADD_PLUGIN(ignition::gui::plugins::MinimalScene, - ignition::gui::Plugin) +IGNITION_ADD_PLUGIN(gz::gui::plugins::MinimalScene, + gz::gui::Plugin) diff --git a/src/plugins/minimal_scene/MinimalScene.hh b/src/plugins/minimal_scene/MinimalScene.hh index 525f92c75..13b8267f4 100644 --- a/src/plugins/minimal_scene/MinimalScene.hh +++ b/src/plugins/minimal_scene/MinimalScene.hh @@ -15,25 +15,25 @@ * */ -#ifndef IGNITION_GUI_PLUGINS_SCENE3D_HH_ -#define IGNITION_GUI_PLUGINS_SCENE3D_HH_ +#ifndef GZ_GUI_PLUGINS_SCENE3D_HH_ +#define GZ_GUI_PLUGINS_SCENE3D_HH_ #include #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include -#include "ignition/gui/Plugin.hh" +#include "gz/gui/Plugin.hh" #include "MinimalSceneRhi.hh" -namespace ignition +namespace gz { namespace gui { @@ -43,7 +43,7 @@ namespace plugins /// It is possible to orbit the camera around the scene with /// the mouse. Use other plugins to manage objects in the scene. /// - /// Only one plugin displaying an Gazebo Rendering scene can be used at a + /// Only one plugin displaying a Gazebo Rendering scene can be used at a /// time. /// /// ## Configuration @@ -349,13 +349,13 @@ namespace plugins /// \brief Called when the mouse hovers to a new position. /// \param[in] _hoverPos 2D coordinates of the hovered mouse position on /// the render window. - public: void OnHovered(const ignition::math::Vector2i &_hoverPos); + public: void OnHovered(const gz::math::Vector2i &_hoverPos); /// \brief Callback when receives a drop event. /// \param[in] _drop Dropped string. /// \param[in] _dropPos x coordinate of mouse position. public: void OnDropped(const QString &_drop, - const ignition::math::Vector2i &_dropPos); + const gz::math::Vector2i &_dropPos); /// \brief Set if sky is enabled /// \param[in] _sky True to enable the sky, false otherwise. diff --git a/src/plugins/minimal_scene/MinimalSceneRhi.cc b/src/plugins/minimal_scene/MinimalSceneRhi.cc index 1fa64a41f..87bbcfdb7 100644 --- a/src/plugins/minimal_scene/MinimalSceneRhi.cc +++ b/src/plugins/minimal_scene/MinimalSceneRhi.cc @@ -17,7 +17,7 @@ #include "MinimalSceneRhi.hh" -using namespace ignition; +using namespace gz; using namespace gui; using namespace plugins; diff --git a/src/plugins/minimal_scene/MinimalSceneRhi.hh b/src/plugins/minimal_scene/MinimalSceneRhi.hh index 89d3e1ec0..752edf2d0 100644 --- a/src/plugins/minimal_scene/MinimalSceneRhi.hh +++ b/src/plugins/minimal_scene/MinimalSceneRhi.hh @@ -15,18 +15,18 @@ * */ -#ifndef IGNITION_GUI_PLUGINS_MINIMALSCENE_MINIMALSCENERHI_HH_ -#define IGNITION_GUI_PLUGINS_MINIMALSCENE_MINIMALSCENERHI_HH_ +#ifndef GZ_GUI_PLUGINS_MINIMALSCENE_MINIMALSCENERHI_HH_ +#define GZ_GUI_PLUGINS_MINIMALSCENE_MINIMALSCENERHI_HH_ #include -#include "ignition/gui/Plugin.hh" -#include "ignition/rendering/RenderTypes.hh" +#include "gz/gui/Plugin.hh" +#include "gz/rendering/RenderTypes.hh" #include #include -namespace ignition +namespace gz { namespace gui { diff --git a/src/plugins/minimal_scene/MinimalSceneRhiMetal.hh b/src/plugins/minimal_scene/MinimalSceneRhiMetal.hh index a2a935b17..2bbf0d9cd 100644 --- a/src/plugins/minimal_scene/MinimalSceneRhiMetal.hh +++ b/src/plugins/minimal_scene/MinimalSceneRhiMetal.hh @@ -15,11 +15,11 @@ * */ -#ifndef IGNITION_GUI_PLUGINS_MINIMALSCENE_MINIMALSCENERHIMETAL_HH_ -#define IGNITION_GUI_PLUGINS_MINIMALSCENE_MINIMALSCENERHIMETAL_HH_ +#ifndef GZ_GUI_PLUGINS_MINIMALSCENE_MINIMALSCENERHIMETAL_HH_ +#define GZ_GUI_PLUGINS_MINIMALSCENE_MINIMALSCENERHIMETAL_HH_ #include "MinimalSceneRhi.hh" -#include "ignition/gui/Plugin.hh" +#include "gz/gui/Plugin.hh" #include #include @@ -28,7 +28,7 @@ #include #include -namespace ignition +namespace gz { namespace gui { diff --git a/src/plugins/minimal_scene/MinimalSceneRhiMetal.mm b/src/plugins/minimal_scene/MinimalSceneRhiMetal.mm index 517caef39..e365c0962 100644 --- a/src/plugins/minimal_scene/MinimalSceneRhiMetal.mm +++ b/src/plugins/minimal_scene/MinimalSceneRhiMetal.mm @@ -18,8 +18,8 @@ #include "MinimalSceneRhiMetal.hh" #include "MinimalScene.hh" -#include -#include +#include +#include #include #include @@ -35,7 +35,7 @@ #endif ///////////////////////////////////////////////// -namespace ignition +namespace gz { namespace gui { @@ -66,7 +66,7 @@ } } -using namespace ignition; +using namespace gz; using namespace gui; using namespace plugins; @@ -122,7 +122,7 @@ // Check if engine has been successfully initialized if (!this->dataPtr->renderer->initialized) { - ignerr << "Unable to initialize renderer" << std::endl; + gzerr << "Unable to initialize renderer" << std::endl; return; } diff --git a/src/plugins/minimal_scene/MinimalSceneRhiOpenGL.cc b/src/plugins/minimal_scene/MinimalSceneRhiOpenGL.cc index f99b5f683..112416aaa 100644 --- a/src/plugins/minimal_scene/MinimalSceneRhiOpenGL.cc +++ b/src/plugins/minimal_scene/MinimalSceneRhiOpenGL.cc @@ -18,8 +18,8 @@ #include "MinimalSceneRhiOpenGL.hh" #include "MinimalScene.hh" -#include -#include +#include +#include #include #include @@ -30,7 +30,7 @@ #include ///////////////////////////////////////////////// -namespace ignition +namespace gz { namespace gui { @@ -63,7 +63,7 @@ namespace plugins } } -using namespace ignition; +using namespace gz; using namespace gui; using namespace plugins; @@ -150,7 +150,7 @@ void RenderThreadRhiOpenGL::RenderNext(RenderSync *_renderSync) if (!this->dataPtr->renderer->initialized) { - ignerr << "Unable to initialize renderer" << std::endl; + gzerr << "Unable to initialize renderer" << std::endl; return; } diff --git a/src/plugins/minimal_scene/MinimalSceneRhiOpenGL.hh b/src/plugins/minimal_scene/MinimalSceneRhiOpenGL.hh index d86d76f66..f93589641 100644 --- a/src/plugins/minimal_scene/MinimalSceneRhiOpenGL.hh +++ b/src/plugins/minimal_scene/MinimalSceneRhiOpenGL.hh @@ -15,11 +15,11 @@ * */ -#ifndef IGNITION_GUI_PLUGINS_MINIMALSCENE_MINIMALSCENERHIOPENGL_HH_ -#define IGNITION_GUI_PLUGINS_MINIMALSCENE_MINIMALSCENERHIOPENGL_HH_ +#ifndef GZ_GUI_PLUGINS_MINIMALSCENE_MINIMALSCENERHIOPENGL_HH_ +#define GZ_GUI_PLUGINS_MINIMALSCENE_MINIMALSCENERHIOPENGL_HH_ #include "MinimalSceneRhi.hh" -#include "ignition/gui/Plugin.hh" +#include "gz/gui/Plugin.hh" #include #include @@ -28,7 +28,7 @@ #include #include -namespace ignition +namespace gz { namespace gui { diff --git a/src/plugins/navsat_map/NavSatMap.cc b/src/plugins/navsat_map/NavSatMap.cc index f19972204..75a8c2e0e 100644 --- a/src/plugins/navsat_map/NavSatMap.cc +++ b/src/plugins/navsat_map/NavSatMap.cc @@ -23,13 +23,13 @@ #include #include -#include -#include -#include +#include +#include +#include -#include "ignition/gui/Application.hh" +#include "gz/gui/Application.hh" -namespace ignition +namespace gz { namespace gui { @@ -53,7 +53,7 @@ namespace plugins } } -using namespace ignition; +using namespace gz; using namespace gui; using namespace plugins; @@ -90,7 +90,7 @@ void NavSatMap::LoadConfig(const tinyxml2::XMLElement *_pluginElem) if (topic.empty() && !topicPicker) { - ignwarn << "Can't hide topic picker without a default topic." << std::endl; + gzwarn << "Can't hide topic picker without a default topic." << std::endl; topicPicker = true; } @@ -140,7 +140,7 @@ void NavSatMap::OnTopic(const QString _topic) if (!this->dataPtr->node.Subscribe(topic, &NavSatMap::OnMessage, this)) { - ignerr << "Unable to subscribe to topic [" << topic << "]" << std::endl; + gzerr << "Unable to subscribe to topic [" << topic << "]" << std::endl; } } @@ -159,7 +159,7 @@ void NavSatMap::OnRefresh() this->dataPtr->node.TopicInfo(topic, publishers); for (auto pub : publishers) { - if (pub.MsgTypeName() == "ignition.msgs.NavSat") + if (pub.MsgTypeName() == "gz.msgs.NavSat") { this->dataPtr->topicList.push_back(QString::fromStdString(topic)); break; @@ -187,5 +187,5 @@ void NavSatMap::SetTopicList(const QStringList &_topicList) } // Register this plugin -IGNITION_ADD_PLUGIN(ignition::gui::plugins::NavSatMap, - ignition::gui::Plugin) +IGNITION_ADD_PLUGIN(gz::gui::plugins::NavSatMap, + gz::gui::Plugin) diff --git a/src/plugins/navsat_map/NavSatMap.hh b/src/plugins/navsat_map/NavSatMap.hh index e9c739b04..a07871d54 100644 --- a/src/plugins/navsat_map/NavSatMap.hh +++ b/src/plugins/navsat_map/NavSatMap.hh @@ -15,21 +15,21 @@ * */ -#ifndef IGNITION_GUI_PLUGINS_IMAGEDISPLAY_HH_ -#define IGNITION_GUI_PLUGINS_IMAGEDISPLAY_HH_ +#ifndef GZ_GUI_PLUGINS_IMAGEDISPLAY_HH_ +#define GZ_GUI_PLUGINS_IMAGEDISPLAY_HH_ #include #ifdef _MSC_VER #pragma warning(push, 0) #endif -#include +#include #ifdef _MSC_VER #pragma warning(pop) #endif -#include "ignition/gui/Plugin.hh" +#include "gz/gui/Plugin.hh" -namespace ignition +namespace gz { namespace gui { @@ -37,7 +37,7 @@ namespace plugins { class NavSatMapPrivate; - /// \brief Display NavSat messages coming through an Gazebo Transport topic + /// \brief Display NavSat messages coming through a Gazebo Transport topic /// on top of a map. /// /// ## Configuration @@ -93,7 +93,7 @@ namespace plugins /// \brief Subscriber callback when new message is received /// \param[in] _msg New message - private: void OnMessage(const ignition::msgs::NavSat &_msg); + private: void OnMessage(const gz::msgs::NavSat &_msg); /// \internal /// \brief Pointer to private data. diff --git a/src/plugins/plotting/TransportPlotting.cc b/src/plugins/plotting/TransportPlotting.cc index 4c2b858a6..d28026ec2 100644 --- a/src/plugins/plotting/TransportPlotting.cc +++ b/src/plugins/plotting/TransportPlotting.cc @@ -14,10 +14,10 @@ * limitations under the License. * */ -#include +#include #include "TransportPlotting.hh" -using namespace ignition; +using namespace gz; using namespace gui; using namespace plugins; @@ -39,6 +39,6 @@ TransportPlotting::TransportPlotting() : Plugin(), } // Register this plugin -IGNITION_ADD_PLUGIN(ignition::gui::plugins::TransportPlotting, - ignition::gui::Plugin) +IGNITION_ADD_PLUGIN(gz::gui::plugins::TransportPlotting, + gz::gui::Plugin) diff --git a/src/plugins/plotting/TransportPlotting.hh b/src/plugins/plotting/TransportPlotting.hh index 96c214672..dc3b76ff6 100644 --- a/src/plugins/plotting/TransportPlotting.hh +++ b/src/plugins/plotting/TransportPlotting.hh @@ -14,16 +14,16 @@ * limitations under the License. * */ -#ifndef IGNITION_GUI_PLUGINS_TRANSPORTPLOTTING_HH_ -#define IGNITION_GUI_PLUGINS_TRANSPORTPLOTTING_HH_ +#ifndef GZ_GUI_PLUGINS_TRANSPORTPLOTTING_HH_ +#define GZ_GUI_PLUGINS_TRANSPORTPLOTTING_HH_ -#include -#include -#include +#include +#include +#include #include -namespace ignition +namespace gz { namespace gui { @@ -32,7 +32,7 @@ namespace plugins /// \brief Plots fields from Gazebo Transport topics. /// Fields can be dragged from the Topic Viewer or the Component Inspector. -class TransportPlotting : public ignition::gui::Plugin +class TransportPlotting : public gz::gui::Plugin { Q_OBJECT diff --git a/src/plugins/point_cloud/PointCloud.cc b/src/plugins/point_cloud/PointCloud.cc index c65b5645b..ad55d4b24 100644 --- a/src/plugins/point_cloud/PointCloud.cc +++ b/src/plugins/point_cloud/PointCloud.cc @@ -15,32 +15,32 @@ * */ -#include "ignition/msgs/pointcloud_packed.pb.h" +#include "gz/msgs/pointcloud_packed.pb.h" #include #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include #include "PointCloud.hh" /// \brief Private data class for PointCloud -class ignition::gui::plugins::PointCloudPrivate +class gz::gui::plugins::PointCloudPrivate { /// \brief Makes a request to populate the scene with markers public: void PublishMarkers(); @@ -49,7 +49,7 @@ class ignition::gui::plugins::PointCloudPrivate public: void ClearMarkers(); /// \brief Transport node - public: ignition::transport::Node node; + public: gz::transport::Node node; /// \brief Name of topic for PointCloudPacked public: std::string pointCloudTopic{""}; @@ -67,10 +67,10 @@ class ignition::gui::plugins::PointCloudPrivate public: std::recursive_mutex mutex; /// \brief Point cloud message containing XYZ positions - public: ignition::msgs::PointCloudPacked pointCloudMsg; + public: gz::msgs::PointCloudPacked pointCloudMsg; /// \brief Message holding a float vector. - public: ignition::msgs::Float_V floatVMsg; + public: gz::msgs::Float_V floatVMsg; /// \brief Minimum value in latest float vector public: float minFloatV{std::numeric_limits::max()}; @@ -79,10 +79,10 @@ class ignition::gui::plugins::PointCloudPrivate public: float maxFloatV{-std::numeric_limits::max()}; /// \brief Color for minimum value, changeable at runtime - public: ignition::math::Color minColor{1.0f, 0.0f, 0.0f, 1.0f}; + public: gz::math::Color minColor{1.0f, 0.0f, 0.0f, 1.0f}; /// \brief Color for maximum value, changeable at runtime - public: ignition::math::Color maxColor{0.0f, 1.0f, 0.0f, 1.0f}; + public: gz::math::Color maxColor{0.0f, 1.0f, 0.0f, 1.0f}; /// \brief Size of each point, changeable at runtime public: float pointSize{20}; @@ -91,13 +91,13 @@ class ignition::gui::plugins::PointCloudPrivate public: bool showing{true}; }; -using namespace ignition; +using namespace gz; using namespace gui; using namespace plugins; ///////////////////////////////////////////////// PointCloud::PointCloud() - : ignition::gui::Plugin(), + : gz::gui::Plugin(), dataPtr(std::make_unique()) { } @@ -137,8 +137,8 @@ void PointCloud::LoadConfig(const tinyxml2::XMLElement *_pluginElem) } - ignition::gui::App()->findChild< - ignition::gui::MainWindow *>()->installEventFilter(this); + gz::gui::App()->findChild< + gz::gui::MainWindow *>()->installEventFilter(this); } ////////////////////////////////////////////////// @@ -149,7 +149,7 @@ void PointCloud::OnPointCloudTopic(const QString &_pointCloudTopic) if (!this->dataPtr->pointCloudTopic.empty() && !this->dataPtr->node.Unsubscribe(this->dataPtr->pointCloudTopic)) { - ignerr << "Unable to unsubscribe from topic [" + gzerr << "Unable to unsubscribe from topic [" << this->dataPtr->pointCloudTopic <<"]" <dataPtr->node.Subscribe(this->dataPtr->pointCloudTopic, &PointCloud::OnPointCloud, this)) { - ignerr << "Unable to subscribe to topic [" + gzerr << "Unable to subscribe to topic [" << this->dataPtr->pointCloudTopic << "]\n"; return; } - ignmsg << "Subscribed to " << this->dataPtr->pointCloudTopic << std::endl; + gzmsg << "Subscribed to " << this->dataPtr->pointCloudTopic << std::endl; } ////////////////////////////////////////////////// @@ -181,7 +181,7 @@ void PointCloud::OnFloatVTopic(const QString &_floatVTopic) if (!this->dataPtr->floatVTopic.empty() && !this->dataPtr->node.Unsubscribe(this->dataPtr->floatVTopic)) { - ignerr << "Unable to unsubscribe from topic [" + gzerr << "Unable to unsubscribe from topic [" << this->dataPtr->floatVTopic <<"]" <dataPtr->node.Subscribe(this->dataPtr->floatVTopic, &PointCloud::OnFloatV, this)) { - ignerr << "Unable to subscribe to topic [" + gzerr << "Unable to subscribe to topic [" << this->dataPtr->floatVTopic << "]\n"; return; } - ignmsg << "Subscribed to " << this->dataPtr->floatVTopic << std::endl; + gzmsg << "Subscribed to " << this->dataPtr->floatVTopic << std::endl; } ////////////////////////////////////////////////// @@ -223,7 +223,7 @@ void PointCloud::Show(bool _show) void PointCloud::OnRefresh() { std::lock_guard lock(this->dataPtr->mutex); - ignmsg << "Refreshing topic list for point cloud messages." << std::endl; + gzmsg << "Refreshing topic list for point cloud messages." << std::endl; // Clear this->dataPtr->pointCloudTopicList.clear(); @@ -234,16 +234,16 @@ void PointCloud::OnRefresh() this->dataPtr->node.TopicList(allTopics); for (auto topic : allTopics) { - std::vector publishers; + std::vector publishers; this->dataPtr->node.TopicInfo(topic, publishers); for (auto pub : publishers) { - if (pub.MsgTypeName() == "ignition.msgs.PointCloudPacked") + if (pub.MsgTypeName() == "gz.msgs.PointCloudPacked") { this->dataPtr->pointCloudTopicList.push_back( QString::fromStdString(topic)); } - else if (pub.MsgTypeName() == "ignition.msgs.Float_V") + else if (pub.MsgTypeName() == "gz.msgs.Float_V") { this->dataPtr->floatVTopicList.push_back(QString::fromStdString(topic)); } @@ -294,7 +294,7 @@ void PointCloud::SetFloatVTopicList( ////////////////////////////////////////////////// void PointCloud::OnPointCloud( - const ignition::msgs::PointCloudPacked &_msg) + const gz::msgs::PointCloudPacked &_msg) { std::lock_guard lock(this->dataPtr->mutex); this->dataPtr->pointCloudMsg = _msg; @@ -302,7 +302,7 @@ void PointCloud::OnPointCloud( } ////////////////////////////////////////////////// -void PointCloud::OnFloatV(const ignition::msgs::Float_V &_msg) +void PointCloud::OnFloatV(const gz::msgs::Float_V &_msg) { std::lock_guard lock(this->dataPtr->mutex); this->dataPtr->floatVMsg = _msg; @@ -328,11 +328,11 @@ void PointCloud::OnFloatV(const ignition::msgs::Float_V &_msg) ////////////////////////////////////////////////// void PointCloud::OnPointCloudService( - const ignition::msgs::PointCloudPacked &_msg, bool _result) + const gz::msgs::PointCloudPacked &_msg, bool _result) { if (!_result) { - ignerr << "Service request failed." << std::endl; + gzerr << "Service request failed." << std::endl; return; } this->OnPointCloud(_msg); @@ -340,11 +340,11 @@ void PointCloud::OnPointCloudService( ////////////////////////////////////////////////// void PointCloud::OnFloatVService( - const ignition::msgs::Float_V &_msg, bool _result) + const gz::msgs::Float_V &_msg, bool _result) { if (!_result) { - ignerr << "Service request failed." << std::endl; + gzerr << "Service request failed." << std::endl; return; } this->OnFloatV(_msg); @@ -366,21 +366,21 @@ void PointCloudPrivate::PublishMarkers() } std::lock_guard lock(this->mutex); - ignition::msgs::Marker marker; + gz::msgs::Marker marker; marker.set_ns(this->pointCloudTopic + this->floatVTopic); marker.set_id(1); - marker.set_action(ignition::msgs::Marker::ADD_MODIFY); - marker.set_type(ignition::msgs::Marker::POINTS); - marker.set_visibility(ignition::msgs::Marker::GUI); + marker.set_action(gz::msgs::Marker::ADD_MODIFY); + marker.set_type(gz::msgs::Marker::POINTS); + marker.set_visibility(gz::msgs::Marker::GUI); - ignition::msgs::Set(marker.mutable_scale(), - ignition::math::Vector3d::One * this->pointSize); + gz::msgs::Set(marker.mutable_scale(), + gz::math::Vector3d::One * this->pointSize); - ignition::msgs::PointCloudPackedIterator + gz::msgs::PointCloudPackedIterator iterX(this->pointCloudMsg, "x"); - ignition::msgs::PointCloudPackedIterator + gz::msgs::PointCloudPackedIterator iterY(this->pointCloudMsg, "y"); - ignition::msgs::PointCloudPackedIterator + gz::msgs::PointCloudPackedIterator iterZ(this->pointCloudMsg, "z"); // Index of point in point cloud, visualized or not @@ -406,15 +406,15 @@ void PointCloudPrivate::PublishMarkers() auto ratio = floatRange > 0 ? (dataVal - this->minFloatV) / floatRange : 0.0f; - ignition:: math::Color color{ + gz:: math::Color color{ minC.R() + (maxC.R() - minC.R()) * ratio, minC.G() + (maxC.G() - minC.G()) * ratio, minC.B() + (maxC.B() - minC.B()) * ratio }; - ignition::msgs::Set(marker.add_materials()->mutable_diffuse(), color); + gz::msgs::Set(marker.add_materials()->mutable_diffuse(), color); - ignition::msgs::Set(marker.add_point(), ignition::math::Vector3d( + gz::msgs::Set(marker.add_point(), gz::math::Vector3d( *iterX, *iterY, *iterZ)); @@ -430,12 +430,12 @@ void PointCloudPrivate::ClearMarkers() return; std::lock_guard lock(this->mutex); - ignition::msgs::Marker msg; + gz::msgs::Marker msg; msg.set_ns(this->pointCloudTopic + this->floatVTopic); msg.set_id(0); - msg.set_action(ignition::msgs::Marker::DELETE_ALL); + msg.set_action(gz::msgs::Marker::DELETE_ALL); - igndbg << "Clearing markers on " + gzdbg << "Clearing markers on " << this->pointCloudTopic + this->floatVTopic << std::endl; @@ -445,13 +445,13 @@ void PointCloudPrivate::ClearMarkers() ///////////////////////////////////////////////// QColor PointCloud::MinColor() const { - return ignition::gui::convert(this->dataPtr->minColor); + return gz::gui::convert(this->dataPtr->minColor); } ///////////////////////////////////////////////// void PointCloud::SetMinColor(const QColor &_minColor) { - this->dataPtr->minColor = ignition::gui::convert(_minColor); + this->dataPtr->minColor = gz::gui::convert(_minColor); this->MinColorChanged(); this->dataPtr->PublishMarkers(); } @@ -459,13 +459,13 @@ void PointCloud::SetMinColor(const QColor &_minColor) ///////////////////////////////////////////////// QColor PointCloud::MaxColor() const { - return ignition::gui::convert(this->dataPtr->maxColor); + return gz::gui::convert(this->dataPtr->maxColor); } ///////////////////////////////////////////////// void PointCloud::SetMaxColor(const QColor &_maxColor) { - this->dataPtr->maxColor = ignition::gui::convert(_maxColor); + this->dataPtr->maxColor = gz::gui::convert(_maxColor); this->MaxColorChanged(); this->dataPtr->PublishMarkers(); } @@ -511,5 +511,5 @@ void PointCloud::SetPointSize(float _pointSize) } // Register this plugin -IGNITION_ADD_PLUGIN(ignition::gui::plugins::PointCloud, - ignition::gui::Plugin) +IGNITION_ADD_PLUGIN(gz::gui::plugins::PointCloud, + gz::gui::Plugin) diff --git a/src/plugins/point_cloud/PointCloud.hh b/src/plugins/point_cloud/PointCloud.hh index feb56edd8..1c1865d86 100644 --- a/src/plugins/point_cloud/PointCloud.hh +++ b/src/plugins/point_cloud/PointCloud.hh @@ -15,23 +15,23 @@ * */ -#ifndef IGNITION_GUI_PLUGINS_POINTCLOUD_HH_ -#define IGNITION_GUI_PLUGINS_POINTCLOUD_HH_ +#ifndef GZ_GUI_PLUGINS_POINTCLOUD_HH_ +#define GZ_GUI_PLUGINS_POINTCLOUD_HH_ #include #ifdef _MSC_VER #pragma warning(push, 0) #endif -#include -#include +#include +#include #ifdef _MSC_VER #pragma warning(pop) #endif -#include "ignition/gui/Plugin.hh" +#include "gz/gui/Plugin.hh" -namespace ignition +namespace gz { namespace gui { @@ -39,11 +39,11 @@ namespace plugins { class PointCloudPrivate; - /// \brief Visualize `ignition::msgs::PointCloudPacked` messages in a 3D + /// \brief Visualize `gz::msgs::PointCloudPacked` messages in a 3D /// scene. /// /// By default, the whole cloud is displayed using a single color. Users - /// can optionally choose a topic publishing `ignition::msgs::FloatV` messages + /// can optionally choose a topic publishing `gz::msgs::FloatV` messages /// which will be used to color all points with a color gradient according to /// their values. The float message must have the same number of elements as /// the point cloud and be indexed the same way. NaN values on the FloatV @@ -56,9 +56,9 @@ namespace plugins /// Parameters: /// /// * ``: Topic to receive - /// `ignition::msgs::PointCloudPacked` messages. - /// * ``: Topic to receive `ignition::msgs::FloatV` messages. - class PointCloud : public ignition::gui::Plugin + /// `gz::msgs::PointCloudPacked` messages. + /// * ``: Topic to receive `gz::msgs::FloatV` messages. + class PointCloud : public gz::gui::Plugin { Q_OBJECT diff --git a/src/plugins/point_cloud/PointCloud_TEST.cc b/src/plugins/point_cloud/PointCloud_TEST.cc index 83f2767dd..abd42799f 100644 --- a/src/plugins/point_cloud/PointCloud_TEST.cc +++ b/src/plugins/point_cloud/PointCloud_TEST.cc @@ -18,14 +18,14 @@ #include #include -#include -#include -#include +#include +#include +#include #include "test_config.h" // NOLINT(build/include) -#include "ignition/gui/Application.hh" -#include "ignition/gui/MainWindow.hh" -#include "ignition/gui/Plugin.hh" +#include "gz/gui/Application.hh" +#include "gz/gui/MainWindow.hh" +#include "gz/gui/Plugin.hh" #include "PointCloud.hh" int g_argc = 1; @@ -34,7 +34,7 @@ char* g_argv[] = reinterpret_cast(const_cast("./PointCloud_TEST")), }; -using namespace ignition; +using namespace gz; using namespace gui; ///////////////////////////////////////////////// diff --git a/src/plugins/publisher/Publisher.cc b/src/plugins/publisher/Publisher.cc index 39b30ac9e..d95d9b8eb 100644 --- a/src/plugins/publisher/Publisher.cc +++ b/src/plugins/publisher/Publisher.cc @@ -19,17 +19,17 @@ #ifdef _MSC_VER #pragma warning(push, 0) #endif -#include +#include #ifdef _MSC_VER #pragma warning(pop) #endif -#include -#include -#include +#include +#include +#include #include "Publisher.hh" -namespace ignition +namespace gz { namespace gui { @@ -38,7 +38,7 @@ namespace plugins class PublisherPrivate { /// \brief Message type - public: QString msgType = "ignition.msgs.StringMsg"; + public: QString msgType = "gz.msgs.StringMsg"; /// \brief Message contents public: QString msgData = "data: \"Hello\""; @@ -53,16 +53,16 @@ namespace plugins public: QTimer *timer; /// \brief Node for communication - public: ignition::transport::Node node; + public: gz::transport::Node node; /// \brief Publisher - public: ignition::transport::Node::Publisher pub; + public: gz::transport::Node::Publisher pub; }; } } } -using namespace ignition; +using namespace gz; using namespace gui; using namespace plugins; @@ -115,7 +115,7 @@ void Publisher::OnPublish(const bool _checked) this->dataPtr->timer->stop(); this->disconnect(this->dataPtr->timer, 0, 0, 0); } - this->dataPtr->pub = ignition::transport::Node::Publisher(); + this->dataPtr->pub = gz::transport::Node::Publisher(); return; } @@ -124,10 +124,10 @@ void Publisher::OnPublish(const bool _checked) auto msgData = this->dataPtr->msgData.toStdString(); // Check it's possible to create message - auto msg = ignition::msgs::Factory::New(msgType, msgData); + auto msg = gz::msgs::Factory::New(msgType, msgData); if (!msg || (msg->DebugString() == "" && msgData != "")) { - ignerr << "Unable to create message of type[" << msgType << "] " + gzerr << "Unable to create message of type[" << msgType << "] " << "with data[" << msgData << "].\n"; // TODO(anyone): notify error and uncheck switch return; @@ -138,7 +138,7 @@ void Publisher::OnPublish(const bool _checked) if (!this->dataPtr->pub) { - ignerr << "Unable to publish on topic[" << topic << "] " + gzerr << "Unable to publish on topic[" << topic << "] " << "with message type[" << msgType << "].\n"; // TODO(anyone): notify error and uncheck switch return; @@ -155,7 +155,7 @@ void Publisher::OnPublish(const bool _checked) this->dataPtr->timer->setInterval(1000/this->dataPtr->frequency); this->connect(this->dataPtr->timer, &QTimer::timeout, [=]() { - auto newMsg = ignition::msgs::Factory::New(msgType, msgData); + auto newMsg = gz::msgs::Factory::New(msgType, msgData); this->dataPtr->pub.Publish(*newMsg); }); this->dataPtr->timer->start(); @@ -214,5 +214,5 @@ void Publisher::SetFrequency(const double _frequency) } // Register this plugin -IGNITION_ADD_PLUGIN(ignition::gui::plugins::Publisher, - ignition::gui::Plugin) +IGNITION_ADD_PLUGIN(gz::gui::plugins::Publisher, + gz::gui::Plugin) diff --git a/src/plugins/publisher/Publisher.hh b/src/plugins/publisher/Publisher.hh index 2ff95415f..db193c88b 100644 --- a/src/plugins/publisher/Publisher.hh +++ b/src/plugins/publisher/Publisher.hh @@ -15,12 +15,12 @@ * */ -#ifndef IGNITION_GUI_PLUGINS_PUBLISHER_HH_ -#define IGNITION_GUI_PLUGINS_PUBLISHER_HH_ +#ifndef GZ_GUI_PLUGINS_PUBLISHER_HH_ +#define GZ_GUI_PLUGINS_PUBLISHER_HH_ #include -#include "ignition/gui/Plugin.hh" +#include "gz/gui/Plugin.hh" #ifndef _WIN32 # define Publisher_EXPORTS_API @@ -32,7 +32,7 @@ # endif #endif -namespace ignition +namespace gz { namespace gui { @@ -94,12 +94,12 @@ namespace plugins public slots: void OnPublish(const bool _checked); /// \brief Get the message type as a string, for example - /// 'ignition.msgs.StringMsg' + /// 'gz.msgs.StringMsg' /// \return Message type public: Q_INVOKABLE QString MsgType() const; /// \brief Set the message type from a string, for example - /// 'ignition.msgs.StringMsg' + /// 'gz.msgs.StringMsg' /// \param[in] _msgType Message type public: Q_INVOKABLE void SetMsgType(const QString &_msgType); diff --git a/src/plugins/publisher/Publisher_TEST.cc b/src/plugins/publisher/Publisher_TEST.cc index 469a20c7e..cd7e61e5c 100644 --- a/src/plugins/publisher/Publisher_TEST.cc +++ b/src/plugins/publisher/Publisher_TEST.cc @@ -19,17 +19,17 @@ #ifdef _MSC_VER #pragma warning(push, 0) #endif -#include +#include #ifdef _MSC_VER #pragma warning(pop) #endif -#include -#include +#include +#include #include "test_config.h" // NOLINT(build/include) -#include "ignition/gui/Application.hh" -#include "ignition/gui/Plugin.hh" -#include "ignition/gui/MainWindow.hh" +#include "gz/gui/Application.hh" +#include "gz/gui/Plugin.hh" +#include "gz/gui/MainWindow.hh" #include "Publisher.hh" @@ -39,11 +39,11 @@ char* g_argv[] = reinterpret_cast(const_cast("./Publisher_TEST")), }; -using namespace ignition; +using namespace gz; using namespace gui; ///////////////////////////////////////////////// -// See https://github.com/ignitionrobotics/ign-gui/issues/75 +// See https://github.com/gazebosim/gz-gui/issues/75 TEST(PublisherTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Load)) { common::Console::SetVerbosity(4); @@ -104,7 +104,7 @@ TEST(PublisherTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Publish)) EXPECT_EQ(plugin->Title(), "Publisher!"); // Message type - EXPECT_EQ(plugin->MsgType(), "ignition.msgs.StringMsg"); + EXPECT_EQ(plugin->MsgType(), "gz.msgs.StringMsg"); // Message EXPECT_EQ(plugin->MsgData(), "data: \"Hello\""); @@ -190,7 +190,7 @@ TEST(PublisherTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Publish)) plugin->OnPublish(false); // Bad message type - msg combination - plugin->SetMsgType("ignition.msgs.StringMsg"); + plugin->SetMsgType("gz.msgs.StringMsg"); plugin->SetMsgData("banana: apple"); plugin->OnPublish(true); @@ -221,7 +221,7 @@ TEST(PublisherTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(ParamsFromSDF)) "" "/fruit" "number: 1 fruit {name:\"banana\"}" - "ignition.msgs.Fruits" + "gz.msgs.Fruits" "0.1" ""; @@ -245,7 +245,7 @@ TEST(PublisherTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(ParamsFromSDF)) EXPECT_EQ(plugin->Title(), "Publisher"); // Message type - EXPECT_EQ(plugin->MsgType(), "ignition.msgs.Fruits"); + EXPECT_EQ(plugin->MsgType(), "gz.msgs.Fruits"); // Message EXPECT_EQ(plugin->MsgData(), "number: 1 fruit {name:\"banana\"}"); diff --git a/src/plugins/scene3d/Scene3D.cc b/src/plugins/scene3d/Scene3D.cc index 2b7eee770..574bced9d 100644 --- a/src/plugins/scene3d/Scene3D.cc +++ b/src/plugins/scene3d/Scene3D.cc @@ -24,43 +24,43 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include -#include +#include -#include -#include +#include +#include // TODO(louise) Remove these pragmas once ign-rendering and ign-msgs // are disabling the warnings #ifdef _MSC_VER #pragma warning(push, 0) #endif -#include +#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #ifdef _MSC_VER #pragma warning(pop) #endif -#include +#include -#include "ignition/gui/Application.hh" -#include "ignition/gui/Conversions.hh" -#include "ignition/gui/GuiEvents.hh" -#include "ignition/gui/MainWindow.hh" +#include "gz/gui/Application.hh" +#include "gz/gui/Conversions.hh" +#include "gz/gui/GuiEvents.hh" +#include "gz/gui/MainWindow.hh" -namespace ignition +namespace gz { namespace gui { @@ -201,7 +201,7 @@ namespace plugins /// \brief Transport node for making service request and subscribing to /// pose topic - private: ignition::transport::Node node; + private: gz::transport::Node node; }; /// \brief Private data class for IgnRenderer @@ -265,7 +265,7 @@ namespace plugins } } -using namespace ignition; +using namespace gz; using namespace gui; using namespace plugins; @@ -313,13 +313,13 @@ void SceneManager::Request() if (publishers.size() > 0) break; std::this_thread::sleep_for(sleepDuration); - igndbg << "Waiting for service " << this->service << "\n"; + gzdbg << "Waiting for service " << this->service << "\n"; } if (publishers.empty() || !this->node.Request(this->service, &SceneManager::OnSceneSrvMsg, this)) { - ignerr << "Error making service request to " << this->service << std::endl; + gzerr << "Error making service request to " << this->service << std::endl; } } @@ -426,7 +426,7 @@ void SceneManager::OnSceneSrvMsg(const msgs::Scene &_msg, const bool result) { if (!result) { - ignerr << "Error making service request to " << this->service + gzerr << "Error making service request to " << this->service << std::endl; return; } @@ -440,13 +440,13 @@ void SceneManager::OnSceneSrvMsg(const msgs::Scene &_msg, const bool result) { if (!this->node.Subscribe(this->poseTopic, &SceneManager::OnPoseVMsg, this)) { - ignerr << "Error subscribing to pose topic: " << this->poseTopic + gzerr << "Error subscribing to pose topic: " << this->poseTopic << std::endl; } } else { - ignwarn << "The pose topic, set via , for the Scene3D plugin " + gzwarn << "The pose topic, set via , for the Scene3D plugin " << "is missing or empty. Please set this topic so that the Scene3D " << "can receive and process pose information.\n"; } @@ -456,13 +456,13 @@ void SceneManager::OnSceneSrvMsg(const msgs::Scene &_msg, const bool result) if (!this->node.Subscribe(this->deletionTopic, &SceneManager::OnDeletionMsg, this)) { - ignerr << "Error subscribing to deletion topic: " << this->deletionTopic + gzerr << "Error subscribing to deletion topic: " << this->deletionTopic << std::endl; } } else { - ignwarn << "The deletion topic, set via , for the " + gzwarn << "The deletion topic, set via , for the " << "Scene3D plugin is missing or empty. Please set this topic so that " << "the Scene3D can receive and process deletion information.\n"; } @@ -472,13 +472,13 @@ void SceneManager::OnSceneSrvMsg(const msgs::Scene &_msg, const bool result) if (!this->node.Subscribe( this->sceneTopic, &SceneManager::OnSceneMsg, this)) { - ignerr << "Error subscribing to scene topic: " << this->sceneTopic + gzerr << "Error subscribing to scene topic: " << this->sceneTopic << std::endl; } } else { - ignwarn << "The scene topic, set via , for the " + gzwarn << "The scene topic, set via , for the " << "Scene3D plugin is missing or empty. Please set this topic so that " << "the Scene3D can receive and process scene information.\n"; } @@ -498,7 +498,7 @@ void SceneManager::LoadScene(const msgs::Scene &_msg) if (modelVis) rootVis->AddChild(modelVis); else - ignerr << "Failed to load model: " << _msg.model(i).name() << std::endl; + gzerr << "Failed to load model: " << _msg.model(i).name() << std::endl; } } @@ -511,7 +511,7 @@ void SceneManager::LoadScene(const msgs::Scene &_msg) if (light) rootVis->AddChild(light); else - ignerr << "Failed to load light: " << _msg.light(i).name() << std::endl; + gzerr << "Failed to load light: " << _msg.light(i).name() << std::endl; } } } @@ -531,7 +531,7 @@ rendering::VisualPtr SceneManager::LoadModel(const msgs::Model &_msg) if (linkVis) modelVis->AddChild(linkVis); else - ignerr << "Failed to load link: " << _msg.link(i).name() << std::endl; + gzerr << "Failed to load link: " << _msg.link(i).name() << std::endl; } // load nested models @@ -541,7 +541,7 @@ rendering::VisualPtr SceneManager::LoadModel(const msgs::Model &_msg) if (nestedModelVis) modelVis->AddChild(nestedModelVis); else - ignerr << "Failed to load nested model: " << _msg.model(i).name() + gzerr << "Failed to load nested model: " << _msg.model(i).name() << std::endl; } @@ -563,7 +563,7 @@ rendering::VisualPtr SceneManager::LoadLink(const msgs::Link &_msg) if (visualVis) linkVis->AddChild(visualVis); else - ignerr << "Failed to load visual: " << _msg.visual(i).name() << std::endl; + gzerr << "Failed to load visual: " << _msg.visual(i).name() << std::endl; } // load lights @@ -573,7 +573,7 @@ rendering::VisualPtr SceneManager::LoadLink(const msgs::Link &_msg) if (light) linkVis->AddChild(light); else - ignerr << "Failed to load light: " << _msg.light(i).name() << std::endl; + gzerr << "Failed to load light: " << _msg.light(i).name() << std::endl; } return linkVis; @@ -666,7 +666,7 @@ rendering::VisualPtr SceneManager::LoadVisual(const msgs::Visual &_msg) } else { - ignerr << "Failed to load geometry for visual: " << _msg.name() + gzerr << "Failed to load geometry for visual: " << _msg.name() << std::endl; } @@ -741,7 +741,7 @@ rendering::GeometryPtr SceneManager::LoadGeometry(const msgs::Geometry &_msg, { if (_msg.mesh().filename().empty()) { - ignerr << "Mesh geometry missing filename" << std::endl; + gzerr << "Mesh geometry missing filename" << std::endl; return geom; } rendering::MeshDescriptor descriptor; @@ -749,8 +749,8 @@ rendering::GeometryPtr SceneManager::LoadGeometry(const msgs::Geometry &_msg, // Assume absolute path to mesh file descriptor.meshName = _msg.mesh().filename(); - ignition::common::MeshManager* meshManager = - ignition::common::MeshManager::Instance(); + gz::common::MeshManager* meshManager = + gz::common::MeshManager::Instance(); descriptor.mesh = meshManager->Load(descriptor.meshName); geom = this->scene->CreateMesh(descriptor); @@ -758,7 +758,7 @@ rendering::GeometryPtr SceneManager::LoadGeometry(const msgs::Geometry &_msg, } else { - ignerr << "Unsupported geometry type" << std::endl; + gzerr << "Unsupported geometry type" << std::endl; } _scale = scale; _localPose = localPose; @@ -820,7 +820,7 @@ rendering::LightPtr SceneManager::LoadLight(const msgs::Light &_msg) break; } default: - ignerr << "Light type not supported" << std::endl; + gzerr << "Light type not supported" << std::endl; return light; } @@ -903,10 +903,10 @@ void IgnRenderer::Render() // update and render to texture this->dataPtr->camera->Update(); - if (ignition::gui::App()) + if (gz::gui::App()) { - ignition::gui::App()->sendEvent( - ignition::gui::App()->findChild(), + gz::gui::App()->sendEvent( + gz::gui::App()->findChild(), new gui::events::Render()); } } @@ -1124,7 +1124,7 @@ std::string IgnRenderer::Initialize() std::map params; params["useCurrentGLContext"] = "1"; params["winID"] = std::to_string( - ignition::gui::App()->findChild()-> + gz::gui::App()->findChild()-> QuickWindow()->winId()); engine = rendering::engine(this->engineName, params); } @@ -1132,7 +1132,7 @@ std::string IgnRenderer::Initialize() { if (loadedEngines.front() != this->engineName) { - ignwarn << "Failed to load engine [" << this->engineName + gzwarn << "Failed to load engine [" << this->engineName << "]. Using engine [" << loadedEngines.front() << "], which is already loaded. Currently only one engine is " << "supported at a time." << std::endl; @@ -1149,7 +1149,7 @@ std::string IgnRenderer::Initialize() auto scene = engine->SceneByName(this->sceneName); if (!scene) { - igndbg << "Create scene [" << this->sceneName << "]" << std::endl; + gzdbg << "Create scene [" << this->sceneName << "]" << std::endl; scene = engine->CreateScene(this->sceneName); scene->SetAmbientLight(this->ambientLight); scene->SetBackgroundColor(this->backgroundColor); @@ -1205,7 +1205,7 @@ void IgnRenderer::Destroy() // If that was the last sensor, destroy scene if (scene->SensorCount() == 0) { - igndbg << "Destroy scene [" << scene->Name() << "]" << std::endl; + gzdbg << "Destroy scene [" << scene->Name() << "]" << std::endl; engine->DestroyScene(scene); // TODO(anyone) If that was the last scene, terminate engine? @@ -1285,7 +1285,7 @@ void RenderThread::RenderNext() // check if engine has been successfully initialized if (!this->ignRenderer.initialized) { - ignerr << "Unable to initialize renderer" << std::endl; + gzerr << "Unable to initialize renderer" << std::endl; return; } @@ -1324,7 +1324,7 @@ void RenderThread::SizeChanged() auto item = qobject_cast(this->sender()); if (!item) { - ignerr << "Internal error, sender is not QQuickItem." << std::endl; + gzerr << "Internal error, sender is not QQuickItem." << std::endl; return; } @@ -1388,7 +1388,7 @@ void TextureNode::PrepareNode() newId, sz, QQuickWindow::TextureIsOpaque); #else // TODO(anyone) Use createTextureFromNativeObject - // https://github.com/ignitionrobotics/ign-gui/issues/113 + // https://github.com/gazebosim/gz-gui/issues/113 #ifndef _WIN32 # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wdeprecated-declarations" @@ -1575,7 +1575,7 @@ void RenderWindowItem::SetSceneTopic(const std::string &_topic) Scene3D::Scene3D() : Plugin(), dataPtr(new Scene3DPrivate) { - ignwarn << "This plugin is deprecated on ign-gui v6 and will be removed on " + gzwarn << "This plugin is deprecated on ign-gui v6 and will be removed on " << "ign-gui v7. Use MinimalScene + TransportSceneManager instead." << std::endl; @@ -1595,7 +1595,7 @@ void Scene3D::LoadConfig(const tinyxml2::XMLElement *_pluginElem) this->PluginItem()->findChild(); if (!renderWindow) { - ignerr << "Unable to find Render Window item. " + gzerr << "Unable to find Render Window item. " << "Render window will not be created" << std::endl; return; } @@ -1684,7 +1684,7 @@ void Scene3D::LoadConfig(const tinyxml2::XMLElement *_pluginElem) } ///////////////////////////////////////////////// -void RenderWindowItem::OnHovered(const ignition::math::Vector2i &_hoverPos) +void RenderWindowItem::OnHovered(const gz::math::Vector2i &_hoverPos) { this->dataPtr->renderThread->ignRenderer.NewHoverEvent(_hoverPos); } @@ -1823,5 +1823,5 @@ void Scene3D::SetLoadingError(const QString &_loadingError) } // Register this plugin -IGNITION_ADD_PLUGIN(ignition::gui::plugins::Scene3D, - ignition::gui::Plugin) +IGNITION_ADD_PLUGIN(gz::gui::plugins::Scene3D, + gz::gui::Plugin) diff --git a/src/plugins/scene3d/Scene3D.hh b/src/plugins/scene3d/Scene3D.hh index 8844d2503..0068a00f7 100644 --- a/src/plugins/scene3d/Scene3D.hh +++ b/src/plugins/scene3d/Scene3D.hh @@ -15,24 +15,24 @@ * */ -#ifndef IGNITION_GUI_PLUGINS_SCENE3D_HH_ -#define IGNITION_GUI_PLUGINS_SCENE3D_HH_ +#ifndef GZ_GUI_PLUGINS_SCENE3D_HH_ +#define GZ_GUI_PLUGINS_SCENE3D_HH_ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include -#include +#include -#include "ignition/gui/qt.h" -#include "ignition/gui/Plugin.hh" +#include "gz/gui/qt.h" +#include "gz/gui/Plugin.hh" -namespace ignition +namespace gz { namespace gui { @@ -46,7 +46,7 @@ namespace plugins /// It is possible to orbit the camera around the scene with /// the mouse. Use other plugins to manage objects in the scene. /// - /// Only one plugin displaying an Gazebo Rendering scene can be used at a + /// Only one plugin displaying a Gazebo Rendering scene can be used at a /// time. /// /// ## Configuration @@ -335,7 +335,7 @@ namespace plugins /// \brief Called when the mouse hovers to a new position. /// \param[in] _hoverPos 2D coordinates of the hovered mouse position on /// the render window. - public: void OnHovered(const ignition::math::Vector2i &_hoverPos); + public: void OnHovered(const gz::math::Vector2i &_hoverPos); /// \brief Slot called when thread is ready to be started public Q_SLOTS: void Ready(); diff --git a/src/plugins/screenshot/Screenshot.cc b/src/plugins/screenshot/Screenshot.cc index 4ea87c1de..a5ed1eee7 100644 --- a/src/plugins/screenshot/Screenshot.cc +++ b/src/plugins/screenshot/Screenshot.cc @@ -18,29 +18,29 @@ #include -#include -#include -#include -#include +#include +#include +#include +#include #ifdef _MSC_VER #pragma warning(push, 0) #endif -#include -#include -#include -#include +#include +#include +#include +#include #ifdef _MSC_VER #pragma warning(pop) #endif -#include +#include -#include "ignition/gui/Application.hh" -#include "ignition/gui/GuiEvents.hh" -#include "ignition/gui/MainWindow.hh" +#include "gz/gui/Application.hh" +#include "gz/gui/GuiEvents.hh" +#include "gz/gui/MainWindow.hh" -namespace ignition +namespace gz { namespace gui { @@ -49,7 +49,7 @@ namespace plugins class ScreenshotPrivate { /// \brief Node for communication - public: ignition::transport::Node node; + public: gz::transport::Node node; /// \brief Screenshot service name public: std::string screenshotService; @@ -61,7 +61,7 @@ namespace plugins public: bool dirty{false}; /// \brief Pointer to the user camera. - public: ignition::rendering::CameraPtr userCamera{nullptr}; + public: gz::rendering::CameraPtr userCamera{nullptr}; /// \brief Saved screenshot filepath public: QString savedScreenshotPath = ""; @@ -70,13 +70,13 @@ namespace plugins } } -using namespace ignition; +using namespace gz; using namespace gui; using namespace plugins; ///////////////////////////////////////////////// Screenshot::Screenshot() - : ignition::gui::Plugin(), + : gz::gui::Plugin(), dataPtr(std::make_unique()) { std::string home; @@ -91,7 +91,7 @@ Screenshot::Screenshot() if (!common::createDirectories(this->dataPtr->directory)) { std::string defaultDir = common::joinPaths(home, ".ignition", "gui"); - ignerr << "Unable to create directory [" << this->dataPtr->directory + gzerr << "Unable to create directory [" << this->dataPtr->directory << "]. Changing default directory to: " << defaultDir << std::endl; @@ -115,7 +115,7 @@ void Screenshot::LoadConfig(const tinyxml2::XMLElement *) this->dataPtr->screenshotService = "/gui/screenshot"; this->dataPtr->node.Advertise(this->dataPtr->screenshotService, &Screenshot::ScreenshotService, this); - ignmsg << "Screenshot service on [" + gzmsg << "Screenshot service on [" << this->dataPtr->screenshotService << "]" << std::endl; App()->findChild()->installEventFilter(this); @@ -168,7 +168,7 @@ void Screenshot::SaveScreenshot() image.SetFromData(cameraImage.Data(), width, height, format); image.SavePNG(savePath); - igndbg << "Saved image to [" << savePath << "]" << std::endl; + gzdbg << "Saved image to [" << savePath << "]" << std::endl; this->dataPtr->dirty = false; @@ -194,7 +194,7 @@ void Screenshot::FindUserCamera() if (nullptr != cam) { this->dataPtr->userCamera = cam; - igndbg << "Screenshot plugin taking pictures of camera [" + gzdbg << "Screenshot plugin taking pictures of camera [" << this->dataPtr->userCamera->Name() << "]" << std::endl; break; } @@ -236,5 +236,5 @@ void Screenshot::SetSavedScreenshotPath(const QString &_filename) } // Register this plugin -IGNITION_ADD_PLUGIN(ignition::gui::plugins::Screenshot, - ignition::gui::Plugin) +IGNITION_ADD_PLUGIN(gz::gui::plugins::Screenshot, + gz::gui::Plugin) diff --git a/src/plugins/screenshot/Screenshot.hh b/src/plugins/screenshot/Screenshot.hh index cb56a383c..9921b3944 100644 --- a/src/plugins/screenshot/Screenshot.hh +++ b/src/plugins/screenshot/Screenshot.hh @@ -14,24 +14,24 @@ * limitations under the License. * */ -#ifndef IGNITION_GUI_PLUGINS_SCREENSHOT_HH_ -#define IGNITION_GUI_PLUGINS_SCREENSHOT_HH_ +#ifndef GZ_GUI_PLUGINS_SCREENSHOT_HH_ +#define GZ_GUI_PLUGINS_SCREENSHOT_HH_ #ifdef _MSC_VER #pragma warning(push, 0) #endif -#include -#include +#include +#include #ifdef _MSC_VER #pragma warning(pop) #endif #include -#include "ignition/gui/qt.h" -#include "ignition/gui/Plugin.hh" +#include "gz/gui/qt.h" +#include "gz/gui/Plugin.hh" -namespace ignition +namespace gz { namespace gui { diff --git a/src/plugins/screenshot/Screenshot_TEST.cc b/src/plugins/screenshot/Screenshot_TEST.cc index cd60f6c5f..c6e155226 100644 --- a/src/plugins/screenshot/Screenshot_TEST.cc +++ b/src/plugins/screenshot/Screenshot_TEST.cc @@ -17,9 +17,9 @@ #ifdef _MSC_VER #pragma warning(push, 0) #endif -#include -#include -#include +#include +#include +#include #ifdef _MSC_VER #pragma warning(pop) #endif @@ -27,16 +27,16 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include "test_config.h" // NOLINT(build/include) -#include "ignition/gui/Application.hh" -#include "ignition/gui/GuiEvents.hh" -#include "ignition/gui/MainWindow.hh" -#include "ignition/gui/Plugin.hh" +#include "gz/gui/Application.hh" +#include "gz/gui/GuiEvents.hh" +#include "gz/gui/MainWindow.hh" +#include "gz/gui/Plugin.hh" #include "Screenshot.hh" int g_argc = 1; @@ -45,7 +45,7 @@ char* g_argv[] = reinterpret_cast(const_cast("./Screenshot_TEST")), }; -using namespace ignition; +using namespace gz; using namespace gui; ///////////////////////////////////////////////// @@ -82,11 +82,11 @@ TEST(ScreenshotTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(Screenshot)) // ASSERT_EQ(plugins.size(), 2); // // --- Screenshot request --- - // std::function cb = - // [](const ignition::msgs::Boolean &/*_rep*/, const bool _result) + // std::function cb = + // [](const gz::msgs::Boolean &/*_rep*/, const bool _result) // { // if (!_result) - // ignerr << "Error saving screenshot" << std::endl; + // gzerr << "Error saving screenshot" << std::endl; // }; // // std::string screenshotService = "/gui/screenshot"; diff --git a/src/plugins/shutdown_button/ShutdownButton.cc b/src/plugins/shutdown_button/ShutdownButton.cc index 87a2ba0c2..7d8958333 100644 --- a/src/plugins/shutdown_button/ShutdownButton.cc +++ b/src/plugins/shutdown_button/ShutdownButton.cc @@ -17,12 +17,12 @@ #include "ShutdownButton.hh" -#include +#include -#include "ignition/gui/Application.hh" -#include "ignition/gui/MainWindow.hh" +#include "gz/gui/Application.hh" +#include "gz/gui/MainWindow.hh" -using namespace ignition; +using namespace gz; using namespace gui; using namespace plugins; @@ -45,9 +45,9 @@ void ShutdownButton::LoadConfig(const tinyxml2::XMLElement * /*_pluginElem*/) ///////////////////////////////////////////////// void ShutdownButton::OnStop() { - ignition::gui::App()->findChild()->QuickWindow()->close(); + gz::gui::App()->findChild()->QuickWindow()->close(); } // Register this plugin -IGNITION_ADD_PLUGIN(ignition::gui::plugins::ShutdownButton, - ignition::gui::Plugin) +IGNITION_ADD_PLUGIN(gz::gui::plugins::ShutdownButton, + gz::gui::Plugin) diff --git a/src/plugins/shutdown_button/ShutdownButton.hh b/src/plugins/shutdown_button/ShutdownButton.hh index f4489cb43..7af124b2f 100644 --- a/src/plugins/shutdown_button/ShutdownButton.hh +++ b/src/plugins/shutdown_button/ShutdownButton.hh @@ -15,10 +15,10 @@ * */ -#ifndef IGNITION_GUI_PLUGINS_SHUTDOWNBUTTON_HH_ -#define IGNITION_GUI_PLUGINS_SHUTDOWNBUTTON_HH_ +#ifndef GZ_GUI_PLUGINS_SHUTDOWNBUTTON_HH_ +#define GZ_GUI_PLUGINS_SHUTDOWNBUTTON_HH_ -#include "ignition/gui/Plugin.hh" +#include "gz/gui/Plugin.hh" #ifndef _WIN32 # define ShutdownButton_EXPORTS_API @@ -30,14 +30,14 @@ # endif #endif -namespace ignition +namespace gz { namespace gui { namespace plugins { /// \brief This plugin provides a shutdown button. - class ShutdownButton_EXPORTS_API ShutdownButton: public ignition::gui::Plugin + class ShutdownButton_EXPORTS_API ShutdownButton: public gz::gui::Plugin { Q_OBJECT diff --git a/src/plugins/shutdown_button/ShutdownButton_TEST.cc b/src/plugins/shutdown_button/ShutdownButton_TEST.cc index 3ffe7a5c5..caf458dcd 100644 --- a/src/plugins/shutdown_button/ShutdownButton_TEST.cc +++ b/src/plugins/shutdown_button/ShutdownButton_TEST.cc @@ -17,14 +17,14 @@ #include -#include -#include -#include +#include +#include +#include #include "test_config.h" // NOLINT(build/include) -#include "ignition/gui/Application.hh" -#include "ignition/gui/Plugin.hh" -#include "ignition/gui/MainWindow.hh" +#include "gz/gui/Application.hh" +#include "gz/gui/Plugin.hh" +#include "gz/gui/MainWindow.hh" #include "ShutdownButton.hh" int g_argc = 1; @@ -33,10 +33,10 @@ char* g_argv[] = reinterpret_cast(const_cast("./ShutdownButton_TEST")), }; -using namespace ignition; +using namespace gz; using namespace gui; -// See https://github.com/ignitionrobotics/ign-gui/issues/75 +// See https://github.com/gazebosim/gz-gui/issues/75 ///////////////////////////////////////////////// TEST(ShutdownButtonTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Load)) { diff --git a/src/plugins/tape_measure/TapeMeasure.cc b/src/plugins/tape_measure/TapeMeasure.cc index 422226dbc..256b9272f 100644 --- a/src/plugins/tape_measure/TapeMeasure.cc +++ b/src/plugins/tape_measure/TapeMeasure.cc @@ -15,25 +15,25 @@ * */ -#include +#include #include #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include "TapeMeasure.hh" -namespace ignition::gui +namespace gz::gui { class TapeMeasurePrivate { @@ -59,22 +59,22 @@ namespace ignition::gui /// \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; + public: gz::math::Vector3d startPoint = + gz::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; + public: gz::math::Vector3d endPoint = gz::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)}; + public: gz::math::Color + hoverColor{gz::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)}; + public: gz::math::Color + drawColor{gz::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. @@ -89,12 +89,12 @@ namespace ignition::gui }; } -using namespace ignition; +using namespace gz; using namespace gui; ///////////////////////////////////////////////// TapeMeasure::TapeMeasure() - : ignition::gui::Plugin(), + : gz::gui::Plugin(), dataPtr(std::make_unique()) { } @@ -108,9 +108,9 @@ void TapeMeasure::LoadConfig(const tinyxml2::XMLElement *) if (this->title.empty()) this->title = "Tape measure"; - ignition::gui::App()->findChild + gz::gui::App()->findChild ()->installEventFilter(this); - ignition::gui::App()->findChild + gz::gui::App()->findChild ()->QuickWindow()->installEventFilter(this); } @@ -129,9 +129,9 @@ void TapeMeasure::Measure() // 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(), + gz::gui::events::DropdownMenuEnabled dropdownMenuEnabledEvent(false); + gz::gui::App()->sendEvent( + gz::gui::App()->findChild(), &dropdownMenuEnabledEvent); } @@ -149,8 +149,8 @@ void TapeMeasure::Reset() 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->startPoint = gz::math::Vector3d::Zero; + this->dataPtr->endPoint = gz::math::Vector3d::Zero; this->dataPtr->distance = 0.0; this->dataPtr->measure = false; this->newDistance(); @@ -158,9 +158,9 @@ void TapeMeasure::Reset() // 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(), + gz::gui::events::DropdownMenuEnabled dropdownMenuEnabledEvent(true); + gz::gui::App()->sendEvent( + gz::gui::App()->findChild(), &dropdownMenuEnabledEvent); } @@ -178,51 +178,51 @@ void TapeMeasure::DeleteMarker(int _id) return; // Delete the previously created marker - ignition::msgs::Marker markerMsg; + gz::msgs::Marker markerMsg; markerMsg.set_ns(this->dataPtr->ns); markerMsg.set_id(_id); - markerMsg.set_action(ignition::msgs::Marker::DELETE_MARKER); + markerMsg.set_action(gz::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) + gz::math::Vector3d &_point, gz::math::Color &_color) { this->DeleteMarker(_id); - ignition::msgs::Marker markerMsg; + gz::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)); + markerMsg.set_action(gz::msgs::Marker::ADD_MODIFY); + markerMsg.set_type(gz::msgs::Marker::SPHERE); + gz::msgs::Set(markerMsg.mutable_material()->mutable_ambient(), _color); + gz::msgs::Set(markerMsg.mutable_material()->mutable_diffuse(), _color); + gz::msgs::Set(markerMsg.mutable_scale(), + gz::math::Vector3d(0.1, 0.1, 0.1)); + gz::msgs::Set(markerMsg.mutable_pose(), + gz::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) +void TapeMeasure::DrawLine(int _id, gz::math::Vector3d &_startPoint, + gz::math::Vector3d &_endPoint, gz::math::Color &_color) { this->DeleteMarker(_id); - ignition::msgs::Marker markerMsg; + gz::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); + markerMsg.set_action(gz::msgs::Marker::ADD_MODIFY); + markerMsg.set_type(gz::msgs::Marker::LINE_LIST); + gz::msgs::Set(markerMsg.mutable_material()->mutable_ambient(), _color); + gz::msgs::Set(markerMsg.mutable_material()->mutable_diffuse(), _color); + gz::msgs::Set(markerMsg.add_point(), _startPoint); + gz::msgs::Set(markerMsg.add_point(), _endPoint); this->dataPtr->node.Request("/marker", markerMsg); this->dataPtr->placedMarkers.insert(_id); @@ -231,16 +231,16 @@ void TapeMeasure::DrawLine(int _id, ignition::math::Vector3d &_startPoint, ///////////////////////////////////////////////// bool TapeMeasure::eventFilter(QObject *_obj, QEvent *_event) { - if (_event->type() == ignition::gui::events::HoverToScene::kType) + if (_event->type() == gz::gui::events::HoverToScene::kType) { auto hoverToSceneEvent = - reinterpret_cast(_event); + 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(); + gz::math::Vector3d point = hoverToSceneEvent->Point(); this->DrawPoint(this->dataPtr->currentId, point, this->dataPtr->hoverColor); @@ -255,16 +255,16 @@ bool TapeMeasure::eventFilter(QObject *_obj, QEvent *_event) } } } - else if (_event->type() == ignition::gui::events::LeftClickToScene::kType) + else if (_event->type() == gz::gui::events::LeftClickToScene::kType) { auto leftClickToSceneEvent = - reinterpret_cast(_event); + 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(); + gz::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 @@ -287,11 +287,11 @@ bool TapeMeasure::eventFilter(QObject *_obj, QEvent *_event) // Notify Scene3D that we are done using the right click, so it can // re-enable the settings menu - ignition::gui::events::DropdownMenuEnabled + gz::gui::events::DropdownMenuEnabled dropdownMenuEnabledEvent(true); - ignition::gui::App()->sendEvent( - ignition::gui::App()->findChild(), + gz::gui::App()->sendEvent( + gz::gui::App()->findChild(), &dropdownMenuEnabledEvent); } this->dataPtr->currentId = this->dataPtr->kEndPointId; @@ -316,7 +316,7 @@ bool TapeMeasure::eventFilter(QObject *_obj, QEvent *_event) } } // Cancel the current action if a right click is detected - else if (_event->type() == ignition::gui::events::RightClickToScene::kType) + else if (_event->type() == gz::gui::events::RightClickToScene::kType) { if (this->dataPtr->measure) { @@ -328,5 +328,5 @@ bool TapeMeasure::eventFilter(QObject *_obj, QEvent *_event) } // Register this plugin -IGNITION_ADD_PLUGIN(ignition::gui::TapeMeasure, - ignition::gui::Plugin) +IGNITION_ADD_PLUGIN(gz::gui::TapeMeasure, + gz::gui::Plugin) diff --git a/src/plugins/tape_measure/TapeMeasure.hh b/src/plugins/tape_measure/TapeMeasure.hh index ccf38ff94..d00fde984 100644 --- a/src/plugins/tape_measure/TapeMeasure.hh +++ b/src/plugins/tape_measure/TapeMeasure.hh @@ -14,23 +14,23 @@ * limitations under the License. * */ -#ifndef IGNITION_GAZEBO_GUI_TAPEMEASURE_HH_ -#define IGNITION_GAZEBO_GUI_TAPEMEASURE_HH_ +#ifndef GZ_GAZEBO_GUI_TAPEMEASURE_HH_ +#define GZ_GAZEBO_GUI_TAPEMEASURE_HH_ #include -#include -#include -#include +#include +#include +#include -namespace ignition +namespace gz { namespace gui { class TapeMeasurePrivate; /// \brief Provides buttons for the tape measure tool. - class TapeMeasure : public ignition::gui::Plugin + class TapeMeasure : public gz::gui::Plugin { Q_OBJECT @@ -63,8 +63,8 @@ namespace gui /// \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); + gz::math::Vector3d &_point, + gz::math::Color &_color); /// \brief Draws a line marker. Called to display the line between the /// start and end point of the tape measure. @@ -73,9 +73,9 @@ namespace gui /// \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); + gz::math::Vector3d &_startPoint, + gz::math::Vector3d &_endPoint, + gz::math::Color &_color); /// \brief Callback in Qt thread when the new measurement button is /// clicked. diff --git a/src/plugins/teleop/Teleop.cc b/src/plugins/teleop/Teleop.cc index 89b7b9255..8a4b8036c 100644 --- a/src/plugins/teleop/Teleop.cc +++ b/src/plugins/teleop/Teleop.cc @@ -19,7 +19,7 @@ #ifdef _MSC_VER #pragma warning(push, 0) #endif -#include +#include #ifdef _MSC_VER #pragma warning(pop) #endif @@ -28,12 +28,12 @@ #include -#include +#include -#include -#include +#include +#include -namespace ignition +namespace gz { namespace gui { @@ -54,13 +54,13 @@ namespace plugins class TeleopPrivate { /// \brief Node for communication. - public: ignition::transport::Node node; + public: gz::transport::Node node; /// \brief Topic. Set '/cmd_vel' as default. public: std::string topic = "/cmd_vel"; /// \brief Publisher. - public: ignition::transport::Node::Publisher cmdVelPub; + public: gz::transport::Node::Publisher cmdVelPub; /// \brief Linear velocity. public: double linearVel = 0; @@ -85,7 +85,7 @@ namespace plugins } } -using namespace ignition; +using namespace gz; using namespace gui; using namespace plugins; @@ -93,9 +93,9 @@ using namespace plugins; Teleop::Teleop(): Plugin(), dataPtr(std::make_unique()) { // Initialize publisher using default topic. - this->dataPtr->cmdVelPub = ignition::transport::Node::Publisher(); + this->dataPtr->cmdVelPub = gz::transport::Node::Publisher(); this->dataPtr->cmdVelPub = - this->dataPtr->node.Advertise + this->dataPtr->node.Advertise (this->dataPtr->topic); } @@ -108,14 +108,14 @@ void Teleop::LoadConfig(const tinyxml2::XMLElement *) if (this->title.empty()) this->title = "Teleop"; - ignition::gui::App()->findChild - ()->QuickWindow()->installEventFilter(this); + gz::gui::App()->findChild + ()->QuickWindow()->installEventFilter(this); } ///////////////////////////////////////////////// void Teleop::OnTeleopTwist() { - ignition::msgs::Twist cmdVelMsg; + gz::msgs::Twist cmdVelMsg; cmdVelMsg.mutable_linear()->set_x( this->dataPtr->linearDir * this->dataPtr->linearVel); @@ -123,7 +123,7 @@ void Teleop::OnTeleopTwist() this->dataPtr->angularDir * this->dataPtr->angularVel); if (!this->dataPtr->cmdVelPub.Publish(cmdVelMsg)) - ignerr << "ignition::msgs::Twist message couldn't be published at topic: " + gzerr << "gz::msgs::Twist message couldn't be published at topic: " << this->dataPtr->topic << std::endl; } @@ -131,20 +131,20 @@ void Teleop::OnTeleopTwist() void Teleop::OnTopicSelection(const QString &_topic) { this->dataPtr->topic = _topic.toStdString(); - ignmsg << "A new topic has been entered: '" << + gzmsg << "A new topic has been entered: '" << this->dataPtr->topic << " ' " <dataPtr->cmdVelPub = ignition::transport::Node::Publisher(); + this->dataPtr->cmdVelPub = gz::transport::Node::Publisher(); this->dataPtr->cmdVelPub = - this->dataPtr->node.Advertise + this->dataPtr->node.Advertise (this->dataPtr->topic); if(!this->dataPtr->cmdVelPub) { App()->findChild()->notifyWithDuration( QString::fromStdString("Error when advertising topic: " + this->dataPtr->topic), 4000); - ignerr << "Error when advertising topic: " << + gzerr << "Error when advertising topic: " << this->dataPtr->topic << std::endl; } else @@ -281,5 +281,5 @@ void Teleop::setAngularDirection(int _angularDir) } // Register this plugin -IGNITION_ADD_PLUGIN(ignition::gui::plugins::Teleop, - ignition::gui::Plugin) +IGNITION_ADD_PLUGIN(gz::gui::plugins::Teleop, + gz::gui::Plugin) diff --git a/src/plugins/teleop/Teleop.hh b/src/plugins/teleop/Teleop.hh index 187a77323..e14b1250f 100644 --- a/src/plugins/teleop/Teleop.hh +++ b/src/plugins/teleop/Teleop.hh @@ -15,15 +15,15 @@ * */ -#ifndef IGNITION_GUI_PLUGINS_TELEOP_HH_ -#define IGNITION_GUI_PLUGINS_TELEOP_HH_ +#ifndef GZ_GUI_PLUGINS_TELEOP_HH_ +#define GZ_GUI_PLUGINS_TELEOP_HH_ #include -#include +#include -#include -#include +#include +#include #ifndef _WIN32 # define Teleop_EXPORTS_API @@ -35,7 +35,7 @@ # endif #endif -namespace ignition +namespace gz { namespace gui { diff --git a/src/plugins/teleop/Teleop_TEST.cc b/src/plugins/teleop/Teleop_TEST.cc index 6fde4616c..d96b6beab 100644 --- a/src/plugins/teleop/Teleop_TEST.cc +++ b/src/plugins/teleop/Teleop_TEST.cc @@ -19,18 +19,18 @@ #ifdef _MSC_VER #pragma warning(push, 0) #endif -#include +#include #ifdef _MSC_VER #pragma warning(pop) #endif -#include +#include #include "test_config.h" // NOLINT(build/include) -#include "ignition/gui/Application.hh" -#include "ignition/gui/Plugin.hh" -#include "ignition/gui/MainWindow.hh" -#include "ignition/gui/qt.h" +#include "gz/gui/Application.hh" +#include "gz/gui/Plugin.hh" +#include "gz/gui/MainWindow.hh" +#include "gz/gui/qt.h" #include "Teleop.hh" @@ -40,7 +40,7 @@ char* g_argv[] = reinterpret_cast(const_cast("./Teleop_TEST")), }; -using namespace ignition; +using namespace gz; using namespace gui; class TeleopTest : public ::testing::Test diff --git a/src/plugins/topic_echo/TopicEcho.cc b/src/plugins/topic_echo/TopicEcho.cc index 629e2955c..30e73bb65 100644 --- a/src/plugins/topic_echo/TopicEcho.cc +++ b/src/plugins/topic_echo/TopicEcho.cc @@ -16,14 +16,14 @@ */ #include -#include -#include -#include +#include +#include +#include -#include "ignition/gui/Application.hh" +#include "gz/gui/Application.hh" #include "TopicEcho.hh" -namespace ignition +namespace gz { namespace gui { @@ -48,13 +48,13 @@ namespace plugins public: std::mutex mutex; /// \brief Node for communication - public: ignition::transport::Node node; + public: gz::transport::Node node; }; } } } -using namespace ignition; +using namespace gz; using namespace gui; using namespace plugins; @@ -110,7 +110,7 @@ void TopicEcho::OnEcho(const bool _checked) auto topic = this->dataPtr->topic.toStdString(); if (!this->dataPtr->node.Subscribe(topic, &TopicEcho::OnMessage, this)) { - ignerr << "Invalid topic [" << topic << "]" << std::endl; + gzerr << "Invalid topic [" << topic << "]" << std::endl; } } @@ -178,6 +178,6 @@ void TopicEcho::SetPaused(const bool &_paused) } // Register this plugin -IGNITION_ADD_PLUGIN(ignition::gui::plugins::TopicEcho, - ignition::gui::Plugin) +IGNITION_ADD_PLUGIN(gz::gui::plugins::TopicEcho, + gz::gui::Plugin) diff --git a/src/plugins/topic_echo/TopicEcho.hh b/src/plugins/topic_echo/TopicEcho.hh index 94f42e088..f335e2a2f 100644 --- a/src/plugins/topic_echo/TopicEcho.hh +++ b/src/plugins/topic_echo/TopicEcho.hh @@ -15,8 +15,8 @@ * */ -#ifndef IGNITION_GUI_PLUGINS_TOPICECHO_HH_ -#define IGNITION_GUI_PLUGINS_TOPICECHO_HH_ +#ifndef GZ_GUI_PLUGINS_TOPICECHO_HH_ +#define GZ_GUI_PLUGINS_TOPICECHO_HH_ #ifdef _MSC_VER #pragma warning(push, 0) @@ -28,9 +28,9 @@ #include -#include "ignition/gui/Plugin.hh" +#include "gz/gui/Plugin.hh" -namespace ignition +namespace gz { namespace gui { @@ -38,7 +38,7 @@ namespace plugins { class TopicEchoPrivate; - /// \brief Echo messages coming through an Gazebo Transport topic. + /// \brief Echo messages coming through a Gazebo Transport topic. /// /// ## Configuration /// This plugin doesn't accept any custom configuration. diff --git a/src/plugins/topic_echo/TopicEcho_TEST.cc b/src/plugins/topic_echo/TopicEcho_TEST.cc index dd28ebd6c..fc829ab65 100644 --- a/src/plugins/topic_echo/TopicEcho_TEST.cc +++ b/src/plugins/topic_echo/TopicEcho_TEST.cc @@ -17,14 +17,14 @@ #include -#include -#include +#include +#include -#include "ignition/gui/Iface.hh" -#include "ignition/gui/Plugin.hh" -#include "ignition/gui/MainWindow.hh" +#include "gz/gui/Iface.hh" +#include "gz/gui/Plugin.hh" +#include "gz/gui/MainWindow.hh" -using namespace ignition; +using namespace gz; using namespace gui; ///////////////////////////////////////////////// diff --git a/src/plugins/topic_viewer/TopicViewer.cc b/src/plugins/topic_viewer/TopicViewer.cc index 130b76ac4..0752b3021 100644 --- a/src/plugins/topic_viewer/TopicViewer.cc +++ b/src/plugins/topic_viewer/TopicViewer.cc @@ -24,14 +24,14 @@ #include #include -#include +#include -#include -#include -#include +#include +#include +#include -#include -#include +#include +#include #include "TopicViewer.hh" #define NAME_KEY "name" @@ -46,7 +46,7 @@ #define PATH_ROLE 54 #define PLOT_ROLE 55 -namespace ignition +namespace gz { namespace gui { @@ -73,7 +73,7 @@ namespace plugins class TopicViewerPrivate { /// \brief Node for Commincation - public: ignition::transport::Node node; + public: gz::transport::Node node; /// \brief Model to create it from the available topics and messages public: TopicsModel *model; @@ -146,7 +146,7 @@ namespace plugins } } -using namespace ignition; +using namespace gz; using namespace gui; using namespace plugins; @@ -163,7 +163,7 @@ TopicViewer::TopicViewer() : Plugin(), dataPtr(new TopicViewerPrivate) this->dataPtr->CreateModel(); - ignition::gui::App()->Engine()->rootContext()->setContextProperty( + gz::gui::App()->Engine()->rootContext()->setContextProperty( "TopicsModel", this->dataPtr->model); this->dataPtr->timer = new QTimer(); @@ -199,7 +199,7 @@ void TopicViewerPrivate::CreateModel() for (unsigned int i = 0; i < topics.size(); ++i) { - std::vector infoMsgs; + std::vector infoMsgs; this->node.TopicInfo(topics[i], infoMsgs); std::string msgType = infoMsgs[0].MsgTypeName(); this->AddTopic(topics[i], msgType); @@ -241,17 +241,17 @@ void TopicViewerPrivate::AddField(QStandardItem *_parentItem, _parentItem->appendRow(msgItem); } - auto msg = ignition::msgs::Factory::New(_msgType); + auto msg = gz::msgs::Factory::New(_msgType); if (!msg) { - ignwarn << "Null Msg: " << _msgType << std::endl; + gzwarn << "Null Msg: " << _msgType << std::endl; return; } auto msgDescriptor = msg->GetDescriptor(); if (!msgDescriptor) { - ignwarn << "Null Descriptor of Msg: " << _msgType << std::endl; + gzwarn << "Null Descriptor of Msg: " << _msgType << std::endl; return; } @@ -384,7 +384,7 @@ void TopicViewer::UpdateModel() for (unsigned int i = 0; i < topics.size(); ++i) { // get the msg type - std::vector infoMsgs; + std::vector infoMsgs; this->dataPtr->node.TopicInfo(topics[i], infoMsgs); std::string msgType = infoMsgs[0].MsgTypeName(); @@ -425,5 +425,5 @@ void TopicViewer::UpdateModel() // Register this plugin -IGNITION_ADD_PLUGIN(ignition::gui::plugins::TopicViewer, - ignition::gui::Plugin) +IGNITION_ADD_PLUGIN(gz::gui::plugins::TopicViewer, + gz::gui::Plugin) diff --git a/src/plugins/topic_viewer/TopicViewer.hh b/src/plugins/topic_viewer/TopicViewer.hh index ec4e73185..a8839bbbf 100644 --- a/src/plugins/topic_viewer/TopicViewer.hh +++ b/src/plugins/topic_viewer/TopicViewer.hh @@ -16,7 +16,7 @@ */ #include -#include +#include #ifndef _WIN32 # define TopicViewer_EXPORTS_API @@ -28,7 +28,7 @@ # endif #endif -namespace ignition +namespace gz { namespace gui { diff --git a/src/plugins/topic_viewer/TopicViewer_TEST.cc b/src/plugins/topic_viewer/TopicViewer_TEST.cc index 5a4cbd7e0..fdf6112a9 100644 --- a/src/plugins/topic_viewer/TopicViewer_TEST.cc +++ b/src/plugins/topic_viewer/TopicViewer_TEST.cc @@ -16,14 +16,14 @@ */ #include -#include -#include -#include +#include +#include +#include #include "test_config.h" // NOLINT(build/include) -#include "ignition/gui/Application.hh" -#include "ignition/gui/Plugin.hh" -#include "ignition/gui/MainWindow.hh" +#include "gz/gui/Application.hh" +#include "gz/gui/Plugin.hh" +#include "gz/gui/MainWindow.hh" #include "TopicViewer.hh" #define NAME_ROLE 51 @@ -39,12 +39,12 @@ char* g_argv[] = reinterpret_cast(const_cast("./TopicViewer_TEST")), }; -using namespace ignition; +using namespace gz; using namespace gui; using namespace plugins; ///////////////////////////////////////////////// -// See https://github.com/ignitionrobotics/ign-gui/issues/75 +// See https://github.com/gazebosim/gz-gui/issues/75 TEST(TopicViewerTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Load)) { common::Console::SetVerbosity(4); @@ -70,7 +70,7 @@ TEST(TopicViewerTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Load)) } ///////////////////////////////////////////////// -// See https://github.com/ignitionrobotics/ign-gui/issues/75 +// See https://github.com/gazebosim/gz-gui/issues/75 TEST(TopicViewerTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Model)) { setenv("IGN_PARTITION", "ign-gazebo-test", 1); @@ -145,7 +145,7 @@ TEST(TopicViewerTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Model)) { foundCollision = true; - EXPECT_EQ(child->data(TYPE_ROLE), "ignition.msgs.Collision"); + EXPECT_EQ(child->data(TYPE_ROLE), "gz.msgs.Collision"); EXPECT_EQ(child->rowCount(), 8); auto pose = child->child(5); @@ -162,7 +162,7 @@ TEST(TopicViewerTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Model)) { foundInt = true; - EXPECT_EQ(child->data(TYPE_ROLE), "ignition.msgs.Int32"); + EXPECT_EQ(child->data(TYPE_ROLE), "gz.msgs.Int32"); EXPECT_EQ(child->rowCount(), 2); auto data = child->child(1); diff --git a/src/plugins/transport_scene_manager/TransportSceneManager.cc b/src/plugins/transport_scene_manager/TransportSceneManager.cc index 2dac5a9a0..a9322a46d 100644 --- a/src/plugins/transport_scene_manager/TransportSceneManager.cc +++ b/src/plugins/transport_scene_manager/TransportSceneManager.cc @@ -24,40 +24,40 @@ #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include // TODO(louise) Remove these pragmas once ign-rendering and ign-msgs // are disabling the warnings #ifdef _MSC_VER #pragma warning(push, 0) #endif -#include +#include -#include -#include -#include -#include +#include +#include +#include +#include #ifdef _MSC_VER #pragma warning(pop) #endif -#include -#include +#include +#include -#include "ignition/gui/Application.hh" -#include "ignition/gui/Conversions.hh" -#include "ignition/gui/GuiEvents.hh" -#include "ignition/gui/MainWindow.hh" +#include "gz/gui/Application.hh" +#include "gz/gui/Conversions.hh" +#include "gz/gui/GuiEvents.hh" +#include "gz/gui/MainWindow.hh" #include "TransportSceneManager.hh" /// \brief Private data class for TransportSceneManager -class ignition::gui::plugins::TransportSceneManagerPrivate +class gz::gui::plugins::TransportSceneManagerPrivate { /// \brief Make the scene service request and populate the scene public: void Request(); @@ -168,13 +168,13 @@ class ignition::gui::plugins::TransportSceneManagerPrivate /// \brief Transport node for making service request and subscribing to /// pose topic - public: ignition::transport::Node node; + public: gz::transport::Node node; /// \brief Thread to wait for transport initialization public: std::thread initializeTransport; }; -using namespace ignition; +using namespace gz; using namespace gui; using namespace plugins; @@ -243,7 +243,7 @@ void TransportSceneManager::LoadConfig(const tinyxml2::XMLElement *_pluginElem) this->dataPtr->deletionTopic.empty() || this->dataPtr->sceneTopic.empty()) { - ignerr << "One or more transport parameters invalid:" << std::endl + gzerr << "One or more transport parameters invalid:" << std::endl << " * : " << this->dataPtr->service << std::endl << " * : " << this->dataPtr->poseTopic << std::endl << " * : " << this->dataPtr->deletionTopic << std::endl @@ -263,40 +263,40 @@ void TransportSceneManagerPrivate::InitializeTransport() if (!this->node.Subscribe(this->poseTopic, &TransportSceneManagerPrivate::OnPoseVMsg, this)) { - ignerr << "Error subscribing to pose topic: " << this->poseTopic + gzerr << "Error subscribing to pose topic: " << this->poseTopic << std::endl; } else { - ignmsg << "Listening to pose messages on [" << this->poseTopic << "]" + gzmsg << "Listening to pose messages on [" << this->poseTopic << "]" << std::endl; } if (!this->node.Subscribe(this->deletionTopic, &TransportSceneManagerPrivate::OnDeletionMsg, this)) { - ignerr << "Error subscribing to deletion topic: " << this->deletionTopic + gzerr << "Error subscribing to deletion topic: " << this->deletionTopic << std::endl; } else { - ignmsg << "Listening to deletion messages on [" << this->deletionTopic + gzmsg << "Listening to deletion messages on [" << this->deletionTopic << "]" << std::endl; } if (!this->node.Subscribe(this->sceneTopic, &TransportSceneManagerPrivate::OnSceneMsg, this)) { - ignerr << "Error subscribing to scene topic: " << this->sceneTopic + gzerr << "Error subscribing to scene topic: " << this->sceneTopic << std::endl; } else { - ignmsg << "Listening to scene messages on [" << this->sceneTopic << "]" + gzmsg << "Listening to scene messages on [" << this->sceneTopic << "]" << std::endl; } - ignmsg << "Transport initialized." << std::endl; + gzmsg << "Transport initialized." << std::endl; } ///////////////////////////////////////////////// @@ -324,13 +324,13 @@ void TransportSceneManagerPrivate::Request() if (publishers.size() > 0) break; std::this_thread::sleep_for(sleepDuration); - igndbg << "Waiting for service [" << this->service << "]\n"; + gzdbg << "Waiting for service [" << this->service << "]\n"; } if (publishers.empty() || !this->node.Request(this->service, &TransportSceneManagerPrivate::OnSceneSrvMsg, this)) { - ignerr << "Error making service request to [" << this->service << "]" + gzerr << "Error making service request to [" << this->service << "]" << std::endl; } } @@ -446,7 +446,7 @@ void TransportSceneManagerPrivate::OnSceneSrvMsg(const msgs::Scene &_msg, { if (!result) { - ignerr << "Error making service request to " << this->service + gzerr << "Error making service request to " << this->service << std::endl; return; } @@ -472,7 +472,7 @@ void TransportSceneManagerPrivate::LoadScene(const msgs::Scene &_msg) if (modelVis) rootVis->AddChild(modelVis); else - ignerr << "Failed to load model: " << _msg.model(i).name() << std::endl; + gzerr << "Failed to load model: " << _msg.model(i).name() << std::endl; } } @@ -485,7 +485,7 @@ void TransportSceneManagerPrivate::LoadScene(const msgs::Scene &_msg) if (light) rootVis->AddChild(light); else - ignerr << "Failed to load light: " << _msg.light(i).name() << std::endl; + gzerr << "Failed to load light: " << _msg.light(i).name() << std::endl; } } } @@ -515,7 +515,7 @@ rendering::VisualPtr TransportSceneManagerPrivate::LoadModel( if (linkVis) modelVis->AddChild(linkVis); else - ignerr << "Failed to load link: " << _msg.link(i).name() << std::endl; + gzerr << "Failed to load link: " << _msg.link(i).name() << std::endl; } // load nested models @@ -525,7 +525,7 @@ rendering::VisualPtr TransportSceneManagerPrivate::LoadModel( if (nestedModelVis) modelVis->AddChild(nestedModelVis); else - ignerr << "Failed to load nested model: " << _msg.model(i).name() + gzerr << "Failed to load nested model: " << _msg.model(i).name() << std::endl; } @@ -557,7 +557,7 @@ rendering::VisualPtr TransportSceneManagerPrivate::LoadLink( if (visualVis) linkVis->AddChild(visualVis); else - ignerr << "Failed to load visual: " << _msg.visual(i).name() << std::endl; + gzerr << "Failed to load visual: " << _msg.visual(i).name() << std::endl; } // load lights @@ -567,7 +567,7 @@ rendering::VisualPtr TransportSceneManagerPrivate::LoadLink( if (light) linkVis->AddChild(light); else - ignerr << "Failed to load light: " << _msg.light(i).name() << std::endl; + gzerr << "Failed to load light: " << _msg.light(i).name() << std::endl; } return linkVis; @@ -670,7 +670,7 @@ rendering::VisualPtr TransportSceneManagerPrivate::LoadVisual( } else { - ignerr << "Failed to load geometry for visual: " << _msg.name() + gzerr << "Failed to load geometry for visual: " << _msg.name() << std::endl; } @@ -746,7 +746,7 @@ rendering::GeometryPtr TransportSceneManagerPrivate::LoadGeometry( { if (_msg.mesh().filename().empty()) { - ignerr << "Mesh geometry missing filename" << std::endl; + gzerr << "Mesh geometry missing filename" << std::endl; return geom; } rendering::MeshDescriptor descriptor; @@ -754,8 +754,8 @@ rendering::GeometryPtr TransportSceneManagerPrivate::LoadGeometry( // Assume absolute path to mesh file descriptor.meshName = _msg.mesh().filename(); - ignition::common::MeshManager* meshManager = - ignition::common::MeshManager::Instance(); + gz::common::MeshManager* meshManager = + gz::common::MeshManager::Instance(); descriptor.mesh = meshManager->Load(descriptor.meshName); geom = this->scene->CreateMesh(descriptor); @@ -763,7 +763,7 @@ rendering::GeometryPtr TransportSceneManagerPrivate::LoadGeometry( } else { - ignerr << "Unsupported geometry type" << std::endl; + gzerr << "Unsupported geometry type" << std::endl; } _scale = scale; _localPose = localPose; @@ -827,7 +827,7 @@ rendering::LightPtr TransportSceneManagerPrivate::LoadLight( break; } default: - ignerr << "Light type not supported" << std::endl; + gzerr << "Light type not supported" << std::endl; return light; } @@ -875,5 +875,5 @@ void TransportSceneManagerPrivate::DeleteEntity(const unsigned int _entity) } // Register this plugin -IGNITION_ADD_PLUGIN(ignition::gui::plugins::TransportSceneManager, - ignition::gui::Plugin) +IGNITION_ADD_PLUGIN(gz::gui::plugins::TransportSceneManager, + gz::gui::Plugin) diff --git a/src/plugins/transport_scene_manager/TransportSceneManager.hh b/src/plugins/transport_scene_manager/TransportSceneManager.hh index 478ad9b71..d69ec624b 100644 --- a/src/plugins/transport_scene_manager/TransportSceneManager.hh +++ b/src/plugins/transport_scene_manager/TransportSceneManager.hh @@ -15,14 +15,14 @@ * */ -#ifndef IGNITION_GUI_PLUGINS_TRANSPORTSCENEMANAGER_HH_ -#define IGNITION_GUI_PLUGINS_TRANSPORTSCENEMANAGER_HH_ +#ifndef GZ_GUI_PLUGINS_TRANSPORTSCENEMANAGER_HH_ +#define GZ_GUI_PLUGINS_TRANSPORTSCENEMANAGER_HH_ #include -#include "ignition/gui/Plugin.hh" +#include "gz/gui/Plugin.hh" -namespace ignition +namespace gz { namespace gui { @@ -31,7 +31,7 @@ namespace plugins class TransportSceneManagerPrivate; /// \brief Provides a Gazebo Transport interface to - /// `ignition::gui::plugins::MinimalScene`. + /// `gz::gui::plugins::MinimalScene`. /// /// ## Configuration /// diff --git a/src/plugins/world_control/WorldControl.cc b/src/plugins/world_control/WorldControl.cc index 35559bda3..fea859288 100644 --- a/src/plugins/world_control/WorldControl.cc +++ b/src/plugins/world_control/WorldControl.cc @@ -19,16 +19,16 @@ #include -#include -#include -#include +#include +#include +#include -#include "ignition/gui/Application.hh" -#include "ignition/gui/Helpers.hh" -#include "ignition/gui/GuiEvents.hh" -#include "ignition/gui/MainWindow.hh" +#include "gz/gui/Application.hh" +#include "gz/gui/Helpers.hh" +#include "gz/gui/GuiEvents.hh" +#include "gz/gui/MainWindow.hh" -namespace ignition +namespace gz { namespace gui { @@ -38,10 +38,10 @@ namespace plugins { /// \brief Send the world control event or call the control service. /// \param[in] _msg Message to send. - public: void SendEventMsg(const ignition::msgs::WorldControl &_msg); + public: void SendEventMsg(const gz::msgs::WorldControl &_msg); /// \brief Message holding latest world statistics - public: ignition::msgs::WorldStatistics msg; + public: gz::msgs::WorldStatistics msg; /// \brief Service to send world control requests public: std::string controlService; @@ -50,7 +50,7 @@ namespace plugins public: std::recursive_mutex mutex; /// \brief Communication node - public: ignition::transport::Node node; + public: gz::transport::Node node; /// \brief The multi step value public: unsigned int multiStep = 1u; @@ -71,7 +71,7 @@ namespace plugins } } -using namespace ignition; +using namespace gz; using namespace gui; using namespace plugins; @@ -96,7 +96,7 @@ void WorldControl::LoadConfig(const tinyxml2::XMLElement *_pluginElem) // Create elements from configuration if (!_pluginElem) { - ignerr << "Null plugin element." << std::endl; + gzerr << "Null plugin element." << std::endl; return; } @@ -129,7 +129,7 @@ void WorldControl::LoadConfig(const tinyxml2::XMLElement *_pluginElem) parts[2] != worldName && parts[3] == "control") { - ignwarn << "Ignoring service [" << this->dataPtr->controlService + gzwarn << "Ignoring service [" << this->dataPtr->controlService << "], world name different from [" << worldName << "]. Fix or remove your tag." << std::endl; @@ -141,7 +141,7 @@ void WorldControl::LoadConfig(const tinyxml2::XMLElement *_pluginElem) { if (worldName.empty()) { - ignerr << "Must specify a for world control requests, or set " + gzerr << "Must specify a for world control requests, or set " << "the MainWindow's [worldNames] property." << std::endl; return; } @@ -153,11 +153,11 @@ void WorldControl::LoadConfig(const tinyxml2::XMLElement *_pluginElem) if (this->dataPtr->controlService.empty()) { - ignerr << "Failed to create valid control service for world [" << worldName + gzerr << "Failed to create valid control service for world [" << worldName << "]" << std::endl; } - ignmsg << "Using world control service [" << this->dataPtr->controlService + gzmsg << "Using world control service [" << this->dataPtr->controlService << "]" << std::endl; // Play / pause buttons @@ -206,7 +206,7 @@ void WorldControl::LoadConfig(const tinyxml2::XMLElement *_pluginElem) parts[2] != worldName && parts[3] == "stats") { - ignwarn << "Ignoring topic [" << statsTopic + gzwarn << "Ignoring topic [" << statsTopic << "], world name different from [" << worldName << "]. Fix or remove your tag." << std::endl; @@ -225,16 +225,16 @@ void WorldControl::LoadConfig(const tinyxml2::XMLElement *_pluginElem) if (!this->dataPtr->node.Subscribe(statsTopic, &WorldControl::OnWorldStatsMsg, this)) { - ignerr << "Failed to subscribe to [" << statsTopic << "]" << std::endl; + gzerr << "Failed to subscribe to [" << statsTopic << "]" << std::endl; } else { - ignmsg << "Listening to stats on [" << statsTopic << "]" << std::endl; + gzmsg << "Listening to stats on [" << statsTopic << "]" << std::endl; } } else { - ignerr << "Failed to create valid topic for world [" << worldName << "]" + gzerr << "Failed to create valid topic for world [" << worldName << "]" << std::endl; } @@ -242,9 +242,9 @@ void WorldControl::LoadConfig(const tinyxml2::XMLElement *_pluginElem) elem->QueryBoolText(&this->dataPtr->useEvent); if (this->dataPtr->useEvent) - igndbg << "Using an event to share WorldControl msgs with the server\n"; + gzdbg << "Using an event to share WorldControl msgs with the server\n"; else - igndbg << "Using a service to share WorldControl msgs with the server\n"; + gzdbg << "Using a service to share WorldControl msgs with the server\n"; } ///////////////////////////////////////////////// @@ -275,7 +275,7 @@ void WorldControl::ProcessMsg() } ///////////////////////////////////////////////// -void WorldControl::OnWorldStatsMsg(const ignition::msgs::WorldStatistics &_msg) +void WorldControl::OnWorldStatsMsg(const gz::msgs::WorldStatistics &_msg) { std::lock_guard lock(this->dataPtr->mutex); @@ -286,7 +286,7 @@ void WorldControl::OnWorldStatsMsg(const ignition::msgs::WorldStatistics &_msg) ///////////////////////////////////////////////// void WorldControl::OnPlay() { - ignition::msgs::WorldControl msg; + gz::msgs::WorldControl msg; msg.set_pause(false); this->dataPtr->pause = false; this->dataPtr->SendEventMsg(msg); @@ -295,7 +295,7 @@ void WorldControl::OnPlay() ///////////////////////////////////////////////// void WorldControl::OnPause() { - ignition::msgs::WorldControl msg; + gz::msgs::WorldControl msg; msg.set_pause(true); this->dataPtr->pause = true; @@ -311,7 +311,7 @@ void WorldControl::OnStepCount(const unsigned int _steps) ///////////////////////////////////////////////// void WorldControl::OnStep() { - ignition::msgs::WorldControl msg; + gz::msgs::WorldControl msg; msg.set_pause(this->dataPtr->pause); msg.set_multi_step(this->dataPtr->multiStep); @@ -319,7 +319,7 @@ void WorldControl::OnStep() } ///////////////////////////////////////////////// -void WorldControlPrivate::SendEventMsg(const ignition::msgs::WorldControl &_msg) +void WorldControlPrivate::SendEventMsg(const gz::msgs::WorldControl &_msg) { if (this->useEvent) { @@ -328,8 +328,8 @@ void WorldControlPrivate::SendEventMsg(const ignition::msgs::WorldControl &_msg) } else { - std::function cb = - [](const ignition::msgs::Boolean &/*_rep*/, const bool /*_result*/) + std::function cb = + [](const gz::msgs::Boolean &/*_rep*/, const bool /*_result*/) { // the service CB is empty because updates are handled in // WorldControl::ProcessMsg @@ -339,5 +339,5 @@ void WorldControlPrivate::SendEventMsg(const ignition::msgs::WorldControl &_msg) } // Register this plugin -IGNITION_ADD_PLUGIN(ignition::gui::plugins::WorldControl, - ignition::gui::Plugin) +IGNITION_ADD_PLUGIN(gz::gui::plugins::WorldControl, + gz::gui::Plugin) diff --git a/src/plugins/world_control/WorldControl.hh b/src/plugins/world_control/WorldControl.hh index a434228a7..22dab4567 100644 --- a/src/plugins/world_control/WorldControl.hh +++ b/src/plugins/world_control/WorldControl.hh @@ -15,21 +15,21 @@ * */ -#ifndef IGNITION_GUI_PLUGINS_WORLDCONTROL_HH_ -#define IGNITION_GUI_PLUGINS_WORLDCONTROL_HH_ +#ifndef GZ_GUI_PLUGINS_WORLDCONTROL_HH_ +#define GZ_GUI_PLUGINS_WORLDCONTROL_HH_ #include #ifdef _MSC_VER #pragma warning(push, 0) #endif -#include +#include #ifdef _MSC_VER #pragma warning(pop) #endif -#include +#include -#include "ignition/gui/Plugin.hh" +#include "gz/gui/Plugin.hh" #ifndef _WIN32 # define WorldControl_EXPORTS_API @@ -41,7 +41,7 @@ # endif #endif -namespace ignition +namespace gz { namespace gui { @@ -67,7 +67,7 @@ namespace plugins /// /// If no elements are filled for the plugin, both the play/pause and the /// step buttons will be displayed. - class WorldControl_EXPORTS_API WorldControl: public ignition::gui::Plugin + class WorldControl_EXPORTS_API WorldControl: public gz::gui::Plugin { Q_OBJECT @@ -103,7 +103,7 @@ namespace plugins signals: void paused(); /// \brief Subscriber callback when new world statistics are received - private: void OnWorldStatsMsg(const ignition::msgs::WorldStatistics &_msg); + private: void OnWorldStatsMsg(const gz::msgs::WorldStatistics &_msg); // Private data private: std::unique_ptr dataPtr; diff --git a/src/plugins/world_control/WorldControlEventListener.cc b/src/plugins/world_control/WorldControlEventListener.cc index c076748c1..3c728da0b 100644 --- a/src/plugins/world_control/WorldControlEventListener.cc +++ b/src/plugins/world_control/WorldControlEventListener.cc @@ -17,20 +17,20 @@ #include "WorldControlEventListener.hh" -using namespace ignition; +using namespace gz; using namespace gui; WorldControlEventListener::WorldControlEventListener() { - ignition::gui::App()->findChild< - ignition::gui::MainWindow *>()->installEventFilter(this); + gz::gui::App()->findChild< + gz::gui::MainWindow *>()->installEventFilter(this); } WorldControlEventListener::~WorldControlEventListener() = default; bool WorldControlEventListener::eventFilter(QObject *_obj, QEvent *_event) { - if (_event->type() == ignition::gui::events::WorldControl::kType) + if (_event->type() == gz::gui::events::WorldControl::kType) { auto worldControlEvent = reinterpret_cast(_event); diff --git a/src/plugins/world_control/WorldControlEventListener.hh b/src/plugins/world_control/WorldControlEventListener.hh index 8b4d34a8b..8f288c089 100644 --- a/src/plugins/world_control/WorldControlEventListener.hh +++ b/src/plugins/world_control/WorldControlEventListener.hh @@ -14,16 +14,16 @@ * limitations under the License. * */ -#ifndef IGNITION_GUI_WORLDCONTROLEVENTLISTENER_HH_ -#define IGNITION_GUI_WORLDCONTROLEVENTLISTENER_HH_ +#ifndef GZ_GUI_WORLDCONTROLEVENTLISTENER_HH_ +#define GZ_GUI_WORLDCONTROLEVENTLISTENER_HH_ -#include "ignition/gui/Application.hh" -#include "ignition/gui/Export.hh" -#include "ignition/gui/GuiEvents.hh" -#include "ignition/gui/MainWindow.hh" -#include "ignition/gui/qt.h" +#include "gz/gui/Application.hh" +#include "gz/gui/Export.hh" +#include "gz/gui/GuiEvents.hh" +#include "gz/gui/MainWindow.hh" +#include "gz/gui/qt.h" -namespace ignition +namespace gz { namespace gui { diff --git a/src/plugins/world_control/WorldControl_TEST.cc b/src/plugins/world_control/WorldControl_TEST.cc index da1a2495b..9497fa90a 100644 --- a/src/plugins/world_control/WorldControl_TEST.cc +++ b/src/plugins/world_control/WorldControl_TEST.cc @@ -17,14 +17,14 @@ #include -#include -#include -#include +#include +#include +#include #include "test_config.h" // NOLINT(build/include) -#include "ignition/gui/Application.hh" -#include "ignition/gui/MainWindow.hh" -#include "ignition/gui/Plugin.hh" +#include "gz/gui/Application.hh" +#include "gz/gui/MainWindow.hh" +#include "gz/gui/Plugin.hh" #include "WorldControl.hh" #include "WorldControlEventListener.hh" @@ -34,10 +34,10 @@ char* g_argv[] = reinterpret_cast(const_cast("./WorldControl_TEST")), }; -using namespace ignition; +using namespace gz; using namespace gui; -// See https://github.com/ignitionrobotics/ign-gui/issues/75 +// See https://github.com/gazebosim/gz-gui/issues/75 ///////////////////////////////////////////////// TEST(WorldControlTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Load)) { @@ -338,7 +338,7 @@ TEST(WorldControlTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(WorldControlEvent)) EXPECT_EQ(plugin->Title(), "World Control!"); // World control event listener - ignition::gui::WorldControlEventListener eventListener; + gz::gui::WorldControlEventListener eventListener; EXPECT_FALSE(eventListener.listenedToPause); EXPECT_FALSE(eventListener.listenedToStep); EXPECT_FALSE(eventListener.listenedToPlay); diff --git a/src/plugins/world_stats/WorldStats.cc b/src/plugins/world_stats/WorldStats.cc index 7a9608dd8..a80b5f4a7 100644 --- a/src/plugins/world_stats/WorldStats.cc +++ b/src/plugins/world_stats/WorldStats.cc @@ -19,13 +19,13 @@ #include -#include -#include -#include +#include +#include +#include -#include "ignition/gui/Helpers.hh" +#include "gz/gui/Helpers.hh" -namespace ignition +namespace gz { namespace gui { @@ -34,13 +34,13 @@ namespace plugins class WorldStatsPrivate { /// \brief Message holding latest world statistics - public: ignition::msgs::WorldStatistics msg; + public: gz::msgs::WorldStatistics msg; /// \brief Mutex to protect msg public: std::recursive_mutex mutex; /// \brief Communication node - public: ignition::transport::Node node; + public: gz::transport::Node node; /// \brief Holds real time factor public: QString realTimeFactor; @@ -58,7 +58,7 @@ namespace plugins } } -using namespace ignition; +using namespace gz; using namespace gui; using namespace plugins; @@ -83,7 +83,7 @@ void WorldStats::LoadConfig(const tinyxml2::XMLElement *_pluginElem) // Create elements from configuration if (!_pluginElem) { - ignerr << "Null plugin element." << std::endl; + gzerr << "Null plugin element." << std::endl; return; } @@ -119,7 +119,7 @@ void WorldStats::LoadConfig(const tinyxml2::XMLElement *_pluginElem) parts[2] != worldName && parts[3] == "stats") { - ignwarn << "Ignoring topic [" << topic + gzwarn << "Ignoring topic [" << topic << "], world name different from [" << worldName << "]. Fix or remove your tag." << std::endl; @@ -130,7 +130,7 @@ void WorldStats::LoadConfig(const tinyxml2::XMLElement *_pluginElem) { if (worldName.empty()) { - ignerr << "Must specify a to subscribe to world statistics, or " + gzerr << "Must specify a to subscribe to world statistics, or " << "set the MainWindow's [worldNames] property." << std::endl; return; } @@ -141,7 +141,7 @@ void WorldStats::LoadConfig(const tinyxml2::XMLElement *_pluginElem) topic = transport::TopicUtils::AsValidTopic(topic); if (topic.empty()) { - ignerr << "Failed to create valid topic for world [" << worldName << "]" + gzerr << "Failed to create valid topic for world [" << worldName << "]" << std::endl; return; } @@ -149,11 +149,11 @@ void WorldStats::LoadConfig(const tinyxml2::XMLElement *_pluginElem) if (!this->dataPtr->node.Subscribe(topic, &WorldStats::OnWorldStatsMsg, this)) { - ignerr << "Failed to subscribe to [" << topic << "]" << std::endl; + gzerr << "Failed to subscribe to [" << topic << "]" << std::endl; return; } - ignmsg << "Listening to stats on [" << topic << "]" << std::endl; + gzmsg << "Listening to stats on [" << topic << "]" << std::endl; // Sim time if (auto simTimeElem = _pluginElem->FirstChildElement("sim_time")) @@ -235,7 +235,7 @@ void WorldStats::ProcessMsg() } ///////////////////////////////////////////////// -void WorldStats::OnWorldStatsMsg(const ignition::msgs::WorldStatistics &_msg) +void WorldStats::OnWorldStatsMsg(const gz::msgs::WorldStatistics &_msg) { std::lock_guard lock(this->dataPtr->mutex); @@ -296,5 +296,5 @@ void WorldStats::SetIterations(const QString &_iterations) } // Register this plugin -IGNITION_ADD_PLUGIN(ignition::gui::plugins::WorldStats, - ignition::gui::Plugin) +IGNITION_ADD_PLUGIN(gz::gui::plugins::WorldStats, + gz::gui::Plugin) diff --git a/src/plugins/world_stats/WorldStats.hh b/src/plugins/world_stats/WorldStats.hh index 472d1c096..6eb15da81 100644 --- a/src/plugins/world_stats/WorldStats.hh +++ b/src/plugins/world_stats/WorldStats.hh @@ -15,22 +15,22 @@ * */ -#ifndef IGNITION_GUI_PLUGINS_WORLDSTATS_HH_ -#define IGNITION_GUI_PLUGINS_WORLDSTATS_HH_ +#ifndef GZ_GUI_PLUGINS_WORLDSTATS_HH_ +#define GZ_GUI_PLUGINS_WORLDSTATS_HH_ #include #ifdef _MSC_VER #pragma warning(push, 0) #endif -#include +#include #ifdef _MSC_VER #pragma warning(pop) #endif -#include +#include -#include "ignition/gui/Export.hh" -#include "ignition/gui/Plugin.hh" +#include "gz/gui/Export.hh" +#include "gz/gui/Plugin.hh" #ifndef _WIN32 # define WorldStats_EXPORTS_API @@ -42,7 +42,7 @@ # endif #endif -namespace ignition +namespace gz { namespace gui { @@ -70,7 +70,7 @@ namespace plugins /// /// If no elements are filled for the plugin, all properties will be /// displayed. - class WorldStats_EXPORTS_API WorldStats: public ignition::gui::Plugin + class WorldStats_EXPORTS_API WorldStats: public gz::gui::Plugin { Q_OBJECT @@ -163,7 +163,7 @@ namespace plugins signals: void IterationsChanged(); /// \brief Subscriber callback when new world statistics are received - private: void OnWorldStatsMsg(const ignition::msgs::WorldStatistics &_msg); + private: void OnWorldStatsMsg(const gz::msgs::WorldStatistics &_msg); // Private data private: std::unique_ptr dataPtr; diff --git a/src/plugins/world_stats/WorldStats_TEST.cc b/src/plugins/world_stats/WorldStats_TEST.cc index 853ef4787..c2477a598 100644 --- a/src/plugins/world_stats/WorldStats_TEST.cc +++ b/src/plugins/world_stats/WorldStats_TEST.cc @@ -17,14 +17,14 @@ #include -#include -#include -#include +#include +#include +#include #include "test_config.h" // NOLINT(build/include) -#include "ignition/gui/Application.hh" -#include "ignition/gui/Plugin.hh" -#include "ignition/gui/MainWindow.hh" +#include "gz/gui/Application.hh" +#include "gz/gui/Plugin.hh" +#include "gz/gui/MainWindow.hh" #include "WorldStats.hh" int g_argc = 1; @@ -33,10 +33,10 @@ char* g_argv[] = reinterpret_cast(const_cast("./WorldStats_TEST")), }; -using namespace ignition; +using namespace gz; using namespace gui; -// See https://github.com/ignitionrobotics/ign-gui/issues/75 +// See https://github.com/gazebosim/gz-gui/issues/75 ///////////////////////////////////////////////// TEST(WorldStatsTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Load)) { diff --git a/test/helpers/TestHelper.cc b/test/helpers/TestHelper.cc index e7d70984d..7316f5e24 100644 --- a/test/helpers/TestHelper.cc +++ b/test/helpers/TestHelper.cc @@ -17,7 +17,7 @@ #include "TestHelper.hh" -namespace ignition +namespace gz { namespace gui { diff --git a/test/helpers/TestHelper.hh b/test/helpers/TestHelper.hh index 8c2fee0f9..00c2e0eb5 100644 --- a/test/helpers/TestHelper.hh +++ b/test/helpers/TestHelper.hh @@ -14,12 +14,12 @@ * limitations under the License. * */ -#ifndef IGNITION_GUI_TESTHELPER_HH_ -#define IGNITION_GUI_TESTHELPER_HH_ +#ifndef GZ_GUI_TESTHELPER_HH_ +#define GZ_GUI_TESTHELPER_HH_ -#include -#include -#include +#include +#include +#include #ifndef _WIN32 # define TestHelper_EXPORTS_API @@ -31,7 +31,7 @@ # endif #endif -namespace ignition +namespace gz { namespace gui { diff --git a/test/integration/ExamplesBuild_TEST.cc b/test/integration/ExamplesBuild_TEST.cc index 0ab1b7bb6..594bc4a91 100644 --- a/test/integration/ExamplesBuild_TEST.cc +++ b/test/integration/ExamplesBuild_TEST.cc @@ -18,16 +18,16 @@ #include #include -#include -#include -#include +#include +#include +#include #include "test_config.h" // NOLINT(build/include) -using namespace ignition; +using namespace gz; // Helper functions copied from -// https://github.com/ignitionrobotics/ign-common/raw/ign-common3/src/Filesystem_TEST.cc +// https://github.com/gazebosim/gz-common/raw/ign-common3/src/Filesystem_TEST.cc #ifndef _WIN32 #include // NOLINT(build/include_order) @@ -134,25 +134,25 @@ void ExamplesBuild::Build(const std::string &_type) // Path to examples of the given type auto examplesDir = std::string(PROJECT_SOURCE_PATH) + "/examples/" + _type; - ASSERT_TRUE(ignition::common::exists(examplesDir)); + ASSERT_TRUE(gz::common::exists(examplesDir)); // Iterate over directory - ignition::common::DirIter endIter; - for (ignition::common::DirIter dirIter(examplesDir); + gz::common::DirIter endIter; + for (gz::common::DirIter dirIter(examplesDir); dirIter != endIter; ++dirIter) { - auto base = ignition::common::basename(*dirIter); + auto base = gz::common::basename(*dirIter); // Source directory for this example auto sourceDir = examplesDir + "/" + base; - ASSERT_TRUE(ignition::common::exists(sourceDir)); - igndbg << "Source: " << sourceDir << std::endl; + ASSERT_TRUE(gz::common::exists(sourceDir)); + gzdbg << "Source: " << sourceDir << std::endl; // Create a temp build directory std::string tmpBuildDir; ASSERT_TRUE(createAndSwitchToTempDir(tmpBuildDir)); - EXPECT_TRUE(ignition::common::exists(tmpBuildDir)); - igndbg << "Build directory: " << tmpBuildDir<< std::endl; + EXPECT_TRUE(gz::common::exists(tmpBuildDir)); + gzdbg << "Build directory: " << tmpBuildDir<< std::endl; char cmd[1024]; @@ -167,7 +167,7 @@ void ExamplesBuild::Build(const std::string &_type) } ////////////////////////////////////////////////// -// See https://github.com/ignitionrobotics/ign-gui/issues/75 +// See https://github.com/gazebosim/gz-gui/issues/75 TEST_P(ExamplesBuild, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Build)) { Build(GetParam()); diff --git a/test/integration/Examples_TEST.cc b/test/integration/Examples_TEST.cc index 73f247ba8..92649a161 100644 --- a/test/integration/Examples_TEST.cc +++ b/test/integration/Examples_TEST.cc @@ -17,12 +17,12 @@ #include -#include -#include -#include +#include +#include +#include #include "test_config.h" // NOLINT(build/include) -#include "ignition/gui/Application.hh" +#include "gz/gui/Application.hh" int g_argc = 1; char* g_argv[] = @@ -30,10 +30,10 @@ char* g_argv[] = reinterpret_cast(const_cast("./Examples_TEST")), }; -using namespace ignition; +using namespace gz; using namespace gui; -// See https://github.com/ignitionrobotics/ign-gui/issues/75 +// See https://github.com/gazebosim/gz-gui/issues/75 ///////////////////////////////////////////////// TEST(ExampleTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Configs)) { @@ -42,10 +42,10 @@ TEST(ExampleTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Configs)) "examples", "config"); // Load each config file - ignition::common::DirIter endIter; + gz::common::DirIter endIter; for (common::DirIter file(exampleConfigPath); file != endIter; ++file) { - igndbg << *file << std::endl; + gzdbg << *file << std::endl; Application app(g_argc, g_argv); app.AddPluginPath(std::string(PROJECT_BINARY_PATH) + "/lib"); diff --git a/test/integration/camera_tracking.cc b/test/integration/camera_tracking.cc index e5bcefd2e..1a932f876 100644 --- a/test/integration/camera_tracking.cc +++ b/test/integration/camera_tracking.cc @@ -17,29 +17,29 @@ #include -#include -#include +#include +#include #ifdef _MSC_VER #pragma warning(push, 0) #endif -#include +#include #ifdef _MSC_VER #pragma warning(pop) #endif -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include "test_config.h" // NOLINT(build/include) -#include "ignition/gui/Application.hh" -#include "ignition/gui/GuiEvents.hh" -#include "ignition/gui/Plugin.hh" -#include "ignition/gui/MainWindow.hh" +#include "gz/gui/Application.hh" +#include "gz/gui/GuiEvents.hh" +#include "gz/gui/Plugin.hh" +#include "gz/gui/MainWindow.hh" int g_argc = 1; char* g_argv[] = @@ -47,7 +47,7 @@ char* g_argv[] = reinterpret_cast(const_cast("./camera_tracking")), }; -using namespace ignition; +using namespace gz; using namespace gui; using namespace std::chrono_literals; diff --git a/test/integration/deprecated_TEST.cc b/test/integration/deprecated_TEST.cc new file mode 100644 index 000000000..4a449a640 --- /dev/null +++ b/test/integration/deprecated_TEST.cc @@ -0,0 +1,32 @@ +/* + * 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 + +#define SUPPRESS_IGNITION_HEADER_DEPRECATION + +#include +#include + +///////////////////////////////////////////////// +// Make sure the ignition namespace still works +TEST(Deprecated, IgnitionNamespace) +{ + ignition::gui::Plugin plugin; +} + +#undef SUPPRESS_IGNITION_HEADER_DEPRECATION diff --git a/test/integration/marker_manager.cc b/test/integration/marker_manager.cc index 098333ec3..c5deb3627 100644 --- a/test/integration/marker_manager.cc +++ b/test/integration/marker_manager.cc @@ -18,8 +18,8 @@ #ifdef _MSC_VER #pragma warning(push, 0) #endif -#include -#include +#include +#include #ifdef _MSC_VER #pragma warning(pop) #endif @@ -27,16 +27,16 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include "test_config.h" // NOLINT(build/include) -#include "ignition/gui/Application.hh" -#include "ignition/gui/GuiEvents.hh" -#include "ignition/gui/MainWindow.hh" -#include "ignition/gui/Plugin.hh" +#include "gz/gui/Application.hh" +#include "gz/gui/GuiEvents.hh" +#include "gz/gui/MainWindow.hh" +#include "gz/gui/Plugin.hh" int g_argc = 1; char* g_argv[] = @@ -46,27 +46,27 @@ char* g_argv[] = using namespace std::chrono_literals; -using namespace ignition; +using namespace gz; using namespace gui; class MarkerManagerTestFixture : public ::testing::Test { public: - ignition::transport::Node node; + gz::transport::Node node; rendering::ScenePtr scene; - ignition::transport::Node::Publisher statsPub; + gz::transport::Node::Publisher statsPub; MarkerManagerTestFixture() { // Periodic world statistics statsPub = - node.Advertise("/example/stats"); + node.Advertise("/example/stats"); } void sendWorldStatisticsMsg(std::chrono::steady_clock::duration &timePoint) { - ignition::msgs::WorldStatistics msgWorldStatistics; + gz::msgs::WorldStatistics msgWorldStatistics; msgWorldStatistics.set_real_time_factor(1); auto s = std::chrono::duration_cast(timePoint); @@ -164,13 +164,13 @@ TEST_F(MarkerManagerTestFixture, std::chrono::steady_clock::duration::zero(); // Create the marker message - ignition::msgs::Marker markerMsg; - ignition::msgs::Material matMsg; + gz::msgs::Marker markerMsg; + gz::msgs::Material matMsg; markerMsg.set_ns("default"); markerMsg.set_id(0); - markerMsg.set_action(ignition::msgs::Marker::ADD_MODIFY); - markerMsg.set_type(ignition::msgs::Marker::SPHERE); - markerMsg.set_visibility(ignition::msgs::Marker::GUI); + markerMsg.set_action(gz::msgs::Marker::ADD_MODIFY); + markerMsg.set_type(gz::msgs::Marker::SPHERE); + markerMsg.set_visibility(gz::msgs::Marker::GUI); // Add a sphere that will be remove after 2 seconds markerMsg.mutable_material()->mutable_ambient()->set_r(0); @@ -183,11 +183,11 @@ TEST_F(MarkerManagerTestFixture, markerMsg.mutable_material()->mutable_diffuse()->set_a(1); markerMsg.mutable_lifetime()->set_sec(0); markerMsg.mutable_lifetime()->set_nsec(0); - ignition::msgs::Set(markerMsg.mutable_scale(), - ignition::math::Vector3d(1.0, 1.0, 1.0)); + gz::msgs::Set(markerMsg.mutable_scale(), + gz::math::Vector3d(1.0, 1.0, 1.0)); - ignition::msgs::Set(markerMsg.mutable_pose(), - ignition::math::Pose3d(2, 2, 0, 0, 0, 0)); + gz::msgs::Set(markerMsg.mutable_pose(), + gz::math::Pose3d(2, 2, 0, 0, 0, 0)); EXPECT_EQ(0u, scene->VisualCount()); // Wait 2 seconds, plugins need to be initialized @@ -196,7 +196,7 @@ TEST_F(MarkerManagerTestFixture, bool executed = node.Request("/marker", markerMsg); if (executed) { - igndbg << "/marker request sent" << std::endl; + gzdbg << "/marker request sent" << std::endl; waitAndSendStatsMsgs(timePoint, 1, 200); EXPECT_EQ(1u, scene->VisualCount()); } @@ -205,7 +205,7 @@ TEST_F(MarkerManagerTestFixture, FAIL(); } - markerMsg.set_action(ignition::msgs::Marker::DELETE_ALL); + markerMsg.set_action(gz::msgs::Marker::DELETE_ALL); executed = node.Request("/marker", markerMsg); if (executed) { diff --git a/test/integration/minimal_scene.cc b/test/integration/minimal_scene.cc index 5001b5322..46037df50 100644 --- a/test/integration/minimal_scene.cc +++ b/test/integration/minimal_scene.cc @@ -17,21 +17,21 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include "test_config.h" // NOLINT(build/include) #include "../helpers/TestHelper.hh" -#include "ignition/gui/Application.hh" -#include "ignition/gui/GuiEvents.hh" -#include "ignition/gui/Plugin.hh" -#include "ignition/gui/MainWindow.hh" +#include "gz/gui/Application.hh" +#include "gz/gui/GuiEvents.hh" +#include "gz/gui/Plugin.hh" +#include "gz/gui/MainWindow.hh" int g_argc = 1; char* g_argv[] = @@ -39,7 +39,7 @@ char* g_argv[] = reinterpret_cast(const_cast("./MinimalScene_TEST")), }; -using namespace ignition; +using namespace gz; using namespace gui; ///////////////////////////////////////////////// diff --git a/test/integration/scene3d.cc b/test/integration/scene3d.cc index cb8e4dbe5..c97dc67f8 100644 --- a/test/integration/scene3d.cc +++ b/test/integration/scene3d.cc @@ -17,21 +17,21 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include "test_config.h" // NOLINT(build/include) #include "../helpers/TestHelper.hh" -#include "ignition/gui/Application.hh" -#include "ignition/gui/GuiEvents.hh" -#include "ignition/gui/Plugin.hh" -#include "ignition/gui/MainWindow.hh" +#include "gz/gui/Application.hh" +#include "gz/gui/GuiEvents.hh" +#include "gz/gui/Plugin.hh" +#include "gz/gui/MainWindow.hh" int g_argc = 1; char* g_argv[] = @@ -39,7 +39,7 @@ char* g_argv[] = reinterpret_cast(const_cast("./Scene3d_TEST")), }; -using namespace ignition; +using namespace gz; using namespace gui; ///////////////////////////////////////////////// diff --git a/test/integration/transport_scene_manager.cc b/test/integration/transport_scene_manager.cc index 90700a77e..60bb59283 100644 --- a/test/integration/transport_scene_manager.cc +++ b/test/integration/transport_scene_manager.cc @@ -17,24 +17,24 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include "test_config.h" // NOLINT(build/include) #include "../helpers/TestHelper.hh" -#include "ignition/gui/Application.hh" -#include "ignition/gui/GuiEvents.hh" -#include "ignition/gui/Plugin.hh" -#include "ignition/gui/MainWindow.hh" +#include "gz/gui/Application.hh" +#include "gz/gui/GuiEvents.hh" +#include "gz/gui/Plugin.hh" +#include "gz/gui/MainWindow.hh" int g_argc = 1; char* g_argv[] = @@ -42,7 +42,7 @@ char* g_argv[] = reinterpret_cast(const_cast("./TransportSceneManager_TEST")), }; -using namespace ignition; +using namespace gz; using namespace gui; ///////////////////////////////////////////////// @@ -212,9 +212,9 @@ TEST(TransportSceneManagerTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Config)) EXPECT_EQ(1u, visualVis->GeometryCount()); // Change model pose - auto posePub = node.Advertise("/test/pose"); + auto posePub = node.Advertise("/test/pose"); - ignition::msgs::Pose_V poseVMsg; + gz::msgs::Pose_V poseVMsg; auto poseMsg = poseVMsg.add_pose(); poseMsg->set_id(1); poseMsg->set_name("box_model"); @@ -232,9 +232,9 @@ TEST(TransportSceneManagerTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Config)) EXPECT_EQ(math::Pose3d(5, 0, 0, 0, 0, 0), modelVis->LocalPose()); // Delete model - auto deletePub = node.Advertise("/test/delete"); + auto deletePub = node.Advertise("/test/delete"); - ignition::msgs::UInt32_V entityVMsg; + gz::msgs::UInt32_V entityVMsg; entityVMsg.add_data(1); deletePub.Publish(entityVMsg); diff --git a/test/plugins/TestBadInheritancePlugin.cc b/test/plugins/TestBadInheritancePlugin.cc index 4e0608810..d618ce170 100644 --- a/test/plugins/TestBadInheritancePlugin.cc +++ b/test/plugins/TestBadInheritancePlugin.cc @@ -15,12 +15,12 @@ * */ -#include -#include +#include +#include #include "TestBadInheritancePlugin.hh" -using namespace ignition; +using namespace gz; using namespace gui; ///////////////////////////////////////////////// @@ -35,5 +35,5 @@ TestBadInheritancePlugin::~TestBadInheritancePlugin() } // Register this plugin -IGNITION_ADD_PLUGIN(ignition::gui::TestBadInheritancePlugin, - ignition::gui::MainWindow) +IGNITION_ADD_PLUGIN(gz::gui::TestBadInheritancePlugin, + gz::gui::MainWindow) diff --git a/test/plugins/TestBadInheritancePlugin.hh b/test/plugins/TestBadInheritancePlugin.hh index c5c5bc753..bd301cf36 100644 --- a/test/plugins/TestBadInheritancePlugin.hh +++ b/test/plugins/TestBadInheritancePlugin.hh @@ -15,15 +15,15 @@ * */ -#ifndef IGNITION_GUI_TEST_TESTBADINHERITANCEPLUGIN_HH_ -#define IGNITION_GUI_TEST_TESTBADINHERITANCEPLUGIN_HH_ +#ifndef GZ_GUI_TEST_TESTBADINHERITANCEPLUGIN_HH_ +#define GZ_GUI_TEST_TESTBADINHERITANCEPLUGIN_HH_ #ifndef Q_MOC_RUN - #include - #include + #include + #include #endif -namespace ignition +namespace gz { namespace gui { diff --git a/test/plugins/TestInvalidQmlPlugin.cc b/test/plugins/TestInvalidQmlPlugin.cc index c4b604799..f34f68716 100644 --- a/test/plugins/TestInvalidQmlPlugin.cc +++ b/test/plugins/TestInvalidQmlPlugin.cc @@ -15,11 +15,11 @@ * */ -#include +#include #include "TestInvalidQmlPlugin.hh" -using namespace ignition; +using namespace gz; using namespace gui; ///////////////////////////////////////////////// @@ -34,5 +34,5 @@ TestInvalidQmlPlugin::~TestInvalidQmlPlugin() } // Register this plugin -IGNITION_ADD_PLUGIN(ignition::gui::TestInvalidQmlPlugin, - ignition::gui::Plugin) +IGNITION_ADD_PLUGIN(gz::gui::TestInvalidQmlPlugin, + gz::gui::Plugin) diff --git a/test/plugins/TestInvalidQmlPlugin.hh b/test/plugins/TestInvalidQmlPlugin.hh index 412dbd1e6..d70e57c67 100644 --- a/test/plugins/TestInvalidQmlPlugin.hh +++ b/test/plugins/TestInvalidQmlPlugin.hh @@ -15,12 +15,12 @@ * */ -#ifndef IGNITION_GUI_TEST_MALFORMEDPLUGIN_HH_ -#define IGNITION_GUI_TEST_MALFORMEDPLUGIN_HH_ +#ifndef GZ_GUI_TEST_MALFORMEDPLUGIN_HH_ +#define GZ_GUI_TEST_MALFORMEDPLUGIN_HH_ -#include +#include -namespace ignition +namespace gz { namespace gui { diff --git a/test/plugins/TestNotRegisteredPlugin.cc b/test/plugins/TestNotRegisteredPlugin.cc index c9471d8b4..10a61e433 100644 --- a/test/plugins/TestNotRegisteredPlugin.cc +++ b/test/plugins/TestNotRegisteredPlugin.cc @@ -15,12 +15,12 @@ * */ -#include -#include +#include +#include #include "TestNotRegisteredPlugin.hh" -using namespace ignition; +using namespace gz; using namespace gui; ///////////////////////////////////////////////// diff --git a/test/plugins/TestNotRegisteredPlugin.hh b/test/plugins/TestNotRegisteredPlugin.hh index 41726a08a..42c36578a 100644 --- a/test/plugins/TestNotRegisteredPlugin.hh +++ b/test/plugins/TestNotRegisteredPlugin.hh @@ -15,15 +15,15 @@ * */ -#ifndef IGNITION_GUI_TEST_TESTNOTREGISTEREDPLUGIN_HH_ -#define IGNITION_GUI_TEST_TESTNOTREGISTEREDPLUGIN_HH_ +#ifndef GZ_GUI_TEST_TESTNOTREGISTEREDPLUGIN_HH_ +#define GZ_GUI_TEST_TESTNOTREGISTEREDPLUGIN_HH_ #ifndef Q_MOC_RUN - #include - #include + #include + #include #endif -namespace ignition +namespace gz { namespace gui { diff --git a/test/plugins/TestPlugin.cc b/test/plugins/TestPlugin.cc index 2ab156c00..6845fcc70 100644 --- a/test/plugins/TestPlugin.cc +++ b/test/plugins/TestPlugin.cc @@ -15,12 +15,12 @@ * */ -#include -#include +#include +#include #include "TestPlugin.hh" -using namespace ignition; +using namespace gz; using namespace gui; ///////////////////////////////////////////////// @@ -35,5 +35,5 @@ TestPlugin::~TestPlugin() } // Register this plugin -IGNITION_ADD_PLUGIN(ignition::gui::TestPlugin, - ignition::gui::Plugin) +IGNITION_ADD_PLUGIN(gz::gui::TestPlugin, + gz::gui::Plugin) diff --git a/test/plugins/TestPlugin.hh b/test/plugins/TestPlugin.hh index d0a03bac6..dcd107b35 100644 --- a/test/plugins/TestPlugin.hh +++ b/test/plugins/TestPlugin.hh @@ -15,15 +15,15 @@ * */ -#ifndef IGNITION_GUI_TEST_TESTPLUGIN_HH_ -#define IGNITION_GUI_TEST_TESTPLUGIN_HH_ +#ifndef GZ_GUI_TEST_TESTPLUGIN_HH_ +#define GZ_GUI_TEST_TESTPLUGIN_HH_ #ifndef Q_MOC_RUN - #include - #include + #include + #include #endif -namespace ignition +namespace gz { namespace gui { diff --git a/tutorials/01_install.md b/tutorials/01_install.md index dea3772f5..e6ced2c88 100644 --- a/tutorials/01_install.md +++ b/tutorials/01_install.md @@ -4,9 +4,9 @@ Next Tutorial: \ref commandline # Install -These instructions are for installing only Ignition GUI. If you're interested +These instructions are for installing only Gazebo GUI. If you're interested in using all the Ignition libraries, not only Igniton GUI, check out this -[Ignition installation](https://ignitionrobotics.org/docs/latest/install). +[Ignition installation](https://gazebosim.org/docs/latest/install). We recommend following the binary install instructions to get up and running as quickly and painlessly as possible. @@ -19,7 +19,7 @@ contribution. ### Ubuntu -On Ubuntu, it's possible to install Ignition GUI as follows: +On Ubuntu, it's possible to install Gazebo GUI as follows: Add OSRF packages: ``` @@ -28,7 +28,7 @@ Add OSRF packages: sudo apt update ``` -Install Ignition GUI: +Install Gazebo GUI: ``` sudo apt install libignition-gui<#>-dev ``` @@ -44,7 +44,7 @@ On macOS, add OSRF packages: brew tap osrf/simulation ``` -Install Ignition GUI: +Install Gazebo GUI: ``` brew install ignition-gui<#> ``` @@ -74,7 +74,7 @@ Add OSRF packages: Clone source code: ``` # This checks out the default branch. You can append `-b ign-gui#` (replace # with a number) to checkout a specific version - git clone http://github.com/ignitionrobotics/ign-gui + git clone http://github.com/gazebosim/gz-gui ``` Install dependencies @@ -98,7 +98,7 @@ Build and install as follows: 1. Clone the repository ``` - git clone https://github.com/ignitionrobotics/ign-gui -b ign-gui<#> + git clone https://github.com/gazebosim/gz-gui -b ign-gui<#> ``` Be sure to replace `<#>` with a number value, such as 5 or 6, depending on which version you need. @@ -128,7 +128,7 @@ Build and install as follows: #### Install Prerequisites -First, follow the [ign-cmake](https://github.com/ignitionrobotics/ign-cmake) tutorial for installing Conda, Visual Studio, CMake, etc., prerequisites, and creating a Conda environment. +First, follow the [ign-cmake](https://github.com/gazebosim/gz-cmake) tutorial for installing Conda, Visual Studio, CMake, etc., prerequisites, and creating a Conda environment. Navigate to `condabin` if necessary to use the `conda` command (i.e., if Conda is not in your `PATH` environment variable. You can find the location of `condabin` in Anaconda Prompt, `where conda`). @@ -148,7 +148,7 @@ Install Ignition dependencies, replacing `<#>` with the desired versions: conda install libignition-cmake<#> libignition-common<#> libignition-math<#> libignition-transport<#> libignition-msgs<#> libignition-plugin<#> libignition-tools<#> --channel conda-forge ``` -Before [ign-rendering](https://github.com/ignitionrobotics/ign-rendering) becomes available on conda-forge, follow its tutorial to build it from source. +Before [ign-rendering](https://github.com/gazebosim/gz-rendering) becomes available on conda-forge, follow its tutorial to build it from source. #### Build from source @@ -160,7 +160,7 @@ Before [ign-rendering](https://github.com/ignitionrobotics/ign-rendering) become 1. Navigate to where you would like to build the library, and clone the repository. ``` # Optionally, append `-b ign-gui#` (replace # with a number) to check out a specific version - git clone https://github.com/ignitionrobotics/ign-gui.git + git clone https://github.com/gazebosim/gz-gui.git ``` 1. Configure and build @@ -184,7 +184,7 @@ Before [ign-rendering](https://github.com/ignitionrobotics/ign-rendering) become # Documentation API documentation and tutorials can be accessed at -[https://ignitionrobotics.org/libs/gui](https://ignitionrobotics.org/libs/gui) +[https://gazebosim.org/libs/gui](https://gazebosim.org/libs/gui) You can also generate the documentation from a clone of this repository by following these steps. @@ -195,7 +195,7 @@ You can also generate the documentation from a clone of this repository by follo 2. Clone the repository ``` - git clone https://github.com/ignitionrobotics/ign-gui + git clone https://github.com/gazebosim/gz-gui ``` 3. Configure and build the documentation. @@ -228,4 +228,4 @@ Follow these steps to run tests and static code analysis in your clone of this r make codecheck ``` -See the [Writing Tests section of the contributor guide](https://ignitionrobotics.org/docs/all/contributing#writing-tests) for help creating or modifying tests. +See the [Writing Tests section of the contributor guide](https://gazebosim.org/docs/all/contributing#writing-tests) for help creating or modifying tests. diff --git a/tutorials/02_commandline.md b/tutorials/02_commandline.md index 978021331..15e8d5c32 100644 --- a/tutorials/02_commandline.md +++ b/tutorials/02_commandline.md @@ -5,11 +5,11 @@ Previous Tutorial: \ref install ## Overview -If you have Ignition Tools installed, you can use the `ign gui` command line tool: +If you have Gazebo Tools installed, you can use the `ign gui` command line tool: `ign gui -h` - Ignition GUI tool. + Gazebo GUI tool. ign gui [options] diff --git a/tutorials/03_plugins.md b/tutorials/03_plugins.md index ce4183a8d..d556859b0 100644 --- a/tutorials/03_plugins.md +++ b/tutorials/03_plugins.md @@ -5,26 +5,26 @@ Previous Tutorial: \ref commandline ## Writing plugins -An Ignition GUI plugin is a shared library that defines a widget. +A Gazebo GUI plugin is a shared library that defines a widget. The plugin contains [QML](https://doc.qt.io/qt-5/qtqml-index.html) code that specifies what the widget looks like, as well as C++ code that defines the plugin's behavior and ties it to other libraries. -See [HelloPlugin](https://github.com/ignitionrobotics/ign-gui/blob/main/examples/plugin/hello_plugin/) +See [HelloPlugin](https://github.com/gazebosim/gz-gui/blob/main/examples/plugin/hello_plugin/) for an example. ## Finding plugins -Ignition GUI will look for plugins on the following paths, in this order: +Gazebo GUI will look for plugins on the following paths, in this order: 1. All paths set on the `GZ_GUI_PLUGIN_PATH` environment variable -2. All paths added by calling `ignition::gui::addPluginPath` +2. All paths added by calling `gz::gui::addPluginPath` 3. `~/.ignition/gui/plugins` -4. [Plugins which are installed with Ignition GUI](https://ignitionrobotics.org/api/gui/6.0/namespaceignition_1_1gui_1_1plugins.html) +4. [Plugins which are installed with Gazebo GUI](https://gazebosim.org/api/gui/6.0/namespace gz_1_1gui_1_1plugins.html) ## Configuring plugins -Ignition GUI supports loading XML configuration files, which may contain +Gazebo GUI supports loading XML configuration files, which may contain parameters to be passed directly to the plugin. See the \subpage config tutorial for more information. @@ -32,7 +32,7 @@ tutorial for more information. ### Image display -Display images from an Ignition Transport topic. +Display images from a Gazebo Transport topic. ign gui -c examples/config/image.config @@ -42,7 +42,7 @@ or ### Publisher -Publish messages on an Ignition Transport topic. +Publish messages on a Gazebo Transport topic. 1. Listen to string messages on the `/echo` topic: @@ -64,13 +64,13 @@ Publish messages on an Ignition Transport topic. ### Topic echo -Echo messages from an Ignition Transport topic. +Echo messages from a Gazebo Transport topic. ign gui -c examples/config/pubsub.config ### Key publisher -Publish key presses through Ignition Transport. +Publish key presses through Gazebo Transport. ign gui -c examples/config/keypublisher.config @@ -80,7 +80,7 @@ Change the topic to echo to `/keyboard/keypress`, echo, and start pressing keys. **Not ported to versions 1 or higher yet** -Discover all Ignition Transport topics and introspect its fields. +Discover all Gazebo Transport topics and introspect its fields. ign gui -c examples/config/topicViewer.config @@ -88,7 +88,7 @@ Discover all Ignition Transport topics and introspect its fields. **Not ported to versions 1 or higher yet** -Show basic stats of all Ignition Transport topics at the same time. +Show basic stats of all Gazebo Transport topics at the same time. ign gui -c examples/config/topicsStats.config @@ -107,7 +107,7 @@ plugins. This is a container for various Display Plugins that each paint on a Scene. The following example includes the display plugins that are installed with -Ignition GUI by default. +Gazebo GUI by default. ign gui -c examples/config/display_plugins.config @@ -115,9 +115,9 @@ Ignition GUI by default. **Not ported to versions 1 or higher yet** -Ignition GUI will look for display plugins on the following paths, in this +Gazebo GUI will look for display plugins on the following paths, in this order: -1. All paths set on the `IGN_GUI_DISPLAY_PLUGIN_PATH` environment variable +1. All paths set on the `GZ_GUI_DISPLAY_PLUGIN_PATH` environment variable 2. `~/.ignition/gui/display_plugins` -3. [Display plugins that are installed with Ignition GUI](https://ignitionrobotics.org/api/gui/0.1/namespaceignition_1_1gui_1_1display_plugins.html) +3. [Display plugins that are installed with Gazebo GUI](https://gazebosim.org/api/gui/0.1/namespace gz_1_1gui_1_1display_plugins.html) diff --git a/tutorials/04_layout.md b/tutorials/04_layout.md index 139841e14..91f1a2247 100644 --- a/tutorials/04_layout.md +++ b/tutorials/04_layout.md @@ -27,7 +27,7 @@ by adding a `` element to the config file. The child elements are: `` is `false`, closing the window will emit a server shutdown request with `stop = true` to the `` topic. This can be used - in applications like Ignition Gazebo which can run a + in applications like Gazebo which can run a server in a process separate from the GUI to stop both the GUI and the server when the window is closed. The value is case-insensitive. @@ -78,7 +78,7 @@ config file. For example: 1. Click on `File->Save configuration as` and save on a new file. > You can also click on `File -> Save configuration` to save that as the - default configuration which is loaded whenever Ignition GUI is opened + default configuration which is loaded whenever Gazebo GUI is opened without a config file. 1. Close the window, then load the new config file: diff --git a/tutorials/05_style.md b/tutorials/05_style.md index 12ae5e5c8..3dfe74e72 100644 --- a/tutorials/05_style.md +++ b/tutorials/05_style.md @@ -5,21 +5,21 @@ Previous Tutorial: \ref layout ## Overview -Ignition GUI leverages +Gazebo GUI leverages [QtQuick Controls 2 Styles](https://doc.qt.io/qt-5.9/qtquickcontrols2-styles.html) for styling. The recommended and best supported style is the Material Style, but it is also possible to use others such as Default and Universal. This tutorial focuses on customizing the Material style. The default style is hardcoded into the -[qtquickcontrols2.conf](https://github.com/ignitionrobotics/ign-gui/blob/main/include/ignition/gui/qtquickcontrols2.conf) +[qtquickcontrols2.conf](https://github.com/gazebosim/gz-gui/blob/main/include/ignition/gui/qtquickcontrols2.conf) file. There are a few ways to override the default style: * Through the graphical interface (GUI) * Setting environment variables (env) -* Through Ignition GUI config files (config) +* Through Gazebo GUI config files (config) If styles are set from multiple sources, this is the order in which they take precedence: @@ -35,13 +35,13 @@ Users can customize the whole application's material style using just a few vari QML types provided by [QtQuick Controls 2](https://doc.qt.io/qt-5/qtquick-controls2-qmlmodule.html), -as well as QML types provided by Ignition GUI, use these variables as appropriate. +as well as QML types provided by Gazebo GUI, use these variables as appropriate. It's recommended that developers make sure their plugins use these variables for a more integrated experience. ### Top toolbar -On top of those, Ignition GUI also offers a few variables specific to customizing +On top of those, Gazebo GUI also offers a few variables specific to customizing the top toolbar. By default, the top toolbar will use the primary color, while the plugin toolbars will @@ -86,7 +86,7 @@ these environment variable preferences. \note Toolbar colors can't be changed through environment variables yet. -\note Applications built on top of Ignition GUI may override custom environment variables. +\note Applications built on top of Gazebo GUI may override custom environment variables. ## Config files diff --git a/tutorials/06_example.md b/tutorials/06_example.md index a75a5b5a1..4580230a4 100644 --- a/tutorials/06_example.md +++ b/tutorials/06_example.md @@ -5,12 +5,12 @@ Previous Tutorial: \ref style ## Overview -Ignition GUI comes with several examples of plugins and other files +Gazebo GUI comes with several examples of plugins and other files under the `examples` folder. ## Standalone applications -Ignition GUI can be used as a C++ library by other applications. +Gazebo GUI can be used as a C++ library by other applications. Examples provided under `examples/standalone` can be compiled and run without the `ign gui` command line tool. @@ -30,7 +30,7 @@ Then run it: ## Custom plugins -Ignition GUI comes with several plugins, but its true power is loading custom +Gazebo GUI comes with several plugins, but its true power is loading custom plugins developed by others. Under `examples/plugins`, there are several examples on how to build different types of plugins. @@ -42,7 +42,7 @@ For example, we can build the `hello_plugin` example plugin: cmake .. make -Then create the plugins directory and copy the generated library to it so that Ignition GUI can find the plugin: +Then create the plugins directory and copy the generated library to it so that Gazebo GUI can find the plugin: mkdir -p ~/.ignition/gui/plugins # Linux @@ -61,7 +61,7 @@ Now you can use the command line to open it: ## Configuration files -Configuration files are used to load an Ignition GUI window with several +Configuration files are used to load a Gazebo GUI window with several plugins and custom window configurations. Example configuration files are provided in the `/examples/config` folder. diff --git a/tutorials/07_config.md b/tutorials/07_config.md index b855da96c..66b1f8866 100644 --- a/tutorials/07_config.md +++ b/tutorials/07_config.md @@ -4,12 +4,12 @@ Next Tutorial: \ref layout ## Configuration files -Ignition GUI supports loading XML configuration files that define what +Gazebo GUI supports loading XML configuration files that define what the window should look like and which plugins should be loaded. ### Loading -By default, Ignition GUI will load the config file at +By default, Gazebo GUI will load the config file at `$HOME/.ignition/gui/default.config`, if it exists. Configuration files can also be loaded from the command line or through the @@ -20,24 +20,24 @@ From the command line, use the `--config` / `-c` option, for example: `ign gui -c path/to/example.config` From the C++ API, pass the file path to -[Application::LoadConfig](https://ignitionrobotics.org/api/gui/6.0/classignition_1_1gui_1_1Application.html#a03c4c3a1b1e58cc4bff05658f21fff17). +[Application::LoadConfig](https://gazebosim.org/api/gui/6.0/classignition_1_1gui_1_1Application.html#a03c4c3a1b1e58cc4bff05658f21fff17). ### File structure -Ignition GUI accepts the following top-level elements on a config file: +Gazebo GUI accepts the following top-level elements on a config file: * ``: Options related to the entire window's layout. See \subpage layout for more details. * ``: Zero or more plugins to be loaded at startup. * `filename`: This attribute specifies the plugin library to be loaded. - * ``: Ignition GUI processes this block before passing the + * ``: Gazebo GUI processes this block before passing the config to the plugin. See - [plugin_params.config](https://github.com/ignitionrobotics/ign-gui/blob/main/examples/config/plugin_params.config) + [plugin_params.config](https://github.com/gazebosim/gz-gui/blob/main/examples/config/plugin_params.config) for an example. * custom elements: Developers can read custom plugin configurations overriding the - [Plugin::LoadConfig](https://ignitionrobotics.org/api/gui/6.0/classignition_1_1gui_1_1Plugin.html#a720646.0af4cd247b994b905559fd4ee) + [Plugin::LoadConfig](https://gazebosim.org/api/gui/6.0/classignition_1_1gui_1_1Plugin.html#a720646.0af4cd247b994b905559fd4ee) function, see the - [HelloPlugin](https://github.com/ignitionrobotics/ign-gui/blob/main/examples/plugin/hello_plugin/HelloPlugin.cc) + [HelloPlugin](https://github.com/gazebosim/gz-gui/blob/main/examples/plugin/hello_plugin/HelloPlugin.cc) example. See the example plugin block below: @@ -49,6 +49,6 @@ See the example plugin block below: /camera -This will load the `libImageDisplay.so` plugin, Ignition GUI will set its +This will load the `libImageDisplay.so` plugin, Gazebo GUI will set its `height` to `120` pixels, and the plugin-specific `` parameter will be handled within `ImageDisplay::LoadConfig`. diff --git a/tutorials/08_screenshot.md b/tutorials/08_screenshot.md index 300f18b05..ccb882ab4 100644 --- a/tutorials/08_screenshot.md +++ b/tutorials/08_screenshot.md @@ -10,7 +10,7 @@ the filename will be the timestamp of when the screenshot was taken. It is possible to change the default directory to a different location, which will be shown in the example below. -**Note**: This example is using Ignition Gazebo but is not required. +**Note**: This example is using Gazebo Sim but is not required. The same steps can be done using `ign gui` with a 3D scene. First, go to the plugins menu on the top right (vertical ellipsis) then select diff --git a/tutorials/index.md b/tutorials/index.md index b1d04f063..9df6c7d4b 100644 --- a/tutorials/index.md +++ b/tutorials/index.md @@ -1,6 +1,6 @@ # Introduction -Ignition GUI is a component in the Ignition framework, a set +Gazebo GUI is a component in the Ignition framework, a set of libraries designed to rapidly develop robot applications. -[http://ignitionrobotics.org](http://ignitionrobotics.org) +[http://gazebosim.org](http://gazebosim.org) diff --git a/tutorials/scene.md b/tutorials/scene.md index 20645cb3b..22765429f 100644 --- a/tutorials/scene.md +++ b/tutorials/scene.md @@ -2,29 +2,29 @@ ## Overview -Applications built on top of Ignition GUI can leverage Ignition Rendering +Applications built on top of Gazebo GUI can leverage Gazebo Rendering to display interactive 3D scenes. This tutorial will help application developers -leverage Ignition GUI's plugins to quickly develop plugins that interact with +leverage Gazebo GUI's plugins to quickly develop plugins that interact with the 3D scene. -> This tutorial applies for Ignition GUI version 6 (Fortress) and higher. +> This tutorial applies for Gazebo GUI version 6 (Fortress) and higher. ## Minimal scene -Ignition GUI ships with the `MinimalScene` plugin, which instantiates a 3D +Gazebo GUI ships with the `MinimalScene` plugin, which instantiates a 3D scene and provides orbit controls, but doesn't do much else. Actions such as adding, modifying and removing rendering elements from the scene must be performed by other plugins that work alongside the minimal scene. Each application will have a different way of updating the 3D scene. For example, -[Ignition Gazebo](https://ignitionrobotics.org/libs/gazebo) updates the scene +[Gazebo](https://gazebosim.org/libs/gazebo) updates the scene based on its entities and components, and -[Ignition RViz](https://github.com/ignitionrobotics/ign-rviz/) +[Gazebo RViz](https://github.com/gazebosim/gz-rviz/) updates the scene based on ROS 2 messages. Each of these applications provides custom plugins that update the 3D scene through events and the render thread. -Ignition GUI ships with a plugin that updates the scene based on Ignition -Transport messages, the `ignition::gui::plugins::TransportSceneManager`. +Gazebo GUI ships with a plugin that updates the scene based on Ignition +Transport messages, the `gz::gui::plugins::TransportSceneManager`. Applications can use that directly, or use it as inspiration for developing their own scene managers. @@ -36,14 +36,14 @@ will process those and update the 3D scene, and then the `MinimalScene` will paint the scene to the window. Follow the instructions in the -[scene_provider example](https://github.com/ignitionrobotics/ign-gui/tree/main/examples/standalone/scene_provider) +[scene_provider example](https://github.com/gazebosim/gz-gui/tree/main/examples/standalone/scene_provider) and see visuals being added and moved on the 3D scene. ### Getting the scene -After the `MinimalScene` instantiates an `ignition::rendering::Scene` pointer, +After the `MinimalScene` instantiates an `gz::rendering::Scene` pointer, any plugin can get it using the rendering engine's singleton. The -`ignition::rendering::sceneFromFirstRenderEngine()` +`gz::rendering::sceneFromFirstRenderEngine()` function is a convenient way of getting the scene for applications that have a single scene loaded. @@ -56,8 +56,8 @@ every iteration until it succeeds. This way, it can find a 3D scene even if Rendering operations aren't thread-safe. To make sure there are no race conditions, all rendering operations should happen in the same thread, the "render thread". In order to access that thread from a custom plugin, it's -necessary to listen to the `ignition::gui::events::Render` or -`ignition::gui::events::PreRender` events, which are +necessary to listen to the `gz::gui::events::Render` or +`gz::gui::events::PreRender` events, which are emitted by the `MinimalScene`. See how the `TransportSceneManager` installs an event filter with