pinocchio  UNKNOWN
jacobian.hpp
1 //
2 // Copyright (c) 2015-2018 CNRS
3 //
4 // This file is part of Pinocchio
5 // Pinocchio is free software: you can redistribute it
6 // and/or modify it under the terms of the GNU Lesser General Public
7 // License as published by the Free Software Foundation, either version
8 // 3 of the License, or (at your option) any later version.
9 //
10 // Pinocchio is distributed in the hope that it will be
11 // useful, but WITHOUT ANY WARRANTY; without even the implied warranty
12 // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 // General Lesser Public License for more details. You should have
14 // received a copy of the GNU Lesser General Public License along with
15 // Pinocchio If not, see
16 // <http://www.gnu.org/licenses/>.
17 
18 #ifndef __se3_jacobian_hpp__
19 #define __se3_jacobian_hpp__
20 
21 #include "pinocchio/multibody/fwd.hpp"
22 #include "pinocchio/multibody/model.hpp"
23 #include "pinocchio/multibody/data.hpp"
24 
25 namespace se3
26 {
39  inline const Data::Matrix6x &
40  computeJointJacobians(const Model & model,
41  Data & data,
42  const Eigen::VectorXd & q);
43 
58  PINOCCHIO_DEPRECATED
59  inline const Data::Matrix6x &
60  computeJacobians(const Model & model,
61  Data & data,
62  const Eigen::VectorXd & q)
63  { return computeJointJacobians(model,data,q); }
64 
76  inline const Data::Matrix6x &
77  computeJointJacobians(const Model & model,
78  Data & data);
79 
93  PINOCCHIO_DEPRECATED
94  inline const Data::Matrix6x &
95  computeJacobians(const Model & model,
96  Data & data)
97  { return computeJointJacobians(model,data); }
98 
111  template<ReferenceFrame rf>
112  void getJointJacobian(const Model & model,
113  const Data & data,
114  const Model::JointIndex jointId,
115  Data::Matrix6x & J);
116 
131  template<ReferenceFrame rf>
132  PINOCCHIO_DEPRECATED
133  void getJacobian(const Model & model,
134  const Data & data,
135  const Model::JointIndex jointId,
136  Data::Matrix6x & J)
137  { getJointJacobian<rf>(model,data,jointId,J); }
138 
154  inline void jointJacobian(const Model & model,
155  Data & data,
156  const Eigen::VectorXd & q,
157  const Model::JointIndex jointId,
158  Data::Matrix6x & J);
159 
177  PINOCCHIO_DEPRECATED
178  inline void jacobian(const Model & model,
179  Data & data,
180  const Eigen::VectorXd & q,
181  const Model::JointIndex jointId,
182  Data::Matrix6x & J)
183  { jointJacobian(model,data,q,jointId,J); }
184 
195  PINOCCHIO_DEPRECATED
196  inline const Data::Matrix6x &
197  jointJacobian(const Model & model,
198  Data & data,
199  const Eigen::VectorXd & q,
200  const Model::JointIndex jointId)
201  {
202  data.J.setZero();
203  jointJacobian(model,data,q,jointId,data.J);
204 
205  return data.J;
206  }
207 
220  inline const Data::Matrix6x &
222  Data & data,
223  const Eigen::VectorXd & q,
224  const Eigen::VectorXd & v);
225 
239  PINOCCHIO_DEPRECATED
240  inline const Data::Matrix6x &
242  Data & data,
243  const Eigen::VectorXd & q,
244  const Eigen::VectorXd & v)
245  { return computeJointJacobiansTimeVariation(model,data,q,v); }
246 
259  template<ReferenceFrame rf>
260  void getJointJacobianTimeVariation(const Model & model,
261  const Data & data,
262  const Model::JointIndex jointId,
263  Data::Matrix6x & dJ);
264 
278  template<ReferenceFrame rf>
279  PINOCCHIO_DEPRECATED
280  void getJacobianTimeVariation(const Model & model,
281  const Data & data,
282  const Model::JointIndex jointId,
283  Data::Matrix6x & dJ)
284  { getJointJacobianTimeVariation<rf>(model,data,jointId,dJ); }
285 
286 } // namespace se3
287 
288 /* --- Details -------------------------------------------------------------------- */
289 /* --- Details -------------------------------------------------------------------- */
290 /* --- Details -------------------------------------------------------------------- */
291 
292 #include "pinocchio/algorithm/jacobian.hxx"
293 
294 #endif // ifndef __se3_jacobian_hpp__
PINOCCHIO_DEPRECATED const Data::Matrix6x & computeJacobians(const Model &model, Data &data, const Eigen::VectorXd &q)
Computes the full model Jacobian, i.e. the stack of all motion subspace expressed in the world frame...
Definition: jacobian.hpp:60
void getJointJacobianTimeVariation(const Model &model, const Data &data, const Model::JointIndex jointId, Data::Matrix6x &dJ)
Computes the Jacobian time variation of a specific joint frame expressed either in the world frame (r...
Definition: jacobian.hxx:245
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef Eigen::Matrix< double, 6, Eigen::Dynamic > Matrix6x
The 6d jacobian type (temporary)
Definition: data.hpp:45
Matrix6x J
Jacobian of joint placements.
Definition: data.hpp:217
PINOCCHIO_DEPRECATED void getJacobian(const Model &model, const Data &data, const Model::JointIndex jointId, Data::Matrix6x &J)
Computes the Jacobian of a specific joint frame expressed either in the world (rf = WORLD) frame or i...
Definition: jacobian.hpp:133
const Data::Matrix6x & computeJointJacobiansTimeVariation(const Model &model, Data &data, const Eigen::VectorXd &q, const Eigen::VectorXd &v)
Computes the full model Jacobian variations with respect to time. It corresponds to dJ/dt which depen...
Definition: jacobian.hxx:228
PINOCCHIO_DEPRECATED const Data::Matrix6x & computeJacobiansTimeVariation(const Model &model, Data &data, const Eigen::VectorXd &q, const Eigen::VectorXd &v)
Computes the full model Jacobian variations with respect to time. It corresponds to dJ/dt which depen...
Definition: jacobian.hpp:241
void getJointJacobian(const Model &model, const Data &data, const Model::JointIndex jointId, Data::Matrix6x &J)
Computes the Jacobian of a specific joint frame expressed either in the world (rf = WORLD) frame or i...
Definition: jacobian.hxx:109
PINOCCHIO_DEPRECATED void jacobian(const Model &model, Data &data, const Eigen::VectorXd &q, const Model::JointIndex jointId, Data::Matrix6x &J)
Computes the Jacobian of a specific joint frame expressed in the local frame of the joint and store t...
Definition: jacobian.hpp:178
PINOCCHIO_DEPRECATED void getJacobianTimeVariation(const Model &model, const Data &data, const Model::JointIndex jointId, Data::Matrix6x &dJ)
Computes the Jacobian time variation of a specific joint frame expressed either in the world frame (r...
Definition: jacobian.hpp:280
void jointJacobian(const Model &model, Data &data, const Eigen::VectorXd &q, const Model::JointIndex jointId, Data::Matrix6x &J)
Computes the Jacobian of a specific joint frame expressed in the local frame of the joint and store t...
Definition: jacobian.hxx:159
const Data::Matrix6x & computeJointJacobians(const Model &model, Data &data, const Eigen::VectorXd &q)
Computes the full model Jacobian, i.e. the stack of all motion subspace expressed in the world frame...
Definition: jacobian.hxx:59