SimulatorViewerApp.h
Go to the documentation of this file.
1/*
2 * This file is part of ArmarX.
3 *
4 * Copyright (C) 2013-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 ArmarXSimulation::application::SimulatorViewer
19 * @author Nikolaus Vahrenkamp ( vahrenkamp at kit dot edu )
20 * @date 2015
21 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
22 * GNU General Public License
23 */
24#pragma once
25#include <QApplication>
26
28
30
32
38
39namespace armarx
40{
43 {
44 public:
45 /**
46 * @see armarx::PropertyDefinitionContainer::PropertyDefinitionContainer()
47 */
50 {
52 "UpdateRate", 30.0f, "Rate at which the data is polled from the simulator");
54 "UseDebugDrawer",
55 false,
56 "Whether to create the debug drawer component for the viewer.");
57 }
58 };
59
60 /**
61 * @class SimulatorViewerApp
62 * @brief A viewer that visualizes the content of the ArmarX Simulator.
63 *
64 * The application creates an armarx::ArmarXPhysicsWorldVisualization component which connects to the SimulatorVisuUpdate topic
65 * in order to retrieve the visualization stream of the current simulated environment. The simulator data stream is continously processed and
66 * the visualization is updated accordingly. The viewer is capable of generating a complete visualization at any time.
67 * Hence, it can be started from any PC in the network at any time.
68 *
69 *
70 *
71 */
72 class SimulatorViewerApp : public QObject, virtual public armarx::Application
73 {
74 Q_OBJECT
75 public:
76 /**
77 * Constructor
78 */
80
81 ~SimulatorViewerApp() override;
82
83 /**
84 * @see armarx::Application::setup()
85 */
87 Ice::PropertiesPtr properties) override;
88
89 /**
90 * Runs the Qt Event Loop
91 */
92 int exec(const ArmarXManagerPtr& armarXManager) override;
93
94 /*!
95 * \brief interruptCallback Recieve interrupt callbacks to gracefully shut down simulator
96 * \param signal
97 */
98 void interruptCallback(int signal) override;
99
106
107 private slots:
108 void closeRequest_sent();
109
110 protected:
111 QCoreApplication* qApplication;
114
116
117 // the one and only mutex
119
121 };
122} // namespace armarx
#define ARMARXCORE_IMPORT_EXPORT
ApplicationPropertyDefinitions(std::string prefix)
Baseclass for all ArmarX applications.
virtual std::string getDomainName()
Retrieve the domain name used for property parsing.
std::shared_ptr< RecursiveMutex > RecursiveMutexPtr
Definition CoinViewer.h:51
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
PropertyDefinition< PropertyType > & defineOptionalProperty(const std::string &name, PropertyType defaultValue, const std::string &description="", PropertyDefinitionBase::PropertyConstness constness=PropertyDefinitionBase::eConstant)
void setup(const ManagedIceObjectRegistryInterfacePtr &registry, Ice::PropertiesPtr properties) override
ArmarXSimulatorWindowPtr mainWindow
PropertyDefinitionsPtr createPropertyDefinitions() override
CoinViewer::RecursiveMutexPtr mutex
int exec(const ArmarXManagerPtr &armarXManager) override
Runs the Qt Event Loop.
void interruptCallback(int signal) override
interruptCallback Recieve interrupt callbacks to gracefully shut down simulator
ArmarXPhysicsWorldVisualizationPtr simVisu
memoryx::EntityDrawerComponentPtr debugDrawer
::IceInternal::Handle<::Ice::Properties > PropertiesPtr
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceUtil::Handle< ArmarXManager > ArmarXManagerPtr
IceUtil::Handle< ManagedIceObjectRegistryInterface > ManagedIceObjectRegistryInterfacePtr
Definition Application.h:83
IceInternal::Handle< ArmarXSimulatorWindow > ArmarXSimulatorWindowPtr
IceInternal::Handle< ArmarXPhysicsWorldVisualization > ArmarXPhysicsWorldVisualizationPtr
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
IceInternal::Handle< EntityDrawerComponent > EntityDrawerComponentPtr