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


iri_bow_object_detector
Author(s): dmartinez
autogenerated on Fri Dec 6 2013 22:45:45