_GetSnapshotFeedback.py
Go to the documentation of this file.
00001 """autogenerated by genpy from pr2_tilt_laser_interface/GetSnapshotFeedback.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 std_msgs.msg
00008 import sensor_msgs.msg
00009 
00010 class GetSnapshotFeedback(genpy.Message):
00011   _md5sum = "96cec5374164b3b3d1d7ef5d7628a7ed"
00012   _type = "pr2_tilt_laser_interface/GetSnapshotFeedback"
00013   _has_header = False #flag to mark the presence of a Header object
00014   _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00015 # Feedback
00016 sensor_msgs/PointCloud2 cloud
00017 
00018 
00019 
00020 ================================================================================
00021 MSG: sensor_msgs/PointCloud2
00022 # This message holds a collection of N-dimensional points, which may
00023 # contain additional information such as normals, intensity, etc. The
00024 # point data is stored as a binary blob, its layout described by the
00025 # contents of the "fields" array.
00026 
00027 # The point cloud data may be organized 2d (image-like) or 1d
00028 # (unordered). Point clouds organized as 2d images may be produced by
00029 # camera depth sensors such as stereo or time-of-flight.
00030 
00031 # Time of sensor data acquisition, and the coordinate frame ID (for 3d
00032 # points).
00033 Header header
00034 
00035 # 2D structure of the point cloud. If the cloud is unordered, height is
00036 # 1 and width is the length of the point cloud.
00037 uint32 height
00038 uint32 width
00039 
00040 # Describes the channels and their layout in the binary data blob.
00041 PointField[] fields
00042 
00043 bool    is_bigendian # Is this data bigendian?
00044 uint32  point_step   # Length of a point in bytes
00045 uint32  row_step     # Length of a row in bytes
00046 uint8[] data         # Actual point data, size is (row_step*height)
00047 
00048 bool is_dense        # True if there are no invalid points
00049 
00050 ================================================================================
00051 MSG: std_msgs/Header
00052 # Standard metadata for higher-level stamped data types.
00053 # This is generally used to communicate timestamped data 
00054 # in a particular coordinate frame.
00055 # 
00056 # sequence ID: consecutively increasing ID 
00057 uint32 seq
00058 #Two-integer timestamp that is expressed as:
00059 # * stamp.secs: seconds (stamp_secs) since epoch
00060 # * stamp.nsecs: nanoseconds since stamp_secs
00061 # time-handling sugar is provided by the client library
00062 time stamp
00063 #Frame this data is associated with
00064 # 0: no frame
00065 # 1: global frame
00066 string frame_id
00067 
00068 ================================================================================
00069 MSG: sensor_msgs/PointField
00070 # This message holds the description of one point entry in the
00071 # PointCloud2 message format.
00072 uint8 INT8    = 1
00073 uint8 UINT8   = 2
00074 uint8 INT16   = 3
00075 uint8 UINT16  = 4
00076 uint8 INT32   = 5
00077 uint8 UINT32  = 6
00078 uint8 FLOAT32 = 7
00079 uint8 FLOAT64 = 8
00080 
00081 string name      # Name of field
00082 uint32 offset    # Offset from start of point struct
00083 uint8  datatype  # Datatype enumeration, see above
00084 uint32 count     # How many elements in the field
00085 
00086 """
00087   __slots__ = ['cloud']
00088   _slot_types = ['sensor_msgs/PointCloud2']
00089 
00090   def __init__(self, *args, **kwds):
00091     """
00092     Constructor. Any message fields that are implicitly/explicitly
00093     set to None will be assigned a default value. The recommend
00094     use is keyword arguments as this is more robust to future message
00095     changes.  You cannot mix in-order arguments and keyword arguments.
00096 
00097     The available fields are:
00098        cloud
00099 
00100     :param args: complete set of field values, in .msg order
00101     :param kwds: use keyword arguments corresponding to message field names
00102     to set specific fields.
00103     """
00104     if args or kwds:
00105       super(GetSnapshotFeedback, self).__init__(*args, **kwds)
00106       #message fields cannot be None, assign default values for those that are
00107       if self.cloud is None:
00108         self.cloud = sensor_msgs.msg.PointCloud2()
00109     else:
00110       self.cloud = sensor_msgs.msg.PointCloud2()
00111 
00112   def _get_types(self):
00113     """
00114     internal API method
00115     """
00116     return self._slot_types
00117 
00118   def serialize(self, buff):
00119     """
00120     serialize message into buffer
00121     :param buff: buffer, ``StringIO``
00122     """
00123     try:
00124       _x = self
00125       buff.write(_struct_3I.pack(_x.cloud.header.seq, _x.cloud.header.stamp.secs, _x.cloud.header.stamp.nsecs))
00126       _x = self.cloud.header.frame_id
00127       length = len(_x)
00128       if python3 or type(_x) == unicode:
00129         _x = _x.encode('utf-8')
00130         length = len(_x)
00131       buff.write(struct.pack('<I%ss'%length, length, _x))
00132       _x = self
00133       buff.write(_struct_2I.pack(_x.cloud.height, _x.cloud.width))
00134       length = len(self.cloud.fields)
00135       buff.write(_struct_I.pack(length))
00136       for val1 in self.cloud.fields:
00137         _x = val1.name
00138         length = len(_x)
00139         if python3 or type(_x) == unicode:
00140           _x = _x.encode('utf-8')
00141           length = len(_x)
00142         buff.write(struct.pack('<I%ss'%length, length, _x))
00143         _x = val1
00144         buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00145       _x = self
00146       buff.write(_struct_B2I.pack(_x.cloud.is_bigendian, _x.cloud.point_step, _x.cloud.row_step))
00147       _x = self.cloud.data
00148       length = len(_x)
00149       # - if encoded as a list instead, serialize as bytes instead of string
00150       if type(_x) in [list, tuple]:
00151         buff.write(struct.pack('<I%sB'%length, length, *_x))
00152       else:
00153         buff.write(struct.pack('<I%ss'%length, length, _x))
00154       buff.write(_struct_B.pack(self.cloud.is_dense))
00155     except struct.error as se: self._check_types(se)
00156     except TypeError as te: self._check_types(te)
00157 
00158   def deserialize(self, str):
00159     """
00160     unpack serialized message in str into this message instance
00161     :param str: byte array of serialized message, ``str``
00162     """
00163     try:
00164       if self.cloud is None:
00165         self.cloud = sensor_msgs.msg.PointCloud2()
00166       end = 0
00167       _x = self
00168       start = end
00169       end += 12
00170       (_x.cloud.header.seq, _x.cloud.header.stamp.secs, _x.cloud.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00171       start = end
00172       end += 4
00173       (length,) = _struct_I.unpack(str[start:end])
00174       start = end
00175       end += length
00176       if python3:
00177         self.cloud.header.frame_id = str[start:end].decode('utf-8')
00178       else:
00179         self.cloud.header.frame_id = str[start:end]
00180       _x = self
00181       start = end
00182       end += 8
00183       (_x.cloud.height, _x.cloud.width,) = _struct_2I.unpack(str[start:end])
00184       start = end
00185       end += 4
00186       (length,) = _struct_I.unpack(str[start:end])
00187       self.cloud.fields = []
00188       for i in range(0, length):
00189         val1 = sensor_msgs.msg.PointField()
00190         start = end
00191         end += 4
00192         (length,) = _struct_I.unpack(str[start:end])
00193         start = end
00194         end += length
00195         if python3:
00196           val1.name = str[start:end].decode('utf-8')
00197         else:
00198           val1.name = str[start:end]
00199         _x = val1
00200         start = end
00201         end += 9
00202         (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00203         self.cloud.fields.append(val1)
00204       _x = self
00205       start = end
00206       end += 9
00207       (_x.cloud.is_bigendian, _x.cloud.point_step, _x.cloud.row_step,) = _struct_B2I.unpack(str[start:end])
00208       self.cloud.is_bigendian = bool(self.cloud.is_bigendian)
00209       start = end
00210       end += 4
00211       (length,) = _struct_I.unpack(str[start:end])
00212       start = end
00213       end += length
00214       if python3:
00215         self.cloud.data = str[start:end].decode('utf-8')
00216       else:
00217         self.cloud.data = str[start:end]
00218       start = end
00219       end += 1
00220       (self.cloud.is_dense,) = _struct_B.unpack(str[start:end])
00221       self.cloud.is_dense = bool(self.cloud.is_dense)
00222       return self
00223     except struct.error as e:
00224       raise genpy.DeserializationError(e) #most likely buffer underfill
00225 
00226 
00227   def serialize_numpy(self, buff, numpy):
00228     """
00229     serialize message with numpy array types into buffer
00230     :param buff: buffer, ``StringIO``
00231     :param numpy: numpy python module
00232     """
00233     try:
00234       _x = self
00235       buff.write(_struct_3I.pack(_x.cloud.header.seq, _x.cloud.header.stamp.secs, _x.cloud.header.stamp.nsecs))
00236       _x = self.cloud.header.frame_id
00237       length = len(_x)
00238       if python3 or type(_x) == unicode:
00239         _x = _x.encode('utf-8')
00240         length = len(_x)
00241       buff.write(struct.pack('<I%ss'%length, length, _x))
00242       _x = self
00243       buff.write(_struct_2I.pack(_x.cloud.height, _x.cloud.width))
00244       length = len(self.cloud.fields)
00245       buff.write(_struct_I.pack(length))
00246       for val1 in self.cloud.fields:
00247         _x = val1.name
00248         length = len(_x)
00249         if python3 or type(_x) == unicode:
00250           _x = _x.encode('utf-8')
00251           length = len(_x)
00252         buff.write(struct.pack('<I%ss'%length, length, _x))
00253         _x = val1
00254         buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00255       _x = self
00256       buff.write(_struct_B2I.pack(_x.cloud.is_bigendian, _x.cloud.point_step, _x.cloud.row_step))
00257       _x = self.cloud.data
00258       length = len(_x)
00259       # - if encoded as a list instead, serialize as bytes instead of string
00260       if type(_x) in [list, tuple]:
00261         buff.write(struct.pack('<I%sB'%length, length, *_x))
00262       else:
00263         buff.write(struct.pack('<I%ss'%length, length, _x))
00264       buff.write(_struct_B.pack(self.cloud.is_dense))
00265     except struct.error as se: self._check_types(se)
00266     except TypeError as te: self._check_types(te)
00267 
00268   def deserialize_numpy(self, str, numpy):
00269     """
00270     unpack serialized message in str into this message instance using numpy for array types
00271     :param str: byte array of serialized message, ``str``
00272     :param numpy: numpy python module
00273     """
00274     try:
00275       if self.cloud is None:
00276         self.cloud = sensor_msgs.msg.PointCloud2()
00277       end = 0
00278       _x = self
00279       start = end
00280       end += 12
00281       (_x.cloud.header.seq, _x.cloud.header.stamp.secs, _x.cloud.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00282       start = end
00283       end += 4
00284       (length,) = _struct_I.unpack(str[start:end])
00285       start = end
00286       end += length
00287       if python3:
00288         self.cloud.header.frame_id = str[start:end].decode('utf-8')
00289       else:
00290         self.cloud.header.frame_id = str[start:end]
00291       _x = self
00292       start = end
00293       end += 8
00294       (_x.cloud.height, _x.cloud.width,) = _struct_2I.unpack(str[start:end])
00295       start = end
00296       end += 4
00297       (length,) = _struct_I.unpack(str[start:end])
00298       self.cloud.fields = []
00299       for i in range(0, length):
00300         val1 = sensor_msgs.msg.PointField()
00301         start = end
00302         end += 4
00303         (length,) = _struct_I.unpack(str[start:end])
00304         start = end
00305         end += length
00306         if python3:
00307           val1.name = str[start:end].decode('utf-8')
00308         else:
00309           val1.name = str[start:end]
00310         _x = val1
00311         start = end
00312         end += 9
00313         (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00314         self.cloud.fields.append(val1)
00315       _x = self
00316       start = end
00317       end += 9
00318       (_x.cloud.is_bigendian, _x.cloud.point_step, _x.cloud.row_step,) = _struct_B2I.unpack(str[start:end])
00319       self.cloud.is_bigendian = bool(self.cloud.is_bigendian)
00320       start = end
00321       end += 4
00322       (length,) = _struct_I.unpack(str[start:end])
00323       start = end
00324       end += length
00325       if python3:
00326         self.cloud.data = str[start:end].decode('utf-8')
00327       else:
00328         self.cloud.data = str[start:end]
00329       start = end
00330       end += 1
00331       (self.cloud.is_dense,) = _struct_B.unpack(str[start:end])
00332       self.cloud.is_dense = bool(self.cloud.is_dense)
00333       return self
00334     except struct.error as e:
00335       raise genpy.DeserializationError(e) #most likely buffer underfill
00336 
00337 _struct_I = genpy.struct_I
00338 _struct_IBI = struct.Struct("<IBI")
00339 _struct_3I = struct.Struct("<3I")
00340 _struct_B = struct.Struct("<B")
00341 _struct_2I = struct.Struct("<2I")
00342 _struct_B2I = struct.Struct("<B2I")


pr2_tilt_laser_interface
Author(s): Radu Rusu, Wim Meeussen, Vijay Pradeep
autogenerated on Sat Dec 28 2013 17:25:13