laas / metapod

A template-based robot dynamics library
GNU Lesser General Public License v3.0
14 stars 10 forks source link

most of the objects are not initialized #41

Closed sbarthelemy closed 11 years ago

sbarthelemy commented 11 years ago

Eigen constructors do not initialize the matrix, even the default one. [1]

As a consequence, spatial types, which do not initialize their eigen data members, are constructed uninitialized too.

The computations on the master branch are still sound because all these objects are used in static data members and thus are zero initialized. [2]

In the fusion0 branch, the objects are no more static and we need a proper initialization.

I'd like to fix it, but we need to choose a policy:

I'd tend to prefer the first option, for the sake of consistency with eigen. What do you think?

[1] http://eigen.tuxfamily.org/dox/TutorialMatrixClass.html#TutorialMatrixConstructors [2] http://stackoverflow.com/a/58804

aelkhour commented 11 years ago

either the spatial types static initilizer (say Spatial::Force::Zero) and the user has to manually call them

+1 for this option.

olivier-stasse commented 11 years ago

+1 for this option too.