[Rock-dev] Imminent move to eigen3 *Please Read*

Jakob Schwendner jakob.schwendner at dfki.de
Mon May 16 09:50:08 CEST 2011


Hi,

please read, as this is quite likely to affect you.

as you might now, we are using eigen2 quite extensively in rock. Through 
the base/types package, which has a dependency to eigen, almost all 
packages in rock have an eigen dependency.

Since eigen3 (http://eigen.tuxfamily.org/index.php?title=Main_Page) is 
out for a while now, and we have some problems with eigen2 and 32 bit 
machines, we've decided to move to eigen3. I've done the conversion for 
the rock modules as well as the imoby packages.

*I would like to push these changes today around noon.*
This has a good chance of breaking your code. Let me know if you have a 
problem with me pushing today (you can always hold off updating of course).

Here are the things that you might need to do to move to eigen3:
- eigen3 is not available as a package, and is extracted into 
external/eigen3 through the autoproj rock.base configuration.
- to make future compatbility with packages easier, the module is 
referred to as eigen3 and not external/eigen3 in the manifests
- base/types is already pulling in eigen3, so if you have a dependency 
on it, you don't need to update your makefiles. If you use base/types 
and also explicitly include eigen2, remove the FindEigen2 part.
- if you include eigen2 without including base, the best way is to use 
pkg-config (and an eigen3 entry in the manifest of your package) to find 
eigen3 (this avoids copying FindEigen3 cmake scripts).
- there is a page with all the things that have changed: 
http://eigen.tuxfamily.org/dox/Eigen2ToEigen3.html

Common things I had to convert and how I did it:
- Transform3d is now Affine3d.
- begin() and end() are now head() and tail().
- the include is "Eigen/Core.hpp" not "eigen2/Eigen/Core.hpp". The 
latter only worked because of the standard installation directory for 
the includes.
- It seems that eigen2 was including <iostream> and eigen3 is not. I had 
to add a number of iostream includes because of this.

The big change for us is that now in base/types/eigen.h we have 
additional to the base::Vector3d etc types base::Quaterniond and 
base::Transform3d, which do not need to be aligned and can be used in 
orogen types. This does not mean that now all the code will work on 32 
bit, but that it can be made to work. Escpecially envire is still a bit 
flaky on the 32 bit side as far as I know.

Let me know if you have comments or questions.

Jakob



More information about the Rock-dev mailing list