HumanActivityDebugger.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 VisionX::ArmarXObjects::human_activity_debugger
17 * @author Joana Plewnia ( joana dot plewnia at kit dot edu )
18 * @date 2025
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22
23
24#pragma once
25
26#include <optional>
27
29
34
38
40{
41
42 /**
43 * This component can be used for debugging of the human activity memory; more specifically it commits
44 * HumanActivity instances into the human memory based on user input. This is useful to test the
45 * HumanActivity core segment.
46 * The component must be started inside a terminal. The HumanMemory should be running.
47 * Important: do not use this in a real environment, as it will create test data.
48 */
50 virtual public armarx::Component,
52 {
53 public:
54 /// @see armarx::ManagedIceObject::getDefaultName()
55 std::string getDefaultName() const override;
56
57 /// Get the component's default name.
58 static std::string GetDefaultName();
59
60 public:
61 static const std::string activity_provider_name;
62
63 protected:
64 /// @see PropertyUser::createPropertyDefinitions()
66
67 /// @see armarx::ManagedIceObject::onInitComponent()
68 void onInitComponent() override;
69
70 /// @see armarx::ManagedIceObject::onConnectComponent()
71 void onConnectComponent() override;
72
73 /// @see armarx::ManagedIceObject::onDisconnectComponent()
74 void onDisconnectComponent() override;
75
76 /// @see armarx::ManagedIceObject::onExitComponent()
77 void onExitComponent() override;
78
79 private:
80 // main loop
81 void run();
82
83 // main commands
84 void activityCommand();
85 void readActivityCommand();
86
87 // helpers
88 void commitActivity(const std::string& firstName,
89 const std::string& lastName,
91 const std::string& activityName,
92 float confidence);
93
94 private:
95 bool running;
96
97 /// Properties shown in the Scenario GUI.
98 struct Properties
99 {
100 std::string robotName;
101 };
102
103 Properties properties;
104
105 // used to get readers/writers
108 };
109
110} // namespace visionx::components::human_activity_debugger
Baseclass for all ArmarX ManagedIceObjects requiring properties.
Definition Component.h:94
This component can be used for debugging of the human activity memory; more specifically it commits H...
static std::string GetDefaultName()
Get the component's default name.
plugins::ListeningPluginUser ComponentPluginUser
Definition plugins.h:10
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.