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
55e93590
Commit
55e93590
authored
4 years ago
by
Raphael Grimm
Browse files
Options
Downloads
Patches
Plain Diff
Add ArVizComponentPluginUser::getArvizClient and clean up client code
parent
dc1e1876
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
source/RobotAPI/components/ArViz/Client/Client.h
+11
-7
11 additions, 7 deletions
source/RobotAPI/components/ArViz/Client/Client.h
source/RobotAPI/libraries/RobotAPIComponentPlugins/ArVizComponentPlugin.h
+9
-0
9 additions, 0 deletions
...libraries/RobotAPIComponentPlugins/ArVizComponentPlugin.h
with
20 additions
and
7 deletions
source/RobotAPI/components/ArViz/Client/Client.h
+
11
−
7
View file @
55e93590
...
...
@@ -19,20 +19,19 @@ namespace armarx::viz
Client
(
armarx
::
Component
&
component
,
std
::
string
topicNameProperty
=
"ArVizTopicName"
)
{
componentName
=
component
.
getName
();
topic
=
component
.
getTopicFromProperty
<
decltype
(
topic
)
>
(
topicNameProperty
);
component
.
getTopicFromProperty
(
_topic
,
topicNameProperty
);
}
Client
(
ManagedIceObject
&
obj
,
const
std
::
string
&
topicName
=
"ArVizTopic"
)
{
componentName
=
obj
.
getName
();
obj
.
getTopic
(
topic
,
topicName
);
obj
.
getTopic
(
_
topic
,
topicName
);
}
static
Client
createFromTopic
(
const
std
::
string
arvizNamespace
,
armarx
::
viz
::
Topic
::
ProxyType
topic
)
{
Client
client
;
client
.
componentName
=
arvizNamespace
;
client
.
topic
=
topic
;
client
.
_
topic
=
topic
;
return
client
;
}
...
...
@@ -46,7 +45,7 @@ namespace armarx::viz
name
=
name
.
substr
(
0
,
dashPos
);
}
client
.
componentName
=
name
;
client
.
topic
=
component
.
getTopic
<
decltype
(
topic
)
>
(
topicName
);
component
.
getTopic
(
client
.
_
topic
,
topicName
);
return
client
;
}
...
...
@@ -129,7 +128,7 @@ namespace armarx::viz
void
commit
()
{
topic
->
updateLayers
(
updates
);
_
topic
->
updateLayers
(
updates
);
updates
.
clear
();
}
...
...
@@ -138,9 +137,14 @@ namespace armarx::viz
{
commit
(
layerContaining
(
name
,
std
::
forward
<
Ts
>
(
elems
)...));
}
const
armarx
::
viz
::
TopicPrx
&
topic
()
const
{
return
_topic
;
}
private
:
std
::
string
componentName
;
armarx
::
viz
::
TopicPrx
topic
;
armarx
::
viz
::
TopicPrx
_
topic
;
data
::
LayerUpdateSeq
updates
;
};
...
...
This diff is collapsed.
Click to expand it.
source/RobotAPI/libraries/RobotAPIComponentPlugins/ArVizComponentPlugin.h
+
9
−
0
View file @
55e93590
...
...
@@ -41,6 +41,15 @@ namespace armarx
armarx
::
viz
::
Client
arviz
;
armarx
::
viz
::
Client
&
getArvizClient
()
{
if
(
!
arviz
.
topic
())
{
arviz
=
createArVizClient
();
}
return
arviz
;
}
private
:
armarx
::
plugins
::
ArVizComponentPlugin
*
plugin
=
nullptr
;
};
...
...
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