liegroup-variant-visitors.hpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2018 CNRS
3 //
4 
5 #ifndef __pinocchio_lie_group_variant_visitor_hpp__
6 #define __pinocchio_lie_group_variant_visitor_hpp__
7 
9 
10 namespace pinocchio
11 {
12 
21  template<typename LieGroupCollection>
22  inline int nq(const LieGroupGenericTpl<LieGroupCollection> & lg);
23 
32  template<typename LieGroupCollection>
33  inline int nv(const LieGroupGenericTpl<LieGroupCollection> & lg);
34 
42  template<typename LieGroupCollection>
43  inline std::string name(const LieGroupGenericTpl<LieGroupCollection> & lg);
44 
52  template<typename LieGroupCollection>
53  inline Eigen::
54  Matrix<typename LieGroupCollection::Scalar, Eigen::Dynamic, 1, LieGroupCollection::Options>
55  neutral(const LieGroupGenericTpl<LieGroupCollection> & lg);
56 
65  template<typename LieGroupCollection, class ConfigIn_t, class Tangent_t, class ConfigOut_t>
66  inline void integrate(
67  const LieGroupGenericTpl<LieGroupCollection> & lg,
68  const Eigen::MatrixBase<ConfigIn_t> & q,
69  const Eigen::MatrixBase<Tangent_t> & v,
70  const Eigen::MatrixBase<ConfigOut_t> & qout);
71 
72  template<typename LieGroupCollection, class Config_t>
73  inline void random(
74  const LieGroupGenericTpl<LieGroupCollection> & lg, const Eigen::MatrixBase<Config_t> & qout);
75 
76  template<typename LieGroupCollection, class Config_t>
77  inline void normalize(
78  const LieGroupGenericTpl<LieGroupCollection> & lg, const Eigen::MatrixBase<Config_t> & qout);
79 
80  template<typename LieGroupCollection, class Config_t>
81  inline bool isNormalized(
82  const LieGroupGenericTpl<LieGroupCollection> & lg,
83  const Eigen::MatrixBase<Config_t> & qin,
84  const typename Config_t::Scalar & prec =
85  Eigen::NumTraits<typename Config_t::Scalar>::dummy_precision());
86 
87  template<typename LieGroupCollection, class ConfigL_t, class ConfigR_t>
88  inline bool isSameConfiguration(
89  const LieGroupGenericTpl<LieGroupCollection> & lg,
90  const Eigen::MatrixBase<ConfigL_t> & q0,
91  const Eigen::MatrixBase<ConfigR_t> & q1,
92  const typename ConfigL_t::Scalar & prec);
93 
94  template<typename LieGroupCollection, class ConfigL_t, class ConfigR_t>
95  inline typename ConfigL_t::Scalar squaredDistance(
96  const LieGroupGenericTpl<LieGroupCollection> & lg,
97  const Eigen::MatrixBase<ConfigL_t> & q0,
98  const Eigen::MatrixBase<ConfigR_t> & q1);
99 
100  template<typename LieGroupCollection, class ConfigL_t, class ConfigR_t>
101  inline typename ConfigL_t::Scalar distance(
103  const Eigen::MatrixBase<ConfigL_t> & q0,
104  const Eigen::MatrixBase<ConfigR_t> & q1)
105  {
106  return std::sqrt(squaredDistance(lg, q0, q1));
107  }
108 
109  template<typename LieGroupCollection, class ConfigL_t, class ConfigR_t, class Tangent_t>
110  inline void difference(
111  const LieGroupGenericTpl<LieGroupCollection> & lg,
112  const Eigen::MatrixBase<ConfigL_t> & q0,
113  const Eigen::MatrixBase<ConfigR_t> & q1,
114  const Eigen::MatrixBase<Tangent_t> & v);
115 
116  template<typename LieGroupCollection, class ConfigL_t, class ConfigR_t, class ConfigOut_t>
117  inline void randomConfiguration(
118  const LieGroupGenericTpl<LieGroupCollection> & lg,
119  const Eigen::MatrixBase<ConfigL_t> & q0,
120  const Eigen::MatrixBase<ConfigR_t> & q1,
121  const Eigen::MatrixBase<ConfigOut_t> & qout);
122 
123  template<typename LieGroupCollection, class ConfigL_t, class ConfigR_t, class ConfigOut_t>
124  inline void interpolate(
125  const LieGroupGenericTpl<LieGroupCollection> & lg,
126  const Eigen::MatrixBase<ConfigL_t> & q0,
127  const Eigen::MatrixBase<ConfigR_t> & q1,
128  const typename ConfigL_t::Scalar & u,
129  const Eigen::MatrixBase<ConfigOut_t> & qout);
130 
131  template<typename LieGroupCollection, class Config_t, class Tangent_t, class JacobianOut_t>
132  void dIntegrate(
133  const LieGroupGenericTpl<LieGroupCollection> & lg,
134  const Eigen::MatrixBase<Config_t> & q,
135  const Eigen::MatrixBase<Tangent_t> & v,
136  const Eigen::MatrixBase<JacobianOut_t> & J,
137  const ArgumentPosition arg,
138  const AssignmentOperatorType op = SETTO);
139 
140  template<
141  typename LieGroupCollection,
142  class Config_t,
143  class Tangent_t,
144  class JacobianIn_t,
145  class JacobianOut_t>
146  void dIntegrate(
147  const LieGroupGenericTpl<LieGroupCollection> & lg,
148  const Eigen::MatrixBase<Config_t> & q,
149  const Eigen::MatrixBase<Tangent_t> & v,
150  const Eigen::MatrixBase<JacobianIn_t> & J_in,
151  int self,
152  const Eigen::MatrixBase<JacobianOut_t> & J_out,
153  const ArgumentPosition arg,
154  const AssignmentOperatorType op = SETTO);
155 
156  template<
157  typename LieGroupCollection,
158  class Config_t,
159  class Tangent_t,
160  class JacobianIn_t,
161  class JacobianOut_t>
162  void dIntegrate(
163  const LieGroupGenericTpl<LieGroupCollection> & lg,
164  const Eigen::MatrixBase<Config_t> & q,
165  const Eigen::MatrixBase<Tangent_t> & v,
166  int self,
167  const Eigen::MatrixBase<JacobianIn_t> & J_in,
168  const Eigen::MatrixBase<JacobianOut_t> & J_out,
169  const ArgumentPosition arg,
170  const AssignmentOperatorType op = SETTO);
171 
172  template<typename LieGroupCollection, class ConfigL_t, class ConfigR_t, class JacobianOut_t>
173  void dDifference(
174  const LieGroupGenericTpl<LieGroupCollection> & lg,
175  const Eigen::MatrixBase<ConfigL_t> & q0,
176  const Eigen::MatrixBase<ConfigR_t> & q1,
177  const Eigen::MatrixBase<JacobianOut_t> & J,
178  const ArgumentPosition arg);
179 
180  template<
181  typename LieGroupCollection,
182  class ConfigL_t,
183  class ConfigR_t,
184  class JacobianIn_t,
185  class JacobianOut_t>
186  void dDifference(
187  const LieGroupGenericTpl<LieGroupCollection> & lg,
188  const Eigen::MatrixBase<ConfigL_t> & q0,
189  const Eigen::MatrixBase<ConfigR_t> & q1,
190  const Eigen::MatrixBase<JacobianIn_t> & Jin,
191  int self,
192  const Eigen::MatrixBase<JacobianOut_t> & Jout,
193  const ArgumentPosition arg);
194 
195  template<
196  typename LieGroupCollection,
197  class ConfigL_t,
198  class ConfigR_t,
199  class JacobianIn_t,
200  class JacobianOut_t>
201  void dDifference(
202  const LieGroupGenericTpl<LieGroupCollection> & lg,
203  const Eigen::MatrixBase<ConfigL_t> & q0,
204  const Eigen::MatrixBase<ConfigR_t> & q1,
205  int self,
206  const Eigen::MatrixBase<JacobianIn_t> & Jin,
207  const Eigen::MatrixBase<JacobianOut_t> & Jout,
208  const ArgumentPosition arg);
209 
210  template<
211  typename LieGroupCollection,
212  class Config_t,
213  class Tangent_t,
214  class JacobianIn_t,
215  class JacobianOut_t>
216  void dIntegrateTransport(
217  const LieGroupGenericTpl<LieGroupCollection> & lg,
218  const Eigen::MatrixBase<Config_t> & q,
219  const Eigen::MatrixBase<Tangent_t> & v,
220  const Eigen::MatrixBase<JacobianIn_t> & J_in,
221  const Eigen::MatrixBase<JacobianOut_t> & J_out,
222  const ArgumentPosition arg);
223 
224  template<typename LieGroupCollection, class Config_t, class Tangent_t, class JacobianOut_t>
225  void dIntegrateTransport(
226  const LieGroupGenericTpl<LieGroupCollection> & lg,
227  const Eigen::MatrixBase<Config_t> & q,
228  const Eigen::MatrixBase<Tangent_t> & v,
229  const Eigen::MatrixBase<JacobianOut_t> & J,
230  const ArgumentPosition arg);
231 } // namespace pinocchio
232 
234 #include "pinocchio/multibody/liegroup/liegroup-variant-visitors.hxx"
235 
236 #endif // ifndef __pinocchio_lie_group_variant_visitor_hpp__
cassie-simulation.qout
def qout
Definition: cassie-simulation.py:251
pinocchio::LieGroupGenericTpl
Definition: multibody/liegroup/fwd.hpp:13
fwd.hpp
pinocchio::distance
Scalar distance(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const Eigen::MatrixBase< ConfigVectorIn1 > &q0, const Eigen::MatrixBase< ConfigVectorIn2 > &q1)
Distance between two configuration vectors, namely .
Definition: joint-configuration.hpp:846
pinocchio::SETTO
@ SETTO
Definition: fwd.hpp:132
pinocchio::u
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorIn1 > const Eigen::MatrixBase< ConfigVectorIn2 > const Scalar & u
Definition: joint-configuration.hpp:1139
cassie-simulation.qin
qin
Definition: cassie-simulation.py:249
pinocchio::nv
int nv(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel)
Visit a JointModelTpl through JointNvVisitor to get the dimension of the joint tangent space.
pinocchio::dIntegrate
void dIntegrate(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const Eigen::MatrixBase< ConfigVectorType > &q, const Eigen::MatrixBase< TangentVectorType > &v, const Eigen::MatrixBase< JacobianMatrixType > &J, const ArgumentPosition arg, const AssignmentOperatorType op=SETTO)
Computes the Jacobian of a small variation of the configuration vector or the tangent vector into the...
Definition: joint-configuration.hpp:487
pinocchio::nq
int nq(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel)
Visit a JointModelTpl through JointNqVisitor to get the dimension of the joint configuration space.
pinocchio::name
std::string name(const LieGroupGenericTpl< LieGroupCollection > &lg)
Visit a LieGroupVariant to get the name of it.
pinocchio::python::Scalar
context::Scalar Scalar
Definition: admm-solver.cpp:29
inverse-kinematics-3d.J
J
Definition: inverse-kinematics-3d.py:28
pinocchio::ArgumentPosition
ArgumentPosition
Argument position. Used as template parameter to refer to an argument.
Definition: fwd.hpp:121
pinocchio::difference
void difference(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const Eigen::MatrixBase< ConfigVectorIn1 > &q0, const Eigen::MatrixBase< ConfigVectorIn2 > &q1, const Eigen::MatrixBase< ReturnType > &dvout)
Compute the tangent vector that must be integrated during one unit time to go from q0 to q1.
Definition: joint-configuration.hpp:193
pinocchio::dIntegrateTransport
void dIntegrateTransport(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const Eigen::MatrixBase< ConfigVectorType > &q, const Eigen::MatrixBase< TangentVectorType > &v, const Eigen::MatrixBase< JacobianMatrixType1 > &Jin, const Eigen::MatrixBase< JacobianMatrixType2 > &Jout, const ArgumentPosition arg)
Transport a matrix from the terminal to the initial tangent space of the integrate operation,...
Definition: joint-configuration.hpp:576
pinocchio::randomConfiguration
void randomConfiguration(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const Eigen::MatrixBase< ConfigVectorIn1 > &lowerLimits, const Eigen::MatrixBase< ConfigVectorIn2 > &upperLimits, const Eigen::MatrixBase< ReturnType > &qout)
Generate a configuration vector uniformly sampled among provided limits.
Definition: joint-configuration.hpp:315
pinocchio::interpolate
void interpolate(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const Eigen::MatrixBase< ConfigVectorIn1 > &q0, const Eigen::MatrixBase< ConfigVectorIn2 > &q1, const Scalar &u, const Eigen::MatrixBase< ReturnType > &qout)
Interpolate two configurations for a given model.
Definition: joint-configuration.hpp:127
pinocchio::isNormalized
bool isNormalized(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const Eigen::MatrixBase< ConfigVectorType > &q, const Scalar &prec=Eigen::NumTraits< Scalar >::dummy_precision())
Check whether a configuration vector is normalized within the given precision provided by prec.
Definition: joint-configuration.hpp:933
pinocchio::random
void random(const LieGroupGenericTpl< LieGroupCollection > &lg, const Eigen::MatrixBase< Config_t > &qout)
pinocchio::integrate
void integrate(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const Eigen::MatrixBase< ConfigVectorType > &q, const Eigen::MatrixBase< TangentVectorType > &v, const Eigen::MatrixBase< ReturnType > &qout)
Integrate a configuration vector for the specified model for a tangent vector during one unit time.
Definition: joint-configuration.hpp:70
pinocchio::q0
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorIn1 > & q0
Definition: joint-configuration.hpp:1137
pinocchio::AssignmentOperatorType
AssignmentOperatorType
Definition: fwd.hpp:130
pinocchio::q
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorType > & q
Definition: joint-configuration.hpp:1083
pinocchio::v
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorType > const Eigen::MatrixBase< TangentVectorType > & v
Definition: joint-configuration.hpp:1084
pinocchio::squaredDistance
void squaredDistance(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const Eigen::MatrixBase< ConfigVectorIn1 > &q0, const Eigen::MatrixBase< ConfigVectorIn2 > &q1, const Eigen::MatrixBase< ReturnType > &out)
Squared distance between two configuration vectors.
Definition: joint-configuration.hpp:249
pinocchio::q1
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorIn1 > const Eigen::MatrixBase< ConfigVectorIn2 > & q1
Definition: joint-configuration.hpp:1138
pinocchio::dDifference
void dDifference(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const Eigen::MatrixBase< ConfigVector1 > &q0, const Eigen::MatrixBase< ConfigVector2 > &q1, const Eigen::MatrixBase< JacobianMatrix > &J, const ArgumentPosition arg)
Computes the Jacobian of a small variation of the configuration vector into the tangent space at iden...
Definition: joint-configuration.hpp:742
pinocchio::neutral
void neutral(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const Eigen::MatrixBase< ReturnType > &qout)
Return the neutral configuration element related to the model configuration space.
Definition: joint-configuration.hpp:363
pinocchio::isSameConfiguration
bool isSameConfiguration(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const Eigen::MatrixBase< ConfigVectorIn1 > &q1, const Eigen::MatrixBase< ConfigVectorIn2 > &q2, const Scalar &prec=Eigen::NumTraits< Scalar >::dummy_precision())
Return true if the given configurations are equivalents, within the given precision.
Definition: joint-configuration.hpp:993
pinocchio::normalize
void normalize(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const Eigen::MatrixBase< ConfigVectorType > &qout)
Normalize a configuration vector.
Definition: joint-configuration.hpp:887
pinocchio
Main pinocchio namespace.
Definition: timings.cpp:27


pinocchio
Author(s):
autogenerated on Mon Dec 16 2024 03:41:03