Skip to content
Snippets Groups Projects
Commit 86c816fb authored by Florent Lamiraux's avatar Florent Lamiraux Committed by Florent Lamiraux florent@laas.fr
Browse files

Add member size in VectorSpaceOperation

  - VectorSpaceOperation <-1> corresponding to operations on dynamic size
    vectors now handles vectors of given size.
parent b9279764
Branches
Tags
No related merge requests found
......@@ -39,7 +39,27 @@ namespace se3
struct VectorSpaceOperation : public LieGroupOperationBase <VectorSpaceOperation<Size> >
{
typedef VectorSpaceOperation<Size> LieGroupDerived;
SE3_LIE_GROUP_TYPEDEF_TEMPLATE;
typedef typename Eigen::Matrix <Scalar, 1, 1>::Index size_type;
/// Constructor
/// \param size size of the vector space: should be the equal to template
/// argument for static sized vector-spaces.
VectorSpaceOperation (int size = Size) : size_ (size)
{
assert (size_ >= 0);
assert (Size == Eigen::Dynamic || size_ == Size);
}
size_type nq () const
{
return size_;
}
size_type nv () const
{
return size_;
}
template <class ConfigL_t, class ConfigR_t, class Tangent_t>
static void difference_impl(const Eigen::MatrixBase<ConfigL_t> & q0,
......@@ -86,6 +106,8 @@ namespace se3
res[i] = lower_pos_limit[i] + (( upper_pos_limit[i] - lower_pos_limit[i]) * rand())/RAND_MAX;
}
}
private:
size_type size_;
}; // struct VectorSpaceOperation
} // namespace se3
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment