Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

ign -> gz Namespace Migration : gz-gui #401

Merged
merged 25 commits into from
May 29, 2022
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
ef90973
Update header guards
methylDragon May 18, 2022
2025559
Migrate namespaces
methylDragon May 18, 2022
5289c60
Add migration line
methylDragon May 18, 2022
9d444cd
Implement deprecation trick
methylDragon May 18, 2022
71d0686
Add deprecation test
methylDragon May 18, 2022
70bb4ac
Include config.hh
methylDragon May 18, 2022
1beacd9
Use pragma deprecation message instead
methylDragon May 19, 2022
f84d4fe
Ticktock config macros
methylDragon May 19, 2022
937b6d9
Mention gz headers in migration
methylDragon May 20, 2022
76f3166
Migrate includes to gz
methylDragon May 20, 2022
32a2d3d
Update config.hh
methylDragon May 20, 2022
3645e3f
Migrate Export.hh headers and deprecated test
methylDragon May 20, 2022
6c99f4f
Migrate IGN(ITION)_GUI_XXX macros and variables
methylDragon May 20, 2022
27b79af
Migrate github links
methylDragon May 20, 2022
00e0685
Migrate user-facing Ignition to Gazebo
methylDragon May 20, 2022
ae6f7a4
Migrate gz-common logging calls
methylDragon May 20, 2022
0a17693
Migrate "ignition.msgs" -> "gz.msgs"
methylDragon May 21, 2022
eedc3a6
Fix deprecated test
methylDragon May 21, 2022
420a138
Include config.hh in recursive directories and <lib>.hh
methylDragon May 22, 2022
cde12ae
Include config.hh in .h and .hpp redirection headers
methylDragon May 22, 2022
8dcc9b6
`ignitionrobotics` -> `gazebosim`
methylDragon May 23, 2022
e5ab24f
Rollback osrf-migration.github.io migrations
methylDragon May 24, 2022
b8d8166
Fix typo
methylDragon May 24, 2022
fda266f
Wording changes
methylDragon May 25, 2022
f468d6e
Migrate `igndbg` -> `gzdbg`
methylDragon May 26, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Migrate igndbg -> gzdbg
Signed-off-by: methylDragon <[email protected]>
methylDragon committed May 27, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit f468d6e5d0c1972c804266b16157aea5e679712f
22 changes: 11 additions & 11 deletions src/Application.cc
Original file line number Diff line number Diff line change
@@ -91,15 +91,15 @@ 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");
this->setApplicationName("Gazebo GUI");

#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
@@ -162,7 +162,7 @@ Application::Application(int &_argc, char **_argv, const WindowType _type)
/////////////////////////////////////////////////
Application::~Application()
{
igndbg << "Terminating application." << std::endl;
gzdbg << "Terminating application." << std::endl;

if (this->dataPtr->mainWin && this->dataPtr->mainWin->QuickWindow())
{
@@ -292,7 +292,7 @@ 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))
@@ -422,7 +422,7 @@ bool Application::LoadPlugin(const std::string &_filename,
return false;
}

igndbg << "Loading plugin [" << _filename << "]" << std::endl;
gzdbg << "Loading plugin [" << _filename << "]" << std::endl;

common::SystemPaths systemPaths;
systemPaths.SetPluginPathEnv(this->dataPtr->pluginPathEnv);
@@ -559,7 +559,7 @@ std::shared_ptr<Plugin> 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;
@@ -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())
@@ -802,7 +802,7 @@ void ApplicationPrivate::MessageHandler(QtMsgType _type,
switch (_type)
{
case QtDebugMsg:
igndbg << msg << std::endl;
gzdbg << msg << std::endl;
break;
case QtInfoMsg:
gzmsg << msg << std::endl;
2 changes: 1 addition & 1 deletion src/plugins/camera_tracking/CameraTracking.cc
Original file line number Diff line number Diff line change
@@ -178,7 +178,7 @@ 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;
}
4 changes: 2 additions & 2 deletions src/plugins/grid_config/GridConfig.cc
Original file line number Diff line number Diff line change
@@ -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();
}
@@ -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
Original file line number Diff line number Diff line change
@@ -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;
}
6 changes: 3 additions & 3 deletions src/plugins/marker_manager/MarkerManager.cc
Original file line number Diff line number Diff line change
@@ -170,7 +170,7 @@ void MarkerManagerPrivate::Initialize()
<< "/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,
@@ -180,7 +180,7 @@ void MarkerManagerPrivate::Initialize()
<< " 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",
@@ -190,7 +190,7 @@ void MarkerManagerPrivate::Initialize()
<< "_array service.\n";
}

igndbg << "Advertise " << this->topicName << "_array.\n";
gzdbg << "Advertise " << this->topicName << "_array.\n";
}

/////////////////////////////////////////////////
16 changes: 8 additions & 8 deletions src/plugins/minimal_scene/MinimalScene.cc
Original file line number Diff line number Diff line change
@@ -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<IgnCameraTextureRhiOpenGL>();
}
#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<IgnCameraTextureRhiMetal>();
}
@@ -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?
@@ -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<RenderThreadRhiOpenGL>(&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<RenderThreadRhiMetal>(&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<TextureNodeRhiOpenGL>(_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<TextureNodeRhiMetal>(_window);
}
#endif
2 changes: 1 addition & 1 deletion src/plugins/point_cloud/PointCloud.cc
Original file line number Diff line number Diff line change
@@ -435,7 +435,7 @@ void PointCloudPrivate::ClearMarkers()
msg.set_id(0);
msg.set_action(gz::msgs::Marker::DELETE_ALL);

igndbg << "Clearing markers on "
gzdbg << "Clearing markers on "
<< this->pointCloudTopic + this->floatVTopic
<< std::endl;

6 changes: 3 additions & 3 deletions src/plugins/scene3d/Scene3D.cc
Original file line number Diff line number Diff line change
@@ -313,7 +313,7 @@ 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() ||
@@ -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?
4 changes: 2 additions & 2 deletions src/plugins/screenshot/Screenshot.cc
Original file line number Diff line number Diff line change
@@ -168,7 +168,7 @@ void Screenshot::SaveScreenshot()
image.SetFromData(cameraImage.Data<unsigned char>(), 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;
}
Original file line number Diff line number Diff line change
@@ -324,7 +324,7 @@ 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,
4 changes: 2 additions & 2 deletions src/plugins/world_control/WorldControl.cc
Original file line number Diff line number Diff line change
@@ -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";
}

/////////////////////////////////////////////////
4 changes: 2 additions & 2 deletions test/integration/ExamplesBuild_TEST.cc
Original file line number Diff line number Diff line change
@@ -146,13 +146,13 @@ void ExamplesBuild::Build(const std::string &_type)
// Source directory for this example
auto sourceDir = examplesDir + "/" + base;
ASSERT_TRUE(gz::common::exists(sourceDir));
igndbg << "Source: " << sourceDir << std::endl;
gzdbg << "Source: " << sourceDir << std::endl;

// Create a temp build directory
std::string tmpBuildDir;
ASSERT_TRUE(createAndSwitchToTempDir(tmpBuildDir));
EXPECT_TRUE(gz::common::exists(tmpBuildDir));
igndbg << "Build directory: " << tmpBuildDir<< std::endl;
gzdbg << "Build directory: " << tmpBuildDir<< std::endl;

char cmd[1024];

2 changes: 1 addition & 1 deletion test/integration/Examples_TEST.cc
Original file line number Diff line number Diff line change
@@ -45,7 +45,7 @@ TEST(ExampleTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Configs))
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");
2 changes: 1 addition & 1 deletion test/integration/marker_manager.cc
Original file line number Diff line number Diff line change
@@ -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());
}