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
0d8e3677
Commit
0d8e3677
authored
6 years ago
by
Raphael Grimm
Browse files
Options
Downloads
Patches
Plain Diff
Modernize code and add comments
parent
45657994
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/units/RobotUnit/RobotUnitModules/RobotUnitModuleLogging.cpp
+11
-8
11 additions, 8 deletions
...its/RobotUnit/RobotUnitModules/RobotUnitModuleLogging.cpp
with
11 additions
and
8 deletions
source/RobotAPI/components/units/RobotUnit/RobotUnitModules/RobotUnitModuleLogging.cpp
+
11
−
8
View file @
0d8e3677
...
@@ -335,18 +335,19 @@ namespace armarx
...
@@ -335,18 +335,19 @@ namespace armarx
}
}
//sens
//sens
{
{
//sensors
for
(
std
::
size_t
idxDev
=
0
;
idxDev
<
data
.
sensors
.
size
();
++
idxDev
)
for
(
std
::
size_t
idxDev
=
0
;
idxDev
<
data
.
sensors
.
size
();
++
idxDev
)
{
{
const
SensorValueBase
*
val
=
data
.
sensors
.
at
(
idxDev
);
const
SensorValueBase
*
val
=
data
.
sensors
.
at
(
idxDev
);
//dimensions of sensor value (e.g. vel, tor, f_x, f_y, ...)
for
(
std
::
size_t
idxField
=
0
;
idxField
<
val
->
getNumberOfDataFields
();
++
idxField
)
for
(
std
::
size_t
idxField
=
0
;
idxField
<
val
->
getNumberOfDataFields
();
++
idxField
)
{
{
const
auto
str
=
val
->
getDataFieldAsString
(
idxField
);
const
auto
str
=
val
->
getDataFieldAsString
(
idxField
);
for
(
auto
&
pair
:
rtLoggingEntries
)
for
(
auto
&
[
_
,
entry
]
:
rtLoggingEntries
)
{
{
CSVLoggingEntry
&
e
=
*
pair
.
second
;
if
(
entry
->
loggedSensorDeviceValues
.
at
(
idxDev
).
at
(
idxField
))
if
(
e
.
loggedSensorDeviceValues
.
at
(
idxDev
).
at
(
idxField
))
{
{
pair
.
second
->
stream
<<
";"
<<
str
;
entry
->
stream
<<
";"
<<
str
;
}
}
}
}
}
}
...
@@ -354,21 +355,23 @@ namespace armarx
...
@@ -354,21 +355,23 @@ namespace armarx
}
}
//ctrl
//ctrl
{
{
//joint controllers
for
(
std
::
size_t
idxDev
=
0
;
idxDev
<
data
.
control
.
size
();
++
idxDev
)
for
(
std
::
size_t
idxDev
=
0
;
idxDev
<
data
.
control
.
size
();
++
idxDev
)
{
{
const
auto
&
vals
=
data
.
control
.
at
(
idxDev
);
const
auto
&
vals
=
data
.
control
.
at
(
idxDev
);
//control value (e.g. v_platform)
for
(
std
::
size_t
idxVal
=
0
;
idxVal
<
vals
.
size
();
++
idxVal
)
for
(
std
::
size_t
idxVal
=
0
;
idxVal
<
vals
.
size
();
++
idxVal
)
{
{
const
ControlTargetBase
*
val
=
vals
.
at
(
idxVal
);
const
ControlTargetBase
*
val
=
vals
.
at
(
idxVal
);
//dimensions of control value (e.g. v_platform_x, v_platform_y, v_platform_rotate)
for
(
std
::
size_t
idxField
=
0
;
idxField
<
val
->
getNumberOfDataFields
();
++
idxField
)
for
(
std
::
size_t
idxField
=
0
;
idxField
<
val
->
getNumberOfDataFields
();
++
idxField
)
{
{
const
auto
str
=
val
->
getDataFieldAsString
(
idxField
);
const
auto
str
=
val
->
getDataFieldAsString
(
idxField
);
for
(
auto
&
pair
:
rtLoggingEntries
)
for
(
auto
&
[
_
,
entry
]
:
rtLoggingEntries
)
{
{
CSVLoggingEntry
&
e
=
*
pair
.
second
;
if
(
entry
->
loggedControlDeviceValues
.
at
(
idxDev
).
at
(
idxVal
).
at
(
idxField
))
if
(
e
.
loggedControlDeviceValues
.
at
(
idxDev
).
at
(
idxVal
).
at
(
idxField
))
{
{
pair
.
second
->
stream
<<
";"
<<
str
;
entry
->
stream
<<
";"
<<
str
;
}
}
}
}
}
}
...
...
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