[Rock-dev] eigen on 32 Bit machines and rock base types

Alexander Duda Alexander.Duda at dfki.de
Thu Mar 24 18:17:59 CET 2011


On Thu, 2011-03-24 at 15:30 +0100, Sylvain Joyeux wrote:
> > If someone is interested:
> > Because there is no implicit type conversion for base::Quaternion to
> > eigen::Quaternion there will be Segfaults on 32 Bit machines.
> ??? this is not the problem at all.
> 
> There is no base::Quaternion, it is simply a typedef to 
> Eigen::Quaterniond (i.e. they are the same type)

I wanted to keep things simple. You are using implicit type conversion
between Eigen::Matrix<double, 3, 1, Eigen::DontAlign> and
Eigen::Matrix<double, 3, 1, Eigen::AutoAlign>.

Eigen::Quaternion is not supporting this therefore "there is no implicit
type conversion" between base::Quaterniod and Eigen::Quaterniond which
is copying the non aligned data into an aligned data struct, because
they are like you said the same type.

> > the workaround for now is to add:
> add_definitions(-DEIGEN_DISABLE_UNALIGNED_ARRAY_ASSERT)
> Just adding this definition should be enough, as Eigen::Quaterniond is 
> not vectorized
True, but vizkit and envire are not tested to run on 32 Bit machines
therefore for quite a few classes the macro call
EIGEN_MAKE_ALIGNED_OPERATOR_NEW is missing.
 
> > -DEIGEN_DONT_VECTORIZE)
> > add_definitions(-DEIGEN_DONT_ALIGN)
> >
> > to the CMakeLists.txt from:
> > base/types
> > drivers/transformer
> > gui/vizkit
> > slam/envire
> Well, to be complete, you need it on all packages that use 
> base::Quaternion while assuming it is not aligned (which is probably 
> much more than the ones you listed). And the orogen components that have 
> dataflow with one of these types.
like I said I wanted to keep it simple

Alex


-- 
Dipl.-Ing. Alexander Duda 
Unterwasserrobotik

DFKI Bremen
Robotics Innovation Center
Robert-Hooke-Straße 5
28359 Bremen, Germany

Phone: +49 (0)421 178-456620
Fax:   +49 (0)421 178-454150
E-Mail: alexander.duda at dfki.de

Weitere Informationen: http://www.dfki.de/robotik
-----------------------------------------------------------------------
Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
Firmensitz: Trippstadter Straße 122, D-67663 Kaiserslautern
Geschaeftsfuehrung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster
(Vorsitzender) Dr. Walter Olthoff
Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
Amtsgericht Kaiserslautern, HRB 2313
Sitz der Gesellschaft: Kaiserslautern (HRB 2313)
USt-Id.Nr.:    DE 148646973
Steuernummer:  19/673/0060/3



More information about the Rock-dev mailing list