diff --git a/source/RobotAPI/interface/CMakeLists.txt b/source/RobotAPI/interface/CMakeLists.txt index 72e69849e5f9b3611ac25c8008c43a9aeb138f7b..e9cd7a8ed8e584583c2871dce1d8188d7cb70925 100644 --- a/source/RobotAPI/interface/CMakeLists.txt +++ b/source/RobotAPI/interface/CMakeLists.txt @@ -107,6 +107,10 @@ set(SLICE_FILES armem/MemoryInterface.ice armem/MemoryNameSystemInterface.ice + armem/query.ice + armem/query/query.ice + armem/query/data.ice + components/ObstacleAvoidance/ObstacleAvoidanceInterface.ice components/ObstacleAvoidance/ObstacleDetectionInterface.ice components/ObstacleAvoidance/DSObstacleAvoidanceInterface.ice diff --git a/source/RobotAPI/interface/armem/query.ice b/source/RobotAPI/interface/armem/query.ice new file mode 100644 index 0000000000000000000000000000000000000000..fe8dd90ae62d39207bc951e6f3a97f7d722c205f --- /dev/null +++ b/source/RobotAPI/interface/armem/query.ice @@ -0,0 +1,4 @@ +#pragma once + +#include <RobotAPI/interface/armem/query/data.ice> +#include <RobotAPI/interface/armem/query/query.ice> diff --git a/source/RobotAPI/interface/armem/query/data.ice b/source/RobotAPI/interface/armem/query/data.ice new file mode 100644 index 0000000000000000000000000000000000000000..21de01b5094c321ab1d86040c662046060ecc936 --- /dev/null +++ b/source/RobotAPI/interface/armem/query/data.ice @@ -0,0 +1,83 @@ +#pragma once + +#include <RobotAPI/interface/aron.ice> + + +module armarx +{ + module armem + { + // WIP + + module data + { + /// Ice Twin of `armarx::armem::EntityMetadata`. + struct EntityMetadata + { + long timeCreatedMicroSeconds; + long timeSentMicroSeconds; + long timeArrivedMicroSeconds; + + float confidence = 1.0; + }; + /// Ice Twin of `armarx::armem::EntityData`. + struct EntityData + { + int index; + aron::data::AronData data; + + EntityMetadata metadata; + }; + sequence<EntityData> EntityDataSeq; + + + /// Ice Twin of `armarx::armem::EntitySnapshot`. + struct EntitySnapshot + { + long timeMicroSeconds; + EntityDataSeq instances; + }; + dictionary<long, EntitySnapshot> EntityHistory; + + + /// Ice Twin of `armarx::armem::Entity`. + struct Entity + { + string name; + EntityHistory history; + }; + dictionary<string, Entity> EntityDict; + + + /// Ice Twin of `armarx::armem::ProviderSegment`. + struct ProviderSegment + { + string name; + EntityDict entities; + }; + dictionary<string, ProviderSegment> ProviderSegmentDict; + + + /// Ice Twin of `armarx::armem::CoreSegment`. + struct CoreSegment + { + string name; + // aron::type::AronType type; + ProviderSegmentDict providerSegments; + }; + dictionary<string, CoreSegment> CoreSegmentDict; + + + /// Ice Twin of `armarx::armem::Memory`. + struct Memory + { + string name; + // aron::type::AronType type; + CoreSegmentDict coreSegments; + }; + dictionary<string, Memory> MemoryDict; + + } + + }; +}; diff --git a/source/RobotAPI/interface/armem/query/query.ice b/source/RobotAPI/interface/armem/query/query.ice new file mode 100644 index 0000000000000000000000000000000000000000..24c86e0ddc08d6c1d7aa11a41e9f35162ea285f3 --- /dev/null +++ b/source/RobotAPI/interface/armem/query/query.ice @@ -0,0 +1,91 @@ +#pragma once + +#include <RobotAPI/interface/aron.ice> + + +module armarx +{ + module armem + { + // WIP + + module query + { + module data + { + /// Which entity snapshots to get from an entity? + class EntityQuery + { + }; + sequence<EntityQuery> EntityQuerySeq; + class AllEntitySnapshotsQuery extends EntityQuery + { + }; + class LatestEntitySnapshotQuery extends EntityQuery + { + }; + class EntitySnapshotsInRangeQuery extends EntityQuery + { + long minTimestamp = -1; // -1 for oldest + long maxTimestamp = -1; // -1 for latest + }; + + + /// Which entities to get from a provider segment? + class ProviderSegmentQuery + { + EntityQuerySeq entityQueries; + }; + sequence<ProviderSegmentQuery> ProviderSegmentQuerySeq; + + class AllEntitiesQuery extends ProviderSegmentQuery + { + }; + class SingleEntitiesQuery extends ProviderSegmentQuery + { + string entityName; + }; + class RegexEntityQuery extends ProviderSegmentQuery + { + string entityNameRegex; + }; + + /// Which provider segments to get from a core segment? + class CoreSegmentQuery + { + ProviderSegmentQuerySeq providerSegmentQueries; + }; + sequence<CoreSegmentQuery> CoreSegmentQuerySeq; + + class AllProviderSegmentsQuery extends CoreSegmentQuery + { + }; + class SingleProviderSegmentsQuery extends CoreSegmentQuery + { + string providerSegmentName; + }; + + + /// Which core segments to get from a memory? + class MemoryQuery + { + CoreSegmentQuerySeq coreSegmentQueries; + }; + + class AllCoreSegmentsQuery extends MemoryQuery + { + }; + class SingleCoreSegmentsQuery extends MemoryQuery + { + string coreSegmentName; + }; + } + } + + interface someReadingInterface + { + // data::EntitySnapshotQueryResultList getEntitySnapshots(data::EntitySnapshotQueryList queries); + }; + + }; +};