_DenseLaserObjectFeatures.py
Go to the documentation of this file.
00001 """autogenerated by genpy from calibration_msgs/DenseLaserObjectFeatures.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006 
00007 import calibration_msgs.msg
00008 import geometry_msgs.msg
00009 import std_msgs.msg
00010 
00011 class DenseLaserObjectFeatures(genpy.Message):
00012   _md5sum = "b642d46e47d54e00f98a3d98b02b5cc6"
00013   _type = "calibration_msgs/DenseLaserObjectFeatures"
00014   _has_header = True #flag to mark the presence of a Header object
00015   _full_text = """# Synchronized with sensor output
00016 Header header
00017 
00018 # Pixel locations of detected features
00019 DenseLaserPoint[] dense_laser_points
00020 
00021 # Defines geometry of detected features in some "object" coordinate frame
00022 geometry_msgs/Point[] object_points
00023 
00024 # False on detection failure or partial detection
00025 uint8 success
00026 
00027 ================================================================================
00028 MSG: std_msgs/Header
00029 # Standard metadata for higher-level stamped data types.
00030 # This is generally used to communicate timestamped data 
00031 # in a particular coordinate frame.
00032 # 
00033 # sequence ID: consecutively increasing ID 
00034 uint32 seq
00035 #Two-integer timestamp that is expressed as:
00036 # * stamp.secs: seconds (stamp_secs) since epoch
00037 # * stamp.nsecs: nanoseconds since stamp_secs
00038 # time-handling sugar is provided by the client library
00039 time stamp
00040 #Frame this data is associated with
00041 # 0: no frame
00042 # 1: global frame
00043 string frame_id
00044 
00045 ================================================================================
00046 MSG: calibration_msgs/DenseLaserPoint
00047 # Stores the xy subpixel location of a point in a DenseLaserSnapshot
00048 float64 scan  # Which scan line we detected the feature
00049 float64 ray   # Which ray in the specified scan we detected the feature
00050 
00051 ================================================================================
00052 MSG: geometry_msgs/Point
00053 # This contains the position of a point in free space
00054 float64 x
00055 float64 y
00056 float64 z
00057 
00058 """
00059   __slots__ = ['header','dense_laser_points','object_points','success']
00060   _slot_types = ['std_msgs/Header','calibration_msgs/DenseLaserPoint[]','geometry_msgs/Point[]','uint8']
00061 
00062   def __init__(self, *args, **kwds):
00063     """
00064     Constructor. Any message fields that are implicitly/explicitly
00065     set to None will be assigned a default value. The recommend
00066     use is keyword arguments as this is more robust to future message
00067     changes.  You cannot mix in-order arguments and keyword arguments.
00068 
00069     The available fields are:
00070        header,dense_laser_points,object_points,success
00071 
00072     :param args: complete set of field values, in .msg order
00073     :param kwds: use keyword arguments corresponding to message field names
00074     to set specific fields.
00075     """
00076     if args or kwds:
00077       super(DenseLaserObjectFeatures, self).__init__(*args, **kwds)
00078       #message fields cannot be None, assign default values for those that are
00079       if self.header is None:
00080         self.header = std_msgs.msg.Header()
00081       if self.dense_laser_points is None:
00082         self.dense_laser_points = []
00083       if self.object_points is None:
00084         self.object_points = []
00085       if self.success is None:
00086         self.success = 0
00087     else:
00088       self.header = std_msgs.msg.Header()
00089       self.dense_laser_points = []
00090       self.object_points = []
00091       self.success = 0
00092 
00093   def _get_types(self):
00094     """
00095     internal API method
00096     """
00097     return self._slot_types
00098 
00099   def serialize(self, buff):
00100     """
00101     serialize message into buffer
00102     :param buff: buffer, ``StringIO``
00103     """
00104     try:
00105       _x = self
00106       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00107       _x = self.header.frame_id
00108       length = len(_x)
00109       if python3 or type(_x) == unicode:
00110         _x = _x.encode('utf-8')
00111         length = len(_x)
00112       buff.write(struct.pack('<I%ss'%length, length, _x))
00113       length = len(self.dense_laser_points)
00114       buff.write(_struct_I.pack(length))
00115       for val1 in self.dense_laser_points:
00116         _x = val1
00117         buff.write(_struct_2d.pack(_x.scan, _x.ray))
00118       length = len(self.object_points)
00119       buff.write(_struct_I.pack(length))
00120       for val1 in self.object_points:
00121         _x = val1
00122         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00123       buff.write(_struct_B.pack(self.success))
00124     except struct.error as se: self._check_types(se)
00125     except TypeError as te: self._check_types(te)
00126 
00127   def deserialize(self, str):
00128     """
00129     unpack serialized message in str into this message instance
00130     :param str: byte array of serialized message, ``str``
00131     """
00132     try:
00133       if self.header is None:
00134         self.header = std_msgs.msg.Header()
00135       if self.dense_laser_points is None:
00136         self.dense_laser_points = None
00137       if self.object_points is None:
00138         self.object_points = None
00139       end = 0
00140       _x = self
00141       start = end
00142       end += 12
00143       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00144       start = end
00145       end += 4
00146       (length,) = _struct_I.unpack(str[start:end])
00147       start = end
00148       end += length
00149       if python3:
00150         self.header.frame_id = str[start:end].decode('utf-8')
00151       else:
00152         self.header.frame_id = str[start:end]
00153       start = end
00154       end += 4
00155       (length,) = _struct_I.unpack(str[start:end])
00156       self.dense_laser_points = []
00157       for i in range(0, length):
00158         val1 = calibration_msgs.msg.DenseLaserPoint()
00159         _x = val1
00160         start = end
00161         end += 16
00162         (_x.scan, _x.ray,) = _struct_2d.unpack(str[start:end])
00163         self.dense_laser_points.append(val1)
00164       start = end
00165       end += 4
00166       (length,) = _struct_I.unpack(str[start:end])
00167       self.object_points = []
00168       for i in range(0, length):
00169         val1 = geometry_msgs.msg.Point()
00170         _x = val1
00171         start = end
00172         end += 24
00173         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00174         self.object_points.append(val1)
00175       start = end
00176       end += 1
00177       (self.success,) = _struct_B.unpack(str[start:end])
00178       return self
00179     except struct.error as e:
00180       raise genpy.DeserializationError(e) #most likely buffer underfill
00181 
00182 
00183   def serialize_numpy(self, buff, numpy):
00184     """
00185     serialize message with numpy array types into buffer
00186     :param buff: buffer, ``StringIO``
00187     :param numpy: numpy python module
00188     """
00189     try:
00190       _x = self
00191       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00192       _x = self.header.frame_id
00193       length = len(_x)
00194       if python3 or type(_x) == unicode:
00195         _x = _x.encode('utf-8')
00196         length = len(_x)
00197       buff.write(struct.pack('<I%ss'%length, length, _x))
00198       length = len(self.dense_laser_points)
00199       buff.write(_struct_I.pack(length))
00200       for val1 in self.dense_laser_points:
00201         _x = val1
00202         buff.write(_struct_2d.pack(_x.scan, _x.ray))
00203       length = len(self.object_points)
00204       buff.write(_struct_I.pack(length))
00205       for val1 in self.object_points:
00206         _x = val1
00207         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00208       buff.write(_struct_B.pack(self.success))
00209     except struct.error as se: self._check_types(se)
00210     except TypeError as te: self._check_types(te)
00211 
00212   def deserialize_numpy(self, str, numpy):
00213     """
00214     unpack serialized message in str into this message instance using numpy for array types
00215     :param str: byte array of serialized message, ``str``
00216     :param numpy: numpy python module
00217     """
00218     try:
00219       if self.header is None:
00220         self.header = std_msgs.msg.Header()
00221       if self.dense_laser_points is None:
00222         self.dense_laser_points = None
00223       if self.object_points is None:
00224         self.object_points = None
00225       end = 0
00226       _x = self
00227       start = end
00228       end += 12
00229       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00230       start = end
00231       end += 4
00232       (length,) = _struct_I.unpack(str[start:end])
00233       start = end
00234       end += length
00235       if python3:
00236         self.header.frame_id = str[start:end].decode('utf-8')
00237       else:
00238         self.header.frame_id = str[start:end]
00239       start = end
00240       end += 4
00241       (length,) = _struct_I.unpack(str[start:end])
00242       self.dense_laser_points = []
00243       for i in range(0, length):
00244         val1 = calibration_msgs.msg.DenseLaserPoint()
00245         _x = val1
00246         start = end
00247         end += 16
00248         (_x.scan, _x.ray,) = _struct_2d.unpack(str[start:end])
00249         self.dense_laser_points.append(val1)
00250       start = end
00251       end += 4
00252       (length,) = _struct_I.unpack(str[start:end])
00253       self.object_points = []
00254       for i in range(0, length):
00255         val1 = geometry_msgs.msg.Point()
00256         _x = val1
00257         start = end
00258         end += 24
00259         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00260         self.object_points.append(val1)
00261       start = end
00262       end += 1
00263       (self.success,) = _struct_B.unpack(str[start:end])
00264       return self
00265     except struct.error as e:
00266       raise genpy.DeserializationError(e) #most likely buffer underfill
00267 
00268 _struct_I = genpy.struct_I
00269 _struct_2d = struct.Struct("<2d")
00270 _struct_3I = struct.Struct("<3I")
00271 _struct_B = struct.Struct("<B")
00272 _struct_3d = struct.Struct("<3d")
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends


calibration_msgs
Author(s): Vijay Pradeep
autogenerated on Thu Aug 15 2013 10:15:15