[Rock-dev] std::vector<bool> allowed in types ?

Felix Rehrmann felix.rehrmann at dfki.de
Wed Jul 11 12:28:39 CEST 2012


Hi all,

in Virgo we had the following data structure:

     struct Bumpers
     {
         // Number of Bumpers (specific per Robot)
         int nrFront;
         int nrRear;
         // States of Bumpers. See Aria Documentation and/or ArModes.cpp
         // for an Example how to read out these values.
         int front;
         int rear;

         std::vector<bool> bumpersFront;
         std::vector<bool> bumpersRear;

         base::Time time;
     };

When connecting to a port with this type via orocos.rb a segmentation 
fault happened.
After changing std::vector<bool> to std::vector<int> the segmentation 
fault was gone.

The questions is whether std::vector<bool> is not allowed at all (e.g. 
typelib cannot interpret it correctly,
maybe because the interpretation of bool is not clear) or that this is a 
bug or missing feature?

Thanks
Felix


-- 

  Felix Rehrmann
  Researcher
  
  DFKI Bremen
  Robotics Innovation Center
  Robert-Hooke-Straße 5
  28359 Bremen, Germany
  
  Phone: +49 (0)421 178 45-4129
  Fax:   +49 (0)421 218-64150
  E-Mail: felix.rehrmann 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