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
394ef979
Commit
394ef979
authored
4 years ago
by
Fabian Reister
Browse files
Options
Downloads
Patches
Plain Diff
PlatformUnit: partially reverting changes
parent
cfd521d7
No related branches found
No related tags found
1 merge request
!132
Fix robot state component
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
source/RobotAPI/components/units/PlatformUnit.cpp
+9
-5
9 additions, 5 deletions
source/RobotAPI/components/units/PlatformUnit.cpp
source/RobotAPI/components/units/PlatformUnit.h
+17
-0
17 additions, 0 deletions
source/RobotAPI/components/units/PlatformUnit.h
with
26 additions
and
5 deletions
source/RobotAPI/components/units/PlatformUnit.cpp
+
9
−
5
View file @
394ef979
...
...
@@ -34,26 +34,30 @@ namespace armarx
{
PropertyDefinitionsPtr
PlatformUnit
::
createPropertyDefinitions
()
{
armarx
::
PropertyDefinitionsPtr
def
=
new
ComponentPropertyDefinitions
(
getConfigIdentifier
());
armarx
::
PropertyDefinitionsPtr
def
=
new
PlatformUnitPropertyDefinitions
(
getConfigIdentifier
());
def
->
topic
(
odometryPrx
);
def
->
topic
(
globalPosePrx
);
// legacy
// defineOptionalProperty<std::string>("PlatformName", "Platform", "Name of the platform (will publish values on PlatformName + 'State')");
def
->
topic
(
listenerPrx
,
"PlatformState"
);
return
def
;
}
void
PlatformUnit
::
onInitComponent
()
{
std
::
string
platformName
=
getProperty
<
std
::
string
>
(
"PlatformName"
).
getValue
();
listenerChannelName
=
platformName
+
"State"
;
offeringTopic
(
listenerChannelName
);
this
->
onInitPlatformUnit
();
}
void
PlatformUnit
::
onConnectComponent
()
{
listenerPrx
=
getTopic
<
PlatformUnitListenerPrx
>
(
listenerChannelName
);
this
->
onStartPlatformUnit
();
}
...
...
This diff is collapsed.
Click to expand it.
source/RobotAPI/components/units/PlatformUnit.h
+
17
−
0
View file @
394ef979
...
...
@@ -36,6 +36,21 @@
namespace
armarx
{
/**
* \class PlatformUnitPropertyDefinitions
* \brief Defines all necessary properties for armarx::PlatformUnit
*/
class
PlatformUnitPropertyDefinitions
:
public
ComponentPropertyDefinitions
{
public:
PlatformUnitPropertyDefinitions
(
std
::
string
prefix
)
:
ComponentPropertyDefinitions
(
prefix
)
{
defineOptionalProperty
<
std
::
string
>
(
"PlatformName"
,
"Platform"
,
"Name of the platform (will publish values on PlatformName + 'State')"
);
}
};
/**
* \defgroup Component-PlatformUnit PlatformUnit
...
...
@@ -100,6 +115,8 @@ namespace armarx
PropertyDefinitionsPtr
createPropertyDefinitions
()
override
;
protected
:
std
::
string
listenerChannelName
;
/**
* PlatformUnitListener proxy for publishing state updates
*/
...
...
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