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