pinocchio  2.4.4
A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives
frames.hpp
1 //
2 // Copyright (c) 2015-2020 CNRS INRIA
3 //
4 
5 #ifndef __pinocchio_frames_hpp__
6 #define __pinocchio_frames_hpp__
7 
8 #include "pinocchio/multibody/model.hpp"
9 #include "pinocchio/multibody/data.hpp"
10 
11 namespace pinocchio
12 {
13 
24  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl>
25  inline void updateFramePlacements(const ModelTpl<Scalar,Options,JointCollectionTpl> & model,
26  DataTpl<Scalar,Options,JointCollectionTpl> & data);
27 
39  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl>
40  inline const typename DataTpl<Scalar,Options,JointCollectionTpl>::SE3 &
41  updateFramePlacement(const ModelTpl<Scalar,Options,JointCollectionTpl> & model,
42  DataTpl<Scalar,Options,JointCollectionTpl> & data,
43  const typename ModelTpl<Scalar,Options,JointCollectionTpl>::FrameIndex frame_id);
44 
45 
57  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename ConfigVectorType>
58  inline void framesForwardKinematics(const ModelTpl<Scalar,Options,JointCollectionTpl> & model,
59  DataTpl<Scalar,Options,JointCollectionTpl> & data,
60  const Eigen::MatrixBase<ConfigVectorType> & q);
61 
62 
74  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl>
75  PINOCCHIO_DEPRECATED
78  {
79  updateFramePlacements(model,data);
80  }
81 
82 
96  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl>
100  const typename ModelTpl<Scalar,Options,JointCollectionTpl>::FrameIndex frame_id,
101  const ReferenceFrame rf = LOCAL);
102 
116  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl>
120  const typename ModelTpl<Scalar,Options,JointCollectionTpl>::FrameIndex frame_id,
121  const ReferenceFrame rf = LOCAL);
122 
137  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl>
141  const typename ModelTpl<Scalar,Options,JointCollectionTpl>::FrameIndex frame_id,
142  const ReferenceFrame rf = LOCAL);
143 
164  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename Matrix6xLike>
167  const typename ModelTpl<Scalar,Options,JointCollectionTpl>::FrameIndex frame_id,
168  const ReferenceFrame rf,
169  const Eigen::MatrixBase<Matrix6xLike> & J);
170 
190  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename ConfigVectorType, typename Matrix6xLike>
193  const Eigen::MatrixBase<ConfigVectorType> & q,
194  const FrameIndex frameId,
195  const ReferenceFrame reference_frame,
196  const Eigen::MatrixBase<Matrix6xLike> & J);
197 
216  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename ConfigVectorType, typename Matrix6xLike>
219  const Eigen::MatrixBase<ConfigVectorType> & q,
220  const FrameIndex frameId,
221  const Eigen::MatrixBase<Matrix6xLike> & J)
222  {
223  computeFrameJacobian(model,data,q.derived(),frameId,LOCAL,
224  PINOCCHIO_EIGEN_CONST_CAST(Matrix6xLike,J));
225  }
226 
232  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename ConfigVectorType, typename Matrix6xLike>
233  PINOCCHIO_DEPRECATED
236  const Eigen::MatrixBase<ConfigVectorType> & q,
237  const FrameIndex frameId,
238  const Eigen::MatrixBase<Matrix6xLike> & J)
239  {
240  computeFrameJacobian(model,data,q,frameId,PINOCCHIO_EIGEN_CONST_CAST(Matrix6xLike,J));
241  }
242 
256  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename Matrix6xLike>
259  const typename ModelTpl<Scalar,Options,JointCollectionTpl>::FrameIndex frame_id,
260  const ReferenceFrame rf,
261  const Eigen::MatrixBase<Matrix6xLike> & dJ);
262 
263 } // namespace pinocchio
264 
265 /* --- Details -------------------------------------------------------------------- */
266 #include "pinocchio/algorithm/frames.hxx"
267 
268 #endif // ifndef __pinocchio_frames_hpp__
void computeFrameJacobian(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< ConfigVectorType > &q, const FrameIndex frameId, const ReferenceFrame reference_frame, const Eigen::MatrixBase< Matrix6xLike > &J)
Computes the Jacobian of a specific Frame expressed in the desired reference_frame given as argument...
void getFrameJacobianTimeVariation(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const DataTpl< Scalar, Options, JointCollectionTpl > &data, const typename ModelTpl< Scalar, Options, JointCollectionTpl >::FrameIndex frame_id, const ReferenceFrame rf, const Eigen::MatrixBase< Matrix6xLike > &dJ)
Computes the Jacobian time variation of a specific frame (given by frame_id) expressed either in the ...
MotionTpl< Scalar, Options > getFrameAcceleration(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const DataTpl< Scalar, Options, JointCollectionTpl > &data, const typename ModelTpl< Scalar, Options, JointCollectionTpl >::FrameIndex frame_id, const ReferenceFrame rf=LOCAL)
Returns the spatial acceleration of the Frame expressed in the desired reference frame. You must first call pinocchio::forwardKinematics to update placement, velocity and acceleration values in data structure.
const DataTpl< Scalar, Options, JointCollectionTpl >::SE3 & updateFramePlacement(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const typename ModelTpl< Scalar, Options, JointCollectionTpl >::FrameIndex frame_id)
Updates the placement of the given frame.
MotionTpl< Scalar, Options > getFrameVelocity(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const DataTpl< Scalar, Options, JointCollectionTpl > &data, const typename ModelTpl< Scalar, Options, JointCollectionTpl >::FrameIndex frame_id, const ReferenceFrame rf=LOCAL)
Returns the spatial velocity of the Frame expressed in the desired reference frame. You must first call pinocchio::forwardKinematics to update placement and velocity values in data structure.
MotionTpl< Scalar, Options > getFrameClassicalAcceleration(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const DataTpl< Scalar, Options, JointCollectionTpl > &data, const typename ModelTpl< Scalar, Options, JointCollectionTpl >::FrameIndex frame_id, const ReferenceFrame rf=LOCAL)
Returns the "classical" acceleration of the Frame expressed in the desired reference frame...
Main pinocchio namespace.
Definition: treeview.dox:24
PINOCCHIO_DEPRECATED void frameJacobian(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< ConfigVectorType > &q, const FrameIndex frameId, const Eigen::MatrixBase< Matrix6xLike > &J)
This function is now deprecated and has been renamed computeFrameJacobian. This signature will be rem...
Definition: frames.hpp:234
void updateFramePlacements(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data)
Updates the position of each frame contained in the model.
void getFrameJacobian(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const DataTpl< Scalar, Options, JointCollectionTpl > &data, const typename ModelTpl< Scalar, Options, JointCollectionTpl >::FrameIndex frame_id, const ReferenceFrame rf, const Eigen::MatrixBase< Matrix6xLike > &J)
Returns the jacobian of the frame expressed either expressed in the LOCAL frame coordinate system or ...
void framesForwardKinematics(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< ConfigVectorType > &q)
First calls the forwardKinematics on the model, then computes the placement of each frame...