RobotViewerGuiPlugin.cpp
Go to the documentation of this file.
1/*
2 * This file is part of ArmarX.
3 *
4 * Copyright (C) 2011-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
5 *
6 * ArmarX is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * ArmarX is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 *
18 * @package
19 * @author
20 * @date
21 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
22 * GNU General Public License
23 */
25
26#include <VirtualRobot/CollisionDetection/CollisionModel.h>
27#include <VirtualRobot/MathTools.h>
28#include <VirtualRobot/Nodes/RobotNode.h>
29#include <VirtualRobot/Robot.h>
30#include <VirtualRobot/RobotNodeSet.h>
31#include <VirtualRobot/Visualization/CoinVisualization/CoinVisualization.h>
32#include <VirtualRobot/Visualization/VisualizationFactory.h>
33#include <VirtualRobot/XML/RobotIO.h>
34
40
42
43// Qt headers
44#include <QCheckBox>
45#include <QClipboard>
46#include <QPushButton>
47#include <QScrollBar>
48#include <Qt>
49#include <QtGlobal>
50
52
54
55#include <Inventor/Qt/SoQt.h>
56#include <Inventor/SoDB.h>
57
58// System
59#include <stdio.h>
60#include <stdlib.h>
61#include <string.h>
62
63#include <cmath>
64#include <filesystem>
65#include <iostream>
66#include <string>
67
68#define TIMER_MS 33
69#define ROBOTSTATE_NAME_DEFAULT "RobotStateComponent"
70
71using namespace armarx;
72using namespace VirtualRobot;
73
83
85 "Joint Configuration",
86 "Framed Position (TCP)",
87 "Framed Orientation (TCP)",
88 "Framed Pose (TCP)",
89};
90
95
97 rootVisu(nullptr), robotVisu(nullptr), timerSensor(nullptr), debugLayerVisu(nullptr)
98{
99 ui.setupUi(getWidget());
100 getWidget()->setEnabled(false);
101
102 QComboBox* outputTypes = ui.outputTypeComboBox;
103 for (int typeIndex = 0; typeIndex < eRobotStateOutputTypeSize; ++typeIndex)
104 {
105 auto& typeName = ROBOT_STATE_OUTPUT_TYPE_NAMES[typeIndex];
106 outputTypes->addItem(typeName);
107 }
108 outputTypes->setCurrentIndex(0);
109}
110
111void
113{
114 bool createDebugDrawer = true;
115 verbose = true;
116
118
119 rootVisu = new SoSeparator();
120 rootVisu->ref();
121
122 robotVisu = new SoSeparator;
123 robotVisu->ref();
124 rootVisu->addChild(robotVisu);
125
126 // create the debugdrawer component
127 if (createDebugDrawer)
128 {
129 std::string debugDrawerComponentName = "RobotViewerGUIDebugDrawer_" + getName();
130 ARMARX_INFO << "Creating component " << debugDrawerComponentName;
133
134 if (mutex3D)
135 {
136 debugDrawer->setMutex(mutex3D);
137 }
138 else
139 {
140 ARMARX_ERROR << " No 3d mutex available...";
141 }
142
144 m->addObject(debugDrawer);
145
146
147 {
148 std::unique_lock lock(*mutex3D);
149 debugLayerVisu = new SoSeparator();
150 debugLayerVisu->ref();
151 debugLayerVisu->addChild(debugDrawer->getVisualization());
152 rootVisu->addChild(debugLayerVisu);
153 }
154 }
155
156 showRoot(true);
157}
158
159void
161{
163 usingTopic(robotStateComponentPrx->getRobotStateTopicName());
164 if (robotVisu)
165 {
166 robotVisu->removeAllChildren();
167 }
168
169 robot.reset();
170
171 std::string rfile;
172 Ice::StringSeq includePaths;
173
174 // get robot filename
175 try
176 {
177
178 Ice::StringSeq packages = robotStateComponentPrx->getArmarXPackages();
179 packages.push_back(Application::GetProjectName());
180 ARMARX_VERBOSE << "ArmarX packages " << packages;
181
182 for (const std::string& projectName : packages)
183 {
184 if (projectName.empty())
185 {
186 continue;
187 }
188
189 CMakePackageFinder project(projectName);
190 auto pathsString = project.getDataDir();
191 ARMARX_VERBOSE << "Data paths of ArmarX package " << projectName << ": " << pathsString;
192 Ice::StringSeq projectIncludePaths = Split(pathsString, ";,", true, true);
193 ARMARX_VERBOSE << "Result: Data paths of ArmarX package " << projectName << ": "
194 << projectIncludePaths;
195 includePaths.insert(
196 includePaths.end(), projectIncludePaths.begin(), projectIncludePaths.end());
197 }
198
199 rfile = robotStateComponentPrx->getRobotFilename();
200 ARMARX_VERBOSE << "Relative robot file " << rfile;
201 ArmarXDataPath::getAbsolutePath(rfile, rfile, includePaths);
202 ARMARX_VERBOSE << "Absolute robot file " << rfile;
203 }
204 catch (...)
205 {
206 ARMARX_ERROR << "Unable to retrieve robot filename";
207 }
208
209 try
210 {
211 ARMARX_INFO << "Loading robot from file " << rfile;
212 robot = loadRobotFile(rfile);
213 }
214 catch (...)
215 {
216 ARMARX_ERROR << "Failed to init robot";
217 }
218
219 if (!robot)
220 {
221 getObjectScheduler()->terminate();
222
223 if (getWidget()->parentWidget())
224 {
225 getWidget()->parentWidget()->close();
226 }
227
228 std::cout << "returning" << std::endl;
229 return;
230 }
231
232 setRobotVisu(ui.radioButtonCol->isChecked());
233 showRobot(ui.cbRobot->isChecked());
234
235 // start update timer
236 SoSensorManager* sensor_mgr = SoDB::getSensorManager();
237 timerSensor = new SoTimerSensor(timerCB, this);
238 timerSensor->setInterval(SbTime(TIMER_MS / 1000.0f));
239 sensor_mgr->insertTimerSensor(timerSensor);
240
241 // Initialize the copy state GUI
242 {
243 auto sharedRobot = robotStateComponentPrx->getSynchronizedRobot();
244
245 ui.kinematicChainComboBox->addItem("<All Nodes>");
246 robotNodeSetNames = sharedRobot->getRobotNodeSets();
247 for (std::string const& nodeSetName : robotNodeSetNames)
248 {
249 ui.kinematicChainComboBox->addItem(QString::fromStdString(nodeSetName));
250 }
251 ui.kinematicChainComboBox->setCurrentIndex(0);
252 ui.tcpComboBox->addItem("<default>");
253 for (auto& node : sharedRobot->getRobotNodes())
254 {
255 ui.tcpComboBox->addItem(QString::fromStdString(node));
256 }
257 ui.tcpComboBox->setCurrentIndex(0);
258
259 ui.frameComboBox->addItem("<Global>");
260 robotNodeNames = sharedRobot->getRobotNodes();
261 for (std::string const& nodeName : robotNodeNames)
262 {
263 ui.frameComboBox->addItem(QString::fromStdString(nodeName));
264 }
265 ui.frameComboBox->setCurrentIndex(0);
266 }
267
268 connectSlots();
270}
271
272void
274{
275
276 ARMARX_INFO << "Disconnecting component";
277
278 // stop update timer
279 if (timerSensor)
280 {
281 SoSensorManager* sensor_mgr = SoDB::getSensorManager();
282 sensor_mgr->removeTimerSensor(timerSensor);
283 }
284
285 ARMARX_INFO << "Disconnecting component: timer stopped";
286
287 robotStateComponentPrx = nullptr;
288
289 {
290 std::unique_lock lock(*mutex3D);
291
292 if (robotVisu)
293 {
294 ARMARX_INFO << "Disconnecting component: removing visu";
295 robotVisu->removeAllChildren();
296 }
297
298 robot.reset();
299 }
300 ARMARX_INFO << "Disconnecting component: finished";
301}
302
303void
305{
307
308 {
309 std::unique_lock lock(*mutex3D);
310
311 if (debugLayerVisu)
312 {
313 debugLayerVisu->removeAllChildren();
314 debugLayerVisu->unref();
315 debugLayerVisu = NULL;
316 }
317
318 if (robotVisu)
319 {
320 robotVisu->removeAllChildren();
321 robotVisu->unref();
322 robotVisu = NULL;
323 }
324
325 if (rootVisu)
326 {
327 rootVisu->removeAllChildren();
328 rootVisu->unref();
329 rootVisu = NULL;
330 }
331 }
332
333 /*
334 if (debugDrawer && debugDrawer->getObjectScheduler())
335 {
336 ARMARX_INFO << "Removing DebugDrawer component...";
337 debugDrawer->getObjectScheduler()->terminate();
338 ARMARX_INFO << "Removing DebugDrawer component...done";
339 }
340 */
341}
342
343QPointer<QDialog>
345{
346 if (!dialog)
347 {
348 dialog = new SimpleConfigDialog(parent);
349 dialog->addProxyFinder<RobotStateComponentInterfacePrx>(
350 {"RobotStateComponent", "", "RobotState*"});
351 }
352 return qobject_cast<SimpleConfigDialog*>(dialog);
353}
354
355void
357{
358 robotStateComponentName = dialog->getProxyName("RobotStateComponent");
359}
360
361void
363{
365 settings->value("RobotStateComponent", QString::fromStdString(ROBOTSTATE_NAME_DEFAULT))
366 .toString()
367 .toStdString();
368
369 bool showRob = settings->value("showRobot", QVariant(true)).toBool();
370 bool fullMod = settings->value("fullModel", QVariant(true)).toBool();
371 ui.cbRobot->setChecked(showRob);
372 ui.radioButtonFull->setChecked(fullMod);
373 ui.radioButtonCol->setChecked(!fullMod);
374}
375
376void
378{
379 settings->setValue("RobotStateComponent", QString::fromStdString(robotStateComponentName));
380 settings->setValue("showRobot", ui.cbRobot->isChecked());
381 settings->setValue("fullModel", ui.radioButtonFull->isChecked());
382}
383
384void
386{
387 robotVisu->removeAllChildren();
388
389 if (!robot)
390 {
391 return;
392 }
393
394 std::unique_lock lock(*mutex3D);
395
396 VirtualRobot::SceneObject::VisualizationType v = VirtualRobot::SceneObject::Full;
397
398 if (colModel)
399 {
400 v = VirtualRobot::SceneObject::Collision;
401 }
402
403 CoinVisualizationPtr robotViewerVisualization = robot->getVisualization(v);
404
405 if (robotViewerVisualization)
406 {
407 robotVisu->addChild(robotViewerVisualization->getCoinVisualization());
408 }
409 else
410 {
411 ARMARX_WARNING << "no robot visu available...";
412 }
413}
414
415void
417{
418 if (debugDrawer)
419 {
420 if (show)
421 {
422 debugDrawer->enableAllLayers();
423 }
424 else
425 {
426 debugDrawer->disableAllLayers();
427 }
428 }
429}
430
431void
433{
434 if (!debugDrawer)
435 {
436 return;
437 }
438
439 std::string poseName("root");
440
441 if (show)
442 {
443 Eigen::Matrix4f gp = Eigen::Matrix4f::Identity();
444 PosePtr gpP(new Pose(gp));
445 debugDrawer->setPoseDebugLayerVisu(poseName, gpP);
446 }
447 else
448 {
449 debugDrawer->removePoseDebugLayerVisu(poseName);
450 }
451}
452
453void
455{
456 if (!robotVisu)
457 {
458 return;
459 }
460
461 std::unique_lock lock(*mutex3D);
462
463 if (show && rootVisu->findChild(robotVisu) < 0)
464 {
465 rootVisu->addChild(robotVisu);
466 }
467 else if (!show && rootVisu->findChild(robotVisu) >= 0)
468 {
469 rootVisu->removeChild(robotVisu);
470 }
471}
472
473SoNode*
478
479void
481{
483
484 if (!controller)
485 {
486 return;
487 }
488
489 controller->updateRobotVisu();
490}
491
492void
494{
495 // Robot viewer GUI (top part)
496 connect(this, SIGNAL(robotStatusUpdated()), this, SLOT(updateRobotVisu()));
497 connect(ui.cbDebugLayer,
498 SIGNAL(toggled(bool)),
499 this,
500 SLOT(showVisuLayers(bool)),
501 Qt::QueuedConnection);
502 connect(ui.cbRoot, SIGNAL(toggled(bool)), this, SLOT(showRoot(bool)), Qt::QueuedConnection);
503 connect(ui.cbRobot, SIGNAL(toggled(bool)), this, SLOT(showRobot(bool)), Qt::QueuedConnection);
504 connect(
505 ui.radioButtonCol, SIGNAL(toggled(bool)), this, SLOT(colModel(bool)), Qt::QueuedConnection);
506 connect(ui.radioButtonFull,
507 SIGNAL(toggled(bool)),
508 this,
509 SLOT(colModel(bool)),
510 Qt::QueuedConnection);
511 connect(ui.horizontalSliderCollisionModelInflation,
512 SIGNAL(sliderMoved(int)),
513 this,
514 SLOT(inflateCollisionModel(int)),
515 Qt::QueuedConnection);
516
517 // Copy state GUI (bottom part)
518 connect(ui.kinematicChainComboBox,
519 SIGNAL(currentIndexChanged(int)),
520 this,
521 SLOT(updateStateSettings(int)));
522 connect(
523 ui.frameComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(updateStateSettings(int)));
524 connect(ui.outputTypeComboBox,
525 SIGNAL(currentIndexChanged(int)),
526 this,
527 SLOT(updateStateSettings(int)));
528 connect(ui.copyToClipboardButton, SIGNAL(clicked()), this, SLOT(copyToClipboard()));
529
530 connect(this,
531 SIGNAL(configurationChanged()),
532 this,
534 Qt::QueuedConnection);
535}
536
538RobotViewerWidgetController::loadRobotFile(std::string fileName)
539{
541
542 if (!ArmarXDataPath::getAbsolutePath(fileName, fileName))
543 {
544 ARMARX_INFO << "Could not find Robot XML file with name " << fileName;
545 }
546
547 robot = RobotIO::loadRobot(fileName);
548
549 if (!robot)
550 {
551 ARMARX_INFO << "Could not find Robot XML file with name " << fileName;
552 }
553
554 return robot;
555}
556
557void
559{
560 bool colModel = false;
561
562 if (ui.radioButtonCol->isChecked())
563 {
564 colModel = true;
565 }
566 ui.horizontalSliderCollisionModelInflation->setEnabled(ui.radioButtonCol->isChecked());
567
569}
570
571void
576
577void
579{
580 QClipboard* clipboard = QApplication::clipboard();
581 if (clipboard)
582 {
583 QString currentText = ui.previewTextBox->document()->toPlainText();
584 clipboard->setText(currentText);
585 }
586 else
587 {
588 ARMARX_ERROR << "Could not copy text to clipboard";
589 }
590}
591
592static std::string
593writeJointConfigurationToJson(VirtualRobot::Robot& robot,
594 VirtualRobot::RobotNodeSetPtr const& robotNodeSet)
595{
596 int indenting = 2; // Magic value for correct indenting
597 JsonWriter writer(indenting);
598 writer.startObject();
599
600 if (robotNodeSet)
601 {
602 for (RobotNodePtr const& node : *robotNodeSet)
603 {
604 writer.writeKey(node->getName());
605 writer.writeRawValue(to_string(node->getJointValue()));
606 }
607 }
608 else // Write all rotational and translational joints
609 {
610 for (RobotNodePtr const& node : robot.getRobotNodes())
611 {
612 if (node->isRotationalJoint() || node->isTranslationalJoint())
613 {
614 writer.writeKey(node->getName());
615 writer.writeRawValue(to_string(node->getJointValue()));
616 }
617 }
618 }
619
620 writer.endObject();
621 return writer.toString();
622}
623
624template <typename FrameType>
625static std::string
626writeFramedTCP(VirtualRobot::RobotPtr const& robot,
627 VirtualRobot::RobotNodeSetPtr const& nodeSet,
628 std::string const& frameName,
629 const std::string& tcpName)
630{
631 if (nodeSet)
632 {
633 auto tcp = tcpName.empty() ? nodeSet->getTCP() : robot->getRobotNode(tcpName);
634 Eigen::Matrix4f tcpMatrix = tcp->getPoseInRootFrame();
635 IceInternal::Handle<FrameType> position =
636 new FrameType(tcpMatrix, robot->getRootNode()->getName(), robot->getName());
637 position->changeFrame(robot, frameName);
638
639 JSONObjectPtr object = new JSONObject;
640 object->serializeIceObject(position);
641 return object->asString(true);
642 }
643 else
644 {
645 return "{}";
646 }
647}
648
649void
651{
652 if (!robot)
653 {
654 return;
655 }
656
657 std::string kinematicChainName = ui.kinematicChainComboBox->currentText().toStdString();
658 VirtualRobot::RobotNodeSetPtr robotNodeSet;
659 if (ui.kinematicChainComboBox->currentIndex() > 0)
660 {
661 robotNodeSet = robot->getRobotNodeSet(kinematicChainName);
662 }
663
664 std::string frameName = ui.frameComboBox->currentText().toStdString();
665 if (ui.frameComboBox->currentIndex() <= 0)
666 {
667 frameName = "Global";
668 }
669
670 int selectedOutputType = ui.outputTypeComboBox->currentIndex();
671 if (selectedOutputType < 0 || selectedOutputType > eRobotStateOutputTypeSize)
672 {
673 selectedOutputType = eJointConfiguration;
674 }
675 RobotStateOutputType outputType = static_cast<RobotStateOutputType>(selectedOutputType);
676
677 // Set the locale so that the floats get converted correctly
678 const char* oldLocale = std::setlocale(LC_ALL, "en_US.UTF-8");
679 std::string tcpName =
680 ui.tcpComboBox->currentIndex() == 0 ? "" : ui.tcpComboBox->currentText().toStdString();
681 std::string output;
682 switch (outputType)
683 {
685 output = writeJointConfigurationToJson(*robot, robotNodeSet);
686 break;
687
689 output = writeFramedTCP<FramedPosition>(robot, robotNodeSet, frameName, tcpName);
690 break;
691
693 output = writeFramedTCP<FramedOrientation>(robot, robotNodeSet, frameName, tcpName);
694 break;
695
696 case eFramedPoseTCP:
697 output = writeFramedTCP<FramedPose>(robot, robotNodeSet, frameName, tcpName);
698 break;
699
700 default:
701 ARMARX_ERROR << "Output type not supported: " << outputType;
702 break;
703 }
704
705 QString jsonOutput = QString::fromStdString(output);
706 QPlainTextEdit* previewTextBox = ui.previewTextBox;
707 QTextDocument* document = previewTextBox->document();
708 if (document->toPlainText() != jsonOutput)
709 {
710 QScrollBar* scrollBar = previewTextBox->verticalScrollBar();
711 int oldScrollValue = scrollBar->value();
712
713 document->setPlainText(jsonOutput);
714
715 int newScrollValue = std::min(oldScrollValue, scrollBar->maximum());
716 scrollBar->setValue(newScrollValue);
717 }
718
719 std::setlocale(LC_ALL, oldLocale);
720}
721
722void
724{
725 if (ui.autoUpdateCheckBox->isChecked())
726 {
727 updateState();
728 }
729}
730
731void
733{
734 std::unique_lock lock(*mutex3D);
735
737 {
738 return;
739 }
740
741 // try
742 // {
743 // RemoteRobot::synchronizeLocalClone(robot, robotStateComponentPrx);
744 // }
745 // catch (...)
746 // {
747 // ARMARX_INFO << deactivateSpam(5) << "Robot synchronization failed";
748 // return;
749 // }
750
751 Eigen::Matrix4f gp = robot->getGlobalPose();
752 QString roboInfo("Robot Pose (global): pos: ");
753 roboInfo += QString::number(gp(0, 3), 'f', 2);
754 roboInfo += QString(", ");
755 roboInfo += QString::number(gp(1, 3), 'f', 2);
756 roboInfo += QString(", ");
757 roboInfo += QString::number(gp(2, 3), 'f', 2);
758 roboInfo += QString(", rot:");
759 Eigen::Vector3f rpy;
760 VirtualRobot::MathTools::eigen4f2rpy(gp, rpy);
761 roboInfo += QString::number(rpy(0), 'f', 2);
762 roboInfo += QString(", ");
763 roboInfo += QString::number(rpy(1), 'f', 2);
764 roboInfo += QString(", ");
765 roboInfo += QString::number(rpy(2), 'f', 2);
766 ui.leRobotInfo->setText(roboInfo);
767
769}
770
771void
773{
774 std::unique_lock lock(*mutex3D);
775
776 for (auto& model : robot->getCollisionModels())
777 {
778 model->inflateModel(inflationValueMM);
779 }
780 ui.label_collisionModelInflationValue->setText(QString::number(inflationValueMM) + " mm");
781 setRobotVisu(true);
782}
783
784void
786{
787 //ARMARX_IMPORTANT << "set mutex3d :" << mutex3D.get();
788 this->mutex3D = mutex3D;
789
790 if (debugDrawer)
791 {
792 debugDrawer->setMutex(mutex3D);
793 }
794}
795
796void
798 Ice::Long timestamp,
799 bool poseChanged,
800 const Ice::Current&)
801{
802 std::unique_lock lock(*mutex3D);
804 {
805 return;
806 }
807 Eigen::Matrix4f newPose = PosePtr::dynamicCast(pose)->toEigen();
808
809 if (!robot->getGlobalPose().isApprox(newPose))
810 {
811 robot->setGlobalPose(newPose);
812 }
813}
814
815void
817 Ice::Long,
818 bool aValueChanged,
819 const Ice::Current&)
820{
821 std::unique_lock lock(*mutex3D);
822
823 if (!robotStateComponentPrx || !robot || !aValueChanged)
824 {
825 return;
826 }
827 robot->setJointValues(jointAngles);
828}
std::string timestamp()
#define ROBOTSTATE_NAME_DEFAULT
@ eFramedOrientationTCP
@ eRobotStateOutputTypeSize
@ eFramedPositionTCP
@ eJointConfiguration
#define TIMER_MS
const QString ROBOT_STATE_OUTPUT_TYPE_NAMES[eRobotStateOutputTypeSize]
constexpr T c
void serializeIceObject(const SerializablePtr &obj)
static const std::string & GetProjectName()
static bool getAbsolutePath(const std::string &relativeFilename, std::string &storeAbsoluteFilename, const std::vector< std::string > &additionalSearchPaths={}, bool verbose=true)
std::enable_if<!HasGetWidgetName< ArmarXWidgetType >::value >::type addWidget()
virtual QPointer< QWidget > getWidget()
getWidget returns a pointer to the a widget of this controller.
std::shared_ptr< RecursiveMutex > RecursiveMutexPtr
std::shared_ptr< std::recursive_mutex > mutex3D
void enableMainWidgetAsync(bool enable)
This function enables/disables the main widget asynchronously (if called from a non qt thread).
The CMakePackageFinder class provides an interface to the CMake Package finder capabilities.
static TPtr create(Ice::PropertiesPtr properties=Ice::createProperties(), const std::string &configName="", const std::string &configDomain="ArmarX")
Factory method for a component.
Definition Component.h:116
The JSONObject class is used to represent and (de)serialize JSON objects.
Definition JSONObject.h:44
bool usingProxy(const std::string &name, const std::string &endpoints="")
Registers a proxy for retrieval after initialization and adds it to the dependency list.
ArmarXObjectSchedulerPtr getObjectScheduler() const
void usingTopic(const std::string &name, bool orderedPublishing=false)
Registers a proxy for subscription after initialization.
std::string getName() const
Retrieve name of object.
Ice::ObjectPrx getProxy(long timeoutMs=0, bool waitForScheduler=true) const
Returns the proxy of this object (optionally it waits for the proxy)
ArmarXManagerPtr getArmarXManager() const
Returns the ArmarX manager used to add and remove components.
The Pose class.
Definition Pose.h:243
Ice::PropertiesPtr getIceProperties() const
Returns the set of Ice properties.
void onInitComponent() override
Pure virtual hook for the subclass.
void onDisconnectComponent() override
Hook for subclass.
void loadSettings(QSettings *settings) override
Implement to load the settings that are part of the GUI configuration.
void saveSettings(QSettings *settings) override
Implement to save the settings as part of the GUI configuration.
SoNode * getScene() override
Reimplementing this function and returning a SoNode* will show this SoNode in the 3DViewerWidget,...
void setMutex3D(RecursiveMutexPtr const &mutex3D) override
This mutex is used to protect 3d scene updates. Usually called by the ArmarXGui main window on creati...
armarx::DebugDrawerComponentPtr debugDrawer
QPointer< QDialog > getConfigDialog(QWidget *parent=0) override
getConfigDialog returns a pointer to the a configuration widget of this controller.
void onConnectComponent() override
Pure virtual hook for the subclass.
void configured() override
This function must be implemented by the user, if he supplies a config dialog.
void reportJointValues(const NameValueMap &jointAngles, Ice::Long timestamp, bool aValueChanged, const Ice::Current &) override
void inflateCollisionModel(int inflationValueMM)
RobotStateComponentInterfacePrx robotStateComponentPrx
void onExitComponent() override
Hook for subclass.
void reportGlobalRobotRootPose(const FramedPoseBasePtr &pose, Ice::Long timestamp, bool poseChanged, const Ice::Current &) override
static void timerCB(void *data, SoSensor *sensor)
A config-dialog containing one (or multiple) proxy finders.
#define ARMARX_INFO
The normal logging level.
Definition Logging.h:181
#define ARMARX_ERROR
The logging level for unexpected behaviour, that must be fixed.
Definition Logging.h:196
#define ARMARX_WARNING
The logging level for unexpected behaviour, but not a serious problem.
Definition Logging.h:193
#define ARMARX_VERBOSE
The logging level for verbose information.
Definition Logging.h:187
std::shared_ptr< class Robot > RobotPtr
Definition Bus.h:19
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceUtil::Handle< ArmarXManager > ArmarXManagerPtr
std::vector< std::string > Split(const std::string &source, const std::string &splitBy, bool trimElements=false, bool removeEmptyElements=false)
IceInternal::Handle< Pose > PosePtr
Definition Pose.h:306
IceInternal::Handle< JSONObject > JSONObjectPtr
Definition JSONObject.h:34
::IceInternal::ProxyHandle<::IceProxy::armarx::RobotStateComponentInterface > RobotStateComponentInterfacePrx
const std::string & to_string(const std::string &s)
boost::shared_ptr< VirtualRobot::CoinVisualization > CoinVisualizationPtr