frames.hpp 2.93 KB
Newer Older
1
//
2
// Copyright (c) 2015-2017 CNRS
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//
// This file is part of Pinocchio
// Pinocchio is free software: you can redistribute it
// and/or modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation, either version
// 3 of the License, or (at your option) any later version.
//
// Pinocchio is distributed in the hope that it will be
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Lesser Public License for more details. You should have
// received a copy of the GNU Lesser General Public License along with
// Pinocchio If not, see
// <http://www.gnu.org/licenses/>.

18
19
#ifndef __se3_frames_hpp__
#define __se3_frames_hpp__
20
21
22
23
24
25
26

#include "pinocchio/multibody/model.hpp"

namespace se3
{

  /**
jcarpent's avatar
jcarpent committed
27
28
29
30
   * @brief      Updates the position of each frame contained in the model
   *
   * @param[in]  model  The kinematic model.
   * @param      data   Data associated to model.
31
32
33
   *
   * @warning    One of the algorithms forwardKinematics should have been called first
   */
jcarpent's avatar
jcarpent committed
34
  inline void framesForwardKinematics(const Model & model,
35
                                      Data & data);
36
37

  /**
jcarpent's avatar
jcarpent committed
38
39
   * @brief      First calls the forwardKinematics on the model, then computes the placement of each frame.
   *             /sa se3::forwardKinematics
40
   *
jcarpent's avatar
jcarpent committed
41
42
43
   * @param[in]  model                    The kinematic model.
   * @param      data                     Data associated to model.
   * @param[in]  q                        Configuration vector.
44
   */
jcarpent's avatar
jcarpent committed
45
46
  inline void framesForwardKinematics(const Model & model,
                                      Data & data,
47
                                      const Eigen::VectorXd & q);
48
49

  /**
50
   * @brief      Returns the jacobian of the frame expresssed in the local frame depending on the template argument.
51
   *             You must first call se3::framesForwardKinematics and se3::computeJacobians to update values in data structure.
jcarpent's avatar
jcarpent committed
52
   
53
   * @remark     Expressed in the local frame, the jacobian maps the joint velocity vector to the spatial velocity of the center of the frame, expressed in the frame coordinates system.
54
55
56
   *
   * @param[in]  model       The kinematic model
   * @param[in]  data        Data associated to model
57
58
   * @param[in]  frame_id    Id of the operational Frame
   * @param[out] J           The Jacobian of the Frame expressed in the coordinates Frame.
59
   *
60
   * @warning    The function se3::computeJacobians and se3::framesForwardKinematics should have been called first.
61
62
   */
  inline void getFrameJacobian(const Model & model,
jcarpent's avatar
jcarpent committed
63
64
                               const Data& data,
                               const Model::FrameIndex frame_id,
65
                               Data::Matrix6x & J);
66
 
jcarpent's avatar
jcarpent committed
67
} // namespace se3
68
69

/* --- Details -------------------------------------------------------------------- */
70
#include "pinocchio/algorithm/frames.hxx"
71

72
#endif // ifndef __se3_frames_hpp__