PersonInstanceUpdater.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::person_instance_updater
17 * @author Philipp Seidel ( uyhvq at student dot kit dot edu )
18 * @author Fabian Reister ( fabian dot reister at kit dot edu )
19 * @date 2023
20 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
21 * GNU General Public License
22 */
23
24
25#pragma once
26
27
28#include <memory>
29#include <string>
30#include <vector>
31
34
37
39
41{
42
43 /**
44 * @brief Component that fuses face recognition and body pose tracking into unified person instances.
45 *
46 * This component subscribes to memory updates for face recognition and human pose data,
47 * then delegates to UpdateConsumer to match and link these data sources. The goal is to
48 * maintain PersonInstance entities that represent complete information about tracked people,
49 * including their identity (from face recognition) and body pose (from pose tracking).
50 *
51 * @see UpdateConsumer for the core matching and updating logic
52 */
54 virtual public armarx::Component,
56 {
57 public:
58 /// @see armarx::ManagedIceObject::getDefaultName()
59 std::string getDefaultName() const override;
60
61 /// Get the component's default name.
62 static std::string GetDefaultName();
63
64 public:
65 static const std::string provider_name;
66
67 protected:
68 /// @see PropertyUser::createPropertyDefinitions()
70
71 /// @see armarx::ManagedIceObject::onInitComponent()
72 void onInitComponent() override;
73
74 /// @see armarx::ManagedIceObject::onConnectComponent()
75 void onConnectComponent() override;
76
77 /// @see armarx::ManagedIceObject::onDisconnectComponent()
78 void onDisconnectComponent() override;
79
80 /// @see armarx::ManagedIceObject::onExitComponent()
81 void onExitComponent() override;
82
83 private:
84 /**
85 * @brief Registers callbacks for memory updates from FaceRecognition and Pose segments.
86 *
87 * Sets up subscriptions that trigger when new face recognition or pose data arrives,
88 * passing the updates to UpdateConsumer for processing.
89 */
90 void registerMemorySubscriptions();
91
92 private:
93 /// Properties shown in the Scenario GUI.
94 struct Properties
95 {
96 UpdateConsumer::Properties updateConsumer;
97 };
98
99 Properties properties;
100
101 /// The main logic handler that performs matching and updating of person instances.
102 std::unique_ptr<UpdateConsumer> updateConsumer;
103
104 /// Handles for all memory subscriptions, so they can be unsubscribed on disconnect.
105 std::vector<armarx::armem::client::util::SubscriptionHandle> subscriptionHandles;
106 };
107
108} // namespace VisionX::components::person_instance_updater
Component that fuses face recognition and body pose tracking into unified person instances.
static std::string GetDefaultName()
Get the component's default name.
Baseclass for all ArmarX ManagedIceObjects requiring properties.
Definition Component.h:94
client::plugins::ListeningPluginUser ListeningClientPluginUser
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.