pinocchio 4.1.0
A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives
Loading...
Searching...
No Matches
kinematics.hpp
1//
2// Copyright (c) 2015-2019 CNRS INRIA
3//
4
5#pragma once
6
7// IWYU pragma: begin_keep
8#include <Eigen/Core>
9
10#include <cassert>
11#include <cstddef>
12#include <vector>
13
14#include <boost/fusion/container/vector.hpp>
15
16#include "pinocchio/macros.hpp"
17
18#include "pinocchio/spatial.hpp"
19
20#include "pinocchio/multibody.hpp"
21#include "pinocchio/multibody/joint.hpp"
22#include "pinocchio/multibody/visitor.hpp"
23
24#include "pinocchio/algorithm/model.hpp"
25// IWYU pragma: end_keep
26
27namespace pinocchio
28{
29
42 template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
44 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
45 DataTpl<Scalar, Options, JointCollectionTpl> & data);
46
57 template<
58 typename Scalar,
59 int Options,
60 template<typename, int> class JointCollectionTpl,
61 typename ConfigVectorType>
63 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
64 DataTpl<Scalar, Options, JointCollectionTpl> & data,
65 const Eigen::MatrixBase<ConfigVectorType> & q);
66
80 template<
81 typename Scalar,
82 int Options,
83 template<typename, int> class JointCollectionTpl,
84 typename ConfigVectorType,
85 typename TangentVectorType>
87 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
88 DataTpl<Scalar, Options, JointCollectionTpl> & data,
89 const Eigen::MatrixBase<ConfigVectorType> & q,
90 const Eigen::MatrixBase<TangentVectorType> & v);
106 template<
107 typename Scalar,
108 int Options,
109 template<typename, int> class JointCollectionTpl,
110 typename ConfigVectorType,
111 typename TangentVectorType1,
112 typename TangentVectorType2>
114 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
115 DataTpl<Scalar, Options, JointCollectionTpl> & data,
116 const Eigen::MatrixBase<ConfigVectorType> & q,
117 const Eigen::MatrixBase<TangentVectorType1> & v,
118 const Eigen::MatrixBase<TangentVectorType2> & a);
119
138 template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
139 SE3Tpl<Scalar, Options> getRelativePlacement(
140 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
141 const DataTpl<Scalar, Options, JointCollectionTpl> & data,
142 const JointIndex jointIdRef,
143 const JointIndex jointIdTarget,
144 const Convention convention = Convention::LOCAL);
145
160 template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
161 MotionTpl<Scalar, Options> getVelocity(
162 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
163 const DataTpl<Scalar, Options, JointCollectionTpl> & data,
164 const JointIndex jointId,
165 const ReferenceFrame rf = LOCAL);
166
181 template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
182 MotionTpl<Scalar, Options> getAcceleration(
183 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
184 const DataTpl<Scalar, Options, JointCollectionTpl> & data,
185 const JointIndex jointId,
186 const ReferenceFrame rf = LOCAL);
187
203 template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
204 MotionTpl<Scalar, Options> getClassicalAcceleration(
205 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
206 const DataTpl<Scalar, Options, JointCollectionTpl> & data,
207 const JointIndex jointId,
208 const ReferenceFrame rf = LOCAL);
209
210} // namespace pinocchio
211
212// IWYU pragma: begin_exports
213#include "pinocchio/src/algorithm/kinematics.hxx"
214// IWYU pragma: end_exports
Main pinocchio namespace.
Definition treeview.dox:11
void forwardKinematics(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< ConfigVectorType > &q)
Update the joint placements according to the current joint configuration.
MotionTpl< Scalar, Options > getVelocity(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const DataTpl< Scalar, Options, JointCollectionTpl > &data, const JointIndex jointId, const ReferenceFrame rf=LOCAL)
Returns the spatial velocity of the joint expressed in the desired reference frame....
void updateGlobalPlacements(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data)
Update the global placement of the joints oMi according to the relative placements of the joints.
MotionTpl< Scalar, Options > getAcceleration(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const DataTpl< Scalar, Options, JointCollectionTpl > &data, const JointIndex jointId, const ReferenceFrame rf=LOCAL)
Returns the spatial acceleration of the joint expressed in the desired reference frame....
SE3Tpl< Scalar, Options > getRelativePlacement(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const DataTpl< Scalar, Options, JointCollectionTpl > &data, const JointIndex jointIdRef, const JointIndex jointIdTarget, const Convention convention=Convention::LOCAL)
Returns the relative placement of two joints expressed in the desired reference frame....
MotionTpl< Scalar, Options > getClassicalAcceleration(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const DataTpl< Scalar, Options, JointCollectionTpl > &data, const JointIndex jointId, const ReferenceFrame rf=LOCAL)
Returns the "classical" acceleration of the joint expressed in the desired reference frame....