Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Stack Of Tasks
roscontrol_sot
Commits
294e5331
Commit
294e5331
authored
Dec 06, 2021
by
Florent Lamiraux
Browse files
Initialize all logs to 0 at startup.
parent
9e39034f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/log.cpp
View file @
294e5331
...
...
@@ -24,14 +24,28 @@ void DataToLog::init(ProfileLog &aProfileLog) {
orientation
.
resize
(
4
*
aProfileLog
.
length
);
accelerometer
.
resize
(
3
*
aProfileLog
.
length
);
gyrometer
.
resize
(
3
*
aProfileLog
.
length
);
force_sensors
.
resize
(
aProfileLog
.
nbForceSensors
*
6
*
aProfileLog
.
length
);
force_sensors
.
resize
(
aProfileLog
.
nbForceSensors
*
6
*
aProfileLog
.
length
);
temperatures
.
resize
(
aProfileLog
.
nbDofs
*
aProfileLog
.
length
);
controls
.
resize
(
aProfileLog
.
nbDofs
*
aProfileLog
.
length
);
timestamp
.
resize
(
aProfileLog
.
length
);
duration
.
resize
(
aProfileLog
.
length
);
for
(
unsigned
int
i
=
0
;
i
<
aProfileLog
.
nbDofs
*
aProfileLog
.
length
;
i
++
)
{
motor_angle
[
i
]
=
joint_angle
[
i
]
=
velocities
[
i
]
=
0.0
;
motor_angle
[
i
]
=
joint_angle
[
i
]
=
velocities
[
i
]
=
torques
[
i
]
=
motor_currents
[
i
]
=
temperatures
[
i
]
=
controls
[
i
]
=
0.0
;
}
for
(
unsigned
int
i
=
0
;
i
<
4
*
aProfileLog
.
length
;
i
++
)
{
orientation
[
i
]
=
0
;
}
for
(
unsigned
int
i
=
0
;
i
<
3
*
aProfileLog
.
length
;
i
++
)
{
accelerometer
[
i
]
=
gyrometer
[
i
]
=
0
;
}
for
(
unsigned
int
i
=
0
;
i
<
aProfileLog
.
nbForceSensors
*
6
*
aProfileLog
.
length
;
i
++
)
{
force_sensors
[
i
]
=
0
;
}
for
(
unsigned
int
i
=
0
;
i
<
aProfileLog
.
length
;
i
++
)
{
timestamp
[
i
]
=
duration
[
i
]
=
0
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment