HumanMemory.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 RobotAPI::ArmarXObjects::ExampleMemory
17 * @author Rainer Kartmann ( rainer dot kartmann at kit dot edu )
18 * @date 2020
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22
23#pragma once
24
25#include <mutex>
26
29
34
36#include <VisionX/components/armem/server/HumanMemory/ComponentInterface.h>
37#include <VisionX/libraries/armem_human/aron/HumanPose.aron.generated.h>
38#include <VisionX/libraries/armem_human/aron/Person.aron.generated.h>
39#include <VisionX/libraries/armem_human/server/HumanMemoryServerInterface.h>
47
49{
51 virtual public armarx::Component,
53 virtual public ComponentInterface,
54 virtual public ArVizComponentPluginUser,
56 {
57 public:
59
60 std::string getDefaultName() const override;
61
62 protected:
64
65 void onInitComponent() override;
66 void onConnectComponent() override;
67 void onDisconnectComponent() override;
68 void onExitComponent() override;
69
70 VirtualRobot::RobotPtr getSynchronizedRobot(const std::string& robotName,
72
73 void
74 commitHumanPosesInCameraFrame(const ::armarx::aron::data::dto::AronDictSeq& dictSeq,
75 const ::std::string& providerName,
76 const ::armarx::core::time::dto::DateTime& timestamp,
77 const ::Ice::Current& /*c*/ = ::Ice::emptyCurrent) override;
78
79 void
80 commitPersonFacesInCameraFrame(const ::armarx::aron::data::dto::AronDictSeq& dictSeq,
81 const ::std::string& providerName,
82 const ::armarx::core::time::dto::DateTime& timestamp,
83 const ::Ice::Current& /*c*/ = ::Ice::emptyCurrent) override;
84
85 void commitHumanPoses(const std::vector<::armarx::human::arondto::HumanPose>& humanPoses,
86 const std::string& providerName,
88
89 void
90 commitPersonFaces(const std::vector<::armarx::human::arondto::FaceRecognition>& personFaces,
91 const std::string& providerName,
93
94 void commitHumanProfilesA(const std::vector<armarx::human::arondto::Person>& humanProfiles,
95 const ::std::string& providerName,
97 const ::std::string& entityName);
98
99 void commitHumanProfiles(const ::armarx::aron::data::dto::AronDictSeq& dictSeq,
100 const ::std::string& providerName,
101 const ::armarx::core::time::dto::DateTime& timestamp,
102 const std::string& entityName,
103 const ::Ice::Current& /*c*/ = ::Ice::emptyCurrent) override;
104
105 private:
106 human::ProfileSegment profileSegment;
107 human::PersonInstanceSegment personInstanceSegment;
108 human::PoseSegment poseSegment;
109 human::FaceRecognitionSegment faceRecognitionSegment;
110 human::IdentificationSegment identificationSegment;
111 human::HumanActivitySegment humanActivitySegment;
112 human::HumanRobotInteractionSegment humanRobotInteractionSegment;
113
114 human::Visu visu;
115
117 virtualRobotReaderPlugin = nullptr;
118
119 std::mutex robotsMtx;
120 std::map<std::string, VirtualRobot::RobotPtr> robots;
121 };
122
123} // namespace armarx::armem::server::human_memory
std::string timestamp()
Baseclass for all ArmarX ManagedIceObjects requiring properties.
Definition Component.h:94
A component plugin offering client-side access to a reader or writer and manages the lifecycle,...
void commitHumanProfiles(const ::armarx::aron::data::dto::AronDictSeq &dictSeq, const ::std::string &providerName, const ::armarx::core::time::dto::DateTime &timestamp, const std::string &entityName, const ::Ice::Current &=::Ice::emptyCurrent) override
void onInitComponent() override
Pure virtual hook for the subclass.
void onDisconnectComponent() override
Hook for subclass.
void commitPersonFaces(const std::vector<::armarx::human::arondto::FaceRecognition > &personFaces, const std::string &providerName, const armarx::DateTime &timestamp)
void commitHumanPosesInCameraFrame(const ::armarx::aron::data::dto::AronDictSeq &dictSeq, const ::std::string &providerName, const ::armarx::core::time::dto::DateTime &timestamp, const ::Ice::Current &=::Ice::emptyCurrent) override
VirtualRobot::RobotPtr getSynchronizedRobot(const std::string &robotName, const armarx::DateTime &timestamp)
void commitHumanProfilesA(const std::vector< armarx::human::arondto::Person > &humanProfiles, const ::std::string &providerName, const armarx::DateTime &timestamp, const ::std::string &entityName)
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
Creates the property definition container.
void commitPersonFacesInCameraFrame(const ::armarx::aron::data::dto::AronDictSeq &dictSeq, const ::std::string &providerName, const ::armarx::core::time::dto::DateTime &timestamp, const ::Ice::Current &=::Ice::emptyCurrent) override
void onConnectComponent() override
Pure virtual hook for the subclass.
void commitHumanPoses(const std::vector<::armarx::human::arondto::HumanPose > &humanPoses, const std::string &providerName, const armarx::DateTime &timestamp)
void onExitComponent() override
Hook for subclass.
std::string getDefaultName() const override
Retrieve default name of component.
Base class of memory server components.
Represents a point in time.
Definition DateTime.h:25
std::shared_ptr< class Robot > RobotPtr
Definition Bus.h:19
human_robot_interaction::Segment HumanRobotInteractionSegment
Definition Segment.h:56
profile::Segment ProfileSegment
Definition Segment.h:69
human_activity::Segment HumanActivitySegment
Definition Segment.h:56
facerecog::Segment FaceRecognitionSegment
Definition Segment.h:66
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.