25 #include <SimoxUtility/shapes/AxisAlignedBoundingBox.h>
26 #include <SimoxUtility/shapes/OrientedBox.h>
29 #include <RobotAPI/libraries/armem_index/aron/Named.aron.generated.h>
30 #include <RobotAPI/libraries/armem_index/aron/Spatial.aron.generated.h>
41 const std::vector<armem::MemoryID>& updatedObjectInstanceSnapshotIDs)
48 const auto filtered = filterObjectPoses(objectPoses, updatedObjectInstanceSnapshotIDs);
64 std::optional<simox::OrientedBoxf> oobb = objectPose.
oobbGlobal();
68 simox::AxisAlignedBoundingBox::from_points(oobb->corners());
70 armem::index::arondto::Spatial spatial;
73 toAron(spatial.aabbGlobal, aabb);
79 update.instancesData = {spatial.toAron()};
85 std::optional<ObjectInfo> info =
89 std::optional<std::vector<std::string>> recognized, spoken;
90 recognized = info->loadRecognizedNames();
91 spoken = info->loadSpokenNames();
93 armem::index::arondto::Named named;
96 if (recognized.has_value())
98 named.names.recognized = recognized.value();
102 named.names.recognized = {info->className()};
105 if (spoken.has_value())
107 named.names.spoken = spoken.value();
111 named.names.spoken = {info->className()};
118 update.instancesData = {named.toAron()};
127 std::vector<const objpose::ObjectPose*>
129 const std::vector<MemoryID>& updatedSnapshotIDs)
143 if (objectPose.timestamp < nextDueTime)
152 for (
const MemoryID& updatedSnapshotID : updatedSnapshotIDs)
164 std::vector<const objpose::ObjectPose*> filtered;
165 for (
const objpose::ObjectPose& objectPose : objectPoses)
167 if (filter(objectPose))
169 filtered.push_back(&objectPose);