29 #ifndef HPP_PINOCCHIO_LIEGROUP_SPECIAL_ORTHOGONAL_OPERATION_HH
30 #define HPP_PINOCCHIO_LIEGROUP_SPECIAL_ORTHOGONAL_OPERATION_HH
32 #include <pinocchio/multibody/liegroup/special-orthogonal.hpp>
39 :
public ::pinocchio::SpecialOrthogonalOperationTpl<N, value_type> {
40 typedef ::pinocchio::SpecialOrthogonalOperationTpl<N, value_type>
Base;
43 template <
class ConfigL_t,
class ConfigR_t>
45 const Eigen::MatrixBase<ConfigR_t>& q1) {
46 return Base::squaredDistance(q0, q1);
49 template <
class ConfigL_t,
class ConfigR_t>
51 const Eigen::MatrixBase<ConfigR_t>& q1,
52 const typename ConfigL_t::Scalar& w) {
56 template <
class ConfigIn_t,
class ConfigOut_t>
57 static void setBound(
const Eigen::MatrixBase<ConfigIn_t>& bound,
58 const Eigen::MatrixBase<ConfigOut_t>& out) {
59 if (bound.size() == 0)
return;
60 if (bound.size() != Base::NQ) {
61 HPP_THROW(std::invalid_argument,
"Expected vector of size 0 or "
62 << (
int)Base::NQ <<
", got size "
65 const_cast<Eigen::MatrixBase<ConfigOut_t>&
>(out).head(bound.size()) = bound;
68 template <
class JacobianIn_t,
class JacobianOut_t>
70 const Eigen::MatrixBase<JacobianIn_t>& Jin,
71 const Eigen::MatrixBase<JacobianOut_t>& Jout) {
72 const_cast<Eigen::MatrixBase<JacobianOut_t>&
>(Jout) = Jin;
75 template <
class ConfigIn_t>
78 EIGEN_STATIC_ASSERT_SAME_VECTOR_SIZE(ConfigIn_t, Base::ConfigVector_t);
79 return (std::abs(q.norm() - 1) < eps);
double value_type
Definition: fwd.hh:51
Utility functions.
Definition: body.hh:39
Definition: collision-object.hh:40
Definition: special-orthogonal.hh:39
@ BoundSize
Definition: special-orthogonal.hh:41
@ NT
Definition: special-orthogonal.hh:41
@ NR
Definition: special-orthogonal.hh:41
static void getRotationSubJacobian(const Eigen::MatrixBase< JacobianIn_t > &Jin, const Eigen::MatrixBase< JacobianOut_t > &Jout)
Definition: special-orthogonal.hh:69
::pinocchio::SpecialOrthogonalOperationTpl< N, value_type > Base
Definition: special-orthogonal.hh:40
static void setBound(const Eigen::MatrixBase< ConfigIn_t > &bound, const Eigen::MatrixBase< ConfigOut_t > &out)
Definition: special-orthogonal.hh:57
static bool isNormalized(const Eigen::MatrixBase< ConfigIn_t > &q, const value_type &eps)
Definition: special-orthogonal.hh:76
double squaredDistance(const Eigen::MatrixBase< ConfigL_t > &q0, const Eigen::MatrixBase< ConfigR_t > &q1)
Definition: special-orthogonal.hh:44
double squaredDistance(const Eigen::MatrixBase< ConfigL_t > &q0, const Eigen::MatrixBase< ConfigR_t > &q1, const typename ConfigL_t::Scalar &w)
Definition: special-orthogonal.hh:50