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
2cdd2050
Verified
Commit
2cdd2050
authored
Oct 15, 2018
by
Justin Carpentier
Browse files
all: use RowMatrixXs instead of RowMatrixXd
parent
caf8530c
Changes
6
Hide whitespace changes
Inline
Side-by-side
bindings/python/algorithm/expose-aba.cpp
View file @
2cdd2050
...
...
@@ -23,7 +23,7 @@ namespace se3
namespace
python
{
const
Data
::
RowMatrixX
d
&
const
Data
::
RowMatrixX
s
&
computeMinverse_proxy
(
const
Model
&
model
,
Data
&
data
,
const
Eigen
::
VectorXd
&
q
)
{
computeMinverse
(
model
,
data
,
q
);
...
...
bindings/python/multibody/data.hpp
View file @
2cdd2050
...
...
@@ -76,7 +76,7 @@ namespace se3
.
ADD_DATA_PROPERTY_READONLY_BYVALUE
(
Eigen
::
VectorXd
,
ddq
,
"Joint accelerations (output of ABA)"
)
.
ADD_DATA_PROPERTY
(
container
::
aligned_vector
<
Inertia
>
,
Ycrb
,
"Inertia of the sub-tree composit rigid body"
)
.
ADD_DATA_PROPERTY_READONLY_BYVALUE
(
Eigen
::
MatrixXd
,
M
,
"The joint space inertia matrix"
)
.
ADD_DATA_PROPERTY_READONLY_BYVALUE
(
Data
::
RowMatrixX
d
,
Minv
,
"The inverse of the joint space inertia matrix"
)
.
ADD_DATA_PROPERTY_READONLY_BYVALUE
(
Data
::
RowMatrixX
s
,
Minv
,
"The inverse of the joint space inertia matrix"
)
.
ADD_DATA_PROPERTY_READONLY_BYVALUE
(
Eigen
::
MatrixXd
,
C
,
"The Coriolis C(q,v) matrix such that the Coriolis effects are given by c(q,v) = C(q,v)v"
)
.
ADD_DATA_PROPERTY
(
container
::
aligned_vector
<
Matrix6x
>
,
Fcrb
,
"Spatial forces set, used in CRBA"
)
.
ADD_DATA_PROPERTY
(
std
::
vector
<
int
>
,
lastChild
,
"Index of the last child (for CRBA)"
)
...
...
@@ -134,7 +134,7 @@ namespace se3
bp
::
class_
<
std
::
vector
<
int
>
>
(
"StdVec_int"
)
.
def
(
bp
::
vector_indexing_suite
<
std
::
vector
<
int
>
>
());
eigenpy
::
enableEigenPySpecific
<
Data
::
RowMatrixX
d
>
();
eigenpy
::
enableEigenPySpecific
<
Data
::
RowMatrixX
s
>
();
}
};
...
...
src/algorithm/aba.hpp
View file @
2cdd2050
...
...
@@ -88,7 +88,7 @@ namespace se3
/// \return The inverse of the joint space inertia matrix stored in data.ddq.
///
template
<
typename
Scalar
,
int
Options
,
template
<
typename
,
int
>
class
JointCollectionTpl
,
typename
ConfigVectorType
>
inline
const
typename
DataTpl
<
Scalar
,
Options
,
JointCollectionTpl
>::
RowMatrixX
d
&
inline
const
typename
DataTpl
<
Scalar
,
Options
,
JointCollectionTpl
>::
RowMatrixX
s
&
computeMinverse
(
const
ModelTpl
<
Scalar
,
Options
,
JointCollectionTpl
>
&
model
,
DataTpl
<
Scalar
,
Options
,
JointCollectionTpl
>
&
data
,
const
Eigen
::
MatrixBase
<
ConfigVectorType
>
&
q
);
...
...
src/algorithm/aba.hxx
View file @
2cdd2050
...
...
@@ -377,7 +377,7 @@ namespace se3
const
JointIndex
&
parent
=
model
.
parents
[
i
];
typename
Inertia
::
Matrix6
&
Ia
=
data
.
Yaba
[
i
];
typename
Data
::
RowMatrixX
d
&
Minv
=
data
.
Minv
;
typename
Data
::
RowMatrixX
s
&
Minv
=
data
.
Minv
;
typename
Data
::
Matrix6x
&
Fcrb
=
data
.
Fcrb
[
0
];
typename
Data
::
Matrix6x
&
FcrbTmp
=
data
.
Fcrb
.
back
();
...
...
@@ -437,7 +437,7 @@ namespace se3
const
JointIndex
&
i
=
jmodel
.
id
();
const
JointIndex
&
parent
=
model
.
parents
[
i
];
typename
Data
::
RowMatrixX
d
&
Minv
=
data
.
Minv
;
typename
Data
::
RowMatrixX
s
&
Minv
=
data
.
Minv
;
typename
Data
::
Matrix6x
&
FcrbTmp
=
data
.
Fcrb
.
back
();
typedef
typename
SizeDepType
<
JointModel
::
NV
>::
template
ColsReturn
<
typename
Data
::
Matrix6x
>
::
Type
ColsBlock
;
...
...
@@ -461,7 +461,7 @@ namespace se3
};
template
<
typename
Scalar
,
int
Options
,
template
<
typename
,
int
>
class
JointCollectionTpl
,
typename
ConfigVectorType
>
inline
const
typename
DataTpl
<
Scalar
,
Options
,
JointCollectionTpl
>::
RowMatrixX
d
&
inline
const
typename
DataTpl
<
Scalar
,
Options
,
JointCollectionTpl
>::
RowMatrixX
s
&
computeMinverse
(
const
ModelTpl
<
Scalar
,
Options
,
JointCollectionTpl
>
&
model
,
DataTpl
<
Scalar
,
Options
,
JointCollectionTpl
>
&
data
,
const
Eigen
::
MatrixBase
<
ConfigVectorType
>
&
q
)
...
...
src/multibody/data.hpp
View file @
2cdd2050
...
...
@@ -82,7 +82,7 @@ namespace se3
typedef
Eigen
::
Matrix
<
Scalar
,
3
,
Eigen
::
Dynamic
,
Options
>
Matrix3x
;
typedef
Eigen
::
Matrix
<
Scalar
,
6
,
6
,
Eigen
::
RowMajor
|
Options
>
RowMatrix6
;
typedef
Eigen
::
Matrix
<
Scalar
,
Eigen
::
Dynamic
,
Eigen
::
Dynamic
,
Eigen
::
RowMajor
|
Options
>
RowMatrixX
d
;
typedef
Eigen
::
Matrix
<
Scalar
,
Eigen
::
Dynamic
,
Eigen
::
Dynamic
,
Eigen
::
RowMajor
|
Options
>
RowMatrixX
s
;
/// \brief Vector of se3::JointData associated to the se3::JointModel stored in model,
/// encapsulated in JointDataAccessor.
...
...
@@ -150,7 +150,7 @@ namespace se3
MatrixXs
M
;
/// \brief The inverse of the joint space inertia matrix (a square matrix of dim model.nv).
RowMatrixX
d
Minv
;
RowMatrixX
s
Minv
;
/// \brief The Coriolis matrix (a square matrix of dim model.nv).
MatrixXs
C
;
...
...
unittest/aba-derivatives.cpp
View file @
2cdd2050
...
...
@@ -54,7 +54,7 @@ BOOST_AUTO_TEST_CASE(test_aba_derivatives)
MatrixXd
aba_partial_dq
(
model
.
nv
,
model
.
nv
);
aba_partial_dq
.
setZero
();
MatrixXd
aba_partial_dv
(
model
.
nv
,
model
.
nv
);
aba_partial_dv
.
setZero
();
Data
::
RowMatrixX
d
aba_partial_dtau
(
model
.
nv
,
model
.
nv
);
aba_partial_dtau
.
setZero
();
Data
::
RowMatrixX
s
aba_partial_dtau
(
model
.
nv
,
model
.
nv
);
aba_partial_dtau
.
setZero
();
computeABADerivatives
(
model
,
data
,
q
,
v
,
tau
,
aba_partial_dq
,
aba_partial_dv
,
aba_partial_dtau
);
computeRNEADerivatives
(
model
,
data_ref
,
q
,
v
,
a
);
...
...
@@ -152,7 +152,7 @@ BOOST_AUTO_TEST_CASE(test_aba_minimal_argument)
MatrixXd
aba_partial_dq
(
model
.
nv
,
model
.
nv
);
aba_partial_dq
.
setZero
();
MatrixXd
aba_partial_dv
(
model
.
nv
,
model
.
nv
);
aba_partial_dv
.
setZero
();
Data
::
RowMatrixX
d
aba_partial_dtau
(
model
.
nv
,
model
.
nv
);
aba_partial_dtau
.
setZero
();
Data
::
RowMatrixX
s
aba_partial_dtau
(
model
.
nv
,
model
.
nv
);
aba_partial_dtau
.
setZero
();
computeABADerivatives
(
model
,
data_ref
,
q
,
v
,
tau
,
aba_partial_dq
,
aba_partial_dv
,
aba_partial_dtau
);
...
...
@@ -194,7 +194,7 @@ BOOST_AUTO_TEST_CASE(test_aba_derivatives_fext)
MatrixXd
aba_partial_dq
(
model
.
nv
,
model
.
nv
);
aba_partial_dq
.
setZero
();
MatrixXd
aba_partial_dv
(
model
.
nv
,
model
.
nv
);
aba_partial_dv
.
setZero
();
Data
::
RowMatrixX
d
aba_partial_dtau
(
model
.
nv
,
model
.
nv
);
aba_partial_dtau
.
setZero
();
Data
::
RowMatrixX
s
aba_partial_dtau
(
model
.
nv
,
model
.
nv
);
aba_partial_dtau
.
setZero
();
computeABADerivatives
(
model
,
data
,
q
,
v
,
tau
,
fext
,
aba_partial_dq
,
aba_partial_dv
,
aba_partial_dtau
);
...
...
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