Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • sw/armarx/robot-api
  • uwkce_singer/robot-api
  • untcg_hofmann/robot-api
  • ulqba_korosakov/RobotAPI
4 results
Show changes
Commits on Source (1544)
Showing
with 1926 additions and 1685 deletions
stages:
- build-and-test
- deploy
- post-deploy-test
.build-and-test:
cache:
# https://docs.gitlab.com/ee/ci/caching/#share-caches-across-jobs-in-different-branches
key: one-key-to-rule-them-all
paths:
- .apt
- .ccache
before_script:
# Apt cache configuration.
- rm -rf /var/cache/apt/archives || true
- rm -f /etc/apt/apt.conf.d/docker-clean # Remove docker-clean script to avoid cache deletion.
- mkdir .apt || true
- ln -s "$CI_PROJECT_DIR/.apt" /var/cache/apt/archives
# Update apt info.
- apt-get update
# Ccache configuration and introspection.
- apt-get install ccache --yes
- ccache --set-config=cache_dir="$CI_PROJECT_DIR/.ccache"
- ccache --max-size=20G
- ccache --show-stats
# Activate Axii.
- source /axii/scripts/install_axii.sh
- _axii_auto_env_refresh
script:
- echo "ArmarX Workspace = '$ARMARX_WORKSPACE'"
# Use workspace configuration from project.
- cp "$CI_PROJECT_DIR/.gitlab/ci/armarx-workspace.json" "$ARMARX_WORKSPACE/armarx-workspace.json"
- cat "$ARMARX_WORKSPACE/armarx-workspace.json"
- axii workspace env
- _axii_auto_env_refresh
- echo "Workspace information:"
- axii workspace list-modules
- axii workspace list-modules --deps
- axii workspace info
- export PROJECT_MODULE="armarx/RobotAPI"
- export PROJECT_PATH_IN_WORKSPACE="$armarx__RobotAPI__PATH"
# Symlink project directory into Axii workspace.
- mkdir -p "$(dirname $PROJECT_PATH_IN_WORKSPACE)"
- ln -s "$CI_PROJECT_DIR" "$PROJECT_PATH_IN_WORKSPACE"
# Fix "CMake Error in CMakeLists.txt: Imported target "VirtualRobot" includes non-existent path "/usr/lib/include"
# (caused by at least dmp)
- mkdir -p /usr/lib/include
# Upgrade.
- axii workspace system --accept-apt-install
- axii workspace update --prefer-https
- axii workspace upgrade -m "$PROJECT_MODULE"
- ccache --show-stats
# Test.
# ToDo: Add and use `axii ws test -m "$PROJECT_MODULE"`
- cd "$PROJECT_PATH_IN_WORKSPACE/build"
- ctest --output-on-failure --output-junit "$CI_PROJECT_DIR/report.xml" .
artifacts:
reports:
junit: report.xml
build-and-test-bionic:
stage: build-and-test
extends: .build-and-test
image: git.h2t.iar.kit.edu:5050/sw/armarx/armarx-gui:latest-bionic
build-and-test-jammy:
stage: build-and-test
extends: .build-and-test
image: git.h2t.iar.kit.edu:5050/sw/armarx/armarx-gui:latest-jammy
docker-bionic:
stage: deploy
needs: ["build-and-test-bionic"]
image:
name: gcr.io/kaniko-project/executor:v1.9.0-debug
entrypoint: [""]
script:
- /kaniko/executor
--context "${CI_PROJECT_DIR}"
--dockerfile "${CI_PROJECT_DIR}/docker/bionic"
--destination "${CI_REGISTRY_IMAGE}:latest-bionic"
rules:
- if: $CI_COMMIT_BRANCH == "master"
docker-jammy:
stage: deploy
needs: ["build-and-test-jammy"]
image:
name: gcr.io/kaniko-project/executor:v1.9.0-debug
entrypoint: [""]
script:
- /kaniko/executor
--context "${CI_PROJECT_DIR}"
--dockerfile "${CI_PROJECT_DIR}/docker/jammy"
--destination "${CI_REGISTRY_IMAGE}:latest-jammy"
rules:
- if: $CI_COMMIT_BRANCH == "master"
.test-docker-image-common:
before_script:
- source /axii/scripts/install_axii.sh
- _axii_auto_env_refresh
script:
- echo "ArmarX Workspace = '$ARMARX_WORKSPACE'"
- printenv
- axii workspace list-modules
- axii workspace list-modules --deps
- axii workspace info
- echo "RobotAPI directory = '$RobotAPI_DIR'"
- which armarx
- which armarx-package
- armarx switch docker_test --ice-host 127.0.0.1 --ice-port 10000 --ice-default-host 127.0.0.1 --mongo-host 127.0.0.1 --mongo-port 10001
- armarx profile
- armarx status || true
- cd $ArmarXGui_DIR
- ctest --output-on-failure .
test-docker-image-bionic:
stage: post-deploy-test
needs: ["docker-bionic"]
extends: .test-docker-image-common
image: git.h2t.iar.kit.edu:5050/sw/armarx/robot-api:latest-bionic
rules:
- if: $CI_COMMIT_BRANCH == "master"
test-docker-image-jammy:
stage: post-deploy-test
needs: ["docker-jammy"]
extends: .test-docker-image-common
image: git.h2t.iar.kit.edu:5050/sw/armarx/robot-api:latest-jammy
rules:
- if: $CI_COMMIT_BRANCH == "master"
# ARON
##########################
/source/RobotAPI/libraries/aron/ @peller @dreher
/source/RobotAPI/libraries/aron/ @plewnia @hyseni
/source/RobotAPI/interface/aron/ @peller @dreher
/source/RobotAPI/interface/aron.ice @peller @dreher
/source/RobotAPI/interface/aron/ @plewnia @hyseni
/source/RobotAPI/interface/aron.ice @plewnia @hyseni @dreher
# ArMem
/source/RobotAPI/components/armem/ @peller @kartmann @dreher
##########################
/source/RobotAPI/libraries/armem/ @peller @kartmann @dreher
/source/RobotAPI/libraries/armem_robot_localization/ @reister
/source/RobotAPI/libraries/armem_robot_mapping/ @reister
/source/RobotAPI/components/armem/ @plewnia
/source/RobotAPI/libraries/armem/ @plewnia
/source/RobotAPI/interface/armem/ @fratty @RainerKartmann @dreher
/source/RobotAPI/interface/armem.ice @fratty @RainerKartmann @dreher
/source/RobotAPI/interface/armem/ @plewnia
/source/RobotAPI/interface/armem.ice @plewnia @dreher
# ArMem client / helper libraries
##########################
/source/RobotAPI/libraries/armem_grasping/ @hyseni @reister
/source/RobotAPI/libraries/armem_gui/ @plewnia
/source/RobotAPI/libraries/armem_index/ @plewnia
/source/RobotAPI/libraries/armem_laser_scans/ @reister
/source/RobotAPI/libraries/armem_locations/ @plewnia
# /source/RobotAPI/libraries/armem_motions/
# /source/RobotAPI/libraries/armem_mps/
/source/RobotAPI/libraries/armem_objects/ @reister
# /source/RobotAPI/libraries/armem_reasoning/
/source/RobotAPI/libraries/armem_robot_state/ @reister
# /source/RobotAPI/libraries/armem_skills see below
# /source/RobotAPI/libraries/armem_system_state/
# /source/RobotAPI/libraries/armem_vision/
# Skill framework
##########################
/source/RobotAPI/interface/skills @meixner @rietsch
/source/RobotAPI/libraries/skills @meixner @rietsch
/source/RobotAPI/libraries/armem_skills @meixner @rietsch
# ArViz
##########################
/source/RobotAPI/components/ArViz @daab @meixner
# Others
##########################
/source/RobotAPI/libraries/ArmarXObjects @reister
/source/RobotAPI/libraries/diffik @meixner
/source/RobotAPI/libraries/natik @meixner
{
"modules": {
"tools/ccache/default": {},
"armarx/RobotAPI": {}
},
"global": {
"prepare": {
"cmake": {
"definitions": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
"CMAKE_C_COMPILER_LAUNCHER": "$CCACHE",
"CMAKE_CXX_COMPILER_LAUNCHER": "$CCACHE"
}
}
}
}
}
# RobotAPI
## Documentation
[Wiki](docs)
[Online Documentation](https://armarx.humanoids.kit.edu/d4/da3/RobotAPI-Overview.html),
in particular on
[ARON ("ArmarX Object Notation") / IDF (Interpretable Data Format)](https://armarx.humanoids.kit.edu/d9/d51/aron.html)
and
[ArMem ("ArmarX Memory Framework")](https://armarx.humanoids.kit.edu/d5/d6e/memory_system.html)
\ No newline at end of file
Stub to make the package tool work.
......@@ -114,6 +114,15 @@
<CollisionModel>
<File type="Inventor">convexModel/neck_yaw_link.wrl</File>
</CollisionModel>
<PrimitiveModel>
<Primitives>
<Sphere radius="140">
<Transform>
<Translation x="40" y="0" z="180" />
</Transform>
</Sphere>
</Primitives>
</PrimitiveModel>
<Child name="Head_Tilt"/>
</RobotNode>
......
......@@ -33,6 +33,16 @@
<CollisionModel>
<File type="Inventor">convexModel/shoulder_l.wrl</File>
</CollisionModel>
<PrimitiveModel>
<Primitives>
<Capsule height="80" radius="120">
<Transform>
<Translation x="0" y="0" z="-90" />
<rpy roll="90" pitch="0" yaw="00" unit="degree"/>
</Transform>
</Capsule>
</Primitives>
</PrimitiveModel>
<Child name="Shoulder 2 L"/>
</RobotNode>
......@@ -60,6 +70,15 @@
<CollisionModel>
<File type="Inventor">convexModel/shoulder2_l_rot.wrl</File>
</CollisionModel>
<PrimitiveModel>
<Primitives>
<Capsule height="310" radius="50">
<Transform>
<Translation x="0" y="150" z="0" />
</Transform>
</Capsule>
</Primitives>
</PrimitiveModel>
<Child name="Upperarm L"/>
</RobotNode>
......@@ -138,6 +157,16 @@
<CollisionModel>
<File type="Inventor">convexModel/underarm_l.wrl</File>
</CollisionModel>
<PrimitiveModel>
<Primitives>
<Capsule height="240" radius="50">
<Transform>
<Translation x="0" y="0" z="-110" />
<rpy roll="90" pitch="0" yaw="0" unit="degree"/>
</Transform>
</Capsule>
</Primitives>
</PrimitiveModel>
<Physics>
<CoM location="VisualizationBBoxCenter"/>
<Mass value="2.26566087" units="kg" />
......
......@@ -34,6 +34,16 @@
<CollisionModel>
<File type="Inventor">convexModel/shoulder_r.wrl</File>
</CollisionModel>
<PrimitiveModel>
<Primitives>
<Capsule height="80" radius="120">
<Transform>
<Translation x="0" y="0" z="90" />
<rpy roll="90" pitch="0" yaw="00" unit="degree"/>
</Transform>
</Capsule>
</Primitives>
</PrimitiveModel>
<Child name="Shoulder 2 R"/>
</RobotNode>
......@@ -59,6 +69,15 @@
<CollisionModel>
<File type="Inventor">convexModel/shoulder2_r_rot.wrl</File>
</CollisionModel>
<PrimitiveModel>
<Primitives>
<Capsule height="310" radius="50">
<Transform>
<Translation x="0" y="150" z="0" />
</Transform>
</Capsule>
</Primitives>
</PrimitiveModel>
<Child name="Upperarm R"/>
</RobotNode>
......@@ -133,6 +152,16 @@
<CollisionModel>
<File type="Inventor">convexModel/underarm_r.wrl</File>
</CollisionModel>
<PrimitiveModel>
<Primitives>
<Capsule height="240" radius="50">
<Transform>
<Translation x="0" y="0" z="-110" />
<rpy roll="90" pitch="0" yaw="0" unit="degree"/>
</Transform>
</Capsule>
</Primitives>
</PrimitiveModel>
<Physics>
<CoM location="VisualizationBBoxCenter"/>
<Mass value="2.26566087" units="kg" />
......
......@@ -70,6 +70,16 @@
<CollisionModel>
<File type="Inventor">convexModel/platform.wrl</File>
</CollisionModel>
<PrimitiveModel>
<Primitives>
<Capsule height="400" radius="390">
<Transform>
<Translation x="0" y="0" z="380" />
<rpy roll="90" pitch="0" yaw="0" unit="degree"/>
</Transform>
</Capsule>
</Primitives>
</PrimitiveModel>
<Child name="Laser Scanner Front"/>
<Child name="Laser Scanner Back Left"/>
<Child name="Laser Scanner Back Right"/>
......@@ -175,6 +185,16 @@
<CollisionModel>
<File type="Inventor">convexModel/torso.wrl</File>
</CollisionModel>
<PrimitiveModel>
<Primitives>
<Capsule height="400" radius="210">
<Transform>
<Translation x="0" y="-40" z="225" />
<rpy roll="90" pitch="0" yaw="0" unit="degree"/>
</Transform>
</Capsule>
</Primitives>
</PrimitiveModel>
<Child name="Center of Arms"/>
</RobotNode>
......
This diff is collapsed.
{
"modules": {
"armarx/RobotAPI": {}
},
"global": {
"prepare": {
"cmake": {
"definitions": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
}
}
}
}
}
FROM git.h2t.iar.kit.edu:5050/sw/armarx/armarx-gui:latest-bionic
# Setup environment.
SHELL ["/bin/bash", "-c"]
# Setup apt environment.
RUN apt-get -qq update
# Setup repository in Docker.
WORKDIR $ARMARX_WORKSPACE/armarx/RobotAPI
COPY --chmod=755 . .
# Use workspace config.
COPY docker/armarx-workspace.json $ARMARX_WORKSPACE/armarx-workspace.json
# Fix "CMake Error in CMakeLists.txt: Imported target "VirtualRobot" includes non-existent path "/usr/lib/include"
# (caused by at least dmp)
RUN mkdir -p /usr/lib/include
# Run the upgrade.
RUN axii workspace system --accept-apt-install
# ToDo: Prevent this from updating the target itself.
RUN axii workspace update --prefer-https
RUN axii workspace upgrade
FROM git.h2t.iar.kit.edu:5050/sw/armarx/armarx-gui:latest-jammy
# Setup environment.
SHELL ["/bin/bash", "-c"]
# Setup apt environment.
RUN apt-get -qq update
# Setup repository in Docker.
WORKDIR $ARMARX_WORKSPACE/armarx/RobotAPI
COPY --chmod=755 . .
# Use workspace config.
COPY docker/armarx-workspace.json $ARMARX_WORKSPACE/armarx-workspace.json
# Run the upgrade.
RUN axii workspace system --accept-apt-install
# ToDo: Prevent this from updating the target itself.
RUN axii workspace update --prefer-https
RUN axii workspace upgrade
[Aron](aron)
[ArMem](armem)
* [Introduction](introduction)
* [Existing Memories (Memory Servers)](existing_memory_servers_and_segments)
* [How to create a new Core Segment or Memory Server](how_to_create_a_new_core_segment_or_memory_server)
This is a list of existing memory servers, their core segments and their ARON data types.
# `RobotState`
* Memory Server: [`RobotStateMemory` (RobotAPI)](https://git.h2t.iar.kit.edu/sw/armarx/robot-api/-/tree/master/source/RobotAPI/components/armem/server/RobotStateMemory)
* Core Segments:
| Core Segment Name | Type | Description | Example Entities |
|-------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------|-------------------------|
| `Description` | [RobotDescription](https://git.h2t.iar.kit.edu/sw/armarx/robot-api/-/blob/master/source/RobotAPI/libraries/armem_robot/aron/RobotDescription.xml) | Robot description (e.g. link to XML or URDF file) | |
| `Proprioception` | ToDo | Robot configuration and internal sensor values. | tbd |
| [`Localization`](RobotState/Localization) | [Transform](https://git.h2t.iar.kit.edu/sw/armarx/robot-api/-/blob/master/source/RobotAPI/libraries/armem_robot_localization/aron/Transform.xml) | Transformations between frames {world,map,robot} to retrieve global robot pose. | armarx::aron::Transform |
Missing:
- Robot calibration: should be part of `Description` core segment
# `Object`
* Memory Server: [`ObjectMemory` (RobotAPI)](https://git.h2t.iar.kit.edu/sw/armarx/robot-api/-/blob/master/source/RobotAPI/components/armem/server/ObjectMemory)
* Core Segments:
| Core Segment Name | Type | Description | Example Entities |
|-----------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------|-----------------------------------------------------|
| `Class` | [ObjectClass](https://git.h2t.iar.kit.edu/sw/armarx/robot-api/-/blob/master/source/RobotAPI/libraries/armem_objects/aron/ObjectClass.xml) | Static description of a known object class. Entity names are (ArmarXObjects) object IDs. | `KIT/CoffeeFilters`, `YCB/001_chips_can` |
| `Instance` | [ObjectInstance](https://git.h2t.iar.kit.edu/sw/armarx/robot-api/-/blob/master/source/RobotAPI/libraries/armem_objects/aron/ObjectInstance.xml) | Localized object instance. Entity names are (ArmarXObjects) object IDs. | `KIT/CoffeeFilters`, `YCB/001_chips_can/instance_1` |
| `ArticulatedObjectClass` | [RobotDescription](https://git.h2t.iar.kit.edu/sw/armarx/robot-api/-/blob/master/source/RobotAPI/libraries/armem_robot/aron/RobotDescription.xml) | Static description of a known object class. Entity names are (ArmarXObjects) object IDs. | |
| `ArticulatedObjectInstance` | [Robot](https://git.h2t.iar.kit.edu/sw/armarx/robot-api/-/blob/master/source/RobotAPI/libraries/armem_robot/aron/Robot.xml) | Localized object instance. Entity names are (ArmarXObjects) object IDs. | |
| `Attachments` | [ObjectAttachment and ArticulatedObjectAttachment](https://git.h2t.iar.kit.edu/sw/armarx/robot-api/-/blob/master/source/RobotAPI/libraries/armem_objects/aron/Attachment.xml) | | |
# `Vision`
* Memory Server: [`ArMemVisionMemory` (VisionX)](https://git.h2t.iar.kit.edu/sw/armarx/visionx/-/tree/master/source/VisionX/components/armem/ArMemVisionMemory)
* Core Segments:
| Core Segment Name | Type | Description | Example Entities |
|-------------------|--------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------|------------------|
| `ImageRGB` | [`ImageRGB`](https://git.h2t.iar.kit.edu/sw/armarx/visionx/-/blob/master/source/VisionX/libraries/ArMem/aron/ImageRGB.xml) | RGB images (mono and stereo) of a camera | image |
| `ImageDepth` | [`ImageDepth`](https://git.h2t.iar.kit.edu/sw/armarx/visionx/-/blob/master/source/VisionX/libraries/ArMem/aron/ImageDepth.xml) | Depth images of an RGB-D or stereo camera | image |
# `Speech`
* Memory Server: [`SpeechMemory` (SpeechX)](https://git.h2t.iar.kit.edu/sw/armarx/speechx/-/tree/master/source/SpeechX/components/SpeechMemory)
* Core Segments:
| Core Segment Name | Type | Description | Example Entities |
|-------------------------|-----------------|---------------------------------------------------------------------------|------------------|
| `Command` | `SpeechCommand` | Language commands from speech (topic `Speech_Commands`). | `command` |
| `TextListenerInterface` | `Text` | Data from `TextListenerInterface` topics. (`TextToSpeech`, `RobotAction`) | `text` |
...
# `Skills`
* Memory Server: [`SkillsMemory` (RobotAPI)](https://git.h2t.iar.kit.edu/sw/armarx/robot-api/-/tree/master/source/RobotAPI/components/armem/server/SkillsMemory)
* Core Segments:
| Core Segment Name | Type | Description | Example Entities |
|-------------------|--------------|-------------------------------------|------------------|
| `Statechart` | `Transition` | Transitions in ArmarX state charts. | tbd |
# `GeneralPurpose`
This memory is meant to allow for a quick-and-dirty integration of your data type in the memory framework. When your development finishes a stable state, consider creating moving the core segment(s) to an existing memory server or creating a new dedicated memory server.
* Memory Server: [`GeneralPurposeMemory` (RobotAPI)](https://git.h2t.iar.kit.edu/sw/armarx/robot-api/-/tree/master/source/RobotAPI/components/armem/server/GeneralPurposeMemory)
* Core Segments:
| Core Segment Name | Type | Description | Example Entities |
|----------------------------------------|------|-------------|------------------|
| None. You can add segments on the fly. | | | |
# `Mapping`
* Memory Server: `ToDo`
* Core Segments:
| Core Segment Name | <br/>Type | Description | Example Entities |
|---------------------------------|-----------|--------------------------------------------------|------------------|
| [`Mapping`](RobotState/Mapping) | `ToDo` | Mapping related sensor data (e.g. point clouds). | tbd |
# `Example`
An example memory server (alongside a matching client) showing how to implement a standard memory server and test the framework during development.
* Memory Server: [`ExampleMemory` (RobotAPI)](https://git.h2t.iar.kit.edu/sw/armarx/robot-api/-/tree/master/source/RobotAPI/components/armem/server/ExampleMemory)
* Core Segments:
| Core Segment Name | Type | Description | Example Entities |
|-------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------|------------------|
| `ExampleData` | [ExampleData](https://git.h2t.iar.kit.edu/sw/armarx/robot-api/-/blob/master/source/RobotAPI/components/armem/server/ExampleMemory/aron/ExampleData.xml) | Some example data. | example |
\ No newline at end of file
# The localization segment within the RobotState memory
## Concept
There exist various frames that are needed to obtain the robot's global pose (pose within in the global frame):
* [global] the "world" frame.
* [map] During mapping, the robot does not have knowledge about the world but creates a local map (with "map" as root frame). All map features (e.g. point clouds, occupancy grids, ...) are linked to this frame.
* [odom] The odometry as an integration of the robot's velocity.
* [robot] The robot's root frame
![frames](res/frames.png)
For each transformation between frames, there exist individual components:
* [global->map] **Map registration:** given a scene (objects with known poses, e.g. walls, ...), this component obtains a static transformation between a the scene and the map.
* [map->odom] **Localization** The localization component computes the transformation [map->robot] and performs map corrections by updating [map->odom].
* [odom->robot] **Odometry**
### Memory design
Within the core segment, each robot has its own provider segment (here: Armar6). Within the provider segment, entities describe the transformations between the frames ("Global,Map" -> [global->map]).
![Localization](res/localization-armem.png)
### Using the localization memory
See **RobotAPI/libraries/armem_robot_localization**
There exist two classes:
* TransformWriter to send transformations to memory
* TransformReader to obtain transformations between any of the frames; can also be used to obtain the "robot's global pose"
For an example, see RobotComponents/components/carographer_mapping_and_localization (currently branch feature/cartographer_integration)
# The mapping segment within the RobotState memory
## Concept
Within the memory segment, sensor data is stored that is relevant for
* mapping
* map registration
![transformations_frames-Page-2](res/transformations_frames-Page-2.png)
# Distributed Memory
The ArMem memory system is distributed: It is comprised of several **memory servers** storing data in a hierarchical structure.
A memory server can be defined in any ArmarX package and defines which kind of data it stores (e.g. robot state, object classes and instances, visual data, speech, ...).
As a memory server knows which data it stores, it can provide special behaviour, such as custom visualization, aggregation, interpolation or prediction.
As each server is a separate component describing its own structure, it is simple to add new memory servers containing special data types, which are defined in ArmarX packages further down in the dependency chain.
All memory servers follow the same hierarchical data structure and self-describing data format.
The data structure consists of several levels, storing histories/timelines of different entities stored in different segments (see "Memory Levels" below).
The common data format is ARON (ArmarX Object Notation), which is a self-describing, hierarchical data format, allowing extensive introspection as well as general storage.
Each item in the memory (i.e. entries in all levels) can be identified with a **Memory ID**, which contains the keys of each (specified) level. For example, a core segment ID specifies the memory name and core segment name, while an entity instance ID specifies the whole path to the leaf of the data structure.
Technically, each memory server is one ArmarX component implementing the `armem::server::MemoryInterface` (comprising a `ReadingMemoryInterface` and a `WritingMemoryInterface`).
Memory servers register themselves in the **Memory Name System (MNS)**, where they can be found by their (semantic) memory name (which is usually a short, human-readable name such as "Robot", "Object" or "Vision").
Memory servers receive data via **commits** (via the `WritingMemoryInterface`), and return data according to **queries** (via the `ReadingMemoryInterface`).
# Memory Levels
A memory server stores data in a hierarchical structure consisting of several levels:
```
- Grasping (Memory)
- Grasps (Core Segment)
- KnownObjectGraspPlanner (Provider Segment)
- my_object (Entity)
- t = 2021-03-09 14:24:20.064524 (Entity Snapshot)
- 00 (Entity Instance)
- 01 (Entity Instance)
- 02 (Entity Instance)
```
| Level | Key | Description | Examples | Implementation |
| ----- | --- | ----------- | -------- | -------------- |
| Memory | Name (String) | Semantic grouping of one or more core segments. Corresponds to one memory server. | Robot, Object, Vision | [Memory](https://git.h2t.iar.kit.edu/sw/armarx/robot-api/-/blob/master/source/RobotAPI/libraries/armem/core/Memory.h) |
| Core Segment | Name (String) | Building block of a memory containing homogeneous data of a specific (ARON) type. Specifies a _Core Segment Type_ which all provided data must comply to. | (Robot) Configuration, (Object) Classes, Known (Object) Instances, ImageRGB | [CoreSegment](https://git.h2t.iar.kit.edu/sw/armarx/robot-api/-/blob/master/source/RobotAPI/libraries/armem/core/CoreSegment.h) |
| Provider Segment | Name (String) | Sub-segment of a core segment which contains the data from a single source (e.g. a camera, a method, a component). Can define a _Provider Segment Type_ which extends the _Core Segment Type_. | Primsense, SimTrack, MyGraspPlanner | [ProviderSegment](https://git.h2t.iar.kit.edu/sw/armarx/robot-api/-/blob/master/source/RobotAPI/libraries/armem/core/ProviderSegment.h) |
| Entity | Name (String) | A single thing or concept whose properties change over time. An entity has a history / timeline, i.e. a sequence of snapshots storing the entity's properties at a specific point in time. | `image`, `some_object`, `some_object_grasps` | [Entity](https://git.h2t.iar.kit.edu/sw/armarx/robot-api/-/blob/master/source/RobotAPI/libraries/armem/core/Entity.h) |
| Entity Snapshot | Timestamp (`armem::Time` aka `IceUtil::Time`) | An entry of an entity's history, i.e. the state of an entity at a specific point in time. Can contain multiple (entitiy) instances. | Image, object instance, grasp hypotheses at a time *t* | [EntitySnapshot](https://git.h2t.iar.kit.edu/sw/armarx/robot-api/-/blob/master/source/RobotAPI/libraries/armem/core/EntitySnapshot.h) |
| Entity Instance | Index (int) | One instance of the segment's ARON type. | left/right stereo image (at time t), object (at time t), grasp hypothesis (one of many at time t) | [EntityInstance](https://git.h2t.iar.kit.edu/sw/armarx/robot-api/-/blob/master/source/RobotAPI/libraries/armem/core/EntityInstance.h) |
| Entity Instance Metadata | -- | Metadata stored alongside the instance's data. | Further timesteps, confidence | [EntityInstanceMetadata](https://git.h2t.iar.kit.edu/sw/armarx/robot-api/-/blob/master/source/RobotAPI/libraries/armem/core/EntityInstance.h) |