UpdateConsumer.cpp
Go to the documentation of this file.
1 #include "UpdateConsumer.h"
2 
3 #include <optional>
4 #include <sstream>
5 
7 
17 
20 #include <VisionX/libraries/armem_human/aron/FaceRecognition.aron.generated.h>
21 #include <VisionX/libraries/armem_human/aron/HumanPose.aron.generated.h>
22 #include <VisionX/libraries/armem_human/aron/PersonInstance.aron.generated.h>
23 #include <VisionX/libraries/armem_human/aron/Profile.aron.generated.h>
32 
34 {
35 
36  UpdateConsumer::UpdateConsumer() : maxFaceHeadDistance(1000.0)
37  {
38  }
39 
40  UpdateConsumer::UpdateConsumer(int maxFaceHeadDistance) :
41  maxFaceHeadDistance(maxFaceHeadDistance)
42  {
43  }
44 
45  //TODO: add some form of history to allow for better understanding of memory changed of the personInstances
46  //TODO: add visualization of
47  void
50  armarx::armem::MemoryID faceRecognitionID,
52  {
53  ARMARX_DEBUG << "Consuming face recognition update...";
54  armarx::armem::client::Writer personInstanceWriter =
56  armarx::armem::client::Reader personInstanceReader =
60  armarx::armem::MemoryID profileID;
61 
62  if (faceRecognition.profileID.has_value())
63  {
64  profileID = faceRecognition.profileID.value();
65  }
66  else
67  {
69  << "Face recognition " + faceRecognitionID.entityName +
70  " does not provide valid profileID, finding matching "
71  "personInstance is not possible.";
72  return;
73  }
74 
75  if (queryResult.success)
76  {
77  //TODO: add early return in case face recognition id is already used by a personInstance
78  bool foundMatchingEntity = false;
79 
80  queryResult.memory.forEachInstance(
81  [&profileID, &personInstanceWriter, &faceRecognitionID, &foundMatchingEntity](
82  const armarx::armem::wm::EntityInstance& instance)
83  {
84  armarx::human::arondto::PersonInstance personInstance =
85  instance.dataAs<armarx::human::arondto::PersonInstance>();
86  if (profileID.entityName == personInstance.profileID.entityName)
87  {
88  //update matching personInstance
89  toAron(personInstance.faceRecognitionID, faceRecognitionID);
91  update.entityID = instance.id();
92  update.referencedTime = armarx::armem::Time::Now();
93  update.instancesData = {personInstance.toAron()};
94  personInstanceWriter.commit(update);
95  ARMARX_INFO << "Updated face recognition on personInstance '" +
96  instance.id().entityName + "'.";
97  //TODO: check for plausibility of personInstance, remove in case plausibility is no longer ensured, restart consume process afterwards to generate new personInstance
98  foundMatchingEntity = true;
99  return;
100  }
101  });
102  if (foundMatchingEntity)
103  {
104  return;
105  }
106  //create new personInstance in case no matching personInstance could be found
107  {
108  armarx::human::arondto::PersonInstance personInstance;
109  toAron(personInstance.faceRecognitionID, faceRecognitionID);
110  toAron(personInstance.profileID, profileID);
111  std::optional<armarx::armem::MemoryID> closestPoseID =
112  getClosestPoseID(faceRecognition.position3DGlobal, mns);
113  if (closestPoseID.has_value())
114  {
115  toAron(personInstance.poseID, closestPoseID.value());
116  }
117 
118  if (faceRecognition.profileID.value().entityName == "")
119  {
120  ARMARX_WARNING << "Face Recognition has no valid profile";
121  return;
122  }
123 
127  .withEntityName(faceRecognition.profileID.value().entityName);
128  update.referencedTime = armarx::armem::Time::Now();
129  update.instancesData = {personInstance.toAron()};
130  personInstanceWriter.commit(update);
131  ARMARX_INFO << "Created new personInstance for face recognition " +
132  faceRecognitionID.entityName + ".";
133  }
134  }
135  }
136 
137  /**
138  * Checks all person instances, whether the pose can be matched
139  * Note: in all cases, if the pose-face can be plausably matched to the recognized face, it will be.
140  * Matched instances get their poseId's updated. If no match is available, a new one is created.
141  */
142  void
146  {
147  ARMARX_DEBUG << "Consuming pose update...";
148  armarx::armem::client::Writer personInstanceWriter =
150  armarx::armem::client::Reader personInstanceReader =
153  armarx::armem::client::Reader faceRecognitionReader =
157 
158  // iterate over all instances, and find the first one that matches
159  // TODO: what to do, if multiple instances match?
160 
161  // Two cases: either the instance contains a pose with the same humanId,
162  // or the face recognition position matches the face recognition position
163  ARMARX_DEBUG << "Iterating over existing instances";
164  if (queryResult.success)
165  {
166  std::optional<::armarx::armem::human::PersonInstance> matchingInstance = std::nullopt;
167  std::optional<::armarx::armem::MemoryID> matchingInstanceId = std::nullopt;
168  queryResult.memory.forEachInstance(
169  [&](const armarx::armem::wm::EntityInstance& instance)
170  {
171  ARMARX_DEBUG << "In iteration: " << instance.id().entityName;
172  // we want the first matching instance,
173  // therefore skip all iterations once a match is found
174  if (matchingInstance.has_value())
175  {
176  ARMARX_DEBUG << "Already got matching instance, returning";
177  return;
178  }
179 
180  armarx::human::arondto::PersonInstance personInstance =
181  instance.dataAs<armarx::human::arondto::PersonInstance>();
182  armarx::armem::MemoryID currentPoseID;
183  fromAron(personInstance.poseID, currentPoseID);
184  auto pose = humanPoseFromMemId(currentPoseID, poseReader);
185 
186 
187  // prioritize matching face recognition, in case of the pose entity changing
188  armarx::armem::MemoryID currentRecognitionId;
189  fromAron(personInstance.faceRecognitionID, currentRecognitionId);
190  // else: check, if instance is plausible (by checking face-head distance)
191  auto recognition =
192  faceRecognitionFromMemId(currentRecognitionId, faceRecognitionReader);
193  if (recognition.has_value())
194  {
195  ARMARX_DEBUG << "checking for plausability";
196  if (checkForPlausability(humanPose, recognition.value()))
197  {
199  fromAron(personInstance, bo);
200  matchingInstance = bo;
201  matchingInstanceId = instance.id();
202  ARMARX_DEBUG << "Instance is plausible";
203  return;
204  }
205  }
206 
207  if (pose.has_value())
208  {
209  if (pose->humanTrackingId.has_value() or
210  humanPose.humanTrackingId.has_value())
211  {
213  << "A pose does not define a humanId. Unable to match...";
214  return;
215  }
216 
217  if (pose->humanTrackingId == humanPose.humanTrackingId)
218  {
219  ARMARX_DEBUG << "Found matching poses based on humanId";
221  fromAron(personInstance, bo);
222  matchingInstance = bo;
223  matchingInstanceId = instance.id();
224  }
225  return;
226  }
227  });
228 
229  // either a matching instance was found, in which case we update it,
230  // OR: no match was found, and we create a new one
231  if (matchingInstance.has_value())
232  {
233  ARMARX_DEBUG << "Found matching instance, handling it";
234 
235  // in any case, we simply add the current pose id to the person instance
236  updateInstanceWithNewPoseId(matchingInstanceId.value(),
237  matchingInstance.value(),
238  poseID,
239  personInstanceWriter);
240  }
241  else
242  {
243  ARMARX_DEBUG << "No matching instance found, creating new...";
244  createNewInstanceBasedOnPose(poseID, humanPose, mns);
245  }
246  }
247  else
248  {
249  ARMARX_WARNING << deactivateSpam() << "Fetching instance memory failed.";
250  }
251  }
252 
253  void
255  armarx::armem::MemoryID profileID,
257  {
258  //TODO: implement profile update logic
259  }
260 
261  void
262  UpdateConsumer::removePoseFromPersonInstance(
263  const armarx::armem::MemoryID& personInstanceId,
265  armarx::armem::client::Writer& personInstanceWriter)
266  {
267  data.poseID = {};
268  armarx::human::arondto::PersonInstance dto;
269  toAron(dto, data);
270  armarx::armem::EntityUpdate update{.entityID = personInstanceId.getEntityID(),
271  .instancesData = {dto.toAron()},
272  .referencedTime = armarx::armem::Time::Now()};
274  << "Removing pose from PersonInstance: " << personInstanceId.entityName;
275  personInstanceWriter.commit(update);
276  }
277 
278  void
279  UpdateConsumer::createNewInstanceBasedOnPose(const armarx::armem::MemoryID& poseId,
282  {
283  armarx::armem::client::Reader faceRecognitionReader =
285  armarx::armem::client::Writer personInstanceWriter =
287  std::optional<armarx::FramedPosition> headPos = getHeadPos(pose);
288  if (headPos.has_value())
289  {
290  std::optional<armarx::armem::MemoryID> faceRecognitionID =
291  getClosestFaceID(headPos.value(), mns);
292  if (faceRecognitionID.has_value())
293  {
294  armarx::human::arondto::PersonInstance personInstance;
295  toAron(personInstance.faceRecognitionID, faceRecognitionID.value());
296 
297  // determine profile entity name, to generate personinstance entity name
298 
299  auto faceRecognition =
300  faceRecognitionFromMemId(faceRecognitionID.value(), faceRecognitionReader);
301  if (not faceRecognition.has_value())
302  {
303  ARMARX_WARNING << deactivateSpam() << "Could not get face recognition from id";
304  return;
305  }
306 
307  const auto profileId = faceRecognition->profileID;
308  if (not profileId.has_value())
309  {
310  ARMARX_INFO << "While creating a new instance based on pose: closest face "
311  "recognition has no attached profile. Giving up.";
312  return;
313  }
314 
315  const std::string& entityName = profileId->entityName;
316 
317  // set profile id of instance
318  toAron(personInstance.profileID, profileId.value());
319 
320  //TODO: get profile id
321  //toAron(personInstance.profileID, profileID);
322  toAron(personInstance.poseID, poseId);
326  .withEntityName(entityName);
327  update.referencedTime = armarx::armem::Time::Now();
328  update.instancesData = {personInstance.toAron()};
329  personInstanceWriter.commit(update);
330  ARMARX_INFO << "Created new personInstance for human pose " + poseId.entityName +
331  ".";
332  }
333  else
334  {
335  ARMARX_WARNING << deactivateSpam() << "Could not get closest face";
336  }
337  }
338  }
339 
340  void
341  UpdateConsumer::updateInstanceWithNewPoseId(const armarx::armem::MemoryID& instanceId,
343  const armarx::armem::MemoryID& newPoseId,
344  const armarx::armem::client::Writer& instanceWriter)
345  {
346  ARMARX_DEBUG << "Start update with new pose id";
347  if (oldInstance.poseID.getEntityID() == newPoseId.getEntityID())
348  {
349  // committing this "new" data will not change anything
350  return;
351  }
352  oldInstance.poseID = newPoseId;
353  armarx::human::arondto::PersonInstance dto;
354  toAron(dto, oldInstance);
356  .entityID = instanceId.getEntityID(),
357  .instancesData = {dto.toAron()},
358  .referencedTime = armarx::armem::Time::Now(),
359  .confidence = 1.0F,
360  };
361 
362  ARMARX_DEBUG << "Committing new person instance with updated pose for entity: "
363  << instanceId.entityName;
364  instanceWriter.commit(update);
365  }
366 
367  bool
368  UpdateConsumer::checkForPlausability(::armarx::armem::human::HumanPose& pose,
370  {
371  ARMARX_DEBUG << "checking for plausability";
372  auto facePosFromPose = getHeadPos(pose);
373  if (not facePosFromPose.has_value())
374  {
375  ARMARX_WARNING << "Conversion failed";
376  return false;
377  }
378  auto facePosFromFaceRecognition = face.position3DGlobal;
379  float dist = getDistance(facePosFromFaceRecognition, facePosFromPose.value());
380  ARMARX_DEBUG << "distance is: " << dist;
381  return dist <= maxFaceHeadDistance;
382  }
383 
384  std::optional<armarx::armem::MemoryID>
385  UpdateConsumer::getClosestPoseID(Eigen::Matrix<float, 3, 1> facePos,
387  {
391 
392  armarx::armem::MemoryID closestPoseID;
393  float closestDistance = maxFaceHeadDistance;
394 
395  if (queryResult.success)
396  {
397  queryResult.memory.forEachInstance(
398  [&facePos, &closestPoseID, &closestDistance](
399  const armarx::armem::wm::EntityInstance& instance)
400  {
401  armarx::human::arondto::HumanPose dto =
402  instance.dataAs<armarx::human::arondto::HumanPose>();
404  fromAron(dto, pose);
405  std::optional<armarx::FramedPosition> headPos_opt = getHeadPos(pose);
406  if (headPos_opt.has_value())
407  {
408  armarx::FramedPosition headPos = headPos_opt.value();
409  float distance = getDistance(facePos, headPos);
410  if (distance < closestDistance)
411  {
412  closestPoseID = instance.id();
413  closestDistance = distance;
414  }
415  }
416  });
417  }
418  return closestPoseID;
419  }
420 
421  std::optional<armarx::armem::MemoryID>
422  UpdateConsumer::getClosestFaceID(armarx::FramedPosition headPos,
424  {
425  armarx::armem::client::Reader faceRecognitionReader =
429 
430  std::optional<armarx::armem::MemoryID> closestFaceID = std::nullopt;
431  float closestDistance = maxFaceHeadDistance;
432 
433  if (queryResult.success)
434  {
435  queryResult.memory.forEachInstance(
436  [&headPos, &closestFaceID, &closestDistance](
437  const armarx::armem::wm::EntityInstance& instance)
438  {
439  armarx::human::arondto::FaceRecognition dto =
440  instance.dataAs<armarx::human::arondto::FaceRecognition>();
442  fromAron(dto, faceRecognition);
443 
444  float distance = getDistance(faceRecognition.position3DGlobal, headPos);
445  if (distance < closestDistance)
446  {
447  closestFaceID = instance.id();
448  closestDistance = distance;
449  }
450  });
451  }
452  return closestFaceID;
453  }
454 
455  void
456  UpdateConsumer::addPoseToInstance(const armarx::armem::MemoryID& memId,
457  const armarx::armem::MemoryID& poseId,
458  const armarx::armem::client::Writer& personInstanceWriter,
459  armarx::armem::human::PersonInstance currentInstance)
460  {
461  currentInstance.poseID = poseId;
462  armarx::human::arondto::PersonInstance dto;
463  toAron(dto, currentInstance);
465  .entityID = memId,
466  .instancesData = {dto.toAron()},
467  .referencedTime = armarx::armem::Time::Now(),
468  };
469 
470  ARMARX_DEBUG << "Adding pose to instance";
471  personInstanceWriter.commit(update);
472  }
473 
474  std::optional<armarx::armem::human::FaceRecognition>
475  UpdateConsumer::faceRecognitionFromMemId(armarx::armem::MemoryID& memId,
476  armarx::armem::client::Reader& recognitionReader)
477  {
478  ARMARX_DEBUG << "Searching for face recognition";
480  qb.coreSegments()
481  .withID(memId)
483  .withID(memId)
484  .entities()
485  .all()
486  .snapshots()
487  .latest();
488  auto result = recognitionReader.query(qb);
489  if (not result.success)
490  {
491  ARMARX_WARNING << deactivateSpam() << "Could not query recognition.";
492  return std::nullopt;
493  }
494  std::optional<armarx::armem::human::FaceRecognition> resFace = std::nullopt;
495  result.memory.forEachInstance(
496  [&resFace](const armarx::armem::wm::EntityInstance& instance)
497  {
498  auto recognition = instance.dataAs<armarx::human::arondto::FaceRecognition>();
500  armarx::armem::human::fromAron(recognition, res);
501  resFace = res;
502  ARMARX_DEBUG << "Found recognition instance";
503  });
504  if (not resFace.has_value())
505  {
506  ARMARX_WARNING << deactivateSpam() << "Recognition result empty";
507  }
508  return resFace;
509  }
510 
511  std::optional<armarx::armem::human::HumanPose>
512  UpdateConsumer::humanPoseFromMemId(armarx::armem::MemoryID& memId,
513  armarx::armem::client::Reader& poseReader)
514  {
516  qb.coreSegments()
517  .withID(memId)
519  .withID(memId)
520  .entities()
521  .all()
522  .snapshots()
523  .latest();
524  auto result = poseReader.query(qb);
525  if (not result.success)
526  {
527  ARMARX_WARNING << deactivateSpam() << "Could not query poses.";
528  return std::nullopt;
529  }
530  std::optional<armarx::armem::human::HumanPose> resPose;
531  result.memory.forEachInstance(
532  [&resPose](const armarx::armem::wm::EntityInstance& instance)
533  {
534  auto pose = instance.dataAs<armarx::human::arondto::HumanPose>();
537  resPose = res;
538  ARMARX_DEBUG << "Found profile instance";
539  //armarx::armem::human::fromAron(instance.dataAs<armarx::human::arondto::HumanPose>(), resPose.value());
540  });
541  if (not resPose.has_value())
542  {
543  ARMARX_WARNING << deactivateSpam() << "Pose result empty";
544  }
545  return resPose;
546  }
547 
548  std::optional<armarx::FramedPosition>
549  UpdateConsumer::getHeadPos(armarx::armem::human::HumanPose pose)
550  {
551  std::optional<armarx::FramedPosition> headPos;
553  {
554  //TODO: implement pose type
555  }
557  {
560  .positionGlobal;
561  }
563  {
564  //TODO: implement pose type
565  }
566  else
567  {
568  ARMARX_WARNING << "Unknown pose model ID '" << pose.poseModelId;
569  }
570 
571  return headPos;
572  }
573 
574  float
575  UpdateConsumer::getDistance(Eigen::Matrix<float, 3, 1> facePos, armarx::FramedPosition headPos)
576  {
577  return sqrt(facePos.x() * headPos.x + facePos.y() * headPos.y + facePos.z() * headPos.z);
578  }
579 } // namespace VisionX::components::person_instance_updater
armarx::armem::detail::SuccessHeader::success
bool success
Definition: SuccessHeader.h:19
armarx::armem::client::query::EntitySelector::all
EntitySelector & all() override
Definition: selectors.cpp:104
VisionX::components::person_instance_updater::UpdateConsumer::UpdateConsumer
UpdateConsumer()
Definition: UpdateConsumer.cpp:36
armarx::armem::client::Reader
Reads data from a memory server.
Definition: Reader.h:24
VisionX::components::person_instance_updater::PersonInstanceUpdater::provider_name
static const std::string provider_name
Definition: PersonInstanceUpdater.h:49
armarx::armem::client::query::SnapshotSelector::latest
SnapshotSelector & latest()
Definition: selectors.cpp:30
armarx::armem::client::query::ProviderSegmentSelector::entities
EntitySelector & entities()
Start specifying entities.
Definition: selectors.cpp:135
Reader.h
armarx::armem::client::QueryResult::memory
wm::Memory memory
The slice of the memory that matched the query.
Definition: Query.h:58
armarx::armem::client::Reader::getLatestSnapshotsIn
QueryResult getLatestSnapshotsIn(const MemoryID &id, armem::query::DataMode dataMode=armem::query::DataMode::WithData) const
Get the latest snapshots under the given memory ID.
Definition: Reader.cpp:377
Writer.h
armarx::human::FaceRecognitionCoreSegmentID
const armem::MemoryID FaceRecognitionCoreSegmentID
Definition: memory_ids.cpp:30
armarx::armem::wm::EntityInstance
Client-side working entity instance.
Definition: memory_definitions.h:32
armarx::armem::human::PersonInstance::poseID
armarx::armem::MemoryID poseID
Definition: types.h:77
VisionX::components::person_instance_updater::UpdateConsumer::consumeFaceRecognitionUpdate
void consumeFaceRecognitionUpdate(armarx::armem::human::FaceRecognition faceRecognition, armarx::armem::MemoryID faceRecognitionID, armarx::armem::client::MemoryNameSystem mns)
Definition: UpdateConsumer.cpp:48
armarx::core::time::DateTime::Now
static DateTime Now()
Definition: DateTime.cpp:51
armarx::armem::client::query::EntitySelector::snapshots
SnapshotSelector & snapshots()
Start specifying entity snapshots.
Definition: selectors.cpp:92
MemoryID.h
armarx::armem::human::FaceRecognition
Definition: types.h:59
forward_declarations.h
memory_ids.h
armarx::armem::client::QueryResult
Result of a QueryInput.
Definition: Query.h:50
VisionX::components::person_instance_updater
Definition: PersonInstanceUpdater.cpp:43
Query.h
armarx::armem::client::MemoryNameSystem::getWriter
Writer getWriter(const MemoryID &memoryID)
Get a writer to the given memory name.
Definition: MemoryNameSystem.cpp:413
k4a_bt_body_32.h
VisionX::components::person_instance_updater::UpdateConsumer::consumeProfileUpdate
void consumeProfileUpdate(armarx::human::arondto::Profile profile, armarx::armem::MemoryID profileID, armarx::armem::client::MemoryNameSystem mns)
Definition: UpdateConsumer.cpp:254
armarx::human::pose::model::k4a_bt_body_32::Joints::Head
@ Head
armarx::armem::client::query::ProviderSegmentSelector::withID
ProviderSegmentSelector & withID(const MemoryID &id) override
Definition: selectors.h:102
PersonInstanceUpdater.h
deactivateSpam
SpamFilterDataPtr deactivateSpam(SpamFilterDataPtr const &spamFilter, float deactivationDurationSec, const std::string &identifier, bool deactivate)
Definition: Logging.cpp:75
armarx::armem::human::HumanPose::poseModelId
std::string poseModelId
Definition: types.h:32
armarx::armem::base::EntityInstanceBase::dataAs
AronDtoT dataAs() const
Get the data converted to a generated Aron DTO class.
Definition: EntityInstanceBase.h:160
armarx::armem::MemoryID::withProviderSegmentName
MemoryID withProviderSegmentName(const std::string &name) const
Definition: MemoryID.cpp:417
types.h
armarx::armem::MemoryID
A memory ID.
Definition: MemoryID.h:47
armarx::human::pose::model::k4a_bt_body_32::JointNames
const simox::meta::EnumNames< Joints > JointNames
Names of the joints as defined in the body model.
Definition: k4a_bt_body_32.h:77
PoseSegment.h
VisionX::components::person_instance_updater::UpdateConsumer::consumePoseUpdate
void consumePoseUpdate(armarx::armem::human::HumanPose humanPose, armarx::armem::MemoryID poseID, armarx::armem::client::MemoryNameSystem mns)
Checks all person instances, whether the pose can be matched Note: in all cases, if the pose-face can...
Definition: UpdateConsumer.cpp:143
armarx::armem::client::query::Builder::coreSegments
CoreSegmentSelector & coreSegments()
Start specifying core segments.
Definition: Builder.cpp:42
data
uint8_t data[1]
Definition: EtherCATFrame.h:68
ARMARX_DEBUG
#define ARMARX_DEBUG
Definition: Logging.h:184
armarx::FramedPosition
The FramedPosition class.
Definition: FramedPose.h:157
armarx::armem::human::PersonInstance
Definition: types.h:73
armarx::armem::server::human::profile::Profile
armarx::human::arondto::Profile Profile
Definition: Segment.cpp:43
armarx::armem::client::query::CoreSegmentSelector::withID
CoreSegmentSelector & withID(const MemoryID &id) override
Definition: selectors.h:141
armarx::armem::EntityUpdate
An update of an entity for a specific point in time.
Definition: Commit.h:25
armarx::armem::client::Writer
Helps a memory client sending data to a memory.
Definition: Writer.h:22
armarx::armem::client::Writer::commit
CommitResult commit(const Commit &commit) const
Writes a Commit to the memory.
Definition: Writer.cpp:59
armarx::armem::base::detail::MemoryItem::id
MemoryID & id()
Definition: MemoryItem.h:25
armarx::armem::human::HumanPose
Definition: types.h:30
armarx::armem::MemoryID::entityName
std::string entityName
Definition: MemoryID.h:53
armarx::armem::server::ltm::util::mongodb::detail::update
bool update(mongocxx::collection &coll, const nlohmann::json &query, const nlohmann::json &update)
Definition: mongodb.cpp:68
aron_conversions.h
armarx::armem::human::HumanPose::humanTrackingId
std::optional< std::string > humanTrackingId
Definition: types.h:36
armarx::human::pose::model::k4a_bt_body_32::ModelId
const std::string ModelId
Definition: k4a_bt_body_32.h:33
UpdateConsumer.h
armarx::human::PersonInstanceCoreSegmentID
const armem::MemoryID PersonInstanceCoreSegmentID
Definition: memory_ids.cpp:35
Commit.h
armarx::armem::human::FaceRecognition::position3DGlobal
Eigen::Matrix< float, 3, 1 > position3DGlobal
Definition: types.h:62
GfxTL::sqrt
VectorXD< D, T > sqrt(const VectorXD< D, T > &a)
Definition: VectorXD.h:704
openpose_body_25.h
armarx::armem::MemoryID::getEntityID
MemoryID getEntityID() const
Definition: MemoryID.cpp:310
armarx::armem::MemoryID::withEntityName
MemoryID withEntityName(const std::string &name) const
Definition: MemoryID.cpp:425
ARMARX_INFO
#define ARMARX_INFO
Definition: Logging.h:181
aron_conversions.h
Segment.h
armarx::human::pose::model::openpose_body_25::ModelId
const std::string ModelId
Definition: openpose_body_25.h:29
Segment.h
armarx::armem::base::detail::ForEachEntityInstanceMixin::forEachInstance
bool forEachInstance(InstanceFunctionT &&func)
Definition: iteration_mixins.h:147
Builder.h
armarx::fromAron
void fromAron(const arondto::PackagePath &dto, PackageFileLocation &bo)
armarx::armem::client::MemoryNameSystem
The memory name system (MNS) client.
Definition: MemoryNameSystem.h:73
Eigen::Matrix< float, 3, 1 >
distance
double distance(const Point &a, const Point &b)
Definition: point.hpp:95
armarx::armem::client::query::Builder
The query::Builder class provides a fluent-style specification of hierarchical queries.
Definition: Builder.h:21
armarx::human::PoseCoreSegmentID
const armem::MemoryID PoseCoreSegmentID
Definition: memory_ids.cpp:38
mmm_body_68.h
armarx::armem::client::query::CoreSegmentSelector::providerSegments
ProviderSegmentSelector & providerSegments()
Start specifying provider segments.
Definition: selectors.cpp:178
MemoryNameSystem.h
armarx::armem::human::HumanPose::keypoints
KeyPointMap keypoints
Definition: types.h:35
Logging.h
armarx::toAron
void toAron(arondto::PackagePath &dto, const PackageFileLocation &bo)
ARMARX_WARNING
#define ARMARX_WARNING
Definition: Logging.h:193
armarx::armem::client::MemoryNameSystem::getReader
Reader getReader(const MemoryID &memoryID)
Get a reader to the given memory name.
Definition: MemoryNameSystem.cpp:260
armarx::aron::bo
const std::optional< BoT > & bo
Definition: aron_conversions.h:174
armarx::armem::human::FaceRecognition::profileID
std::optional< armarx::armem::MemoryID > profileID
Definition: types.h:70
armarx::armem::human::fromAron
void fromAron(const armarx::human::arondto::HumanPose &dto, HumanPose &bo)
Definition: aron_conversions.cpp:20
armarx::armem::client::Reader::query
QueryResult query(const QueryInput &input) const
Perform a query on the WM.
Definition: Reader.cpp:69
armarx::human::pose::model::mmm_body_68::ModelId
const std::string ModelId
Definition: mmm_body_68.h:29