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
pinocchio
Commits
9d7a3d7f
Commit
9d7a3d7f
authored
Jan 10, 2018
by
jcarpent
Browse files
[Spatial] Use AlphaSkewSquare struct in Inertia::vxi operator
parent
73ce9e3f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/spatial/inertia.hpp
View file @
9d7a3d7f
...
...
@@ -389,23 +389,25 @@ namespace se3
{
EIGEN_STATIC_ASSERT_MATRIX_SPECIFIC_SIZE
(
M6
,
6
,
6
);
M6
&
Iout_
=
const_cast
<
Eigen
::
MatrixBase
<
M6
>
&>
(
Iout
).
derived
();
// Block 1,1
alphaSkew
(
I
.
mass
(),
v
.
angular
(),
Iout_
.
template
block
<
3
,
3
>(
LINEAR
,
LINEAR
));
// Iout_.template block<3,3>(LINEAR,LINEAR) = alphaSkew(I.mass(),v.angular());
const
Vector3
mc
(
I
.
mass
()
*
I
.
lever
());
// Block 1,2
skewSquare
(
-
v
.
angular
(),
mc
,
Iout_
.
template
block
<
3
,
3
>(
LINEAR
,
ANGULAR
));
// Block 2,1
//// Block 2,1
alphaSkew
(
I
.
mass
(),
v
.
linear
(),
Iout_
.
template
block
<
3
,
3
>(
ANGULAR
,
LINEAR
));
Iout_
.
template
block
<
3
,
3
>(
ANGULAR
,
LINEAR
)
-=
Iout_
.
template
block
<
3
,
3
>(
LINEAR
,
ANGULAR
);
// Block 2,2
//
//
Block 2,2
skewSquare
(
-
v
.
linear
(),
mc
,
Iout_
.
template
block
<
3
,
3
>(
ANGULAR
,
ANGULAR
));
Iout_
.
template
block
<
3
,
3
>(
ANGULAR
,
ANGULAR
)
+=
I
.
inertia
().
vxs
(
v
.
angula
r
());
Ma
tri
x
3
mcxc
;
skewSquare
(
mc
,
I
.
lever
(),
mcxc
);
Iout_
.
template
block
<
3
,
3
>(
ANGULAR
,
ANGULAR
)
-
=
cros
s
(
v
.
angular
()
,
mcxc
);
typename
Symmetric3
::
AlphaSkewSquare
mcxcx
(
I
.
mass
(),
I
.
leve
r
());
const
Symme
tri
c
3
I_
mcxc
x
(
I
.
inertia
()
-
mcxc
x
);
Iout_
.
template
block
<
3
,
3
>(
ANGULAR
,
ANGULAR
)
+
=
I_mcxcx
.
vx
s
(
v
.
angular
());
}
...
...
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