[Rock-dev] Uninitialized values for base/types
Leif Christensen
leif.christensen at dfki.de
Mon Nov 10 15:44:54 CET 2014
Hi,
just yesterday I was manually setting parts of my samples/IMUSensors
manually to unknown using the stuff defined in base/types/base/Float.hpp
According to our documentation here:
http://rock.opendfki.de/wiki/WikiStart/Standards/RG3
we have in addition to "unknown" also "unset" with a slightly different
meaning.
LG,
Leif
Am 10.11.2014 um 14:00 schrieb Jakob Schwendner:
> Hey,
>
> I would like to reopen a discussion for uninitialized values in base/types.
> This was triggered by the following merge request:
> https://github.com/rock-core/base-types/pull/17
>
> The question boils down to how we want to handle default constructors in
> base types.
> Options:
> a) Leave uninitialized (like e.g. Eigen does)
> b) Initialize to zero or whatever equivalent
> c) Initialize to unknown (represented as NaN)
>
> I think we currently have a) in some places and c) in others.
>
> My contribution to the discussion:
> b) seems even more dangerous than a, as it wouldn't even be picked up by
> valgrind. No good.
> a) May be slightly more efficient in some special cases
> c) seems like the right thing to do.
>
> RigidBodyState tries a mix between a) and c). Maybe this could be the way
> forward?
>
> Cheers,
>
> Jakob
>
--
Leif Christensen
DFKI Bremen
Robotics Innovation Center
Robert-Hooke-Straße 5
28359 Bremen, Germany
Phone: +49 (0)421 17845-4149
Fax: +49 (0)421 17845-4150
E-Mail: leif.christensen 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