8#include "pinocchio/spatial.hpp" 15 template<
typename Vector3Like>
17 Matrix<
typename Vector3Like::Scalar, 3, 3, PINOCCHIO_EIGEN_PLAIN_TYPE(Vector3Like)::Options>
18 exp3_proxy(const Vector3Like & v)
23 template<
typename Vector3Like>
25 Matrix<
typename Vector3Like::Scalar, 4, 1, PINOCCHIO_EIGEN_PLAIN_TYPE(Vector3Like)::Options>
26 exp3_proxy_quat(const Vector3Like & v)
28 typedef typename Vector3Like::Scalar Scalar;
29 typedef Eigen::Quaternion<Scalar, PINOCCHIO_EIGEN_PLAIN_TYPE(Vector3Like)::Options>
31 typedef Eigen::Map<Quaternion_t> QuaternionMap_t;
32 typedef Eigen::Matrix<Scalar, 4, 1, PINOCCHIO_EIGEN_PLAIN_TYPE(Vector3Like)::Options>
35 QuaternionMap_t quat_out(res.derived().data());
36 quaternion::exp3(v, quat_out);
40 template<
typename Vector3Like>
42 Matrix<
typename Vector3Like::Scalar, 3, 3, PINOCCHIO_EIGEN_PLAIN_TYPE(Vector3Like)::Options>
43 Jexp3_proxy(const Vector3Like & v)
45 typedef Eigen::Matrix<
46 typename Vector3Like::Scalar, 3, 3, PINOCCHIO_EIGEN_PLAIN_TYPE(Vector3Like)::Options>
53 template<
typename Matrix3Like>
54 typename PINOCCHIO_EIGEN_PLAIN_TYPE(Matrix3Like) Jlog3_proxy(
const Matrix3Like & M)
56 typedef typename PINOCCHIO_EIGEN_PLAIN_TYPE(Matrix3Like) ReturnType;
62 template<
typename Matrix3Like,
typename Vector3Like>
63 typename PINOCCHIO_EIGEN_PLAIN_TYPE(Matrix3Like)
64 Hlog3_proxy(
const Matrix3Like & M,
const Vector3Like & v)
66 typedef typename PINOCCHIO_EIGEN_PLAIN_TYPE(Matrix3Like) ReturnType;
72 template<
typename Scalar,
int Options>
73 SE3Tpl<Scalar, Options> exp6_proxy(
const MotionTpl<Scalar, Options> & v)
78 template<
typename Vector6Like>
79 SE3Tpl<
typename Vector6Like::Scalar, PINOCCHIO_EIGEN_PLAIN_TYPE(Vector6Like)::Options>
80 exp6_proxy(const Vector6Like & vec6)
85 template<
typename Vector6Like>
87 Matrix<
typename Vector6Like::Scalar, 7, 1, PINOCCHIO_EIGEN_PLAIN_TYPE(Vector6Like)::Options>
88 exp6_proxy_quatvec(const Vector6Like & vec6)
90 PINOCCHIO_EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE_OR_DYNAMIC(Vector6Like, 6);
91 return quaternion::exp6(vec6);
94 template<
typename Scalar,
int Options>
95 typename SE3Tpl<Scalar, Options>::Matrix6 Jlog6_proxy(
const SE3Tpl<Scalar, Options> & M)
97 typedef typename SE3Tpl<Scalar, Options>::Matrix6 ReturnType;
103 template<
typename Scalar,
int Options>
104 typename MotionTpl<Scalar, Options>::Matrix6 Jexp6_proxy(
const MotionTpl<Scalar, Options> & v)
106 typedef typename MotionTpl<Scalar, Options>::Matrix6 ReturnType;
112 template<
typename Vector6Like>
114 Matrix<
typename Vector6Like::Scalar, 6, 6, PINOCCHIO_EIGEN_PLAIN_TYPE(Vector6Like)::Options>
115 Jexp6_proxy(const Vector6Like & vec6)
117 typedef MotionRef<const Vector6Like> Motion;
119 typedef typename Motion::Matrix6 ReturnType;
125 template<
typename Matrix3Like>
127 Matrix<
typename Matrix3Like::Scalar, 3, 1, PINOCCHIO_EIGEN_PLAIN_TYPE(Matrix3Like)::Options>
128 log3_proxy(const Matrix3Like & R)
133 template<
typename Matrix3Like,
typename Matrix1Like>
135 Matrix<
typename Matrix3Like::Scalar, 3, 1, PINOCCHIO_EIGEN_PLAIN_TYPE(Matrix3Like)::Options>
136 log3_proxy(const Matrix3Like & R, Eigen::Ref<Matrix1Like> theta)
138 return log3(R, theta.coeffRef(0, 0));
141 template<
typename Matrix3Like,
typename Scalar>
143 Matrix<
typename Matrix3Like::Scalar, 3, 1, PINOCCHIO_EIGEN_PLAIN_TYPE(Matrix3Like)::Options>
144 log3_proxy_fix(const Matrix3Like & R, Scalar & theta)
146 return log3(R, theta);
149 template<
typename QuaternionLike>
151 typename QuaternionLike::Scalar,
154 PINOCCHIO_EIGEN_PLAIN_TYPE(
typename QuaternionLike::Vector3)::Options>
155 log3_proxy(const QuaternionLike & quat)
157 return quaternion::log3(quat);
160 template<
typename Vector4Like>
162 Matrix<
typename Vector4Like::Scalar, 3, 1, PINOCCHIO_EIGEN_PLAIN_TYPE(Vector4Like)::Options>
163 log3_proxy_quatvec(const Vector4Like & v)
165 PINOCCHIO_EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE_OR_DYNAMIC(Vector4Like, 4);
166 typedef typename Vector4Like::Scalar Scalar;
167 typedef Eigen::Quaternion<Scalar, PINOCCHIO_EIGEN_PLAIN_TYPE(Vector4Like)::Options>
169 typedef Eigen::Map<const Quaternion_t> ConstQuaternionMap_t;
171 ConstQuaternionMap_t q(v.derived().data());
172 assert(quaternion::isNormalized(q));
173 return quaternion::log3(q);
176 template<
typename Vector4Like,
typename Matrix1Like>
178 Matrix<
typename Vector4Like::Scalar, 3, 1, PINOCCHIO_EIGEN_PLAIN_TYPE(Vector4Like)::Options>
179 log3_proxy_quatvec(const Vector4Like & v, Eigen::Ref<Matrix1Like> theta)
181 typedef typename Vector4Like::Scalar Scalar;
182 PINOCCHIO_EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE_OR_DYNAMIC(Vector4Like, 4);
184 typedef Eigen::Quaternion<Scalar, PINOCCHIO_EIGEN_PLAIN_TYPE(Vector4Like)::Options>
186 typedef Eigen::Map<const Quaternion_t> ConstQuaternionMap_t;
188 ConstQuaternionMap_t q(v.derived().data());
189 assert(quaternion::isNormalized(q));
191 return quaternion::log3(q, theta.coeffRef(0, 0));
194 template<
typename Vector4Like,
typename _Scalar>
196 Matrix<
typename Vector4Like::Scalar, 3, 1, PINOCCHIO_EIGEN_PLAIN_TYPE(Vector4Like)::Options>
197 log3_proxy_quatvec_fix(const Vector4Like & v, _Scalar & theta)
199 typedef typename Vector4Like::Scalar Scalar;
201 PINOCCHIO_EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE_OR_DYNAMIC(Vector4Like, 4);
202 typedef Eigen::Quaternion<Scalar, PINOCCHIO_EIGEN_PLAIN_TYPE(Vector4Like)::Options>
204 typedef Eigen::Map<const Quaternion_t> ConstQuaternionMap_t;
206 ConstQuaternionMap_t q(v.derived().data());
207 assert(quaternion::isNormalized(q));
209 return quaternion::log3(q, theta);
212 template<
typename Matrix4Like>
213 MotionTpl<
typename Matrix4Like::Scalar, PINOCCHIO_EIGEN_PLAIN_TYPE(Matrix4Like)::Options>
214 log6_proxy(const Matrix4Like & homegenous_matrix)
216 return log6(homegenous_matrix);
219 template<
typename Vector7Like>
220 MotionTpl<
typename Vector7Like::Scalar, PINOCCHIO_EIGEN_PLAIN_TYPE(Vector7Like)::Options>
221 log6_proxy_quatvec(const Vector7Like & q)
223 typedef typename Vector7Like::Scalar Scalar;
225 PINOCCHIO_EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE_OR_DYNAMIC(Vector7Like, 7);
226 static constexpr int Options = PINOCCHIO_EIGEN_PLAIN_TYPE(Vector7Like)::Options;
227 typedef Eigen::Quaternion<Scalar, Options> Quaternion;
228 typedef Eigen::Map<const Quaternion, Options> ConstQuaternionMap;
229 typedef Eigen::Matrix<Scalar, 3, 1, Options> Vector3;
231 const Vector3 v(q.derived().template head<3>());
232 ConstQuaternionMap quat(q.derived().template tail<4>().data());
234 return log6(quat, v);
Main pinocchio namespace.