Re: [eigen] Eigen and rigid body simulation |

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]

*To*: eigen@xxxxxxxxxxxxxxxxxxx*Subject*: Re: [eigen] Eigen and rigid body simulation*From*: Mathieu Gautier <mathieu.gautier@xxxxxx>*Date*: Fri, 16 Apr 2010 16:52:41 +0200

Hi,

When I have time enough I'll post a first version of this module. So we can discuss about it.

The module is in the attached file (lgsm.7z) You can see a quick (and dirty) usecase in SE3CubicInterpolator.h.

There's part in this module (I'll have to split them) :

LieGroup.h, LieAlgebra.h, LieGroup_SO3.h, LieGroup_SE3.h, LieAlgebra_so3.h and LieAlgebra_se3.h

Displacement.h, Twist.h, Wrench.h, Rotation3D.h, AngularVelocity.h and Torque.h

My requirements : * Wrap existing eigen class (do not add any methods to the common classes) * Reuse functions/methods provided by Eigen. * Mimic the Map<> mecanism to handle array of scalars.

The choices I made : 1) class specialization instead of methods specialization 2) Implementing the Map<> design 3) MatrixBase inheritance 4) Strong typing the dual of the Lie Algebra 5) Providing names for rigid bodies simulation In details : 1) class specialization instead of method specialization

template<class G> LieGroup<G> { public: typedef LieAlgebra<someClass> Algebra; LieGroup<G> inverse() const; LieGroup<G> Identity(); Algebra log() const; protected: G m_coeffs; } where G is an Eigen object (Matrix, Array, etc.)

template<class Scalar> LieGroup<Eigen::Array<Scalar, 7, 1> > { public: typedef LieAlgebra<someClass> Algebra; typedef LieGroup<...> LieGroupSO3; LieGroup<G> inverse() const; LieGroup<G> Identity(); Algebra log() const; Map<LieGroupSO3> getSO3Element() {return Map<Map<LieGroupSO3>(m_coeffs);} protected: G m_coeffs; }

LieGroup<Eigen::Array<Scalar, 7, 1> >(const LieGroupSO3&, const Vector3&). 2) Implementing the Map<> design

template<class G, class Derived> class LieGroupBase and the specialization : template<class Derived>

3) MatrixBase inheritance

cols() and rows(), coeffs() and coeffRef(), packet() and writePacket(), innerStride() and outerStride() and data(). 4) Strong typing the dual of the Lie Algebra

5) Providing names for rigid bodies simulation :

-- Mathieu Gautier

**Attachment:
lgsm.7z**

**Messages sorted by:**[ date | thread ]- Prev by Date:
**Re: [eigen] To initialize or not to initialize** - Next by Date:
**Re: [eigen] MSC compiler error: worth working around?** - Previous by thread:
**Re: [eigen] To initialize or not to initialize** - Next by thread:
**[eigen] Really weird regression / product selection logic**

Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |