Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Python3 ArmarX
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software
ArmarX
Python3 ArmarX
Commits
f9c776cf
Commit
f9c776cf
authored
3 months ago
by
Joana Plewnia
Browse files
Options
Downloads
Patches
Plain Diff
fixed issue in test for loading LTM data using python
parent
b416df02
No related branches found
No related tags found
1 merge request
!79
adding aron and armem functionalities from research repo
Pipeline
#22253
canceled
3 months ago
Stage: setup-venv
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/armarx/armarx_memory/ltm/test_loading.py
+14
-7
14 additions, 7 deletions
tests/armarx/armarx_memory/ltm/test_loading.py
with
14 additions
and
7 deletions
tests/armarx/armarx_memory/ltm/test_loading.py
+
14
−
7
View file @
f9c776cf
import
pytest
import
numpy
as
np
import
os
from
armarx_memory.ltm.memory_server
import
MemoryServer
from
armarx_memory.core.MemoryID
import
MemoryID
...
...
@@ -10,7 +11,9 @@ from armarx_memory.aron.data.variant import AronDict, AronString, AronInt, AronL
@pytest.fixture
def
loadReferencesForServer
():
base_path
=
"
testData/2024_07_16
"
test_dir
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
path
=
os
.
path
.
join
(
test_dir
,
"
testData/2024_07_16
"
)
base_path
=
path
.
__str__
()
export_name
=
"
LTM
"
server
=
MemoryServer
(
base_path
,
export_name
)
server
.
loadReferences
()
...
...
@@ -22,14 +25,18 @@ def test_loadingMetadata(loadReferencesForServer):
entity
=
server
.
get_entity
(
mid_vision
)
snapshot_id
=
list
(
entity
.
snapshots
.
keys
())[
0
]
snapshot
:
EntitySnapshot
=
entity
.
snapshots
[
snapshot_id
]
#
print(snapshot.id)
print
(
snapshot
.
id
)
instance
:
EntityInstance
=
snapshot
.
instances
[
0
]
instance
.
load
()
#print(instance.metadata)
assert
instance
.
metadata
.
timeArrived
==
1716470608457011
assert
instance
.
metadata
.
timeSent
==
1716470608455472
assert
instance
.
metadata
.
timeReferenced
==
1716470608454102
assert
instance
.
metadata
.
timeStored
==
1716470609125400
print
(
instance
.
metadata
)
if
(
snapshot
.
id
==
'
Vision/ImageRGB/Armar3WideImageProvider/images/1716470608520853
'
):
# test this for this specific snapshot
assert
instance
.
metadata
.
timeArrived
==
1716470608522966
assert
instance
.
metadata
.
timeSent
==
1716470608521870
assert
instance
.
metadata
.
timeReferenced
==
1716470608520853
assert
instance
.
metadata
.
timeStored
==
1716470609192258
else
:
print
(
"
Incorrect snapshot was chosen and cannot be compared
"
)
def
test_visionMemoryLoading
(
loadReferencesForServer
):
server
=
loadReferencesForServer
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment