HumanPoseWriter.h
Go to the documentation of this file.
1 #pragma once
2 
3 
4 #include <mutex>
5 #include <optional>
6 #include <string>
7 
9 
13 
14 #include <VisionX/libraries/armem_human/aron/HumanPose.aron.generated.h>
15 #include <VisionX/libraries/armem_human/server/HumanMemoryServerInterface.h>
17 
19 {
20 
22  {
23  public:
25 
26  Writer();
27 
28  ~Writer() override;
29 
31  void connect(armem::client::MemoryNameSystem& memoryNameSystem);
32 
33  std::string
34  propertyPrefix() const override
35  {
36  return "mem.human.pose.";
37  };
38 
39  Properties
40  defaultProperties() const override
41  {
42  return Properties{.memoryName = "Human", .coreSegmentName = "Pose", .providerName = ""};
43  };
44 
45  // FIXME remove provider, add to c'tor
46  bool commitHumanPose(const HumanPose& humanPose,
47  const std::string& provider,
48  const armem::Time& referencedTime);
49 
50  bool commitHumanPoses(const std::vector<HumanPose>& humanPoses,
51  const std::string& provider,
52  const armem::Time& referencedTime);
53 
54  bool commitHumanPoseInCameraFrame(const HumanPose& humanPose,
55  const std::string& provider,
56  const armem::Time& referencedTime);
57 
58  /**
59  * @brief Calls a dedicated interface of the human memory in order to resolve keypoints
60  * in several frames given the detection in the camera frame.
61  * @param humanPose
62  * @param provider
63  * @return
64  */
65  bool commitHumanPosesInCameraFrame(const std::vector<HumanPose>& humanPoses,
66  const std::string& provider,
67  const armem::Time& referencedTime);
68 
69  private:
70  armem::human::HumanMemoryServerInterfacePrx humanMemory;
71  };
72 
73 } // namespace armarx::armem::human::client
armarx::armem::human::client::Writer::commitHumanPoseInCameraFrame
bool commitHumanPoseInCameraFrame(const HumanPose &humanPose, const std::string &provider, const armem::Time &referencedTime)
Definition: HumanPoseWriter.cpp:55
Writer.h
armarx::armem::human::client::Writer
Definition: HumanPoseWriter.h:21
armarx::armem::client::util::SimpleWriterBase::Properties
Definition: SimpleWriterBase.h:49
armarx::armem::human::client
Definition: HumanPoseReader.cpp:14
armarx::armem::human::client::Writer::commitHumanPose
bool commitHumanPose(const HumanPose &humanPose, const std::string &provider, const armem::Time &referencedTime)
Definition: HumanPoseWriter.cpp:37
armarx::armem::human::client::Writer::commitHumanPosesInCameraFrame
bool commitHumanPosesInCameraFrame(const std::vector< HumanPose > &humanPoses, const std::string &provider, const armem::Time &referencedTime)
Calls a dedicated interface of the human memory in order to resolve keypoints in several frames given...
Definition: HumanPoseWriter.cpp:63
armarx::armem::client::util::SimpleWriterBase::SimpleWriterBase
SimpleWriterBase()
Definition: SimpleWriterBase.cpp:8
armarx::armem::human::client::Writer::registerPropertyDefinitions
void registerPropertyDefinitions(armarx::PropertyDefinitionsPtr &def)
Definition: HumanPoseWriter.cpp:20
types.h
armarx::armem::human::client::Writer::Writer
Writer()
Definition: HumanPoseWriter.cpp:13
armarx::armem::client::util::SimpleWriterBase::Properties::memoryName
std::string memoryName
Definition: SimpleWriterBase.h:51
armarx::armem::human::client::Writer::defaultProperties
Properties defaultProperties() const override
Definition: HumanPoseWriter.h:40
armarx::armem::human::client::Writer::propertyPrefix
std::string propertyPrefix() const override
Definition: HumanPoseWriter.h:34
armarx::armem::client::util::SimpleWriterBase
Definition: SimpleWriterBase.h:38
armarx::armem::human::HumanPose
Definition: types.h:30
armarx::armem::human::client::Writer::connect
void connect(armem::client::MemoryNameSystem &memoryNameSystem)
Definition: HumanPoseWriter.cpp:26
armarx::core::time::DateTime
Represents a point in time.
Definition: DateTime.h:24
PropertyDefinitionContainer.h
IceUtil::Handle< class PropertyDefinitionContainer >
armarx::armem::client::MemoryNameSystem
The memory name system (MNS) client.
Definition: MemoryNameSystem.h:69
armarx::armem::human::client::Writer::commitHumanPoses
bool commitHumanPoses(const std::vector< HumanPose > &humanPoses, const std::string &provider, const armem::Time &referencedTime)
Definition: HumanPoseWriter.cpp:46
MemoryNameSystem.h
SimpleWriterBase.h
armarx::armem::human::client::Writer::~Writer
~Writer() override