pinocchio  2.1.3
frames.hpp
1 //
2 // Copyright (c) 2015-2018 CNRS
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 
75  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl>
76  inline MotionTpl<Scalar, Options>
77  getFrameVelocity(const ModelTpl<Scalar,Options,JointCollectionTpl> & model,
78  const DataTpl<Scalar,Options,JointCollectionTpl> & data,
79  const typename ModelTpl<Scalar,Options,JointCollectionTpl>::FrameIndex frame_id);
80 
94  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename MotionLike>
95  PINOCCHIO_DEPRECATED
98  const typename ModelTpl<Scalar,Options,JointCollectionTpl>::FrameIndex frame_id,
99  const MotionDense<MotionLike> & frame_v)
100  {
101  frame_v.derived() = getFrameVelocity(model, data, frame_id);
102  }
103 
116  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl>
120  const typename ModelTpl<Scalar,Options,JointCollectionTpl>::FrameIndex frame_id);
121 
135  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename MotionLike>
136  PINOCCHIO_DEPRECATED
139  const typename ModelTpl<Scalar,Options,JointCollectionTpl>::FrameIndex frame_id,
140  const MotionDense<MotionLike> & frame_a)
141  { frame_a.derived() = getFrameAcceleration(model, data, frame_id); }
142 
163  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename Matrix6xLike>
166  const typename ModelTpl<Scalar,Options,JointCollectionTpl>::FrameIndex frame_id,
167  const ReferenceFrame rf,
168  const Eigen::MatrixBase<Matrix6xLike> & J);
169 
190  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename ConfigVectorType, typename Matrix6Like>
193  const Eigen::MatrixBase<ConfigVectorType> & q,
194  const FrameIndex frameId,
195  const Eigen::MatrixBase<Matrix6Like> & J);
196 
217  template<ReferenceFrame rf>
218  PINOCCHIO_DEPRECATED
219  void getFrameJacobian(const Model & model,
220  const Data & data,
221  const Model::FrameIndex frame_id,
222  Data::Matrix6x & J)
223  { getFrameJacobian(model,data,frame_id,rf,J); }
224 
240  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename Matrix6xLike>
241  PINOCCHIO_DEPRECATED
244  const typename ModelTpl<Scalar,Options,JointCollectionTpl>::FrameIndex frame_id,
245  const Eigen::MatrixBase<Matrix6xLike> & J);
246 
260  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename Matrix6xLike>
263  const typename ModelTpl<Scalar,Options,JointCollectionTpl>::FrameIndex frame_id,
264  const ReferenceFrame rf,
265  const Eigen::MatrixBase<Matrix6xLike> & dJ);
266 
280  template<ReferenceFrame rf>
281  PINOCCHIO_DEPRECATED
283  const Data & data,
284  const Model::FrameIndex frameId,
285  Data::Matrix6x & dJ)
286  {
287  getFrameJacobianTimeVariation(model,data,frameId,rf,dJ);
288  }
289 
290 } // namespace pinocchio
291 
292 /* --- Details -------------------------------------------------------------------- */
293 #include "pinocchio/algorithm/frames.hxx"
294 
295 #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 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.
void frameJacobian(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< ConfigVectorType > &q, const FrameIndex frameId, const Eigen::MatrixBase< Matrix6Like > &J)
Computes the Jacobian of a specific Frame expressed in the LOCAL frame coordinate system...
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...
Eigen::Matrix< Scalar, 6, Eigen::Dynamic, Options > Matrix6x
The 6d jacobian type (temporary)
Definition: data.hpp:66
Main pinocchio namespace.
Definition: treeview.dox:24
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...