Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RobotAPI
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
Container Registry
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
RobotAPI
Commits
7d7a3907
Commit
7d7a3907
authored
3 years ago
by
Rainer Kartmann
Browse files
Options
Downloads
Patches
Plain Diff
Allow ObjectMemory to load multiple scenes on startup
parent
71f14ac9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
source/RobotAPI/libraries/armem_objects/server/instance/Segment.cpp
+11
-4
11 additions, 4 deletions
...otAPI/libraries/armem_objects/server/instance/Segment.cpp
with
11 additions
and
4 deletions
source/RobotAPI/libraries/armem_objects/server/instance/Segment.cpp
+
11
−
4
View file @
7d7a3907
...
...
@@ -32,6 +32,7 @@
#include
<ArmarXCore/core/time/TimeUtil.h>
#include
<SimoxUtility/algorithm/get_map_keys_values.h>
#include
<SimoxUtility/algorithm/string.h>
#include
<SimoxUtility/json.h>
#include
<SimoxUtility/math/pose/pose.h>
...
...
@@ -100,8 +101,9 @@ namespace armarx::armem::server::obj::instance
defs
->
optional
(
p
.
sceneSnapshotsDirectory
,
prefix
+
"scene.11_Directory"
,
"Directory in Package/data/Package/ containing the scene snapshots."
);
defs
->
optional
(
p
.
sceneSnapshotToLoad
,
prefix
+
"scene.12_SnapshotToLoad"
,
"Scene snapshot to load on startup (e.g. 'Scene_2021-06-24_20-20-03').
\n
"
"You can also specify paths relative to 'Package/scenes/'."
);
"Scene to load on startup (e.g. 'Scene_2021-06-24_20-20-03').
\n
"
"You can also specify paths relative to 'Package/scenes/'.
\n
"
"You can also specify a ; separated list of scenes."
);
decay
.
defineProperties
(
defs
,
prefix
+
"decay."
);
}
...
...
@@ -113,8 +115,13 @@ namespace armarx::armem::server::obj::instance
if
(
not
p
.
sceneSnapshotToLoad
.
empty
())
{
bool
lockMemory
=
false
;
commitSceneSnapshotFromFilename
(
p
.
sceneSnapshotToLoad
,
lockMemory
);
bool
trim
=
true
;
const
std
::
vector
<
std
::
string
>
scenes
=
simox
::
alg
::
split
(
p
.
sceneSnapshotToLoad
,
";"
,
trim
);
for
(
const
std
::
string
&
scene
:
scenes
)
{
const
bool
lockMemory
=
false
;
commitSceneSnapshotFromFilename
(
scene
,
lockMemory
);
}
}
}
...
...
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