Skip to content

Commit

Permalink
Migrate igndbg -> gzdbg
Browse files Browse the repository at this point in the history
Signed-off-by: methylDragon <[email protected]>
  • Loading branch information
methylDragon committed May 27, 2022
1 parent fda266f commit f468d6e
Show file tree
Hide file tree
Showing 14 changed files with 39 additions and 39 deletions.
22 changes: 11 additions & 11 deletions src/Application.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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())
{
Expand Down Expand Up @@ -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))
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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())
Expand All @@ -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;
Expand Down Expand Up @@ -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())
{
Expand Down Expand Up @@ -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())
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/camera_tracking/CameraTracking.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/grid_config/GridConfig.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/marker_manager/MarkerManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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",
Expand All @@ -190,7 +190,7 @@ void MarkerManagerPrivate::Initialize()
<< "_array service.\n";
}

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

/////////////////////////////////////////////////
Expand Down
16 changes: 8 additions & 8 deletions src/plugins/minimal_scene/MinimalScene.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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>();
}
Expand All @@ -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?
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/point_cloud/PointCloud.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
6 changes: 3 additions & 3 deletions src/plugins/scene3d/Scene3D.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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() ||
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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?
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/screenshot/Screenshot.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/world_control/WorldControl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}

/////////////////////////////////////////////////
Expand Down
4 changes: 2 additions & 2 deletions test/integration/ExamplesBuild_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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];

Expand Down
2 changes: 1 addition & 1 deletion test/integration/Examples_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion test/integration/marker_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down

0 comments on commit f468d6e

Please sign in to comment.