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
8688b488
Commit
8688b488
authored
3 years ago
by
Rainer Kartmann
Browse files
Options
Downloads
Patches
Plain Diff
Move cupboard in ArticulatedObjectLocalizerExample so it does not conflict with the Object example
parent
aa0ea290
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!171
Periodic merge of armem/dev into master
,
!170
ArMem Viewer: Resolve Memory IDs
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
source/RobotAPI/components/ArticulatedObjectLocalizerExample/ArticulatedObjectLocalizerExample.cpp
+10
-4
10 additions, 4 deletions
...ectLocalizerExample/ArticulatedObjectLocalizerExample.cpp
with
10 additions
and
4 deletions
source/RobotAPI/components/ArticulatedObjectLocalizerExample/ArticulatedObjectLocalizerExample.cpp
+
10
−
4
View file @
8688b488
...
...
@@ -29,6 +29,8 @@
#include
<IceUtil/Time.h>
#include
<SimoxUtility/math/pose/pose.h>
#include
<VirtualRobot/Robot.h>
#include
<VirtualRobot/XML/RobotIO.h>
#include
<VirtualRobot/VirtualRobot.h>
...
...
@@ -51,7 +53,9 @@ namespace armarx::articulated_object
{
ArticulatedObjectLocalizerExample
::
ArticulatedObjectLocalizerExample
()
:
articulatedObjectWriter
(
new
::
armarx
::
armem
::
articulated_object
::
Writer
(
memoryNameSystem
)),
articulatedObjectReader
(
new
::
armarx
::
armem
::
articulated_object
::
Reader
(
memoryNameSystem
))
{}
articulatedObjectReader
(
new
::
armarx
::
armem
::
articulated_object
::
Reader
(
memoryNameSystem
))
{
}
armarx
::
PropertyDefinitionsPtr
ArticulatedObjectLocalizerExample
::
createPropertyDefinitions
()
{
...
...
@@ -83,7 +87,7 @@ namespace armarx::articulated_object
ARMARX_IMPORTANT
<<
"Running example."
;
start
=
armem
::
Time
::
now
();
task
=
new
PeriodicTask
<
ArticulatedObjectLocalizerExample
>
(
this
,
&
ArticulatedObjectLocalizerExample
::
run
,
1000
/
p
.
updateFrequency
);
task
=
new
PeriodicTask
<
ArticulatedObjectLocalizerExample
>
(
this
,
&
ArticulatedObjectLocalizerExample
::
run
,
1000
.
f
/
p
.
updateFrequency
);
task
->
start
();
}
...
...
@@ -152,7 +156,7 @@ namespace armarx::articulated_object
ARMARX_DEBUG
<<
"Reporting articulated objects"
;
const
IceUtil
::
Time
now
=
TimeUtil
::
GetTime
();
const
float
t
=
float
((
now
-
start
).
toSecondsDouble
());
const
float
t
=
float
((
now
-
start
).
toSecondsDouble
());
// move joints at certain frequency
const
float
k
=
(
1
+
std
::
sin
(
t
/
(
M_2_PIf32
)))
/
2
;
// in [0,1]
...
...
@@ -163,9 +167,11 @@ namespace armarx::articulated_object
{
"drawer_joint"
,
350
*
k
}
};
dishwasher
->
setGlobalPose
(
simox
::
math
::
pose
(
Eigen
::
Vector3f
(
1000
,
0
,
0
)));
dishwasher
->
setJointValues
(
jointValues
);
armarx
::
armem
::
articulated_object
::
ArticulatedObject
armemDishwasher
=
convert
(
*
dishwasher
,
IceUtil
::
Time
::
now
());
armarx
::
armem
::
articulated_object
::
ArticulatedObject
armemDishwasher
=
convert
(
*
dishwasher
,
IceUtil
::
Time
::
now
());
articulatedObjectWriter
->
store
(
armemDishwasher
);
}
...
...
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