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
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Florian Leander Singer
RobotAPI
Commits
c46d9d7d
Commit
c46d9d7d
authored
2 years ago
by
Rainer Kartmann
Browse files
Options
Downloads
Patches
Plain Diff
Update usage of time in grasp provider example
parent
dbf39b5e
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/components/armem/client/GraspProviderExample/GraspProviderExample.cpp
+6
-6
6 additions, 6 deletions
...rmem/client/GraspProviderExample/GraspProviderExample.cpp
with
6 additions
and
6 deletions
source/RobotAPI/components/armem/client/GraspProviderExample/GraspProviderExample.cpp
+
6
−
6
View file @
c46d9d7d
...
...
@@ -3,7 +3,7 @@
#include
<SimoxUtility/color/cmaps.h>
#include
<ArmarXCore/core/exceptions/local/ExpressionException.h>
#include
<ArmarXCore/core/time/
CycleUtil
.h>
#include
<ArmarXCore/core/time/
Metronome
.h>
#include
<RobotAPI/libraries/core/Pose.h>
...
...
@@ -76,7 +76,7 @@ namespace armarx
{
ARMARX_IMPORTANT
<<
"Running example."
;
CycleUtil
c
(
1000
);
Metronome
m
(
Duration
::
MilliSeconds
(
1000
)
)
;
int
i
=
0
;
...
...
@@ -86,13 +86,13 @@ namespace armarx
grasping
::
GraspCandidate
candidate
=
makeDummyGraspCandidate
();
candidate
.
groupNr
=
i
;
//non-necessary field, but used to commit different candidates
writer
.
commitGraspCandidate
(
candidate
,
armem
::
Time
::
n
ow
(),
"candidateProvider"
);
writer
.
commitGraspCandidate
(
candidate
,
armem
::
Time
::
N
ow
(),
"candidateProvider"
);
// initialize all necessary fields of a bimanual grasp candidate and use writer to commit it to memory
grasping
::
BimanualGraspCandidate
bimanualCandidate
=
makeDummyBimanualGraspCandidate
();
bimanualCandidate
.
groupNr
=
i
;
//non-necessary field, but used to commit different candidates
writer
.
commitBimanualGraspCandidate
(
bimanualCandidate
,
armem
::
Time
::
n
ow
(),
"bimanualProvider"
);
writer
.
commitBimanualGraspCandidate
(
bimanualCandidate
,
armem
::
Time
::
N
ow
(),
"bimanualProvider"
);
//test for writing Seqs, candidates from the same object appear as instances of the same snapshot
...
...
@@ -102,7 +102,7 @@ namespace armarx
candidatesToWrite
.
push_back
(
new
grasping
::
GraspCandidate
(
candidate
));
writer
.
commitGraspCandidateSeq
(
candidatesToWrite
,
armem
::
Time
::
n
ow
(),
"candidateProvider"
);
writer
.
commitGraspCandidateSeq
(
candidatesToWrite
,
armem
::
Time
::
N
ow
(),
"candidateProvider"
);
// test reader and debug by logging the group number of the candidate
...
...
@@ -139,7 +139,7 @@ namespace armarx
ARMARX_INFO
<<
"bimanual candidate with ID "
<<
id
<<
" has group number "
<<
ca
->
groupNr
;
}
c
.
waitFor
CycleDuration
();
m
.
waitFor
NextTick
();
}
}
...
...
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