57                         const Eigen::MatrixBase<ConfigR_t>& q1,
 
   58                         const typename ConfigL_t::Scalar& w) {
 
   59    return LieGroup1().squaredDistance(q0.template head<LieGroup1::NQ>(),
 
   60                                       q1.template head<LieGroup1::NQ>(), w) +
 
   61           LieGroup2().squaredDistance(q0.template tail<LieGroup2::NQ>(),
 
   62                                       q1.template tail<LieGroup2::NQ>(), w);
 
 
   66  static void setBound(
const Eigen::MatrixBase<ConfigIn_t>& bound,
 
   67                       const Eigen::MatrixBase<ConfigOut_t>& out) {
 
   68    EIGEN_STATIC_ASSERT_SAME_VECTOR_SIZE(ConfigOut_t, Base::ConfigVector_t)
 
   70        const_cast<Eigen::MatrixBase<ConfigOut_t>&
>(out).derived();
 
   72      if (LieGroup1::BoundSize > 0)
 
   73        LieGroup1::setBound(bound.template head<LieGroup1::BoundSize>(),
 
   74                            oout.template head<LieGroup1::NQ>());
 
   75      if (LieGroup2::BoundSize > 0)
 
   76        LieGroup2::setBound(bound.template tail<LieGroup2::BoundSize>(),
 
   77                            oout.template tail<LieGroup2::NQ>());
 
   78    } 
else if (bound.size() == Base::NQ) {
 
   79      LieGroup1::setBound(bound.template head<LieGroup1::NQ>(),
 
   80                          oout.template head<LieGroup1::NQ>());
 
   81      LieGroup2::setBound(bound.template tail<LieGroup2::NQ>(),
 
   82                          oout.template tail<LieGroup2::NQ>());
 
   84      HPP_THROW(std::invalid_argument, 
"Expected vector of size " 
   86                                           << (
int)Base::NQ << 
", got size " 
 
   93      const Eigen::MatrixBase<JacobianIn_t>& Jin,
 
   94      const Eigen::MatrixBase<JacobianOut_t>& Jout) {
 
   96        const_cast<Eigen::MatrixBase<JacobianOut_t>&
>(Jout).derived();
 
   97    if (LieGroup1::NR > 0)
 
   98      LieGroup1::getRotationSubJacobian(Jin.template leftCols<LieGroup1::NV>(),
 
   99                                        J.template leftCols<LieGroup1::NR>());
 
  100    if (LieGroup2::NR > 0)
 
  101      LieGroup2::getRotationSubJacobian(Jin.template rightCols<LieGroup2::NV>(),
 
  102                                        J.template rightCols<LieGroup2::NR>());
 
 
  108    EIGEN_STATIC_ASSERT_SAME_VECTOR_SIZE(ConfigIn_t, Base::ConfigVector_t);
 
  109    return LieGroup1::isNormalized(q.template head<LieGroup1::NQ>(), eps) &&
 
  110           LieGroup2::isNormalized(q.template tail<LieGroup2::NQ>(), eps);