PriorMemoryEditorPlugin.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 */
24// Dialogs
26
30#include <MemoryX/gui-plugins/PriorMemoryEditor/ui_CollectionCreateDialog.h>
31#include <MemoryX/gui-plugins/PriorMemoryEditor/ui_PriorEditorConfigDialog.h>
32
33// ArmarX core
35#include <ArmarXCore/interface/core/Log.h>
37
39
40// Qt headers
41#include <QBrush>
42#include <QCheckBox>
43#include <QMessageBox>
44#include <QPushButton>
45#include <QSlider>
46#include <QSpinBox>
47#include <QStandardItemModel>
48#include <QStringList>
49#include <QTableView>
50#include <Qt>
51#include <QtGlobal>
52
53// Coin3D headers
54#include <Inventor/Qt/SoQt.h>
55#include <Inventor/SoDB.h>
56#include <Inventor/nodes/SoUnits.h>
57
58// System
59#include <math.h>
60#include <stdio.h>
61#include <stdlib.h>
62#include <string.h>
63
64#include <iostream>
65#include <string>
66
67// Boost
68#include <filesystem>
69
70// Simox-VirtualRobot
71#include <VirtualRobot/CollisionDetection/CollisionModel.h>
72#include <VirtualRobot/Grasping/Grasp.h>
73#include <VirtualRobot/Grasping/GraspSet.h>
74#include <VirtualRobot/ManipulationObject.h>
75#include <VirtualRobot/Visualization/CoinVisualization/CoinVisualizationFactory.h>
76#include <VirtualRobot/XML/ObjectIO.h>
77#include <VirtualRobot/XML/RobotIO.h>
78
79// MemoryX
85
86using namespace memoryx;
87using namespace memoryx::EntityWrappers;
88using namespace VirtualRobot;
89
90namespace fs = std::filesystem;
91
92#define DEFAULT_SETTINGS_PLUGIN_NAME "PriorMemoryEditorPlugin"
93#define DEFAULT_SETTINGS_PRIORMEMORY_NAME "PriorKnowledge"
94
95namespace TreeItemType
96{
98 {
99 eItemObject = QTreeWidgetItem::UserType + 1,
100 eItemAttr = QTreeWidgetItem::UserType + 2,
101 eItemValue = QTreeWidgetItem::UserType + 3
102 };
103} // namespace TreeItemType
104
109
111{
112 visu = nullptr;
113 show3DViewer = false;
114
115 ui.setupUi(getWidget());
116 treeCurrentItemChanged(nullptr, nullptr);
117
118 collCreateDialog = new CollectionCreateDialog();
119 collCreateDialog->setCollectionPrefix(memoryx::PRIOR_COLLECTION_PREFIX);
120 getWidget()->setEnabled(false);
121}
122
123void
125{
127 verbose = true;
128
129 visu = new SoSeparator();
130 visu->ref();
131
132 connectSlots();
133
134 ARMARX_INFO << "PriorMemory: " << settings_priorMemory;
135
136 usingProxy(settings_priorMemory);
137 usingProxy("CommonStorage");
138 if (!settings_robotStateComponentProxyName.empty())
139 {
140 usingProxy(settings_robotStateComponentProxyName);
141 }
142}
143
144void
146{
148 memoryPrx = getProxy<PriorKnowledgeInterfacePrx>(settings_priorMemory);
149 classesSegmentPrx = memoryPrx->getObjectClassesSegment();
150 databasePrx = memoryPrx->getCommonStorage();
151 if (!settings_robotStateComponentProxyName.empty())
152 {
153 getProxy(robotStateComponent, settings_robotStateComponentProxyName);
154 }
155
156 fileManager.reset(new GridFileManager(databasePrx));
157
158 ui.editHost->setText(QString::fromStdString(databasePrx->getMongoHostAndPort()));
159
160 connected = databasePrx->isConnected();
161
162 refreshControls();
163 refreshCollectionList();
164 setCurrentCollection(classesSegmentPrx->getWriteCollectionNS());
166}
167
168void
170{
172 dialog->close();
173 collCreateDialog->close();
174 connected = false;
175 refreshControls();
177}
178
179void
181{
183 clearObjects();
184
185 if (visu)
186 {
187 visu->unref();
188 }
189}
190
191QPointer<QDialog>
193{
194 if (!dialog)
195 {
196 dialog = new PriorEditorConfigDialog(getIceManager(), parent);
197 dialog->ui->editPriorMemoryEditorName->setText(
198 QString::fromStdString(DEFAULT_SETTINGS_PLUGIN_NAME));
199 dialog->ui->editPriorMemoryName->setText(
200 QString::fromStdString(DEFAULT_SETTINGS_PRIORMEMORY_NAME));
201 }
202
203 return qobject_cast<PriorEditorConfigDialog*>(dialog);
204}
205
206void
208{
209 ARMARX_VERBOSE << "PriorEditorController::configured()";
210 settings_mongoHost = dialog->ui->editMongoHost->text().toStdString();
211 settings_mongoUser = dialog->ui->editMongoUser->text().toStdString();
212 settings_mongoPass = dialog->ui->editMongoPass->text().toStdString();
213 settings_priorMemory = dialog->ui->editPriorMemoryName->text().toStdString();
214 this->setInstanceName(dialog->ui->editPriorMemoryEditorName->text());
215 settings_robotStateComponentProxyName =
216 dialog->proxyFinder->getSelectedProxyName().toStdString();
217
218 // ???
219 // databasePrx->reconnect(ui.editHost->text().toStdString(), settings_mongoUser, settings_mongoPass);
220}
221
222void
224{
225 /*robotFile = settings->value("RobotFile", QString::fromStdString(robotFile_default)).toString().toStdString();
226 objectFile = settings->value("ObjectFile", QString::fromStdString(objectFile_default)).toString().toStdString();
227 show3DViewer = settings->value("ViewerEnabled", "false") == "true";*/
228}
229
230void
232{
233 /*settings->setValue("RobotFile", QString::fromStdString(robotFile));
234 settings->setValue("ObjectFile", QString::fromStdString(objectFile));
235 settings->setValue("ViewerEnabled", QString(show3DViewer?"true":"false"));*/
236}
237
238SoNode*
240{
242 if (visu)
243 {
244 std::cout << "returning scene=" << visu->getName() << std::endl;
245 }
246
247 return visu;
248}
249
250void
252{
254 connect(ui.btnReconnect, SIGNAL(clicked()), this, SLOT(reconnect()));
255
256 connect(ui.btnAddCollection, SIGNAL(clicked()), this, SLOT(addCollection()));
257 connect(ui.btnRefetch, SIGNAL(clicked()), this, SLOT(refetchData()));
258
259 connect(ui.cbCollection,
260 SIGNAL(currentIndexChanged(int)),
261 this,
262 SLOT(collectionChanged()),
263 Qt::QueuedConnection);
264
265 connect(ui.btnShowVisu, SIGNAL(clicked()), this, SLOT(showObjectClassVisu()));
266 connect(ui.btnShowColl, SIGNAL(clicked()), this, SLOT(showObjectClassColl()));
267 connect(ui.btnEdit, SIGNAL(clicked()), this, SLOT(editObjectClass()));
268 connect(ui.btnAdd, SIGNAL(clicked()), this, SLOT(addObjectClass()));
269 connect(ui.btnRemove, SIGNAL(clicked()), this, SLOT(removeObjectClass()));
270 connect(this, SIGNAL(objectsLoaded()), this, SLOT(clearVisualization()), Qt::QueuedConnection);
271 // connect(this, SIGNAL(objectChanged(QString, bool)), this, SLOT(updateObjectVisu(QString, bool)), Qt::QueuedConnection);
272
273 connect(ui.treeWidgetEntities,
274 SIGNAL(currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*)),
275 this,
276 SLOT(treeCurrentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*)));
277 connect(ui.treeWidgetEntities,
278 SIGNAL(itemDoubleClicked(QTreeWidgetItem*, int)),
279 this,
280 SLOT(treeItemDoubleClicked(QTreeWidgetItem*, int)));
281}
282
283void
285{
287 clearObjects();
288 connected = databasePrx->reconnect(
289 ui.editHost->text().toStdString(), settings_mongoUser, settings_mongoPass);
290 refreshControls();
291
292 if (!connected)
293 {
294 QMessageBox msgBox;
295 msgBox.setText("Error connecting to MongoDB! \nCheck if mongod is running on " +
296 ui.editHost->text());
297 msgBox.setIcon(QMessageBox::Critical);
298 msgBox.exec();
299 }
300
301 refreshCollectionList();
302}
303
304void
305PriorEditorController::setCurrentCollection(const std::string& collNS)
306{
308 ui.cbCollection->setCurrentIndex(ui.cbCollection->findText(QString::fromStdString(collNS)));
309}
310
311void
313{
315 const std::string collName = ui.cbCollection->currentText().toStdString();
316
317 if (!collName.empty())
318 {
319 CollectionInterfacePrx coll = databasePrx->requestCollection(collName);
320 classesSegmentPrx->setWriteCollection(coll);
321 refetchData();
322 }
323}
324
325void
327{
329 const NameList dbNames = databasePrx->getDBNames();
330 collCreateDialog->setDatabases(dbNames);
331 int result = collCreateDialog->exec();
332
333 if (result == QDialog::Accepted)
334 {
335 const std::string collectionNS =
336 collCreateDialog->getDBName() + "." + collCreateDialog->getCollectionName();
337 ui.cbCollection->addItem(QString::fromStdString(collectionNS));
338 setCurrentCollection(collectionNS);
339 }
340}
341
342void
344{
346 const std::string collName = ui.cbCollection->currentText().toStdString();
347 ARMARX_INFO << "Refetching data from DB from collection '" << collName << "'";
348 std::unique_lock lock(mutexEntities);
349 clearObjects();
350
351 auto collection = databasePrx->requestCollection(collName);
352 auto ids = collection->findAllIds();
353 ARMARX_INFO << "Found " << ids.size() << " entities";
354
355 // classesSegmentPrx->addReadCollection(collName);
356 for (const auto& id : ids)
357 {
358 EntityBasePtr entity = classesSegmentPrx->getEntityById(id);
359
360 if (!entity)
361 {
362 ARMARX_WARNING << "Could not find entity with id " << id << " in collection "
363 << collName;
364 }
365
366 const ObjectClassPtr objClass = ObjectClassPtr::dynamicCast(entity);
367
368 if (objClass)
369 {
370 updateObject(objClass);
371 }
372 else
373 {
374 ARMARX_WARNING << "Failed to cast to ObjectClass: " << entity->getName() << ", "
375 << entity->getId() << ", " << entity->ice_id();
376 }
377 }
378
379
380 ui.treeWidgetEntities->sortByColumn(0, Qt::AscendingOrder);
381
382 emit objectsLoaded();
383}
384
385void
386PriorEditorController::refreshCollectionList()
387{
389 ui.cbCollection->clear();
390
391 if (!connected)
392 {
393 return;
394 }
395
396 auto activeReadCollectionNames = memoryPrx->getObjectClassesSegment()->getReadCollectionsNS();
397 const NameList dbNames = databasePrx->getDBNames();
398 int firstActiveCollection = -1;
399
400 for (std::string const& dbName : dbNames)
401 {
402 const NameList collNames = databasePrx->getCollectionNames(dbName);
403
404 for (std::string const& collName : collNames)
405 {
406 std::string fullCollName = dbName + "." + collName;
407 if (memoryPrx->isPriorCollection(fullCollName))
408 {
409 if (std::find(activeReadCollectionNames.begin(),
410 activeReadCollectionNames.end(),
411 fullCollName) != activeReadCollectionNames.end())
412 {
413 ui.cbCollection->addItem(QString::fromStdString(fullCollName));
414
415 if (firstActiveCollection == -1)
416 {
417 firstActiveCollection = ui.cbCollection->count() - 1;
418 }
419 }
420 else
421 {
422 ui.cbCollection->addItem(QString::fromStdString(
423 collName + "(not selected in PriorKnowledge config)"));
424 const QStandardItemModel* model =
425 qobject_cast<const QStandardItemModel*>(ui.cbCollection->model());
427 QStandardItem* item = model->item(model->rowCount() - 1);
429
430 item->setFlags(item->flags() & ~(Qt::ItemIsSelectable | Qt::ItemIsEnabled));
431 // visually disable by greying out - works only if combobox has been painted already and palette returns the wanted color
432 item->setData(
433 ui.cbCollection->palette().color(
434 QPalette::Disabled,
435 QPalette::Text), // clear item data in order to use default color
436 Qt::TextColorRole);
437 }
438 }
439 }
440 }
441
442 if (ui.cbCollection->currentIndex() >= 0)
443 {
444 const QStandardItemModel* model =
445 qobject_cast<const QStandardItemModel*>(ui.cbCollection->model());
447 QStandardItem* item = model->item(ui.cbCollection->currentIndex());
449
450 if (!(item->flags() & Qt::ItemIsEnabled))
451 {
452 ui.cbCollection->setCurrentIndex(firstActiveCollection);
453 }
454 }
455 else
456 {
457 ui.cbCollection->setCurrentIndex(firstActiveCollection);
458 }
459}
460
461void
463{
465 doEditClass(true);
466}
467
468void
470{
472 doEditClass(false);
473}
474
475void
476PriorEditorController::doEditClass(bool isNew)
477{
479 ARMARX_INFO << "Opening edit dialog...";
480
481 // init object class
482 const std::string clsId = getSelectedClassId();
483 ObjectClassPtr objectClass;
484
485 if (isNew)
486 {
487 objectClass = new ObjectClass();
488 objectClass->addWrapper(new SimoxObjectWrapper(fileManager));
489 objectClass->addWrapper(new ObjectRecognitionWrapper());
490 objectClass->addWrapper(new TexturedRecognitionWrapper(fileManager));
491 objectClass->addWrapper(new SegmentableRecognitionWrapper(fileManager));
492 objectClass->addWrapper(new HandMarkerBallWrapper(fileManager));
493 objectClass->addWrapper(new ArMarkerWrapper(fileManager));
494 }
495 else
496 {
497 objectClass = currentObjectClasses[clsId];
498 }
499
500
501 // create dialog
502 ObjectClassEditDialog* classEditDialog = new ObjectClassEditDialog(robotStateComponent);
503
504 if (!isNew)
505 {
506 // do not allow changeing of existing classes names
507 classEditDialog->setClassNameEditable(false);
508 classEditDialog->updateGui(objectClass);
509 }
510
511 int result = classEditDialog->exec();
512
513 if (result == QDialog::Accepted)
514 {
515 ARMARX_INFO << "Saving changes to object class...";
517
518 classEditDialog->updateEntity(objectClass, getFilesDBName());
519
520 // update memory segment
521 if (isNew)
522 {
523 const std::string id = classesSegmentPrx->addEntity(objectClass);
524 objectClass->setId(id);
525 currentObjectClasses[id] = objectClass;
526 }
527 else
528 {
529 classesSegmentPrx->updateEntity(objectClass->getId(), objectClass);
530 }
531
532 updateObjectInTree(objectClass);
533 classEditDialog->updateGui(objectClass);
534 }
535
536 delete classEditDialog;
537}
538
539void
541{
543 const std::string clsName = getSelectedClassName();
544 const std::string clsId = getSelectedClassId();
545
546 if (clsId.empty())
547 {
548 return;
549 }
550
551 QMessageBox msgBox;
552 msgBox.setText("Delete object class " + QString(clsName.c_str()) + "?");
553 msgBox.setIcon(QMessageBox::Question);
554 msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
555 int ret = msgBox.exec();
556
557 if (ret == QMessageBox::Yes)
558 {
559 ObjectEntryMap::iterator it = currentObjectClasses.find(clsId);
560
561 if (it != currentObjectClasses.end())
562 {
563 it->second->getWrapper<SimoxObjectWrapper>()->clear();
564 currentObjectClasses.erase(it);
565 }
566
567 classesSegmentPrx->removeEntity(clsId);
568 QTreeWidgetItem* selItem = ui.treeWidgetEntities->currentItem();
569
570 if (selItem)
571 {
572 delete ui.treeWidgetEntities->takeTopLevelItem(
573 ui.treeWidgetEntities->indexOfTopLevelItem(selItem));
574 }
575
577 }
578}
579
580std::string
581PriorEditorController::getSelectedClassId()
582{
584 QTreeWidgetItem* selItem = ui.treeWidgetEntities->currentItem();
585
586 if (selItem && selItem->type() == TreeItemType::eItemObject)
587 {
588 return selItem->text(1).toStdString();
589 }
590 else
591 {
592 return "";
593 }
594}
595
596std::string
597PriorEditorController::getSelectedClassName()
598{
600 QTreeWidgetItem* selItem = ui.treeWidgetEntities->currentItem();
601
602 if (selItem && selItem->type() == TreeItemType::eItemObject)
603 {
604 return selItem->text(0).toStdString();
605 }
606 else
607 {
608 return "";
609 }
610}
611
612void
613PriorEditorController::refreshControls()
614{
616 ui.lblConnected->setText(QString::fromStdString(connected ? "Connected" : "Disconnected"));
617 ui.lblConnected->setStyleSheet(
618 QString::fromStdString(connected ? "color: rgb(0, 170, 0);" : "color: rgb(170, 0, 0);"));
619
620 ui.btnAddCollection->setEnabled(connected);
621 ui.btnRefetch->setEnabled(connected);
622
623 QTreeWidgetItem* cur = ui.treeWidgetEntities->currentItem();
624 bool clsSelected = connected && (cur && cur->type() == TreeItemType::eItemObject);
625 ui.btnAdd->setEnabled(connected);
626 ui.btnEdit->setEnabled(clsSelected);
627 ui.btnRemove->setEnabled(clsSelected);
628 ui.btnShowVisu->setEnabled(clsSelected);
629 ui.btnShowColl->setEnabled(clsSelected);
630}
631
632void
633PriorEditorController::treeCurrentItemChanged(QTreeWidgetItem* cur, QTreeWidgetItem* prev)
634{
636 refreshControls();
637}
638
639void
640PriorEditorController::treeItemDoubleClicked(QTreeWidgetItem* item, int column)
641{
643 if (item->type() == TreeItemType::eItemObject)
644 {
645 ARMARX_INFO << " Selected object: " << item->text(1).toStdString();
646 showObjectClassModel(item->text(1).toStdString(), SceneObject::Full);
647 }
648}
649
650std::string
651PriorEditorController::getFilesDBName()
652{
654 const std::string ns = classesSegmentPrx->getWriteCollectionNS();
655 const size_t found = ns.find_first_of('.');
656 return (found != std::string::npos) ? ns.substr(0, found) : "";
657}
658
659void
660PriorEditorController::updateObjectInTree(ObjectClassPtr obj)
661{
663 QString objName(obj->getName().c_str());
664 QString objId(obj->getId().c_str());
665
666 QList<QTreeWidgetItem*> oldItems =
667 ui.treeWidgetEntities->findItems(objId, Qt::MatchFixedString, 1);
668
669 QTreeWidgetItem* objItem =
670 (oldItems.size() == 0)
671 ? new QTreeWidgetItem(ui.treeWidgetEntities, TreeItemType::eItemObject)
672 : oldItems.at(0);
673 objItem->setText(0, objName);
674 objItem->setText(1, objId);
675
676 // clear object node
677 /* QList<QTreeWidgetItem *> oldAttrs = objItem->takeChildren();
678 while(!oldAttrs.empty())
679 delete oldAttrs.takeFirst();
680
681 QBrush evenRow(QColor(217, 255, 226)), oddRow(Qt::white);
682 int i = 0;
683 memoryx::NameList attrNames = obj->getAttributeNames();
684 for (memoryx::NameList::const_iterator it = attrNames.begin(); it != attrNames.end(); ++it)
685 {
686 // QList<QTreeWidgetItem *> oldAttrs = objItem->findItems(objId, Qt::MatchFixedString, 0);
687 QTreeWidgetItem *attrItem = new QTreeWidgetItem(objItem, TreeItemType::eItemAttr);
688 armarx::VariantPtr attrValue = obj->getAttributeMean(*it);
689 QString attrName(it->c_str());
690 QString attrValStr(attrValue->getOutputValueOnly().c_str());
691 QBrush& bgBrush = (i % 2 == 0) ? evenRow : oddRow;
692 attrItem->setText(0, attrName);
693 attrItem->setText(1, attrValStr);
694 attrItem->setBackground(0, bgBrush);
695 attrItem->setBackground(1, bgBrush);
696 ++i;
697 }*/
698}
699
700void
702{
704 if (!objClass)
705 {
706 return;
707 }
708
709 std::unique_lock lock(mutexEntities);
710
711 const std::string id = objClass->getId();
712
713 if (force || currentObjectClasses.find(id) == currentObjectClasses.end())
714 {
715 // build new entry
716 ARMARX_INFO << "Building new entry for object class " << objClass->getName();
717 objClass->addWrapper(new SimoxObjectWrapper(fileManager));
718 objClass->addWrapper(new ObjectRecognitionWrapper());
719 objClass->addWrapper(new TexturedRecognitionWrapper(fileManager));
720 objClass->addWrapper(new SegmentableRecognitionWrapper(fileManager));
721 objClass->addWrapper(new HandMarkerBallWrapper(fileManager));
722 objClass->addWrapper(new ArMarkerWrapper(fileManager));
723
724 currentObjectClasses[id] = objClass;
725 }
726
727 updateObjectInTree(objClass);
728}
729
730void
731PriorEditorController::showObjectClassModel(const std::string& objectId,
732 SceneObject::VisualizationType visuType)
733{
735 std::unique_lock lock(mutexEntities);
736 ObjectEntryMap::iterator it = currentObjectClasses.find(objectId);
737
738 if (it == currentObjectClasses.end())
739 {
741 return;
742 }
743
744 // no rotation/translation
745 Eigen::Matrix4f m = Eigen::Matrix4f::Identity();
746 SimoxObjectWrapperPtr simoxWrapper = it->second->getWrapper<SimoxObjectWrapper>();
747
749 auto mo = simoxWrapper->getManipulationObject();
750
752 mo->setGlobalPose(m);
753 mo->showCoordinateSystem(true);
754
756 VisualizationNodePtr visNode;
757
758 if (visuType == SceneObject::Full)
759 {
761 visNode = simoxWrapper->getVisualization();
762 }
763 else if (visuType == SceneObject::Collision && simoxWrapper->getCollisionModel())
764 {
766 visNode = simoxWrapper->getCollisionModel()->getVisualization();
767 }
768
769 if (visu && visNode)
770 {
772 visu->addChild(VirtualRobot::CoinVisualizationFactory::getCoinVisualization(visNode));
773 }
774}
775
776void
778{
780 showObjectClassModel(getSelectedClassId(), SceneObject::Full);
781}
782
783void
785{
787 showObjectClassModel(getSelectedClassId(), SceneObject::Collision);
788}
789
790void
792{
794 std::unique_lock lock(mutexEntities);
795
796 // clear storage
797 currentObjectClasses.clear();
798
799 // clear SceneTree
800 ui.treeWidgetEntities->clear();
801}
802
803void
805{
807 visu->removeAllChildren();
808}
#define DEFAULT_SETTINGS_PRIORMEMORY_NAME
#define DEFAULT_SETTINGS_PLUGIN_NAME
std::enable_if<!HasGetWidgetName< ArmarXWidgetType >::value >::type addWidget()
virtual QPointer< QWidget > getWidget()
getWidget returns a pointer to the a widget of this controller.
void enableMainWidgetAsync(bool enable)
This function enables/disables the main widget asynchronously (if called from a non qt thread).
bool setInstanceName(QString instanceName)
sets the name of this instance.
bool usingProxy(const std::string &name, const std::string &endpoints="")
Registers a proxy for retrieval after initialization and adds it to the dependency list.
IceManagerPtr getIceManager() const
Returns the IceManager.
Ice::ObjectPrx getProxy(long timeoutMs=0, bool waitForScheduler=true) const
Returns the proxy of this object (optionally it waits for the proxy)
ArMarkerWrapper offers a simplified access to the necessary information for localization of AR marker...
HandMarkerBallWrapper offers a simplified access to the necessary information for localization of the...
SegmentableRecognitionWrapper offers a simplified access to the data of an object class or instance r...
SimoxObjectWrapper offers a simplified access to the Simox ManipulationObject (i.e visualization,...
TexturedRecognitionWrapper offers a simplified access to the data of an object class or instance rela...
GridFileManager provides utility functions for working with files in Mongo GridFS and links to them s...
void updateEntity(const EntityPtr &entity, std::string filesDBName) override
Pure virtual method.
void updateGui(const EntityPtr &entity) override
Pure virtual method.
void onInitComponent() override
Pure virtual hook for the subclass.
void treeItemDoubleClicked(QTreeWidgetItem *item, int column)
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,...
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 treeCurrentItemChanged(QTreeWidgetItem *cur, QTreeWidgetItem *prev)
void updateObject(const memoryx::ObjectClassPtr obj, bool force=false)
void onExitComponent() override
Hook for subclass.
#define ARMARX_CHECK_EXPRESSION(expression)
This macro evaluates the expression and if it turns out to be false it will throw an ExpressionExcept...
#define ARMARX_INFO
The normal logging level.
Definition Logging.h:181
#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
IceInternal::Handle< SimoxObjectWrapper > SimoxObjectWrapperPtr
VirtualRobot headers.
IceInternal::Handle< ObjectClass > ObjectClassPtr
Definition ObjectClass.h:35
#define ARMARX_TRACE
Definition trace.h:77