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
Stack Of Tasks
pinocchio
Commits
fa5018cd
Verified
Commit
fa5018cd
authored
Nov 05, 2019
by
Francois Keith
Committed by
Justin Carpentier
Jun 03, 2020
Browse files
[Win32] Correct use of min/max, add typename, remove ambiguity
parent
36d3aebc
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/algorithm/aba-derivatives.hxx
View file @
fa5018cd
...
...
@@ -312,9 +312,9 @@ namespace pinocchio
PINOCCHIO_CHECK_INPUT_ARGUMENT
(
model
.
gravity
.
angular
().
isZero
(),
"The gravity must be a pure force vector, no angular part"
);
for
(
Eigen
::
DenseIndex
k
=
0
;
k
<
jmodel
.
nv
();
++
k
)
{
MotionRef
<
typename
ColsBlock
::
ColXpr
>
min
(
J_cols
.
col
(
k
));
MotionRef
<
typename
ColsBlock
::
ColXpr
>
mout
(
dAdq_cols
.
col
(
k
));
mout
.
linear
()
+=
model
.
gravity
.
linear
().
cross
(
min
.
angular
());
MotionRef
<
typename
ColsBlock
::
ColXpr
>
m
_
in
(
J_cols
.
col
(
k
));
MotionRef
<
typename
ColsBlock
::
ColXpr
>
m
_
out
(
dAdq_cols
.
col
(
k
));
m
_
out
.
linear
()
+=
model
.
gravity
.
linear
().
cross
(
m
_
in
.
angular
());
}
}
...
...
src/algorithm/cholesky.hxx
View file @
fa5018cd
...
...
@@ -465,12 +465,12 @@ namespace pinocchio
const
std
::
vector
<
int
>
&
nvt
=
data
.
nvSubtree_fromRow
;
Mat
&
v_
=
PINOCCHIO_EIGEN_CONST_CAST
(
Mat
,
v
);
const
int
last_col
=
std
::
min
(
col
-
1
,
model
.
nv
-
2
);
// You can start from nv-2 (no child in nv-1)
const
int
last_col
=
std
::
min
<
int
>
(
col
-
1
,
model
.
nv
-
2
);
// You can start from nv-2 (no child in nv-1)
v_
.
tail
(
model
.
nv
-
col
-
1
).
setZero
();
v_
[
col
]
=
1.
;
for
(
int
k
=
last_col
;
k
>=
0
;
--
k
)
{
int
nvt_max
=
std
::
min
(
col
,
nvt
[(
size_t
)
k
]
-
1
);
int
nvt_max
=
std
::
min
<
int
>
(
col
,
nvt
[(
size_t
)
k
]
-
1
);
v_
[
k
]
=
-
U
.
row
(
k
).
segment
(
k
+
1
,
nvt_max
).
dot
(
v_
.
segment
(
k
+
1
,
nvt_max
));
}
...
...
src/algorithm/rnea-derivatives.hxx
View file @
fa5018cd
...
...
@@ -391,9 +391,9 @@ namespace pinocchio
PINOCCHIO_CHECK_INPUT_ARGUMENT
(
model
.
gravity
.
angular
().
isZero
(),
"The gravity must be a pure force vector, no angular part"
);
for
(
Eigen
::
DenseIndex
k
=
0
;
k
<
jmodel
.
nv
();
++
k
)
{
MotionRef
<
typename
ColsBlock
::
ColXpr
>
min
(
J_cols
.
col
(
k
));
MotionRef
<
typename
ColsBlock
::
ColXpr
>
mout
(
dAdq_cols
.
col
(
k
));
mout
.
linear
()
+=
model
.
gravity
.
linear
().
cross
(
min
.
angular
());
MotionRef
<
typename
ColsBlock
::
ColXpr
>
m
_
in
(
J_cols
.
col
(
k
));
MotionRef
<
typename
ColsBlock
::
ColXpr
>
m
_
out
(
dAdq_cols
.
col
(
k
));
m
_
out
.
linear
()
+=
model
.
gravity
.
linear
().
cross
(
m
_
in
.
angular
());
}
}
...
...
src/multibody/data.hxx
View file @
fa5018cd
...
...
@@ -144,7 +144,7 @@ namespace pinocchio
{
if
(
lastChild
[(
Index
)
i
]
==
-
1
)
lastChild
[(
Index
)
i
]
=
i
;
const
Index
&
parent
=
model
.
parents
[(
Index
)
i
];
lastChild
[
parent
]
=
std
::
max
(
lastChild
[(
Index
)
i
],
lastChild
[
parent
]);
lastChild
[
parent
]
=
std
::
max
<
Scalar
>
(
lastChild
[(
Index
)
i
],
lastChild
[
parent
]);
nvSubtree
[(
Index
)
i
]
=
idx_v
(
model
.
joints
[(
Index
)
lastChild
[(
Index
)
i
]])
+
nv
(
model
.
joints
[(
Index
)
lastChild
[(
Index
)
i
]])
...
...
src/multibody/model.hxx
View file @
fa5018cd
...
...
@@ -167,7 +167,7 @@ namespace pinocchio
template
<
typename
Scalar
,
int
Options
,
template
<
typename
,
int
>
class
JointCollectionTpl
>
inline
void
ModelTpl
<
Scalar
,
Options
,
JointCollectionTpl
>::
appendBodyToJoint
(
const
ModelTpl
::
JointIndex
joint_index
,
appendBodyToJoint
(
const
typename
ModelTpl
::
JointIndex
joint_index
,
const
Inertia
&
Y
,
const
SE3
&
body_placement
)
{
...
...
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