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
Lennard Hofmann
RobotAPI
Commits
215e9bcb
Commit
215e9bcb
authored
10 years ago
by
Simon Ottenhaus
Browse files
Options
Downloads
Patches
Plain Diff
fixed compiler error
parent
c6902502
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/units/ForceTorqueObserver.cpp
+6
-6
6 additions, 6 deletions
source/RobotAPI/components/units/ForceTorqueObserver.cpp
source/RobotAPI/components/units/ForceTorqueObserver.h
+5
-2
5 additions, 2 deletions
source/RobotAPI/components/units/ForceTorqueObserver.h
with
11 additions
and
8 deletions
source/RobotAPI/components/units/ForceTorqueObserver.cpp
+
6
−
6
View file @
215e9bcb
...
...
@@ -74,9 +74,9 @@ void ForceTorqueObserver::offerValue(std::string nodeName, const std::string &ty
FramedVector3Ptr
vec
=
FramedVector3Ptr
::
dynamicCast
(
value
);
DataFieldIdentifierPtr
id
;
if
(
type
==
FORCES_STRING
)
if
(
type
==
"forces"
)
id
=
getForceDatafieldId
(
nodeName
,
vec
->
frame
);
else
if
(
type
==
TORQUES_STRING
)
else
if
(
type
==
"torques"
)
id
=
getTorqueDatafieldId
(
nodeName
,
vec
->
frame
);
else
throw
LocalException
()
<<
"Unknown sensor type: "
<<
type
;
...
...
@@ -112,12 +112,12 @@ void armarx::ForceTorqueObserver::reportSensorValues(const std::string &sensorNo
if
(
forces
)
{
std
::
string
type
=
FORCES_STRING
;
std
::
string
type
=
"forces"
;
offerValue
(
sensorNodeName
,
type
,
forces
);
}
if
(
torques
)
{
std
::
string
type
=
TORQUES_STRING
;
std
::
string
type
=
"torques"
;
offerValue
(
sensorNodeName
,
type
,
torques
);
}
}
...
...
@@ -148,7 +148,7 @@ DataFieldIdentifierPtr ForceTorqueObserver::getForceDatafieldId(const std::strin
channelName
=
nodeName
;
else
channelName
=
nodeName
+
"_"
+
frame
;
std
::
string
datafieldName
=
FORCES_STRING
;
std
::
string
datafieldName
=
"forces"
;
if
(
!
existsChannel
(
channelName
))
throw
UserException
(
"No sensor for node '"
+
nodeName
+
"'available: channel "
+
channelName
);
if
(
!
existsDataField
(
channelName
,
datafieldName
))
...
...
@@ -164,7 +164,7 @@ DataFieldIdentifierPtr ForceTorqueObserver::getTorqueDatafieldId(const std::stri
channelName
=
nodeName
;
else
channelName
=
nodeName
+
"_"
+
frame
;
std
::
string
datafieldName
=
TORQUES_STRING
;
std
::
string
datafieldName
=
"torques"
;
DataFieldIdentifierPtr
id
=
new
DataFieldIdentifier
(
getName
(),
channelName
,
datafieldName
);
return
id
;
}
This diff is collapsed.
Click to expand it.
source/RobotAPI/components/units/ForceTorqueObserver.h
+
5
−
2
View file @
215e9bcb
...
...
@@ -44,8 +44,11 @@ namespace armarx
*/
virtual
PropertyDefinitionsPtr
createPropertyDefinitions
();
const
std
::
string
FORCES_STRING
=
"forces"
;
const
std
::
string
TORQUES_STRING
=
"torques"
;
// DOES NOT COMPILE:
// sorry, unimplemented: non-static data member initializers
// error: in-class initialization of static data member ‘FORCES_STRING’ of non-literal type
//const std::string FORCES_STRING = "forces";
//const std::string TORQUES_STRING = "torques";
private
:
armarx
::
Mutex
dataMutex
;
std
::
string
topicName
;
...
...
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