Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Humanoid Path Planner
hpp-pinocchio
Commits
c79b1b89
Commit
c79b1b89
authored
Jan 15, 2021
by
Florent Lamiraux
Browse files
[CenterOfMassComputation] Fix invalid memory access.
parent
e7cc5556
Pipeline
#12877
failed with stage
in 2 minutes and 49 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
src/center-of-mass-computation.cc
View file @
c79b1b89
...
...
@@ -66,13 +66,18 @@ namespace hpp {
// Nullify non-subtree com and mass.
std
::
size_t
root
=
0
;
std
::
size_t
rootId
=
roots_
[
root
];
for
(
std
::
size_t
jid
=
1
;
jid
<
model
.
joints
.
size
();
++
jid
)
{
const
std
::
size_t
&
rootId
=
roots_
[
root
];
if
(
jid
==
rootId
)
{
jid
=
(
std
::
size_t
)
data
.
lastChild
[
rootId
];
root
++
;
if
(
root
<
roots_
.
size
())
rootId
=
roots_
[
root
];
else
// After last root, make sure that all joints set to 0.
rootId
=
model
.
joints
.
size
();
}
else
{
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment