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
30613c30
Verified
Commit
30613c30
authored
Oct 16, 2019
by
Justin Carpentier
Browse files
all: remove previous references to Eigen::Tensor
parent
6e787316
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/algorithm/kinematics-derivatives.hpp
View file @
30613c30
...
...
@@ -200,7 +200,7 @@ namespace pinocchio
const
DataTpl
<
Scalar
,
Options
,
JointCollectionTpl
>
&
data
,
const
Model
::
JointIndex
joint_id
,
const
ReferenceFrame
rf
,
Eigen
::
Tensor
<
Scalar
,
3
,
Options
>
&
kinematic_hessian
);
Tensor
<
Scalar
,
3
,
Options
>
&
kinematic_hessian
);
///
/// \brief Retrieves the kinematic Hessian of a given joint according to the values aleardy computed by computeJointKinematicHessians
...
...
@@ -224,13 +224,13 @@ namespace pinocchio
/// Please refer to getJointKinematicHessian for a version without dynamic memory allocation.
///
template
<
typename
Scalar
,
int
Options
,
template
<
typename
,
int
>
class
JointCollectionTpl
>
inline
Eigen
::
Tensor
<
Scalar
,
3
,
Options
>
inline
Tensor
<
Scalar
,
3
,
Options
>
getJointKinematicHessian
(
const
ModelTpl
<
Scalar
,
Options
,
JointCollectionTpl
>
&
model
,
const
DataTpl
<
Scalar
,
Options
,
JointCollectionTpl
>
&
data
,
const
Model
::
JointIndex
joint_id
,
const
ReferenceFrame
rf
)
{
typedef
Eigen
::
Tensor
<
Scalar
,
3
,
Options
>
ReturnType
;
typedef
Tensor
<
Scalar
,
3
,
Options
>
ReturnType
;
ReturnType
res
(
6
,
model
.
nv
,
model
.
nv
);
res
.
setZero
();
getJointKinematicHessian
(
model
,
data
,
joint_id
,
rf
,
res
);
return
res
;
...
...
src/algorithm/kinematics-derivatives.hxx
View file @
30613c30
...
...
@@ -412,7 +412,7 @@ namespace pinocchio
typedef
MotionRef
<
MapVector6
>
MotionOut
;
const
typename
Data
::
Matrix6x
&
J
=
data
.
J
;
typename
Data
::
Tensor3
&
kinematic_hessians
=
data
.
kinematic_hessians
;
typename
Data
::
Tensor3
x
&
kinematic_hessians
=
data
.
kinematic_hessians
;
const
Eigen
::
DenseIndex
slice_matrix_size
=
6
*
model
.
nv
;
for
(
size_t
joint_id
=
1
;
joint_id
<
(
size_t
)
model
.
njoints
;
++
joint_id
)
...
...
@@ -508,7 +508,7 @@ namespace pinocchio
const
DataTpl
<
Scalar
,
Options
,
JointCollectionTpl
>
&
data
,
const
JointIndex
joint_id
,
const
ReferenceFrame
rf
,
Eigen
::
Tensor
<
Scalar
,
3
,
Options
>
&
kinematic_hessian
)
Tensor
<
Scalar
,
3
,
Options
>
&
kinematic_hessian
)
{
assert
(
model
.
check
(
data
)
&&
"data is not consistent with model."
);
assert
(
joint_id
<
model
.
joints
.
size
()
&&
joint_id
>
0
&&
"joint_id is outside the valid index for a joint in model.joints"
);
...
...
@@ -518,7 +518,7 @@ namespace pinocchio
typedef
typename
Data
::
Motion
Motion
;
const
typename
Data
::
Matrix6x
&
J
=
data
.
J
;
const
typename
Data
::
Tensor3
&
kinematic_hessians
=
data
.
kinematic_hessians
;
const
typename
Data
::
Tensor3
x
&
kinematic_hessians
=
data
.
kinematic_hessians
;
// Allocate memory
assert
(
kinematic_hessian
.
dimension
(
0
)
==
6
&&
"The result tensor is not of the right dimension."
);
...
...
src/multibody/data.hpp
View file @
30613c30
...
...
@@ -6,6 +6,8 @@
#ifndef __pinocchio_data_hpp__
#define __pinocchio_data_hpp__
#include
"pinocchio/math/tensor.hpp"
#include
"pinocchio/spatial/fwd.hpp"
#include
"pinocchio/spatial/se3.hpp"
#include
"pinocchio/spatial/force.hpp"
...
...
@@ -17,7 +19,6 @@
#include
<iostream>
#include
<Eigen/Cholesky>
#include
<unsupported/Eigen/CXX11/Tensor>
namespace
pinocchio
{
...
...
@@ -76,7 +77,7 @@ namespace pinocchio
typedef
Eigen
::
Matrix
<
Scalar
,
6
,
10
,
Options
>
BodyRegressorType
;
/// \brief The type of Tensor for Kinematics and Dynamics second order derivatives
typedef
Eigen
::
Tensor
<
Scalar
,
3
,
Options
>
Tensor3
;
typedef
Tensor
<
Scalar
,
3
,
Options
>
Tensor3
x
;
/// \brief Vector of pinocchio::JointData associated to the pinocchio::JointModel stored in model,
/// encapsulated in JointDataAccessor.
...
...
@@ -352,7 +353,7 @@ namespace pinocchio
MatrixXs
jointTorqueRegressor
;
/// \brief Tensor containing the kinematic Hessian of all the joints.
Tensor3
kinematic_hessians
;
Tensor3
x
kinematic_hessians
;
///
/// \brief Default constructor of pinocchio::Data from a pinocchio::Model.
...
...
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