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
Merge requests
!178
Draft: Make RobotStateMemory ready
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Draft: Make RobotStateMemory ready
armem/robot-state-memory
into
master
Overview
1
Commits
48
Pipelines
0
Changes
2
Merged
Rainer Kartmann
requested to merge
armem/robot-state-memory
into
master
3 years ago
Overview
1
Commits
48
Pipelines
0
Changes
2
Expand
Goal:
Make stable (especially race conditions)
Improve runtime
Add profiling/monitoring
Refactor code
Add missing interfaces
0
0
Merge request reports
Viewing commit
117fb70d
Prev
Next
Show latest version
2 files
+
32
−
14
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
117fb70d
Add locking commit
· 117fb70d
Rainer Kartmann
authored
3 years ago
source/RobotAPI/libraries/armem_robot_state/server/localization/Segment.cpp
+
23
−
13
Options
@@ -168,30 +168,40 @@ namespace armarx::armem::server::robot_state::localization
}
bool
Segment
::
store
Transform
(
const
armarx
::
armem
::
robot_state
::
Transform
&
transform
)
bool
Segment
::
commit
Transform
(
const
armarx
::
armem
::
robot_state
::
Transform
&
transform
)
{
const
armem
::
Time
&
timestamp
=
transform
.
header
.
timestamp
;
Commit
commit
;
commit
.
add
(
makeUpdate
(
transform
));
const
MemoryID
providerID
=
coreSegment
->
id
().
withProviderSegmentName
(
transform
.
header
.
agent
);
if
(
not
coreSegment
->
hasProviderSegment
(
providerID
.
providerSegmentName
))
{
coreSegment
->
addProviderSegment
(
providerID
.
providerSegmentName
,
arondto
::
Transform
::
toAronType
());
}
const
armem
::
CommitResult
result
=
iceMemory
.
commit
(
commit
);
return
result
.
allSuccess
();
}
bool
Segment
::
commitTransformLocking
(
const
armarx
::
armem
::
robot_state
::
Transform
&
transform
)
{
Commit
commit
;
commit
.
add
(
makeUpdate
(
transform
));
EntityUpdate
&
update
=
commit
.
updates
.
emplace_back
();
update
.
entityID
=
providerID
.
withEntityName
(
transform
.
header
.
parentFrame
+
","
+
transform
.
header
.
frame
);
const
armem
::
CommitResult
result
=
iceMemory
.
commitLocking
(
commit
);
return
result
.
allSuccess
();
}
EntityUpdate
Segment
::
makeUpdate
(
const
armarx
::
armem
::
robot_state
::
Transform
&
transform
)
const
{
const
armem
::
Time
&
timestamp
=
transform
.
header
.
timestamp
;
const
MemoryID
providerID
=
coreSegment
->
id
().
withProviderSegmentName
(
transform
.
header
.
agent
);
EntityUpdate
update
;
update
.
entityID
=
providerID
.
withEntityName
(
transform
.
header
.
parentFrame
+
","
+
transform
.
header
.
frame
);
update
.
timeArrived
=
update
.
timeCreated
=
update
.
timeSent
=
timestamp
;
arondto
::
Transform
aronTransform
;
toAron
(
aronTransform
,
transform
);
update
.
instancesData
=
{
aronTransform
.
toAron
()};
const
armem
::
CommitResult
result
=
iceMemory
.
commit
(
commit
);
return
result
.
allSuccess
();
return
update
;
}
}
// namespace armarx::armem::server::robot_state::localization
Loading