pinocchio  2.1.3
jacobian.hpp
1 //
2 // Copyright (c) 2015-2018 CNRS
3 //
4 
5 #ifndef __pinocchio_jacobian_hpp__
6 #define __pinocchio_jacobian_hpp__
7 
8 #include "pinocchio/multibody/fwd.hpp"
9 #include "pinocchio/multibody/model.hpp"
10 #include "pinocchio/multibody/data.hpp"
11 
12 namespace pinocchio
13 {
29  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename ConfigVectorType>
31  computeJointJacobians(const ModelTpl<Scalar,Options,JointCollectionTpl> & model,
32  DataTpl<Scalar,Options,JointCollectionTpl> & data,
33  const Eigen::MatrixBase<ConfigVectorType> & q);
34 
49  PINOCCHIO_DEPRECATED
50  inline const Data::Matrix6x &
51  computeJacobians(const Model & model,
52  Data & data,
53  const Eigen::VectorXd & q)
54  { return computeJointJacobians(model,data,q.derived()); }
55 
69  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl>
73 
87  PINOCCHIO_DEPRECATED
88  inline const Data::Matrix6x &
89  computeJacobians(const Model & model,
90  Data & data)
91  { return computeJointJacobians(model,data); }
92 
106  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename Matrix6Like>
109  const typename ModelTpl<Scalar,Options,JointCollectionTpl>::JointIndex jointId,
110  const ReferenceFrame rf,
111  const Eigen::MatrixBase<Matrix6Like> & J);
112 
125  template<ReferenceFrame rf>
126  PINOCCHIO_DEPRECATED
127  void getJointJacobian(const Model & model,
128  const Data & data,
129  const Model::JointIndex jointId,
130  Data::Matrix6x & J)
131  { getJointJacobian(model,data,jointId,rf,J); }
132 
147  template<ReferenceFrame rf>
148  PINOCCHIO_DEPRECATED
149  void getJacobian(const Model & model,
150  const Data & data,
151  const Model::JointIndex jointId,
152  Data::Matrix6x & J)
153  { getJointJacobian<rf>(model,data,jointId,J); }
154 
175  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename ConfigVectorType, typename Matrix6Like>
178  const Eigen::MatrixBase<ConfigVectorType> & q,
179  const JointIndex jointId,
180  const Eigen::MatrixBase<Matrix6Like> & J);
181 
200  PINOCCHIO_DEPRECATED
201  inline void jacobian(const Model & model,
202  Data & data,
203  const Eigen::VectorXd & q,
204  const Model::JointIndex jointId,
205  Data::Matrix6x & J)
206  { jointJacobian(model,data,q.derived(),jointId,J); }
207 
218  PINOCCHIO_DEPRECATED
219  inline const Data::Matrix6x &
220  jointJacobian(const Model & model,
221  Data & data,
222  const Eigen::VectorXd & q,
223  const Model::JointIndex jointId)
224  {
225  data.J.setZero();
226  jointJacobian(model,data,q,jointId,data.J);
227 
228  return data.J;
229  }
230 
246  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename ConfigVectorType, typename TangentVectorType>
250  const Eigen::MatrixBase<ConfigVectorType> & q,
251  const Eigen::MatrixBase<TangentVectorType> & v);
252 
266  PINOCCHIO_DEPRECATED
267  inline const Data::Matrix6x &
269  Data & data,
270  const Eigen::VectorXd & q,
271  const Eigen::VectorXd & v)
272  { return computeJointJacobiansTimeVariation(model,data,q,v); }
273 
287  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename Matrix6Like>
290  const JointIndex jointId,
291  const ReferenceFrame rf,
292  const Eigen::MatrixBase<Matrix6Like> & dJ);
293 
308  template<ReferenceFrame rf>
309  PINOCCHIO_DEPRECATED
310  inline void getJointJacobianTimeVariation(const Model & model,
311  const Data & data,
312  const Model::JointIndex jointId,
313  Data::Matrix6x & dJ)
314  { getJointJacobianTimeVariation(model,data,jointId,rf,dJ); }
315 
331  template<ReferenceFrame rf>
332  PINOCCHIO_DEPRECATED
333  inline void getJacobianTimeVariation(const Model & model,
334  const Data & data,
335  const Model::JointIndex jointId,
336  Data::Matrix6x & dJ)
337  { getJointJacobianTimeVariation<rf>(model,data,jointId,dJ); }
338 
339 } // namespace pinocchio
340 
341 /* --- Details -------------------------------------------------------------------- */
342 /* --- Details -------------------------------------------------------------------- */
343 /* --- Details -------------------------------------------------------------------- */
344 
345 #include "pinocchio/algorithm/jacobian.hxx"
346 
347 #endif // ifndef __pinocchio_jacobian_hpp__
void jointJacobian(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< ConfigVectorType > &q, const JointIndex jointId, const Eigen::MatrixBase< Matrix6Like > &J)
Computes the Jacobian of a specific joint frame expressed in the local frame of the joint and store t...
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:51
void getJointJacobian(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const DataTpl< Scalar, Options, JointCollectionTpl > &data, const typename ModelTpl< Scalar, Options, JointCollectionTpl >::JointIndex jointId, const ReferenceFrame rf, const Eigen::MatrixBase< Matrix6Like > &J)
Computes the Jacobian of a specific joint frame expressed either in the world (rf = WORLD) frame or i...
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:201
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:333
Eigen::Matrix< Scalar, 6, Eigen::Dynamic, Options > Matrix6x
The 6d jacobian type (temporary)
Definition: data.hpp:66
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:268
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:149
const DataTpl< Scalar, Options, JointCollectionTpl >::Matrix6x & computeJointJacobiansTimeVariation(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< ConfigVectorType > &q, const Eigen::MatrixBase< TangentVectorType > &v)
Computes the full model Jacobian variations with respect to time. It corresponds to dJ/dt which depen...
Matrix6x J
Jacobian of joint placements.
Definition: data.hpp:253
void getJointJacobianTimeVariation(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const DataTpl< Scalar, Options, JointCollectionTpl > &data, const JointIndex jointId, const ReferenceFrame rf, const Eigen::MatrixBase< Matrix6Like > &dJ)
Computes the Jacobian time variation of a specific joint frame expressed either in the world frame (r...
Main pinocchio namespace.
Definition: treeview.dox:24
const DataTpl< Scalar, Options, JointCollectionTpl >::Matrix6x & computeJointJacobians(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< ConfigVectorType > &q)
Computes the full model Jacobian, i.e. the stack of all motion subspace expressed in the world frame...