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 <RobotAPI/gui-plugins/RobotViewerPlugin/ui_RobotViewerGuiPlugin.h>
27
28#include <VirtualRobot/CollisionDetection/CollisionModel.h>
29#include <VirtualRobot/MathTools.h>
30#include <VirtualRobot/Nodes/RobotNode.h>
31#include <VirtualRobot/Robot.h>
32#include <VirtualRobot/RobotNodeSet.h>
33#include <VirtualRobot/Visualization/CoinVisualization/CoinVisualization.h>
34#include <VirtualRobot/Visualization/VisualizationFactory.h>
35#include <VirtualRobot/XML/RobotIO.h>
36
42
44
45// Qt headers
46#include <QCheckBox>
47#include <QClipboard>
48#include <QPushButton>
49#include <QScrollBar>
50#include <Qt>
51#include <QtGlobal>
52
54
56
57#include <Inventor/Qt/SoQt.h>
58#include <Inventor/SoDB.h>
59
60// System
61#include <stdio.h>
62#include <stdlib.h>
63#include <string.h>
64
65#include <cmath>
66#include <filesystem>
67#include <iostream>
68#include <string>
69
70#define TIMER_MS 33
71#define ROBOTSTATE_NAME_DEFAULT "RobotStateComponent"
72
73using namespace armarx;
74using namespace VirtualRobot;
75
85
87 "Joint Configuration",
88 "Framed Position (TCP)",
89 "Framed Orientation (TCP)",
90 "Framed Pose (TCP)",
91};
92
97
99
101 rootVisu(nullptr), robotVisu(nullptr), timerSensor(nullptr), debugLayerVisu(nullptr)
102{
103 ui = std::make_unique<Ui::RobotViewerGuiPlugin>();
104 ui->setupUi(getWidget());
105 getWidget()->setEnabled(false);
106
107 QComboBox* outputTypes = ui->outputTypeComboBox;
108 for (int typeIndex = 0; typeIndex < eRobotStateOutputTypeSize; ++typeIndex)
109 {
110 auto& typeName = ROBOT_STATE_OUTPUT_TYPE_NAMES[typeIndex];
111 outputTypes->addItem(typeName);
112 }
113 outputTypes->setCurrentIndex(0);
114}
115
116void
118{
119 bool createDebugDrawer = true;
120 verbose = true;
121
123
124 rootVisu = new SoSeparator();
125 rootVisu->ref();
126
127 robotVisu = new SoSeparator;
128 robotVisu->ref();
129 rootVisu->addChild(robotVisu);
130
131 // create the debugdrawer component
132 if (createDebugDrawer)
133 {
134 std::string debugDrawerComponentName = "RobotViewerGUIDebugDrawer_" + getName();
135 ARMARX_INFO << "Creating component " << debugDrawerComponentName;
138
139 if (mutex3D)
140 {
141 debugDrawer->setMutex(mutex3D);
142 }
143 else
144 {
145 ARMARX_ERROR << " No 3d mutex available...";
146 }
147
149 m->addObject(debugDrawer);
150
151
152 {
153 std::unique_lock lock(*mutex3D);
154 debugLayerVisu = new SoSeparator();
155 debugLayerVisu->ref();
156 debugLayerVisu->addChild(debugDrawer->getVisualization());
157 rootVisu->addChild(debugLayerVisu);
158 }
159 }
160
161 showRoot(true);
162}
163
164void
166{
168 usingTopic(robotStateComponentPrx->getRobotStateTopicName());
169 if (robotVisu)
170 {
171 robotVisu->removeAllChildren();
172 }
173
174 robot.reset();
175
176 std::string rfile;
177 Ice::StringSeq includePaths;
178
179 // get robot filename
180 try
181 {
182
183 Ice::StringSeq packages = robotStateComponentPrx->getArmarXPackages();
184 packages.push_back(Application::GetProjectName());
185 ARMARX_VERBOSE << "ArmarX packages " << packages;
186
187 for (const std::string& projectName : packages)
188 {
189 if (projectName.empty())
190 {
191 continue;
192 }
193
194 CMakePackageFinder project(projectName);
195 auto pathsString = project.getDataDir();
196 ARMARX_VERBOSE << "Data paths of ArmarX package " << projectName << ": " << pathsString;
197 Ice::StringSeq projectIncludePaths = Split(pathsString, ";,", true, true);
198 ARMARX_VERBOSE << "Result: Data paths of ArmarX package " << projectName << ": "
199 << projectIncludePaths;
200 includePaths.insert(
201 includePaths.end(), projectIncludePaths.begin(), projectIncludePaths.end());
202 }
203
204 rfile = robotStateComponentPrx->getRobotFilename();
205 ARMARX_VERBOSE << "Relative robot file " << rfile;
206 ArmarXDataPath::getAbsolutePath(rfile, rfile, includePaths);
207 ARMARX_VERBOSE << "Absolute robot file " << rfile;
208 }
209 catch (...)
210 {
211 ARMARX_ERROR << "Unable to retrieve robot filename";
212 }
213
214 try
215 {
216 ARMARX_INFO << "Loading robot from file " << rfile;
217 robot = loadRobotFile(rfile);
218 }
219 catch (...)
220 {
221 ARMARX_ERROR << "Failed to init robot";
222 }
223
224 if (!robot)
225 {
226 getObjectScheduler()->terminate();
227
228 if (getWidget()->parentWidget())
229 {
230 getWidget()->parentWidget()->close();
231 }
232
233 std::cout << "returning" << std::endl;
234 return;
235 }
236
237 setRobotVisu(ui->radioButtonCol->isChecked());
238 showRobot(ui->cbRobot->isChecked());
239
240 // start update timer
241 SoSensorManager* sensor_mgr = SoDB::getSensorManager();
242 timerSensor = new SoTimerSensor(timerCB, this);
243 timerSensor->setInterval(SbTime(TIMER_MS / 1000.0f));
244 sensor_mgr->insertTimerSensor(timerSensor);
245
246 // Initialize the copy state GUI
247 {
248 auto sharedRobot = robotStateComponentPrx->getSynchronizedRobot();
249
250 ui->kinematicChainComboBox->addItem("<All Nodes>");
251 robotNodeSetNames = sharedRobot->getRobotNodeSets();
252 for (std::string const& nodeSetName : robotNodeSetNames)
253 {
254 ui->kinematicChainComboBox->addItem(QString::fromStdString(nodeSetName));
255 }
256 ui->kinematicChainComboBox->setCurrentIndex(0);
257 ui->tcpComboBox->addItem("<default>");
258 for (auto& node : sharedRobot->getRobotNodes())
259 {
260 ui->tcpComboBox->addItem(QString::fromStdString(node));
261 }
262 ui->tcpComboBox->setCurrentIndex(0);
263
264 ui->frameComboBox->addItem("<Global>");
265 robotNodeNames = sharedRobot->getRobotNodes();
266 for (std::string const& nodeName : robotNodeNames)
267 {
268 ui->frameComboBox->addItem(QString::fromStdString(nodeName));
269 }
270 ui->frameComboBox->setCurrentIndex(0);
271 }
272
273 connectSlots();
275}
276
277void
279{
280
281 ARMARX_INFO << "Disconnecting component";
282
283 // stop update timer
284 if (timerSensor)
285 {
286 SoSensorManager* sensor_mgr = SoDB::getSensorManager();
287 sensor_mgr->removeTimerSensor(timerSensor);
288 }
289
290 ARMARX_INFO << "Disconnecting component: timer stopped";
291
292 robotStateComponentPrx = nullptr;
293
294 {
295 std::unique_lock lock(*mutex3D);
296
297 if (robotVisu)
298 {
299 ARMARX_INFO << "Disconnecting component: removing visu";
300 robotVisu->removeAllChildren();
301 }
302
303 robot.reset();
304 }
305 ARMARX_INFO << "Disconnecting component: finished";
306}
307
308void
310{
312
313 {
314 std::unique_lock lock(*mutex3D);
315
316 if (debugLayerVisu)
317 {
318 debugLayerVisu->removeAllChildren();
319 debugLayerVisu->unref();
320 debugLayerVisu = NULL;
321 }
322
323 if (robotVisu)
324 {
325 robotVisu->removeAllChildren();
326 robotVisu->unref();
327 robotVisu = NULL;
328 }
329
330 if (rootVisu)
331 {
332 rootVisu->removeAllChildren();
333 rootVisu->unref();
334 rootVisu = NULL;
335 }
336 }
337
338 /*
339 if (debugDrawer && debugDrawer->getObjectScheduler())
340 {
341 ARMARX_INFO << "Removing DebugDrawer component...";
342 debugDrawer->getObjectScheduler()->terminate();
343 ARMARX_INFO << "Removing DebugDrawer component...done";
344 }
345 */
346}
347
348QPointer<QDialog>
350{
351 if (!dialog)
352 {
353 dialog = new SimpleConfigDialog(parent);
354 dialog->addProxyFinder<RobotStateComponentInterfacePrx>(
355 {"RobotStateComponent", "", "RobotState*"});
356 }
357 return qobject_cast<SimpleConfigDialog*>(dialog);
358}
359
360void
362{
363 robotStateComponentName = dialog->getProxyName("RobotStateComponent");
364}
365
366void
368{
370 settings->value("RobotStateComponent", QString::fromStdString(ROBOTSTATE_NAME_DEFAULT))
371 .toString()
372 .toStdString();
373
374 bool showRob = settings->value("showRobot", QVariant(true)).toBool();
375 bool fullMod = settings->value("fullModel", QVariant(true)).toBool();
376 ui->cbRobot->setChecked(showRob);
377 ui->radioButtonFull->setChecked(fullMod);
378 ui->radioButtonCol->setChecked(!fullMod);
379}
380
381void
383{
384 settings->setValue("RobotStateComponent", QString::fromStdString(robotStateComponentName));
385 settings->setValue("showRobot", ui->cbRobot->isChecked());
386 settings->setValue("fullModel", ui->radioButtonFull->isChecked());
387}
388
389void
391{
392 robotVisu->removeAllChildren();
393
394 if (!robot)
395 {
396 return;
397 }
398
399 std::unique_lock lock(*mutex3D);
400
401 VirtualRobot::SceneObject::VisualizationType v = VirtualRobot::SceneObject::Full;
402
403 if (colModel)
404 {
405 v = VirtualRobot::SceneObject::Collision;
406 }
407
408 CoinVisualizationPtr robotViewerVisualization = robot->getVisualization(v);
409
410 if (robotViewerVisualization)
411 {
412 robotVisu->addChild(robotViewerVisualization->getCoinVisualization());
413 }
414 else
415 {
416 ARMARX_WARNING << "no robot visu available...";
417 }
418}
419
420void
422{
423 if (debugDrawer)
424 {
425 if (show)
426 {
427 debugDrawer->enableAllLayers();
428 }
429 else
430 {
431 debugDrawer->disableAllLayers();
432 }
433 }
434}
435
436void
438{
439 if (!debugDrawer)
440 {
441 return;
442 }
443
444 std::string poseName("root");
445
446 if (show)
447 {
448 Eigen::Matrix4f gp = Eigen::Matrix4f::Identity();
449 PosePtr gpP(new Pose(gp));
450 debugDrawer->setPoseDebugLayerVisu(poseName, gpP);
451 }
452 else
453 {
454 debugDrawer->removePoseDebugLayerVisu(poseName);
455 }
456}
457
458void
460{
461 if (!robotVisu)
462 {
463 return;
464 }
465
466 std::unique_lock lock(*mutex3D);
467
468 if (show && rootVisu->findChild(robotVisu) < 0)
469 {
470 rootVisu->addChild(robotVisu);
471 }
472 else if (!show && rootVisu->findChild(robotVisu) >= 0)
473 {
474 rootVisu->removeChild(robotVisu);
475 }
476}
477
478SoNode*
483
484void
486{
488
489 if (!controller)
490 {
491 return;
492 }
493
494 controller->updateRobotVisu();
495}
496
497void
499{
500 // Robot viewer GUI (top part)
501 connect(this, SIGNAL(robotStatusUpdated()), this, SLOT(updateRobotVisu()));
502 connect(ui->cbDebugLayer,
503 SIGNAL(toggled(bool)),
504 this,
505 SLOT(showVisuLayers(bool)),
506 Qt::QueuedConnection);
507 connect(ui->cbRoot, SIGNAL(toggled(bool)), this, SLOT(showRoot(bool)), Qt::QueuedConnection);
508 connect(ui->cbRobot, SIGNAL(toggled(bool)), this, SLOT(showRobot(bool)), Qt::QueuedConnection);
509 connect(
510 ui->radioButtonCol, SIGNAL(toggled(bool)), this, SLOT(colModel(bool)), Qt::QueuedConnection);
511 connect(ui->radioButtonFull,
512 SIGNAL(toggled(bool)),
513 this,
514 SLOT(colModel(bool)),
515 Qt::QueuedConnection);
516 connect(ui->horizontalSliderCollisionModelInflation,
517 SIGNAL(sliderMoved(int)),
518 this,
519 SLOT(inflateCollisionModel(int)),
520 Qt::QueuedConnection);
521
522 // Copy state GUI (bottom part)
523 connect(ui->kinematicChainComboBox,
524 SIGNAL(currentIndexChanged(int)),
525 this,
526 SLOT(updateStateSettings(int)));
527 connect(
528 ui->frameComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(updateStateSettings(int)));
529 connect(ui->outputTypeComboBox,
530 SIGNAL(currentIndexChanged(int)),
531 this,
532 SLOT(updateStateSettings(int)));
533 connect(ui->copyToClipboardButton, SIGNAL(clicked()), this, SLOT(copyToClipboard()));
534
535 connect(this,
536 SIGNAL(configurationChanged()),
537 this,
539 Qt::QueuedConnection);
540}
541
543RobotViewerWidgetController::loadRobotFile(std::string fileName)
544{
546
547 if (!ArmarXDataPath::getAbsolutePath(fileName, fileName))
548 {
549 ARMARX_INFO << "Could not find Robot XML file with name " << fileName;
550 }
551
552 robot = RobotIO::loadRobot(fileName);
553
554 if (!robot)
555 {
556 ARMARX_INFO << "Could not find Robot XML file with name " << fileName;
557 }
558
559 return robot;
560}
561
562void
564{
565 bool colModel = false;
566
567 if (ui->radioButtonCol->isChecked())
568 {
569 colModel = true;
570 }
571 ui->horizontalSliderCollisionModelInflation->setEnabled(ui->radioButtonCol->isChecked());
572
574}
575
576void
581
582void
584{
585 QClipboard* clipboard = QApplication::clipboard();
586 if (clipboard)
587 {
588 QString currentText = ui->previewTextBox->document()->toPlainText();
589 clipboard->setText(currentText);
590 }
591 else
592 {
593 ARMARX_ERROR << "Could not copy text to clipboard";
594 }
595}
596
597static std::string
598writeJointConfigurationToJson(VirtualRobot::Robot& robot,
599 VirtualRobot::RobotNodeSetPtr const& robotNodeSet)
600{
601 int indenting = 2; // Magic value for correct indenting
602 JsonWriter writer(indenting);
603 writer.startObject();
604
605 if (robotNodeSet)
606 {
607 for (RobotNodePtr const& node : *robotNodeSet)
608 {
609 writer.writeKey(node->getName());
610 writer.writeRawValue(to_string(node->getJointValue()));
611 }
612 }
613 else // Write all rotational and translational joints
614 {
615 for (RobotNodePtr const& node : robot.getRobotNodes())
616 {
617 if (node->isRotationalJoint() || node->isTranslationalJoint())
618 {
619 writer.writeKey(node->getName());
620 writer.writeRawValue(to_string(node->getJointValue()));
621 }
622 }
623 }
624
625 writer.endObject();
626 return writer.toString();
627}
628
629template <typename FrameType>
630static std::string
631writeFramedTCP(VirtualRobot::RobotPtr const& robot,
632 VirtualRobot::RobotNodeSetPtr const& nodeSet,
633 std::string const& frameName,
634 const std::string& tcpName)
635{
636 if (nodeSet)
637 {
638 auto tcp = tcpName.empty() ? nodeSet->getTCP() : robot->getRobotNode(tcpName);
639 Eigen::Matrix4f tcpMatrix = tcp->getPoseInRootFrame();
640 IceInternal::Handle<FrameType> position =
641 new FrameType(tcpMatrix, robot->getRootNode()->getName(), robot->getName());
642 position->changeFrame(robot, frameName);
643
644 JSONObjectPtr object = new JSONObject;
645 object->serializeIceObject(position);
646 return object->asString(true);
647 }
648 else
649 {
650 return "{}";
651 }
652}
653
654void
656{
657 if (!robot)
658 {
659 return;
660 }
661
662 std::string kinematicChainName = ui->kinematicChainComboBox->currentText().toStdString();
663 VirtualRobot::RobotNodeSetPtr robotNodeSet;
664 if (ui->kinematicChainComboBox->currentIndex() > 0)
665 {
666 robotNodeSet = robot->getRobotNodeSet(kinematicChainName);
667 }
668
669 std::string frameName = ui->frameComboBox->currentText().toStdString();
670 if (ui->frameComboBox->currentIndex() <= 0)
671 {
672 frameName = "Global";
673 }
674
675 int selectedOutputType = ui->outputTypeComboBox->currentIndex();
676 if (selectedOutputType < 0 || selectedOutputType > eRobotStateOutputTypeSize)
677 {
678 selectedOutputType = eJointConfiguration;
679 }
680 RobotStateOutputType outputType = static_cast<RobotStateOutputType>(selectedOutputType);
681
682 // Set the locale so that the floats get converted correctly
683 const char* oldLocale = std::setlocale(LC_ALL, "en_US.UTF-8");
684 std::string tcpName =
685 ui->tcpComboBox->currentIndex() == 0 ? "" : ui->tcpComboBox->currentText().toStdString();
686 std::string output;
687 switch (outputType)
688 {
690 output = writeJointConfigurationToJson(*robot, robotNodeSet);
691 break;
692
694 output = writeFramedTCP<FramedPosition>(robot, robotNodeSet, frameName, tcpName);
695 break;
696
698 output = writeFramedTCP<FramedOrientation>(robot, robotNodeSet, frameName, tcpName);
699 break;
700
701 case eFramedPoseTCP:
702 output = writeFramedTCP<FramedPose>(robot, robotNodeSet, frameName, tcpName);
703 break;
704
705 default:
706 ARMARX_ERROR << "Output type not supported: " << outputType;
707 break;
708 }
709
710 QString jsonOutput = QString::fromStdString(output);
711 QPlainTextEdit* previewTextBox = ui->previewTextBox;
712 QTextDocument* document = previewTextBox->document();
713 if (document->toPlainText() != jsonOutput)
714 {
715 QScrollBar* scrollBar = previewTextBox->verticalScrollBar();
716 int oldScrollValue = scrollBar->value();
717
718 document->setPlainText(jsonOutput);
719
720 int newScrollValue = std::min(oldScrollValue, scrollBar->maximum());
721 scrollBar->setValue(newScrollValue);
722 }
723
724 std::setlocale(LC_ALL, oldLocale);
725}
726
727void
729{
730 if (ui->autoUpdateCheckBox->isChecked())
731 {
732 updateState();
733 }
734}
735
736void
738{
739 std::unique_lock lock(*mutex3D);
740
742 {
743 return;
744 }
745
746 // try
747 // {
748 // RemoteRobot::synchronizeLocalClone(robot, robotStateComponentPrx);
749 // }
750 // catch (...)
751 // {
752 // ARMARX_INFO << deactivateSpam(5) << "Robot synchronization failed";
753 // return;
754 // }
755
756 Eigen::Matrix4f gp = robot->getGlobalPose();
757 QString roboInfo("Robot Pose (global): pos: ");
758 roboInfo += QString::number(gp(0, 3), 'f', 2);
759 roboInfo += QString(", ");
760 roboInfo += QString::number(gp(1, 3), 'f', 2);
761 roboInfo += QString(", ");
762 roboInfo += QString::number(gp(2, 3), 'f', 2);
763 roboInfo += QString(", rot:");
764 Eigen::Vector3f rpy;
765 VirtualRobot::MathTools::eigen4f2rpy(gp, rpy);
766 roboInfo += QString::number(rpy(0), 'f', 2);
767 roboInfo += QString(", ");
768 roboInfo += QString::number(rpy(1), 'f', 2);
769 roboInfo += QString(", ");
770 roboInfo += QString::number(rpy(2), 'f', 2);
771 ui->leRobotInfo->setText(roboInfo);
772
774}
775
776void
778{
779 std::unique_lock lock(*mutex3D);
780
781 for (auto& model : robot->getCollisionModels())
782 {
783 model->inflateModel(inflationValueMM);
784 }
785 ui->label_collisionModelInflationValue->setText(QString::number(inflationValueMM) + " mm");
786 setRobotVisu(true);
787}
788
789void
791{
792 //ARMARX_IMPORTANT << "set mutex3d :" << mutex3D.get();
793 this->mutex3D = mutex3D;
794
795 if (debugDrawer)
796 {
797 debugDrawer->setMutex(mutex3D);
798 }
799}
800
801void
803 Ice::Long timestamp,
804 bool poseChanged,
805 const Ice::Current&)
806{
807 std::unique_lock lock(*mutex3D);
809 {
810 return;
811 }
812 Eigen::Matrix4f newPose = PosePtr::dynamicCast(pose)->toEigen();
813
814 if (!robot->getGlobalPose().isApprox(newPose))
815 {
816 robot->setGlobalPose(newPose);
817 }
818}
819
820void
822 Ice::Long,
823 bool aValueChanged,
824 const Ice::Current&)
825{
826 std::unique_lock lock(*mutex3D);
827
828 if (!robotStateComponentPrx || !robot || !aValueChanged)
829 {
830 return;
831 }
832 robot->setJointValues(jointAngles);
833}
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
std::unique_ptr< Ui::RobotViewerGuiPlugin > ui
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:179
#define ARMARX_ERROR
The logging level for unexpected behaviour, that must be fixed.
Definition Logging.h:194
#define ARMARX_WARNING
The logging level for unexpected behaviour, but not a serious problem.
Definition Logging.h:191
#define ARMARX_VERBOSE
The logging level for verbose information.
Definition Logging.h:185
This file is part of ArmarX.
Definition FramedPose.h:43
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