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
87474ee7
Commit
87474ee7
authored
1 year ago
by
Joana Plewnia
Browse files
Options
Downloads
Patches
Plain Diff
fixed issue with starting and stopping of recording several parallel LTMs at once
parent
70f9fbf1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!322
Feature/forgetting in wm and em
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
source/RobotAPI/libraries/armem/server/MemoryToIceAdapter.cpp
+27
-14
27 additions, 14 deletions
...ce/RobotAPI/libraries/armem/server/MemoryToIceAdapter.cpp
with
27 additions
and
14 deletions
source/RobotAPI/libraries/armem/server/MemoryToIceAdapter.cpp
+
27
−
14
View file @
87474ee7
...
...
@@ -524,8 +524,30 @@ namespace armarx::armem::server
ARMARX_TRACE
;
ARMARX_CHECK_NOT_NULL
(
longtermMemory
);
ARMARX_IMPORTANT
<<
"Enabling the recording of memory "
<<
longtermMemory
->
id
().
str
();
longtermMemory
->
startRecording
();
// TODO: config and execution time!
//other LTMs only start recording when defined from the beginning
std
::
vector
<
armarx
::
armem
::
server
::
ltm
::
Memory
*>
ltms
;
ltms
.
push_back
(
longtermMemory
);
ltms
.
push_back
(
secondLTM
);
ltms
.
push_back
(
thirdLTM
);
ltms
.
push_back
(
fourthLTM
);
ltms
.
push_back
(
fiftLTM
);
ltms
.
push_back
(
sixthLTM
);
ltms
.
push_back
(
seventhLTM
);
ltms
.
push_back
(
eightLTM
);
ltms
.
push_back
(
ninthLTM
);
ltms
.
push_back
(
tenthLTM
);
ltms
.
push_back
(
eleventhLTM
);
/*
ltms.push_back(twelvethLTM);
ltms.push_back(thirteenthLTM);
ltms.push_back(fourteenthLTM);
ltms.push_back(fifteenthLTM);
ltms.push_back(sixteenthLTM);
*/
for
(
int
i
=
0
;
i
<
static_cast
<
int
>
(
ltms
.
size
());
i
++
){
ltms
.
at
(
i
)
->
startRecording
();
}
//longtermMemory->startRecording(); // TODO: config and execution time!
dto
::
StartRecordResult
ret
;
ret
.
success
=
true
;
...
...
@@ -560,7 +582,7 @@ namespace armarx::armem::server
ltms.push_back(sixteenthLTM);
*/
std
::
vector
<
std
::
thread
>
threads
;
for
(
int
i
=
0
;
i
<
5
;
++
i
){
for
(
int
i
=
0
;
i
<
static_cast
<
int
>
(
ltms
.
size
())
;
++
i
){
threads
.
push_back
(
std
::
thread
([
i
,
&
ltms
]{
ltms
.
at
(
i
)
->
stopRecording
();
}));
...
...
@@ -570,17 +592,8 @@ namespace armarx::armem::server
thread
.
join
();
}
ARMARX_INFO
<<
"Stopped all LTM recordings"
;
/**
thirdLTM->stopRecording();
longtermMemory->stopRecording();
secondLTM->stopRecording();
fourthLTM->stopRecording();
fiftLTM->stopRecording();
*/
ARMARX_INFO
<<
"Stopped all LTM recordings, please wait with stopping the component until "
"all files are written"
;
dto
::
StopRecordResult
ret
;
ret
.
success
=
true
;
...
...
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