_StorePointCloud2.py
Go to the documentation of this file.
00001 """autogenerated by genpy from iri_perception_msgs/StorePointCloud2Request.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 sensor_msgs.msg
00008 import geometry_msgs.msg
00009 import std_msgs.msg
00010 
00011 class StorePointCloud2Request(genpy.Message):
00012   _md5sum = "620f2fb25ff410464561f8872a6e9668"
00013   _type = "iri_perception_msgs/StorePointCloud2Request"
00014   _has_header = False #flag to mark the presence of a Header object
00015   _full_text = """
00016 std_msgs/String           file_name
00017 geometry_msgs/PoseStamped sensor_pose
00018 sensor_msgs/PointCloud2   point_cloud
00019 
00020 ================================================================================
00021 MSG: std_msgs/String
00022 string data
00023 
00024 ================================================================================
00025 MSG: geometry_msgs/PoseStamped
00026 # A Pose with reference coordinate frame and timestamp
00027 Header header
00028 Pose pose
00029 
00030 ================================================================================
00031 MSG: std_msgs/Header
00032 # Standard metadata for higher-level stamped data types.
00033 # This is generally used to communicate timestamped data 
00034 # in a particular coordinate frame.
00035 # 
00036 # sequence ID: consecutively increasing ID 
00037 uint32 seq
00038 #Two-integer timestamp that is expressed as:
00039 # * stamp.secs: seconds (stamp_secs) since epoch
00040 # * stamp.nsecs: nanoseconds since stamp_secs
00041 # time-handling sugar is provided by the client library
00042 time stamp
00043 #Frame this data is associated with
00044 # 0: no frame
00045 # 1: global frame
00046 string frame_id
00047 
00048 ================================================================================
00049 MSG: geometry_msgs/Pose
00050 # A representation of pose in free space, composed of postion and orientation. 
00051 Point position
00052 Quaternion orientation
00053 
00054 ================================================================================
00055 MSG: geometry_msgs/Point
00056 # This contains the position of a point in free space
00057 float64 x
00058 float64 y
00059 float64 z
00060 
00061 ================================================================================
00062 MSG: geometry_msgs/Quaternion
00063 # This represents an orientation in free space in quaternion form.
00064 
00065 float64 x
00066 float64 y
00067 float64 z
00068 float64 w
00069 
00070 ================================================================================
00071 MSG: sensor_msgs/PointCloud2
00072 # This message holds a collection of N-dimensional points, which may
00073 # contain additional information such as normals, intensity, etc. The
00074 # point data is stored as a binary blob, its layout described by the
00075 # contents of the "fields" array.
00076 
00077 # The point cloud data may be organized 2d (image-like) or 1d
00078 # (unordered). Point clouds organized as 2d images may be produced by
00079 # camera depth sensors such as stereo or time-of-flight.
00080 
00081 # Time of sensor data acquisition, and the coordinate frame ID (for 3d
00082 # points).
00083 Header header
00084 
00085 # 2D structure of the point cloud. If the cloud is unordered, height is
00086 # 1 and width is the length of the point cloud.
00087 uint32 height
00088 uint32 width
00089 
00090 # Describes the channels and their layout in the binary data blob.
00091 PointField[] fields
00092 
00093 bool    is_bigendian # Is this data bigendian?
00094 uint32  point_step   # Length of a point in bytes
00095 uint32  row_step     # Length of a row in bytes
00096 uint8[] data         # Actual point data, size is (row_step*height)
00097 
00098 bool is_dense        # True if there are no invalid points
00099 
00100 ================================================================================
00101 MSG: sensor_msgs/PointField
00102 # This message holds the description of one point entry in the
00103 # PointCloud2 message format.
00104 uint8 INT8    = 1
00105 uint8 UINT8   = 2
00106 uint8 INT16   = 3
00107 uint8 UINT16  = 4
00108 uint8 INT32   = 5
00109 uint8 UINT32  = 6
00110 uint8 FLOAT32 = 7
00111 uint8 FLOAT64 = 8
00112 
00113 string name      # Name of field
00114 uint32 offset    # Offset from start of point struct
00115 uint8  datatype  # Datatype enumeration, see above
00116 uint32 count     # How many elements in the field
00117 
00118 """
00119   __slots__ = ['file_name','sensor_pose','point_cloud']
00120   _slot_types = ['std_msgs/String','geometry_msgs/PoseStamped','sensor_msgs/PointCloud2']
00121 
00122   def __init__(self, *args, **kwds):
00123     """
00124     Constructor. Any message fields that are implicitly/explicitly
00125     set to None will be assigned a default value. The recommend
00126     use is keyword arguments as this is more robust to future message
00127     changes.  You cannot mix in-order arguments and keyword arguments.
00128 
00129     The available fields are:
00130        file_name,sensor_pose,point_cloud
00131 
00132     :param args: complete set of field values, in .msg order
00133     :param kwds: use keyword arguments corresponding to message field names
00134     to set specific fields.
00135     """
00136     if args or kwds:
00137       super(StorePointCloud2Request, self).__init__(*args, **kwds)
00138       #message fields cannot be None, assign default values for those that are
00139       if self.file_name is None:
00140         self.file_name = std_msgs.msg.String()
00141       if self.sensor_pose is None:
00142         self.sensor_pose = geometry_msgs.msg.PoseStamped()
00143       if self.point_cloud is None:
00144         self.point_cloud = sensor_msgs.msg.PointCloud2()
00145     else:
00146       self.file_name = std_msgs.msg.String()
00147       self.sensor_pose = geometry_msgs.msg.PoseStamped()
00148       self.point_cloud = sensor_msgs.msg.PointCloud2()
00149 
00150   def _get_types(self):
00151     """
00152     internal API method
00153     """
00154     return self._slot_types
00155 
00156   def serialize(self, buff):
00157     """
00158     serialize message into buffer
00159     :param buff: buffer, ``StringIO``
00160     """
00161     try:
00162       _x = self.file_name.data
00163       length = len(_x)
00164       if python3 or type(_x) == unicode:
00165         _x = _x.encode('utf-8')
00166         length = len(_x)
00167       buff.write(struct.pack('<I%ss'%length, length, _x))
00168       _x = self
00169       buff.write(_struct_3I.pack(_x.sensor_pose.header.seq, _x.sensor_pose.header.stamp.secs, _x.sensor_pose.header.stamp.nsecs))
00170       _x = self.sensor_pose.header.frame_id
00171       length = len(_x)
00172       if python3 or type(_x) == unicode:
00173         _x = _x.encode('utf-8')
00174         length = len(_x)
00175       buff.write(struct.pack('<I%ss'%length, length, _x))
00176       _x = self
00177       buff.write(_struct_7d3I.pack(_x.sensor_pose.pose.position.x, _x.sensor_pose.pose.position.y, _x.sensor_pose.pose.position.z, _x.sensor_pose.pose.orientation.x, _x.sensor_pose.pose.orientation.y, _x.sensor_pose.pose.orientation.z, _x.sensor_pose.pose.orientation.w, _x.point_cloud.header.seq, _x.point_cloud.header.stamp.secs, _x.point_cloud.header.stamp.nsecs))
00178       _x = self.point_cloud.header.frame_id
00179       length = len(_x)
00180       if python3 or type(_x) == unicode:
00181         _x = _x.encode('utf-8')
00182         length = len(_x)
00183       buff.write(struct.pack('<I%ss'%length, length, _x))
00184       _x = self
00185       buff.write(_struct_2I.pack(_x.point_cloud.height, _x.point_cloud.width))
00186       length = len(self.point_cloud.fields)
00187       buff.write(_struct_I.pack(length))
00188       for val1 in self.point_cloud.fields:
00189         _x = val1.name
00190         length = len(_x)
00191         if python3 or type(_x) == unicode:
00192           _x = _x.encode('utf-8')
00193           length = len(_x)
00194         buff.write(struct.pack('<I%ss'%length, length, _x))
00195         _x = val1
00196         buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00197       _x = self
00198       buff.write(_struct_B2I.pack(_x.point_cloud.is_bigendian, _x.point_cloud.point_step, _x.point_cloud.row_step))
00199       _x = self.point_cloud.data
00200       length = len(_x)
00201       # - if encoded as a list instead, serialize as bytes instead of string
00202       if type(_x) in [list, tuple]:
00203         buff.write(struct.pack('<I%sB'%length, length, *_x))
00204       else:
00205         buff.write(struct.pack('<I%ss'%length, length, _x))
00206       buff.write(_struct_B.pack(self.point_cloud.is_dense))
00207     except struct.error as se: self._check_types(se)
00208     except TypeError as te: self._check_types(te)
00209 
00210   def deserialize(self, str):
00211     """
00212     unpack serialized message in str into this message instance
00213     :param str: byte array of serialized message, ``str``
00214     """
00215     try:
00216       if self.file_name is None:
00217         self.file_name = std_msgs.msg.String()
00218       if self.sensor_pose is None:
00219         self.sensor_pose = geometry_msgs.msg.PoseStamped()
00220       if self.point_cloud is None:
00221         self.point_cloud = sensor_msgs.msg.PointCloud2()
00222       end = 0
00223       start = end
00224       end += 4
00225       (length,) = _struct_I.unpack(str[start:end])
00226       start = end
00227       end += length
00228       if python3:
00229         self.file_name.data = str[start:end].decode('utf-8')
00230       else:
00231         self.file_name.data = str[start:end]
00232       _x = self
00233       start = end
00234       end += 12
00235       (_x.sensor_pose.header.seq, _x.sensor_pose.header.stamp.secs, _x.sensor_pose.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00236       start = end
00237       end += 4
00238       (length,) = _struct_I.unpack(str[start:end])
00239       start = end
00240       end += length
00241       if python3:
00242         self.sensor_pose.header.frame_id = str[start:end].decode('utf-8')
00243       else:
00244         self.sensor_pose.header.frame_id = str[start:end]
00245       _x = self
00246       start = end
00247       end += 68
00248       (_x.sensor_pose.pose.position.x, _x.sensor_pose.pose.position.y, _x.sensor_pose.pose.position.z, _x.sensor_pose.pose.orientation.x, _x.sensor_pose.pose.orientation.y, _x.sensor_pose.pose.orientation.z, _x.sensor_pose.pose.orientation.w, _x.point_cloud.header.seq, _x.point_cloud.header.stamp.secs, _x.point_cloud.header.stamp.nsecs,) = _struct_7d3I.unpack(str[start:end])
00249       start = end
00250       end += 4
00251       (length,) = _struct_I.unpack(str[start:end])
00252       start = end
00253       end += length
00254       if python3:
00255         self.point_cloud.header.frame_id = str[start:end].decode('utf-8')
00256       else:
00257         self.point_cloud.header.frame_id = str[start:end]
00258       _x = self
00259       start = end
00260       end += 8
00261       (_x.point_cloud.height, _x.point_cloud.width,) = _struct_2I.unpack(str[start:end])
00262       start = end
00263       end += 4
00264       (length,) = _struct_I.unpack(str[start:end])
00265       self.point_cloud.fields = []
00266       for i in range(0, length):
00267         val1 = sensor_msgs.msg.PointField()
00268         start = end
00269         end += 4
00270         (length,) = _struct_I.unpack(str[start:end])
00271         start = end
00272         end += length
00273         if python3:
00274           val1.name = str[start:end].decode('utf-8')
00275         else:
00276           val1.name = str[start:end]
00277         _x = val1
00278         start = end
00279         end += 9
00280         (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00281         self.point_cloud.fields.append(val1)
00282       _x = self
00283       start = end
00284       end += 9
00285       (_x.point_cloud.is_bigendian, _x.point_cloud.point_step, _x.point_cloud.row_step,) = _struct_B2I.unpack(str[start:end])
00286       self.point_cloud.is_bigendian = bool(self.point_cloud.is_bigendian)
00287       start = end
00288       end += 4
00289       (length,) = _struct_I.unpack(str[start:end])
00290       start = end
00291       end += length
00292       if python3:
00293         self.point_cloud.data = str[start:end].decode('utf-8')
00294       else:
00295         self.point_cloud.data = str[start:end]
00296       start = end
00297       end += 1
00298       (self.point_cloud.is_dense,) = _struct_B.unpack(str[start:end])
00299       self.point_cloud.is_dense = bool(self.point_cloud.is_dense)
00300       return self
00301     except struct.error as e:
00302       raise genpy.DeserializationError(e) #most likely buffer underfill
00303 
00304 
00305   def serialize_numpy(self, buff, numpy):
00306     """
00307     serialize message with numpy array types into buffer
00308     :param buff: buffer, ``StringIO``
00309     :param numpy: numpy python module
00310     """
00311     try:
00312       _x = self.file_name.data
00313       length = len(_x)
00314       if python3 or type(_x) == unicode:
00315         _x = _x.encode('utf-8')
00316         length = len(_x)
00317       buff.write(struct.pack('<I%ss'%length, length, _x))
00318       _x = self
00319       buff.write(_struct_3I.pack(_x.sensor_pose.header.seq, _x.sensor_pose.header.stamp.secs, _x.sensor_pose.header.stamp.nsecs))
00320       _x = self.sensor_pose.header.frame_id
00321       length = len(_x)
00322       if python3 or type(_x) == unicode:
00323         _x = _x.encode('utf-8')
00324         length = len(_x)
00325       buff.write(struct.pack('<I%ss'%length, length, _x))
00326       _x = self
00327       buff.write(_struct_7d3I.pack(_x.sensor_pose.pose.position.x, _x.sensor_pose.pose.position.y, _x.sensor_pose.pose.position.z, _x.sensor_pose.pose.orientation.x, _x.sensor_pose.pose.orientation.y, _x.sensor_pose.pose.orientation.z, _x.sensor_pose.pose.orientation.w, _x.point_cloud.header.seq, _x.point_cloud.header.stamp.secs, _x.point_cloud.header.stamp.nsecs))
00328       _x = self.point_cloud.header.frame_id
00329       length = len(_x)
00330       if python3 or type(_x) == unicode:
00331         _x = _x.encode('utf-8')
00332         length = len(_x)
00333       buff.write(struct.pack('<I%ss'%length, length, _x))
00334       _x = self
00335       buff.write(_struct_2I.pack(_x.point_cloud.height, _x.point_cloud.width))
00336       length = len(self.point_cloud.fields)
00337       buff.write(_struct_I.pack(length))
00338       for val1 in self.point_cloud.fields:
00339         _x = val1.name
00340         length = len(_x)
00341         if python3 or type(_x) == unicode:
00342           _x = _x.encode('utf-8')
00343           length = len(_x)
00344         buff.write(struct.pack('<I%ss'%length, length, _x))
00345         _x = val1
00346         buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00347       _x = self
00348       buff.write(_struct_B2I.pack(_x.point_cloud.is_bigendian, _x.point_cloud.point_step, _x.point_cloud.row_step))
00349       _x = self.point_cloud.data
00350       length = len(_x)
00351       # - if encoded as a list instead, serialize as bytes instead of string
00352       if type(_x) in [list, tuple]:
00353         buff.write(struct.pack('<I%sB'%length, length, *_x))
00354       else:
00355         buff.write(struct.pack('<I%ss'%length, length, _x))
00356       buff.write(_struct_B.pack(self.point_cloud.is_dense))
00357     except struct.error as se: self._check_types(se)
00358     except TypeError as te: self._check_types(te)
00359 
00360   def deserialize_numpy(self, str, numpy):
00361     """
00362     unpack serialized message in str into this message instance using numpy for array types
00363     :param str: byte array of serialized message, ``str``
00364     :param numpy: numpy python module
00365     """
00366     try:
00367       if self.file_name is None:
00368         self.file_name = std_msgs.msg.String()
00369       if self.sensor_pose is None:
00370         self.sensor_pose = geometry_msgs.msg.PoseStamped()
00371       if self.point_cloud is None:
00372         self.point_cloud = sensor_msgs.msg.PointCloud2()
00373       end = 0
00374       start = end
00375       end += 4
00376       (length,) = _struct_I.unpack(str[start:end])
00377       start = end
00378       end += length
00379       if python3:
00380         self.file_name.data = str[start:end].decode('utf-8')
00381       else:
00382         self.file_name.data = str[start:end]
00383       _x = self
00384       start = end
00385       end += 12
00386       (_x.sensor_pose.header.seq, _x.sensor_pose.header.stamp.secs, _x.sensor_pose.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00387       start = end
00388       end += 4
00389       (length,) = _struct_I.unpack(str[start:end])
00390       start = end
00391       end += length
00392       if python3:
00393         self.sensor_pose.header.frame_id = str[start:end].decode('utf-8')
00394       else:
00395         self.sensor_pose.header.frame_id = str[start:end]
00396       _x = self
00397       start = end
00398       end += 68
00399       (_x.sensor_pose.pose.position.x, _x.sensor_pose.pose.position.y, _x.sensor_pose.pose.position.z, _x.sensor_pose.pose.orientation.x, _x.sensor_pose.pose.orientation.y, _x.sensor_pose.pose.orientation.z, _x.sensor_pose.pose.orientation.w, _x.point_cloud.header.seq, _x.point_cloud.header.stamp.secs, _x.point_cloud.header.stamp.nsecs,) = _struct_7d3I.unpack(str[start:end])
00400       start = end
00401       end += 4
00402       (length,) = _struct_I.unpack(str[start:end])
00403       start = end
00404       end += length
00405       if python3:
00406         self.point_cloud.header.frame_id = str[start:end].decode('utf-8')
00407       else:
00408         self.point_cloud.header.frame_id = str[start:end]
00409       _x = self
00410       start = end
00411       end += 8
00412       (_x.point_cloud.height, _x.point_cloud.width,) = _struct_2I.unpack(str[start:end])
00413       start = end
00414       end += 4
00415       (length,) = _struct_I.unpack(str[start:end])
00416       self.point_cloud.fields = []
00417       for i in range(0, length):
00418         val1 = sensor_msgs.msg.PointField()
00419         start = end
00420         end += 4
00421         (length,) = _struct_I.unpack(str[start:end])
00422         start = end
00423         end += length
00424         if python3:
00425           val1.name = str[start:end].decode('utf-8')
00426         else:
00427           val1.name = str[start:end]
00428         _x = val1
00429         start = end
00430         end += 9
00431         (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00432         self.point_cloud.fields.append(val1)
00433       _x = self
00434       start = end
00435       end += 9
00436       (_x.point_cloud.is_bigendian, _x.point_cloud.point_step, _x.point_cloud.row_step,) = _struct_B2I.unpack(str[start:end])
00437       self.point_cloud.is_bigendian = bool(self.point_cloud.is_bigendian)
00438       start = end
00439       end += 4
00440       (length,) = _struct_I.unpack(str[start:end])
00441       start = end
00442       end += length
00443       if python3:
00444         self.point_cloud.data = str[start:end].decode('utf-8')
00445       else:
00446         self.point_cloud.data = str[start:end]
00447       start = end
00448       end += 1
00449       (self.point_cloud.is_dense,) = _struct_B.unpack(str[start:end])
00450       self.point_cloud.is_dense = bool(self.point_cloud.is_dense)
00451       return self
00452     except struct.error as e:
00453       raise genpy.DeserializationError(e) #most likely buffer underfill
00454 
00455 _struct_I = genpy.struct_I
00456 _struct_IBI = struct.Struct("<IBI")
00457 _struct_B = struct.Struct("<B")
00458 _struct_2I = struct.Struct("<2I")
00459 _struct_3I = struct.Struct("<3I")
00460 _struct_B2I = struct.Struct("<B2I")
00461 _struct_7d3I = struct.Struct("<7d3I")
00462 """autogenerated by genpy from iri_perception_msgs/StorePointCloud2Response.msg. Do not edit."""
00463 import sys
00464 python3 = True if sys.hexversion > 0x03000000 else False
00465 import genpy
00466 import struct
00467 
00468 
00469 class StorePointCloud2Response(genpy.Message):
00470   _md5sum = "d41d8cd98f00b204e9800998ecf8427e"
00471   _type = "iri_perception_msgs/StorePointCloud2Response"
00472   _has_header = False #flag to mark the presence of a Header object
00473   _full_text = """
00474 
00475 
00476 """
00477   __slots__ = []
00478   _slot_types = []
00479 
00480   def __init__(self, *args, **kwds):
00481     """
00482     Constructor. Any message fields that are implicitly/explicitly
00483     set to None will be assigned a default value. The recommend
00484     use is keyword arguments as this is more robust to future message
00485     changes.  You cannot mix in-order arguments and keyword arguments.
00486 
00487     The available fields are:
00488        
00489 
00490     :param args: complete set of field values, in .msg order
00491     :param kwds: use keyword arguments corresponding to message field names
00492     to set specific fields.
00493     """
00494     if args or kwds:
00495       super(StorePointCloud2Response, self).__init__(*args, **kwds)
00496 
00497   def _get_types(self):
00498     """
00499     internal API method
00500     """
00501     return self._slot_types
00502 
00503   def serialize(self, buff):
00504     """
00505     serialize message into buffer
00506     :param buff: buffer, ``StringIO``
00507     """
00508     try:
00509       pass
00510     except struct.error as se: self._check_types(se)
00511     except TypeError as te: self._check_types(te)
00512 
00513   def deserialize(self, str):
00514     """
00515     unpack serialized message in str into this message instance
00516     :param str: byte array of serialized message, ``str``
00517     """
00518     try:
00519       end = 0
00520       return self
00521     except struct.error as e:
00522       raise genpy.DeserializationError(e) #most likely buffer underfill
00523 
00524 
00525   def serialize_numpy(self, buff, numpy):
00526     """
00527     serialize message with numpy array types into buffer
00528     :param buff: buffer, ``StringIO``
00529     :param numpy: numpy python module
00530     """
00531     try:
00532       pass
00533     except struct.error as se: self._check_types(se)
00534     except TypeError as te: self._check_types(te)
00535 
00536   def deserialize_numpy(self, str, numpy):
00537     """
00538     unpack serialized message in str into this message instance using numpy for array types
00539     :param str: byte array of serialized message, ``str``
00540     :param numpy: numpy python module
00541     """
00542     try:
00543       end = 0
00544       return self
00545     except struct.error as e:
00546       raise genpy.DeserializationError(e) #most likely buffer underfill
00547 
00548 _struct_I = genpy.struct_I
00549 class StorePointCloud2(object):
00550   _type          = 'iri_perception_msgs/StorePointCloud2'
00551   _md5sum = '620f2fb25ff410464561f8872a6e9668'
00552   _request_class  = StorePointCloud2Request
00553   _response_class = StorePointCloud2Response


iri_perception_msgs
Author(s):
autogenerated on Fri Dec 6 2013 20:02:15