WorkingMemoryGuiPlugin.h
Go to the documentation of this file.
1 /*
2 * This file is part of ArmarX.
3 *
4 * ArmarX is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * ArmarX is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * @package ArmarX::MemoryX::WorkingMemoryGuiPlugin
17 * @author Nikolaus Vahrenkamp (vahrenkamp at kit dot edu)
18 * @copyright 2012
19 * @license http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 
22 */
23 
24 #pragma once
25 
26 /* ArmarX headers */
27 #include <MemoryX/gui-plugins/WorkingMemoryGui/ui_WorkingMemoryGuiPlugin.h>
36 
37 /* MemoryX headers */
38 #include <MemoryX/interface/workingmemory/AbstractWorkingMemoryInterface.h>
39 #include <MemoryX/interface/memorytypes/MemorySegments.h>
45 
46 /** VirtualRobot headers **/
47 #include <VirtualRobot/Robot.h>
48 #include <VirtualRobot/Nodes/RobotNode.h>
49 #include <VirtualRobot/RobotNodeSet.h>
50 #include <VirtualRobot/Visualization/VisualizationFactory.h>
51 #include <VirtualRobot/Visualization/CoinVisualization/CoinVisualization.h>
52 
53 /* Qt headers */
54 #include <QMainWindow>
55 #include <QMatrix4x4>
56 #include <QTreeWidget>
57 #include <QTreeWidgetItem>
58 
59 /* Coin3D/SoQt headers */
60 #include <Inventor/nodes/SoNode.h>
61 #include <Inventor/nodes/SoSeparator.h>
62 #include <Inventor/sensors/SoTimerSensor.h>
63 #include <Inventor/nodes/SoEventCallback.h>
64 #include <Inventor/nodes/SoMatrixTransform.h>
65 #include <Inventor/Qt/viewers/SoQtExaminerViewer.h>
66 #include <Inventor/Qt/SoQt.h>
67 
68 #include <Eigen/Dense>
69 
70 #include <atomic>
71 #include <memory>
72 
73 namespace memoryx
74 {
75  class WorkingMemoryConfigDialog;
76 
77  /** \class WorkingMemoryGuiPlugin
78  * \brief The WorkingMemoryGuiPlugin provides a widget that allows you to inspect the current state of the
79  * working memory.
80  * @see WorkingMemoryController
81  */
84  {
85  Q_OBJECT
86  Q_INTERFACES(ArmarXGuiInterface)
87  Q_PLUGIN_METADATA(IID "ArmarXGuiInterface/1.00")
88  public:
90  };
91 
92  /**
93  \page MemoryX-GuiPlugins-WorkingMemoryEditor WorkingMemoryEditor
94  \brief This widget allows you to inspect the current state of the working memory.
95  \image html WorkingMemoryGui.png
96  You can inspect the current working memory.
97  The 3D viewer shows the currently known 3D workspace.
98  In the table in the center of the widget you find a list of all object and agent instances and their attributes that are currently
99  in the working memory.
100 
101  When you add the widget to the Gui, you need to specify the following parameters:
102 
103  Parameter Name | Example Value | Required? | Description
104  :---------------- | :-------------: | :-------------- |:--------------------
105  Gui Plugin Name | WorkingMemoryGuiPlugin | ? | ?
106  Working Memory Name | Working Memory | ? | ?
107  Working Memory Updates Topic | WorkingMemoryUpdates | ? | ?
108  Object Instances Segment Name | objectInstances | ? | The name of the segment in memory containing the object instances.
109  Agent Instances Segment Name | agentInstances | ? | The name of the segment in memory containing the agent instances.
110  World State Segment Name | worldState | ? | The name of the world state.
111  Extend datapaths with additional ArmarX packages (comma-separated) | Armar 3, Armar 4 | ? | ?
112 
113  \note In order to use this widget there must be working memory available.
114 
115  An example scenario for viewing and editing the WorkingMemory
116 
117  \verbatim
118  ${MemoryX_DIR}/scenarios/WorkingMemoryGui
119  \endverbatim
120 
121  The collection db.snapshots of memdb contains all snapshots such as
122  \li MobileKitchen_mm (millimeter)
123  \li KitchenKK
124 
125  Those snapshots contain a list with segment names.
126  Each entry in this list refers to a collection name
127  which contains all objects in the scene for this segment.
128  An object entry contains:
129 
130  \li object name
131  \li object class
132  \li object pose
133  \li object certainty
134 
135  The WorkingMemoryExample contains several tests which load one Snapshot into WorkingMemory
136  and operates on it.
137  It is located in
138  \verbatim
139  ${MemoryX_DIR}/scenarios/WorkingMemoryExample
140  \endverbatim
141 
142  The configuration file WorkingMemory.cfg contains important parameters such as
143 
144  \li "DatabaseName": name of the main database (should be memdb in our case)
145  \li "KalmanFilter": object positions can be fused with a filter
146  \li "WMExample.SnapshotName": name of the snapshot to load
147  \li "WMExample.TestToRun": name of the test to execute
148  \li "WMExample.CommonPlacesSnapshot": name of the CommonPlaces snapshot which should be used
149  \li "MemoryX.PriorKnowledge.ClassCollections": which collections should be used for PriorKnowledge
150 
151  After the configuration files are in the wanted state the Gui can be started with
152  \verbatim
153  ${MemoryX_DIR}/scenarios/WorkingMemoryExample/startGui.sh
154  \endverbatim
155 
156  After the Gui has loaded click on the "addWidget()" menu and then select "WorkingMemoryGui".
157 
158  \li ->setClass("cup", ..)
159 
160  WorkingMemoryEditor API Documentation \ref WorkingMemoryController
161  \see WorkingMemoryGuiPlugin
162  */
163 
164  /**
165  * @class WorkingMemoryController
166  * \brief This widget allows you to inspect the current state of the
167  * working memory.
168  * \see WorkingMemoryGuiPlugin
169  */
171  public armarx::ArmarXComponentWidgetControllerTemplate<WorkingMemoryController>,
172  public WorkingMemoryListenerInterface
173  {
174  Q_OBJECT
175  public:
176 
178  ~WorkingMemoryController() override;
179 
180  /* Inherited from Component */
181  void onInitComponent() override;
182  void onConnectComponent() override;
183  void onDisconnectComponent() override;
184  void onExitComponent() override;
185 
186  /* Inherited from ArmarXWidget. */
187  static QString GetWidgetName()
188  {
189  return "MemoryX.WorkingMemoryGui";
190  }
191  static QIcon GetWidgetIcon()
192  {
193  return QIcon("://icons/brain.svg");
194  }
195  void loadSettings(QSettings* settings) override;
196  void saveSettings(QSettings* settings) override;
197  QPointer<QDialog> getConfigDialog(QWidget* parent = nullptr) override;
198 
199  void configured() override;
200  SoNode* getScene() override;
201  QPointer<QDialog> getSceneConfigDialog(QWidget* parent = nullptr) override;
202 
203  /* Inherited from WorkingMemoryListener. */
204  void reportEntityCreated(const std::string& segmentName, const ::memoryx::EntityBasePtr& entity, const ::Ice::Current& = Ice::emptyCurrent) override;
205  void reportEntityUpdated(const std::string& segmentName, const ::memoryx::EntityBasePtr& entityBaseOld, const ::memoryx::EntityBasePtr& entityBaseNew, const ::Ice::Current& = Ice::emptyCurrent) override;
206  void reportEntityRemoved(const std::string& segmentName, const ::memoryx::EntityBasePtr& entity, const ::Ice::Current& = Ice::emptyCurrent) override;
207  void reportSnapshotLoaded(const std::string& segmentName, const ::Ice::Current& = Ice::emptyCurrent) override;
208  void reportSnapshotCompletelyLoaded(const Ice::Current& c = Ice::emptyCurrent) override;
209  void reportMemoryCleared(const std::string& segmentName, const ::Ice::Current& = Ice::emptyCurrent) override;
210 
211  // overwrite setMutex, so thatwe can inform the debugdrawer
212  void setMutex3D(RecursiveMutexPtr const& mutex3D) override;
213  signals:
214 
215  /* Emitted when: entities are fetched from the working memory, an entity is removed from the working memory or the working memory has been cleared. */
217  /* Emitted when: an entity is created/updated in the working memory. */
218  void entityChanged(memoryx::EntityBasePtr entity, QString entityType, bool isNew);
219 
220  void signalAgentsRemoved();
221  void signalObjectRemoved();
222 
223  void signalRefetchEntities();
224 
225  void signalClearEntities(const std::string& segmentName);
226 
227  void signalRemoveTabs();
228 
229  public slots:
230 
231 
232 
233  /*!
234  * Fetches all entities stored in the objectInstances, agentInstances and worldState segments in the working memory.
235  */
237 
238  void startTimerInGUIThread();
239 
240  /*!
241  * Shows information about a double-clicked item in the tree widget.
242  * \param item Double-clicked item.
243  * \param column Double-clicked column.
244  */
245  void treeItemDoubleClicked(QTreeWidgetItem* item, int column);
246  /*!
247  * Rebuilds the visualisation for all entities.
248  */
249  void rebuildVisualization();
250  /*!
251  * Updates the visualisation for an entity.
252  * \param entityID Entity ID.
253  * \param entityType Entity type. Supported options are: objectInstances, agentInstances and worldState.
254  * \param \isNew TRUE if it is a new entity.
255  */
256  void updateEntityVisu(memoryx::EntityBasePtr entity, QString entityType, bool isNew);
257  /*!
258  * Setups visualisation for all entities stored in currentEntities if the uncertainty visualisation is checked.
259  * \param isChecked TRUE if the uncertainty visualisation option is checked.
260  */
261  void uncertaintyVisuToggled(bool isChecked);
262  void existenceCertaintyToggled(bool isChecked);
263  /*!
264  * Setups the visualisation for all entities stored in currentEntities.
265  */
266  void setupVisualization();
267  /*!
268  * Updates the item corresponding to an entity in the tree widget.
269  * \param entityId Entity ID.
270  * \param entityType Entity type. Supported options are: objectInstances, agentInstances and worldState.
271  * \param isNew TRUE if it is a new entity.
272  */
273  void updateEntityTree(memoryx::EntityBasePtr entity, QString entityType, bool isNew);
274 
275  /*!
276  * \brief clearWorkingMemory deletes the current contents of WorkingMemory
277  */
278  void clearWorkingMemory();
279 
280  /*!
281  * \brief Sets the visibility for debugDrawer's visualization layers
282  * \param show Whether they should be visible.
283  */
284  void showVisuLayers(bool show);
285 
286  /*!
287  * \brief Sets the visibility for agents
288  * \param show Whether they should be visible.
289  */
290  void showAgents(bool show);
291 
292 
293 
294 
295  void showPlane(bool show);
296 
297  /*!
298  * \brief agentsRemoved One or multiple agent(s) have been removed from memory. This method updates all Qt related things (visu/gui).
299  */
300  void agentsRemoved();
301 
302  /*!
303  * \brief objectsRemoved One or multiple object(s) have been removed from memory. This method updates all Qt related things (visu/gui).
304  */
305  void objectsRemoved();
306 
307  /*!
308  * Removes the item corresponding to an entity from the tree widget.
309  * \param entityId Entity ID.
310  * \param entityType Entity type.
311  */
312  void removeEntityInTree(const std::string entityId, const std::string entityType);
313 
314 
315  /*!
316  * Clears all entity data in the current agents and current entities maps. All cleared entities/agents are stored to the deletedAgents/deletedEntities map.
317  */
318  void clearEntitiesData();
319  /*!
320  * Clears all visu data of deletedAgents/deletedEntites all items in the tree widget.
321  */
322  void clearEntitiesVisu(const std::string& segmentName = "");
323 
324  protected:
325 
326  void exportToVRML();
327 
328  /*!
329  * Updates joint values for all agents.
330  * \param event QTimerEvent.
331  */
332  void timerEvent(QTimerEvent*) override;
333 
334  /*!
335  * Connects signals to the slots.
336  */
337  void connectSlots();
338 
339  Ui::WorkingMemoryGuiPlugin ui;
340 
341  bool verbose;
342 
344  {
345  VirtualRobot::RobotPtr robot; ///< Robot used for visualisation purposes.
346  SoNode* visualization = nullptr; ///< Robot visualisation.
348 
349  /// Time when timestamped robot was updated.
350  IceUtil::Time timestamp = IceUtil::Time::seconds(0);
352  };
353 
355  {
358  VirtualRobot::ManipulationObjectPtr manipObj; ///< Object used for visualisation purposes.
359  SoNode* visualization = nullptr; ///< Object visualisation.
361  };
362 
363  struct SegmentTab
364  {
365  int tabIndex;
366  QTreeWidget* tree;
367  QWidget* tab;
368  };
369 
370  /* Maps entityId with data if the entity is of type ObjectInstance. */
371  using EntityEntryMap = std::map<std::string, ObjectDefinition>;
372 
373  std::map<std::string, struct SegmentTab> segmentTabs; /*!< Current segment tabs. */
374  memoryx::NameList segmentNames; /*!< Name of current segments. */
375 
376  EntityEntryMap currentEntities; /*!< Current entities of type ObjectInstance. */
377  EntityEntryMap deletedEntities; /*!< Entities that have been deleted (during last loop) of type ObjectInstance. */
378 
380  std::atomic<bool> showObjInstanceUncertainties;
381 
382  SoSeparator* rootVisu; /*!< Root visualisation node. */
383  SoSeparator* objectsVisu; /*!< object visualisation node. */
384  SoSeparator* agentsVisu; /*!< agent visualisation node. */
385  SoSeparator* debugLayerVisu;
386  SoSeparator* planeVisu;
387 
389  /*!
390  * Updates an entity of type ObjectInstance in the current entities map.
391  * obj Pointer to the entity instance.
392  */
393  void updateObjectData(const ObjectInstancePtr obj);
394 
395  /*!
396  * Creates visualisation for entities of type ObjectInstance.
397  * \param objWrapper Simox wrapper of the entity.
398  */
400 
401  /*!
402  * Updates visualisation for entities of type AgentInstance.
403  * \param objWrapper Simox wrapper of the entity.
404  */
406 
407  /*!
408  * Setups visualisation for entities of type ObjectInstance.
409  * \param objWrapper Simox wrapper of the entity.
410  */
411  void setupEntityVisu(const ObjectDefinition& objWrapper);
412 
413  /*!
414  * Updates an entity of type AgentInstance in the agents map.
415  * \param entity Pointer to the entity instance.
416  * \return True on success.
417  */
418  bool addAgent(const AgentInstancePtr agent);
419  /*!
420  * Creates visualisation for entities of type AgentInstance.
421  * \param entityId Entity ID.
422  */
423  void createAgentVisualisation(const std::string entityId);
424  /*!
425  * Updates visualisation for entities of type AgentInstance.
426  * \param entityId Entity ID.
427  */
428  void updateAgentVisualisation(const std::string entityId);
429  void updateAgentVisualisation(const EntityBasePtr entity);
430 
431 
432  /*!
433  * At tab for a given segment name if the tab does not already exist.
434  * \param segmentName segment name.
435  * \return index of new tab
436  */
437  int addTab(std::string segmentName);
438 
439  /*!
440  * Removes all segment-tabs.
441  */
442  void removeTabs();
443 
444  /*!
445  * Removes a single tab for a given segment name.
446  * \param segmentName segment name.
447  */
448  void removeTab(std::string segmentName);
449 
450  void processPackages(const std::string& packages);
451 
452  /*!
453  * \brief createEntity Updates currentEntities or currentAgents with data.
454  * \param entity
455  * \param entityType
456  * \return
457  */
458 
459  bool createEntity(memoryx::EntityBasePtr entity, const std::string& entityType);
460  private:
461 
462  std::recursive_mutex mutexEntities;
463  std::map<std::string, std::pair<long, armarx::FramedPosePtr>> lastUpdated; // a map containing the timestamp (us) and the pose when the entity got last updated.
464 
465  AbstractWorkingMemoryInterfacePrx memoryPrx;
466  ObjectInstanceMemorySegmentBasePrx objectInstancesPrx;
467  AgentInstancesSegmentBasePrx agentInstancesProxy;
468  WorldStateSegmentBasePrx worldStateProxy;
469  PersistentObjectClassSegmentBasePrx classesSegmentPrx;
470  PriorKnowledgeInterfacePrx priorKnowledgePrx;
471 
472  GridFileManagerPtr fileManager;
473 
474  QPointer<WorkingMemoryConfigDialog> dialog;
475 
476  std::string settings_priorMemoryName;
477  std::string settings_workingMemoryName;
478  std::string settings_workingMemoryUpdatesTopic;
479  std::string settings_objectInstancesSegmentName;
480  std::string settings_agentInstancesSegmentName;
481  std::string settings_worldStateSegmentName;
482  std::string settings_packages;
483 
484  int robotUpdateTimerId;
485 
486 
487  bool visuSetting_transparentExistanceCertatinty;
488  bool visuSetting_showObjectModels;
489 
490  /* Maps entityId with data for entities of type AgentInstance. */
491  using AgentEntryMap = std::map<std::string, RobotDefinition>;
492 
493  void updateAgent(const RobotDefinition& agent);
494 
495  AgentEntryMap currentAgents; /*!< Current entities of type AgentInstance. */
496  AgentEntryMap deletedAgents; /*!< Deleted entities of type AgentInstance (removed during last loop, visu needs to be updated). */
497 
499  QToolBar* customToolbar;
500 
501  QPointer<QDialog> sceneConfigDialog;
502  QPointer<armarx::DebugDrawerConfigWidget> debugDrawerConfigWidget;
503 
504  // ArmarXWidgetController interface
505  public:
506  QPointer<QWidget> getCustomTitlebarWidget(QWidget* parent) override;
508  };
509 
510 
511  using WorkingMemoryGuiPluginPtr = std::shared_ptr<WorkingMemoryController>;
512 }
513 
514 
armarx::ArmarXWidgetController::mutex3D
std::shared_ptr< std::recursive_mutex > mutex3D
Definition: ArmarXWidgetController.h:301
memoryx::WorkingMemoryController::SegmentTab::tabIndex
int tabIndex
Definition: WorkingMemoryGuiPlugin.h:365
RemoteRobot.h
memoryx::WorkingMemoryGuiPlugin
The WorkingMemoryGuiPlugin provides a widget that allows you to inspect the current state of the work...
Definition: WorkingMemoryGuiPlugin.h:82
memoryx::WorkingMemoryController::createObjectVisualization
void createObjectVisualization(ObjectDefinition &o)
Definition: WorkingMemoryGuiPlugin.cpp:1047
DebugLayerControlWidget.h
memoryx::WorkingMemoryController::createEntity
bool createEntity(memoryx::EntityBasePtr entity, const std::string &entityType)
createEntity Updates currentEntities or currentAgents with data.
Definition: WorkingMemoryGuiPlugin.cpp:882
memoryx::WorkingMemoryController::getScene
SoNode * getScene() override
Reimplementing this function and returning a SoNode* will show this SoNode in the 3DViewerWidget,...
Definition: WorkingMemoryGuiPlugin.cpp:513
memoryx::WorkingMemoryController::showObjInstanceUncertainties
std::atomic< bool > showObjInstanceUncertainties
Definition: WorkingMemoryGuiPlugin.h:380
memoryx::WorkingMemoryController::RobotDefinition::robot
VirtualRobot::RobotPtr robot
Robot used for visualisation purposes.
Definition: WorkingMemoryGuiPlugin.h:345
memoryx::WorkingMemoryController::show3DViewer
bool show3DViewer
Definition: WorkingMemoryGuiPlugin.h:379
memoryx::WorkingMemoryController::~WorkingMemoryController
~WorkingMemoryController() override
Definition: WorkingMemoryGuiPlugin.cpp:176
memoryx::WorkingMemoryController::onInitComponent
void onInitComponent() override
Pure virtual hook for the subclass.
Definition: WorkingMemoryGuiPlugin.cpp:227
memoryx::WorkingMemoryController::objectsVisu
SoSeparator * objectsVisu
Definition: WorkingMemoryGuiPlugin.h:383
memoryx::WorkingMemoryController::GetWidgetName
static QString GetWidgetName()
Definition: WorkingMemoryGuiPlugin.h:187
memoryx::WorkingMemoryController::existenceCertaintyToggled
void existenceCertaintyToggled(bool isChecked)
Definition: WorkingMemoryGuiPlugin.cpp:1418
memoryx::WorkingMemoryController::setupVisualization
void setupVisualization()
Definition: WorkingMemoryGuiPlugin.cpp:1425
memoryx::WorkingMemoryController::planeVisu
SoSeparator * planeVisu
Definition: WorkingMemoryGuiPlugin.h:386
memoryx::WorkingMemoryController::signalRemoveTabs
void signalRemoveTabs()
Pose.h
armarx::ArmarXGuiPlugin
Definition: ArmarXGuiPlugin.h:46
memoryx::WorkingMemoryController::clearEntitiesVisu
void clearEntitiesVisu(const std::string &segmentName="")
Definition: WorkingMemoryGuiPlugin.cpp:1314
memoryx::WorkingMemoryController::rootVisu
SoSeparator * rootVisu
Definition: WorkingMemoryGuiPlugin.h:382
memoryx::WorkingMemoryController::removeTab
void removeTab(std::string segmentName)
Definition: WorkingMemoryGuiPlugin.cpp:1848
memoryx::WorkingMemoryController::deletedEntities
EntityEntryMap deletedEntities
Definition: WorkingMemoryGuiPlugin.h:377
memoryx::WorkingMemoryController::RobotDefinition
Definition: WorkingMemoryGuiPlugin.h:343
GridFileManager.h
memoryx::WorkingMemoryController::getCustomTitlebarWidget
QPointer< QWidget > getCustomTitlebarWidget(QWidget *parent) override
getTitleToolbar returns a pointer to the a toolbar widget of this controller.
Definition: WorkingMemoryGuiPlugin.cpp:1875
memoryx::WorkingMemoryController::treeItemDoubleClicked
void treeItemDoubleClicked(QTreeWidgetItem *item, int column)
Definition: WorkingMemoryGuiPlugin.cpp:641
memoryx::WorkingMemoryController::updateEntityVisu
void updateEntityVisu(memoryx::EntityBasePtr entity, QString entityType, bool isNew)
Definition: WorkingMemoryGuiPlugin.cpp:962
memoryx::WorkingMemoryController::verbose
bool verbose
Definition: WorkingMemoryGuiPlugin.h:341
memoryx::WorkingMemoryController::agentsVisu
SoSeparator * agentsVisu
Definition: WorkingMemoryGuiPlugin.h:384
memoryx::WorkingMemoryController::reportEntityRemoved
void reportEntityRemoved(const std::string &segmentName, const ::memoryx::EntityBasePtr &entity, const ::Ice::Current &=Ice::emptyCurrent) override
memoryx
VirtualRobot headers.
Definition: CommonPlacesTester.cpp:48
c
constexpr T c
Definition: UnscentedKalmanFilterTest.cpp:43
memoryx::WorkingMemoryController::loadSettings
void loadSettings(QSettings *settings) override
Implement to load the settings that are part of the GUI configuration.
Definition: WorkingMemoryGuiPlugin.cpp:461
memoryx::WorkingMemoryController::GetWidgetIcon
static QIcon GetWidgetIcon()
Definition: WorkingMemoryGuiPlugin.h:191
memoryx::ObjectInstance
Definition: ObjectInstance.h:47
ObjectClass.h
memoryx::WorkingMemoryController::debugLayerControlWidget
DebugLayerControlWidget * debugLayerControlWidget
Definition: WorkingMemoryGuiPlugin.h:388
memoryx::WorkingMemoryController::segmentNames
memoryx::NameList segmentNames
Definition: WorkingMemoryGuiPlugin.h:374
memoryx::WorkingMemoryController::uncertaintyVisuToggled
void uncertaintyVisuToggled(bool isChecked)
Definition: WorkingMemoryGuiPlugin.cpp:1408
memoryx::WorkingMemoryController::convertObjectInstanceToGlobalPose
void convertObjectInstanceToGlobalPose(ObjectInstance &obj)
Definition: WorkingMemoryGuiPlugin.cpp:745
memoryx::WorkingMemoryController::addTab
int addTab(std::string segmentName)
Definition: WorkingMemoryGuiPlugin.cpp:1807
armarx::ArmarXComponentWidgetControllerTemplate
Definition: ArmarXComponentWidgetController.h:69
memoryx::WorkingMemoryController::ObjectDefinition::cv
VirtualRobot::CoinVisualizationPtr cv
Definition: WorkingMemoryGuiPlugin.h:360
memoryx::WorkingMemoryController::agentsRemoved
void agentsRemoved()
agentsRemoved One or multiple agent(s) have been removed from memory. This method updates all Qt rela...
Definition: WorkingMemoryGuiPlugin.cpp:1679
memoryx::WorkingMemoryController::segmentTabs
std::map< std::string, struct SegmentTab > segmentTabs
Definition: WorkingMemoryGuiPlugin.h:373
memoryx::WorkingMemoryController::currentEntities
EntityEntryMap currentEntities
Definition: WorkingMemoryGuiPlugin.h:376
memoryx::WorkingMemoryController::refetchEntitiesFromMemory
void refetchEntitiesFromMemory()
Definition: WorkingMemoryGuiPlugin.cpp:656
memoryx::WorkingMemoryController::ObjectDefinition::obj
ObjectInstancePtr obj
Definition: WorkingMemoryGuiPlugin.h:357
memoryx::WorkingMemoryController::processPackages
void processPackages(const std::string &packages)
Definition: WorkingMemoryGuiPlugin.cpp:432
ArmarXGuiInterface
The main gui interface.
Definition: ArmarXGuiInterface.h:74
memoryx::WorkingMemoryController::updateAgentVisualisation
void updateAgentVisualisation(const std::string entityId)
Definition: WorkingMemoryGuiPlugin.cpp:2037
DebugDrawerConfigWidget.h
IceInternal::Handle< SimoxObjectWrapper >
memoryx::WorkingMemoryController::removeTabs
void removeTabs()
Definition: WorkingMemoryGuiPlugin.cpp:1865
ArmarXGuiPlugin.h
memoryx::WorkingMemoryController::saveSettings
void saveSettings(QSettings *settings) override
Implement to save the settings as part of the GUI configuration.
Definition: WorkingMemoryGuiPlugin.cpp:492
memoryx::WorkingMemoryController::objectsRemoved
void objectsRemoved()
objectsRemoved One or multiple object(s) have been removed from memory. This method updates all Qt re...
Definition: WorkingMemoryGuiPlugin.cpp:1660
memoryx::WorkingMemoryController::reportMemoryCleared
void reportMemoryCleared(const std::string &segmentName, const ::Ice::Current &=Ice::emptyCurrent) override
memoryx::WorkingMemoryController::showAgents
void showAgents(bool show)
Sets the visibility for agents.
Definition: WorkingMemoryGuiPlugin.cpp:1240
memoryx::WorkingMemoryController::reportSnapshotLoaded
void reportSnapshotLoaded(const std::string &segmentName, const ::Ice::Current &=Ice::emptyCurrent) override
memoryx::WorkingMemoryController::configured
void configured() override
This function must be implemented by the user, if he supplies a config dialog.
Definition: WorkingMemoryGuiPlugin.cpp:446
memoryx::WorkingMemoryController::signalRebuildVisualization
void signalRebuildVisualization()
memoryx::WorkingMemoryController::RobotDefinition::robotStateComponent
armarx::RobotStateComponentInterfacePrx robotStateComponent
Definition: WorkingMemoryGuiPlugin.h:347
armarx::ArmarXWidgetController::RecursiveMutexPtr
std::shared_ptr< RecursiveMutex > RecursiveMutexPtr
Definition: ArmarXWidgetController.h:256
ArmarXComponentWidgetController.h
memoryx::WorkingMemoryController::timerEvent
void timerEvent(QTimerEvent *) override
Definition: WorkingMemoryGuiPlugin.cpp:629
DebugLayerControlWidget
Definition: DebugLayerControlWidget.h:54
memoryx::WorkingMemoryController::signalRefetchEntities
void signalRefetchEntities()
memoryx::WorkingMemoryController::updateEntityTree
void updateEntityTree(memoryx::EntityBasePtr entity, QString entityType, bool isNew)
Definition: WorkingMemoryGuiPlugin.cpp:1123
CoinVisualizationPtr
boost::shared_ptr< VirtualRobot::CoinVisualization > CoinVisualizationPtr
Definition: ManipulatorVisualization.h:52
memoryx::WorkingMemoryController::WorkingMemoryController
WorkingMemoryController()
Definition: WorkingMemoryGuiPlugin.cpp:147
memoryx::WorkingMemoryController::SegmentTab::tab
QWidget * tab
Definition: WorkingMemoryGuiPlugin.h:367
memoryx::WorkingMemoryController::RobotDefinition::timestamp
IceUtil::Time timestamp
Time when timestamped robot was updated.
Definition: WorkingMemoryGuiPlugin.h:350
memoryx::WorkingMemoryController::signalObjectRemoved
void signalObjectRemoved()
memoryx::WorkingMemoryController::clearWorkingMemory
void clearWorkingMemory()
clearWorkingMemory deletes the current contents of WorkingMemory
Definition: WorkingMemoryGuiPlugin.cpp:1206
memoryx::WorkingMemoryController::ObjectDefinition::manipObj
VirtualRobot::ManipulationObjectPtr manipObj
Object used for visualisation purposes.
Definition: WorkingMemoryGuiPlugin.h:358
memoryx::WorkingMemoryController::onExitComponent
void onExitComponent() override
Hook for subclass.
Definition: WorkingMemoryGuiPlugin.cpp:358
memoryx::WorkingMemoryController::onDisconnectComponent
void onDisconnectComponent() override
Hook for subclass.
Definition: WorkingMemoryGuiPlugin.cpp:337
memoryx::WorkingMemoryController::onConnectComponent
void onConnectComponent() override
Pure virtual hook for the subclass.
Definition: WorkingMemoryGuiPlugin.cpp:291
memoryx::WorkingMemoryController::createAgentVisualisation
void createAgentVisualisation(const std::string entityId)
Definition: WorkingMemoryGuiPlugin.cpp:1897
memoryx::WorkingMemoryController::reportEntityCreated
void reportEntityCreated(const std::string &segmentName, const ::memoryx::EntityBasePtr &entity, const ::Ice::Current &=Ice::emptyCurrent) override
memoryx::WorkingMemoryController::updateVisualization
void updateVisualization(const EntityWrappers::SimoxObjectWrapperPtr objWrapper)
Definition: WorkingMemoryGuiPlugin.cpp:1099
memoryx::WorkingMemoryController::connectSlots
void connectSlots()
Definition: WorkingMemoryGuiPlugin.cpp:549
memoryx::WorkingMemoryController::showVisuLayers
void showVisuLayers(bool show)
Sets the visibility for debugDrawer's visualization layers.
Definition: WorkingMemoryGuiPlugin.cpp:1224
memoryx::WorkingMemoryGuiPluginPtr
std::shared_ptr< WorkingMemoryController > WorkingMemoryGuiPluginPtr
Definition: WorkingMemoryGuiPlugin.h:511
armarx::armem::Time
armarx::core::time::DateTime Time
Definition: forward_declarations.h:13
memoryx::WorkingMemoryController::getConfigDialog
QPointer< QDialog > getConfigDialog(QWidget *parent=nullptr) override
getConfigDialog returns a pointer to the a configuration widget of this controller.
Definition: WorkingMemoryGuiPlugin.cpp:412
memoryx::WorkingMemoryController::reportSnapshotCompletelyLoaded
void reportSnapshotCompletelyLoaded(const Ice::Current &c=Ice::emptyCurrent) override
Definition: WorkingMemoryGuiPlugin.cpp:1706
Component.h
memoryx::WorkingMemoryController::getSceneConfigDialog
QPointer< QDialog > getSceneConfigDialog(QWidget *parent=nullptr) override
Reimplementing this function and returning a QDialog* will enable a configuration button which opens ...
Definition: WorkingMemoryGuiPlugin.cpp:524
memoryx::WorkingMemoryController::setMutex3D
void setMutex3D(RecursiveMutexPtr const &mutex3D) override
This mutex is used to protect 3d scene updates. Usually called by the ArmarXGui main window on creati...
Definition: WorkingMemoryGuiPlugin.cpp:1758
memoryx::WorkingMemoryController::updateObjectData
void updateObjectData(const ObjectInstancePtr obj)
Definition: WorkingMemoryGuiPlugin.cpp:812
EntityDrawerComponent.h
SimoxObjectWrapper.h
memoryx::WorkingMemoryController::SegmentTab
Definition: WorkingMemoryGuiPlugin.h:363
ObjectInstance.h
memoryx::WorkingMemoryController::entityChanged
void entityChanged(memoryx::EntityBasePtr entity, QString entityType, bool isNew)
memoryx::GridFileManagerPtr
std::shared_ptr< GridFileManager > GridFileManagerPtr
Definition: AbstractEntityWrapper.h:32
memoryx::WorkingMemoryController::showPlane
void showPlane(bool show)
Definition: WorkingMemoryGuiPlugin.cpp:1266
memoryx::WorkingMemoryController::ui
Ui::WorkingMemoryGuiPlugin ui
Definition: WorkingMemoryGuiPlugin.h:339
memoryx::WorkingMemoryController::SegmentTab::tree
QTreeWidget * tree
Definition: WorkingMemoryGuiPlugin.h:366
IceInternal::ProxyHandle<::IceProxy::armarx::RobotStateComponentInterface >
memoryx::WorkingMemoryController::removeEntityInTree
void removeEntityInTree(const std::string entityId, const std::string entityType)
Definition: WorkingMemoryGuiPlugin.cpp:1770
memoryx::WorkingMemoryController::rebuildVisualization
void rebuildVisualization()
Definition: WorkingMemoryGuiPlugin.cpp:1359
memoryx::WorkingMemoryController::debugLayerVisu
SoSeparator * debugLayerVisu
Definition: WorkingMemoryGuiPlugin.h:385
AgentInstance.h
memoryx::WorkingMemoryController::clearEntitiesData
void clearEntitiesData()
Definition: WorkingMemoryGuiPlugin.cpp:1292
memoryx::WorkingMemoryController
This widget allows you to inspect the current state of the working memory.
Definition: WorkingMemoryGuiPlugin.h:170
memoryx::WorkingMemoryController::addAgent
bool addAgent(const AgentInstancePtr agent)
Definition: WorkingMemoryGuiPlugin.cpp:1922
memoryx::WorkingMemoryController::ObjectDefinition::visualization
SoNode * visualization
Object visualisation.
Definition: WorkingMemoryGuiPlugin.h:359
memoryx::WorkingMemoryController::ObjectDefinition::simoxWrapper
EntityWrappers::SimoxObjectWrapperPtr simoxWrapper
Definition: WorkingMemoryGuiPlugin.h:356
memoryx::WorkingMemoryController::signalClearEntities
void signalClearEntities(const std::string &segmentName)
memoryx::WorkingMemoryGuiPlugin::WorkingMemoryGuiPlugin
WorkingMemoryGuiPlugin()
Definition: WorkingMemoryGuiPlugin.cpp:139
memoryx::WorkingMemoryController::RobotDefinition::timestampedRobot
VirtualRobot::RobotPtr timestampedRobot
Definition: WorkingMemoryGuiPlugin.h:351
memoryx::WorkingMemoryController::EntityEntryMap
std::map< std::string, ObjectDefinition > EntityEntryMap
Definition: WorkingMemoryGuiPlugin.h:371
memoryx::WorkingMemoryController::RobotDefinition::visualization
SoNode * visualization
Robot visualisation.
Definition: WorkingMemoryGuiPlugin.h:346
memoryx::WorkingMemoryController::ObjectDefinition
Definition: WorkingMemoryGuiPlugin.h:354
memoryx::WorkingMemoryController::signalAgentsRemoved
void signalAgentsRemoved()
VirtualRobot::RobotPtr
std::shared_ptr< class Robot > RobotPtr
Definition: Bus.h:18
memoryx::WorkingMemoryController::reportEntityUpdated
void reportEntityUpdated(const std::string &segmentName, const ::memoryx::EntityBasePtr &entityBaseOld, const ::memoryx::EntityBasePtr &entityBaseNew, const ::Ice::Current &=Ice::emptyCurrent) override
memoryx::WorkingMemoryController::setupEntityVisu
void setupEntityVisu(const ObjectDefinition &objWrapper)
Definition: WorkingMemoryGuiPlugin.cpp:1445
memoryx::WorkingMemoryController::exportToVRML
void exportToVRML()
Definition: WorkingMemoryGuiPlugin.cpp:584
memoryx::WorkingMemoryController::startTimerInGUIThread
void startTimerInGUIThread()
Definition: WorkingMemoryGuiPlugin.cpp:737