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

Alexander Duda Alexander.Duda at dfki.de
Thu Mar 24 14:21:36 CET 2011


On Thu, 2011-03-24 at 14:01 +0100, Jakob Schwendner wrote:
> On 03/24/2011 01:42 PM, Alexander Duda wrote:
> > On Thu, 2011-03-24 at 13:08 +0100, Sylvain Joyeux wrote:
> >> On 03/24/2011 11:40 AM, Alexander Duda wrote:
> >>> I am using eigen on a 32 Bit machine and running in lots of unaligned
> >>> array asserts. Is there any reason why for example RigidBodyState does
> >>> not have a EIGEN_MAKE_ALIGNED_OPERATOR_NEW macro call. Or is it just
> >>> missing.
> >> You can't use it for types that are going on the RTT dataflow. Look at
> >> the orocos-dev (or orocos-users) mailing list for an extensive
> >> explanation and discussion.
> > That would mean that you can not use for an example RigidBodyState as a
> > class member like it is extensively done by the transformer.
> >
> > Or do I miss something?
> >
> > Alex
> >
> Yes, you can. The types in base have the DontAlign template option set, 
> which means, they do not need to be aligned. No macro needed here. Look 
> in base/eigen.h... the only problem is that the quaternion does not 
> provide this flag in eigen2. This is why we need to switch to eigen3 for 
> this.
> 
> Jakob

thx for the replays. 

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. 

the workaround for now is to add:
add_definitions(-DEIGEN_DISABLE_UNALIGNED_ARRAY_ASSERT
-DEIGEN_DONT_VECTORIZE)
add_definitions(-DEIGEN_DONT_ALIGN)

to the CMakeLists.txt from:
base/types
drivers/transformer
gui/vizkit
slam/envire

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