From 5f918c57b6090327009bdbc896a725971051be25 Mon Sep 17 00:00:00 2001 From: Nikolaus Vahrenkamp <vahrenkamp@kit.edu> Date: Thu, 26 Feb 2015 10:19:15 +0100 Subject: [PATCH] removed printf --- .../RobotViewerGuiPlugin.cpp | 37 +++++++++++-------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/source/RobotAPI/gui_plugins/RobotViewerPlugin/RobotViewerGuiPlugin.cpp b/source/RobotAPI/gui_plugins/RobotViewerPlugin/RobotViewerGuiPlugin.cpp index bd20b41c1..4b5939c2f 100644 --- a/source/RobotAPI/gui_plugins/RobotViewerPlugin/RobotViewerGuiPlugin.cpp +++ b/source/RobotAPI/gui_plugins/RobotViewerPlugin/RobotViewerGuiPlugin.cpp @@ -61,6 +61,7 @@ RobotViewerWidgetController::RobotViewerWidgetController() void RobotViewerWidgetController::onInitComponent() { + bool createDebugDrawer = true; verbose = true; usingProxy(robotStateComponentName); @@ -74,24 +75,27 @@ void RobotViewerWidgetController::onInitComponent() rootVisu->addChild(robotVisu); // create the debugdrawer component - std::string debugDrawerComponentName = "RobotViewerGUIDebugDrawer_" + getName(); - ARMARX_INFO << "Creating component " << debugDrawerComponentName; - debugDrawer = Component::create<DebugDrawerComponent>(properties,debugDrawerComponentName); - //debugDrawer->setVisuUpdateTime(1); - if (mutex3D) + if (createDebugDrawer) { - debugDrawer->setMutex(mutex3D); - } else - ARMARX_ERROR << " No 3d mutex available..."; - ArmarXManagerPtr m = getArmarXManager(); - m->addObject(debugDrawer); + std::string debugDrawerComponentName = "RobotViewerGUIDebugDrawer_" + getName(); + ARMARX_INFO << "Creating component " << debugDrawerComponentName; + debugDrawer = Component::create<DebugDrawerComponent>(properties,debugDrawerComponentName); + if (mutex3D) + { + debugDrawer->setMutex(mutex3D); + } else + ARMARX_ERROR << " No 3d mutex available..."; + ArmarXManagerPtr m = getArmarXManager(); + m->addObject(debugDrawer); - { - boost::recursive_mutex::scoped_lock lock(*mutex3D); - debugLayerVisu = new SoSeparator(); - debugLayerVisu->ref(); - debugLayerVisu->addChild(debugDrawer->getVisualization()); - rootVisu->addChild(debugLayerVisu); + + { + boost::recursive_mutex::scoped_lock lock(*mutex3D); + debugLayerVisu = new SoSeparator(); + debugLayerVisu->ref(); + debugLayerVisu->addChild(debugDrawer->getVisualization()); + rootVisu->addChild(debugLayerVisu); + } } showRoot(true); } @@ -346,6 +350,7 @@ void RobotViewerWidgetController::updateRobotVisu() RemoteRobot::synchronizeLocalClone(robot,robotStateComponentPrx); } catch (...) { + ARMARX_INFO << deactivateSpam(5) << "Robot synchronization failed"; return; } -- GitLab