pinocchio  2.3.1-dirty
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 
95  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl>
99  const typename ModelTpl<Scalar,Options,JointCollectionTpl>::FrameIndex frame_id);
100 
113  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl>
117  const typename ModelTpl<Scalar,Options,JointCollectionTpl>::FrameIndex frame_id);
118 
139  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename Matrix6xLike>
142  const typename ModelTpl<Scalar,Options,JointCollectionTpl>::FrameIndex frame_id,
143  const ReferenceFrame rf,
144  const Eigen::MatrixBase<Matrix6xLike> & J);
145 
165  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename ConfigVectorType, typename Matrix6xLike>
168  const Eigen::MatrixBase<ConfigVectorType> & q,
169  const FrameIndex frameId,
170  const ReferenceFrame reference_frame,
171  const Eigen::MatrixBase<Matrix6xLike> & J);
172 
191  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename ConfigVectorType, typename Matrix6xLike>
194  const Eigen::MatrixBase<ConfigVectorType> & q,
195  const FrameIndex frameId,
196  const Eigen::MatrixBase<Matrix6xLike> & J)
197  {
198  computeFrameJacobian(model,data,q.derived(),frameId,LOCAL,
199  PINOCCHIO_EIGEN_CONST_CAST(Matrix6xLike,J));
200  }
201 
207  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename ConfigVectorType, typename Matrix6xLike>
208  PINOCCHIO_DEPRECATED
211  const Eigen::MatrixBase<ConfigVectorType> & q,
212  const FrameIndex frameId,
213  const Eigen::MatrixBase<Matrix6xLike> & J)
214  {
215  computeFrameJacobian(model,data,q,frameId,PINOCCHIO_EIGEN_CONST_CAST(Matrix6xLike,J));
216  }
217 
231  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename Matrix6xLike>
234  const typename ModelTpl<Scalar,Options,JointCollectionTpl>::FrameIndex frame_id,
235  const ReferenceFrame rf,
236  const Eigen::MatrixBase<Matrix6xLike> & dJ);
237 
238 } // namespace pinocchio
239 
240 /* --- Details -------------------------------------------------------------------- */
241 #include "pinocchio/algorithm/frames.hxx"
242 
243 #endif // ifndef __pinocchio_frames_hpp__
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)
Returns the spatial velocity of the frame expressed in the LOCAL frame coordinate system...
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 ...
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 > getFrameAcceleration(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const DataTpl< Scalar, Options, JointCollectionTpl > &data, const typename ModelTpl< Scalar, Options, JointCollectionTpl >::FrameIndex frame_id)
Returns the spatial acceleration of the frame expressed in the LOCAL frame coordinate system...
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:209
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...