_GetGraspingPointActionGoal.py
Go to the documentation of this file.
00001 """autogenerated by genpy from iri_bow_object_detector/GetGraspingPointActionGoal.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 iri_bow_object_detector.msg
00008 import sensor_msgs.msg
00009 import genpy
00010 import actionlib_msgs.msg
00011 import std_msgs.msg
00012 
00013 class GetGraspingPointActionGoal(genpy.Message):
00014   _md5sum = "c3f468f5e512c9240ae74f9d10e8a67c"
00015   _type = "iri_bow_object_detector/GetGraspingPointActionGoal"
00016   _has_header = True #flag to mark the presence of a Header object
00017   _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00018 
00019 Header header
00020 actionlib_msgs/GoalID goal_id
00021 GetGraspingPointGoal goal
00022 
00023 ================================================================================
00024 MSG: std_msgs/Header
00025 # Standard metadata for higher-level stamped data types.
00026 # This is generally used to communicate timestamped data 
00027 # in a particular coordinate frame.
00028 # 
00029 # sequence ID: consecutively increasing ID 
00030 uint32 seq
00031 #Two-integer timestamp that is expressed as:
00032 # * stamp.secs: seconds (stamp_secs) since epoch
00033 # * stamp.nsecs: nanoseconds since stamp_secs
00034 # time-handling sugar is provided by the client library
00035 time stamp
00036 #Frame this data is associated with
00037 # 0: no frame
00038 # 1: global frame
00039 string frame_id
00040 
00041 ================================================================================
00042 MSG: actionlib_msgs/GoalID
00043 # The stamp should store the time at which this goal was requested.
00044 # It is used by an action server when it tries to preempt all
00045 # goals that were requested before a certain time
00046 time stamp
00047 
00048 # The id provides a way to associate feedback and
00049 # result message with specific goal requests. The id
00050 # specified must be unique.
00051 string id
00052 
00053 
00054 ================================================================================
00055 MSG: iri_bow_object_detector/GetGraspingPointGoal
00056 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00057 # Define the goal
00058 sensor_msgs/PointCloud2 pointcloud
00059 
00060 ================================================================================
00061 MSG: sensor_msgs/PointCloud2
00062 # This message holds a collection of N-dimensional points, which may
00063 # contain additional information such as normals, intensity, etc. The
00064 # point data is stored as a binary blob, its layout described by the
00065 # contents of the "fields" array.
00066 
00067 # The point cloud data may be organized 2d (image-like) or 1d
00068 # (unordered). Point clouds organized as 2d images may be produced by
00069 # camera depth sensors such as stereo or time-of-flight.
00070 
00071 # Time of sensor data acquisition, and the coordinate frame ID (for 3d
00072 # points).
00073 Header header
00074 
00075 # 2D structure of the point cloud. If the cloud is unordered, height is
00076 # 1 and width is the length of the point cloud.
00077 uint32 height
00078 uint32 width
00079 
00080 # Describes the channels and their layout in the binary data blob.
00081 PointField[] fields
00082 
00083 bool    is_bigendian # Is this data bigendian?
00084 uint32  point_step   # Length of a point in bytes
00085 uint32  row_step     # Length of a row in bytes
00086 uint8[] data         # Actual point data, size is (row_step*height)
00087 
00088 bool is_dense        # True if there are no invalid points
00089 
00090 ================================================================================
00091 MSG: sensor_msgs/PointField
00092 # This message holds the description of one point entry in the
00093 # PointCloud2 message format.
00094 uint8 INT8    = 1
00095 uint8 UINT8   = 2
00096 uint8 INT16   = 3
00097 uint8 UINT16  = 4
00098 uint8 INT32   = 5
00099 uint8 UINT32  = 6
00100 uint8 FLOAT32 = 7
00101 uint8 FLOAT64 = 8
00102 
00103 string name      # Name of field
00104 uint32 offset    # Offset from start of point struct
00105 uint8  datatype  # Datatype enumeration, see above
00106 uint32 count     # How many elements in the field
00107 
00108 """
00109   __slots__ = ['header','goal_id','goal']
00110   _slot_types = ['std_msgs/Header','actionlib_msgs/GoalID','iri_bow_object_detector/GetGraspingPointGoal']
00111 
00112   def __init__(self, *args, **kwds):
00113     """
00114     Constructor. Any message fields that are implicitly/explicitly
00115     set to None will be assigned a default value. The recommend
00116     use is keyword arguments as this is more robust to future message
00117     changes.  You cannot mix in-order arguments and keyword arguments.
00118 
00119     The available fields are:
00120        header,goal_id,goal
00121 
00122     :param args: complete set of field values, in .msg order
00123     :param kwds: use keyword arguments corresponding to message field names
00124     to set specific fields.
00125     """
00126     if args or kwds:
00127       super(GetGraspingPointActionGoal, self).__init__(*args, **kwds)
00128       #message fields cannot be None, assign default values for those that are
00129       if self.header is None:
00130         self.header = std_msgs.msg.Header()
00131       if self.goal_id is None:
00132         self.goal_id = actionlib_msgs.msg.GoalID()
00133       if self.goal is None:
00134         self.goal = iri_bow_object_detector.msg.GetGraspingPointGoal()
00135     else:
00136       self.header = std_msgs.msg.Header()
00137       self.goal_id = actionlib_msgs.msg.GoalID()
00138       self.goal = iri_bow_object_detector.msg.GetGraspingPointGoal()
00139 
00140   def _get_types(self):
00141     """
00142     internal API method
00143     """
00144     return self._slot_types
00145 
00146   def serialize(self, buff):
00147     """
00148     serialize message into buffer
00149     :param buff: buffer, ``StringIO``
00150     """
00151     try:
00152       _x = self
00153       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00154       _x = self.header.frame_id
00155       length = len(_x)
00156       if python3 or type(_x) == unicode:
00157         _x = _x.encode('utf-8')
00158         length = len(_x)
00159       buff.write(struct.pack('<I%ss'%length, length, _x))
00160       _x = self
00161       buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs))
00162       _x = self.goal_id.id
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.goal.pointcloud.header.seq, _x.goal.pointcloud.header.stamp.secs, _x.goal.pointcloud.header.stamp.nsecs))
00170       _x = self.goal.pointcloud.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_2I.pack(_x.goal.pointcloud.height, _x.goal.pointcloud.width))
00178       length = len(self.goal.pointcloud.fields)
00179       buff.write(_struct_I.pack(length))
00180       for val1 in self.goal.pointcloud.fields:
00181         _x = val1.name
00182         length = len(_x)
00183         if python3 or type(_x) == unicode:
00184           _x = _x.encode('utf-8')
00185           length = len(_x)
00186         buff.write(struct.pack('<I%ss'%length, length, _x))
00187         _x = val1
00188         buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00189       _x = self
00190       buff.write(_struct_B2I.pack(_x.goal.pointcloud.is_bigendian, _x.goal.pointcloud.point_step, _x.goal.pointcloud.row_step))
00191       _x = self.goal.pointcloud.data
00192       length = len(_x)
00193       # - if encoded as a list instead, serialize as bytes instead of string
00194       if type(_x) in [list, tuple]:
00195         buff.write(struct.pack('<I%sB'%length, length, *_x))
00196       else:
00197         buff.write(struct.pack('<I%ss'%length, length, _x))
00198       buff.write(_struct_B.pack(self.goal.pointcloud.is_dense))
00199     except struct.error as se: self._check_types(se)
00200     except TypeError as te: self._check_types(te)
00201 
00202   def deserialize(self, str):
00203     """
00204     unpack serialized message in str into this message instance
00205     :param str: byte array of serialized message, ``str``
00206     """
00207     try:
00208       if self.header is None:
00209         self.header = std_msgs.msg.Header()
00210       if self.goal_id is None:
00211         self.goal_id = actionlib_msgs.msg.GoalID()
00212       if self.goal is None:
00213         self.goal = iri_bow_object_detector.msg.GetGraspingPointGoal()
00214       end = 0
00215       _x = self
00216       start = end
00217       end += 12
00218       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00219       start = end
00220       end += 4
00221       (length,) = _struct_I.unpack(str[start:end])
00222       start = end
00223       end += length
00224       if python3:
00225         self.header.frame_id = str[start:end].decode('utf-8')
00226       else:
00227         self.header.frame_id = str[start:end]
00228       _x = self
00229       start = end
00230       end += 8
00231       (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00232       start = end
00233       end += 4
00234       (length,) = _struct_I.unpack(str[start:end])
00235       start = end
00236       end += length
00237       if python3:
00238         self.goal_id.id = str[start:end].decode('utf-8')
00239       else:
00240         self.goal_id.id = str[start:end]
00241       _x = self
00242       start = end
00243       end += 12
00244       (_x.goal.pointcloud.header.seq, _x.goal.pointcloud.header.stamp.secs, _x.goal.pointcloud.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00245       start = end
00246       end += 4
00247       (length,) = _struct_I.unpack(str[start:end])
00248       start = end
00249       end += length
00250       if python3:
00251         self.goal.pointcloud.header.frame_id = str[start:end].decode('utf-8')
00252       else:
00253         self.goal.pointcloud.header.frame_id = str[start:end]
00254       _x = self
00255       start = end
00256       end += 8
00257       (_x.goal.pointcloud.height, _x.goal.pointcloud.width,) = _struct_2I.unpack(str[start:end])
00258       start = end
00259       end += 4
00260       (length,) = _struct_I.unpack(str[start:end])
00261       self.goal.pointcloud.fields = []
00262       for i in range(0, length):
00263         val1 = sensor_msgs.msg.PointField()
00264         start = end
00265         end += 4
00266         (length,) = _struct_I.unpack(str[start:end])
00267         start = end
00268         end += length
00269         if python3:
00270           val1.name = str[start:end].decode('utf-8')
00271         else:
00272           val1.name = str[start:end]
00273         _x = val1
00274         start = end
00275         end += 9
00276         (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00277         self.goal.pointcloud.fields.append(val1)
00278       _x = self
00279       start = end
00280       end += 9
00281       (_x.goal.pointcloud.is_bigendian, _x.goal.pointcloud.point_step, _x.goal.pointcloud.row_step,) = _struct_B2I.unpack(str[start:end])
00282       self.goal.pointcloud.is_bigendian = bool(self.goal.pointcloud.is_bigendian)
00283       start = end
00284       end += 4
00285       (length,) = _struct_I.unpack(str[start:end])
00286       start = end
00287       end += length
00288       if python3:
00289         self.goal.pointcloud.data = str[start:end].decode('utf-8')
00290       else:
00291         self.goal.pointcloud.data = str[start:end]
00292       start = end
00293       end += 1
00294       (self.goal.pointcloud.is_dense,) = _struct_B.unpack(str[start:end])
00295       self.goal.pointcloud.is_dense = bool(self.goal.pointcloud.is_dense)
00296       return self
00297     except struct.error as e:
00298       raise genpy.DeserializationError(e) #most likely buffer underfill
00299 
00300 
00301   def serialize_numpy(self, buff, numpy):
00302     """
00303     serialize message with numpy array types into buffer
00304     :param buff: buffer, ``StringIO``
00305     :param numpy: numpy python module
00306     """
00307     try:
00308       _x = self
00309       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00310       _x = self.header.frame_id
00311       length = len(_x)
00312       if python3 or type(_x) == unicode:
00313         _x = _x.encode('utf-8')
00314         length = len(_x)
00315       buff.write(struct.pack('<I%ss'%length, length, _x))
00316       _x = self
00317       buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs))
00318       _x = self.goal_id.id
00319       length = len(_x)
00320       if python3 or type(_x) == unicode:
00321         _x = _x.encode('utf-8')
00322         length = len(_x)
00323       buff.write(struct.pack('<I%ss'%length, length, _x))
00324       _x = self
00325       buff.write(_struct_3I.pack(_x.goal.pointcloud.header.seq, _x.goal.pointcloud.header.stamp.secs, _x.goal.pointcloud.header.stamp.nsecs))
00326       _x = self.goal.pointcloud.header.frame_id
00327       length = len(_x)
00328       if python3 or type(_x) == unicode:
00329         _x = _x.encode('utf-8')
00330         length = len(_x)
00331       buff.write(struct.pack('<I%ss'%length, length, _x))
00332       _x = self
00333       buff.write(_struct_2I.pack(_x.goal.pointcloud.height, _x.goal.pointcloud.width))
00334       length = len(self.goal.pointcloud.fields)
00335       buff.write(_struct_I.pack(length))
00336       for val1 in self.goal.pointcloud.fields:
00337         _x = val1.name
00338         length = len(_x)
00339         if python3 or type(_x) == unicode:
00340           _x = _x.encode('utf-8')
00341           length = len(_x)
00342         buff.write(struct.pack('<I%ss'%length, length, _x))
00343         _x = val1
00344         buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00345       _x = self
00346       buff.write(_struct_B2I.pack(_x.goal.pointcloud.is_bigendian, _x.goal.pointcloud.point_step, _x.goal.pointcloud.row_step))
00347       _x = self.goal.pointcloud.data
00348       length = len(_x)
00349       # - if encoded as a list instead, serialize as bytes instead of string
00350       if type(_x) in [list, tuple]:
00351         buff.write(struct.pack('<I%sB'%length, length, *_x))
00352       else:
00353         buff.write(struct.pack('<I%ss'%length, length, _x))
00354       buff.write(_struct_B.pack(self.goal.pointcloud.is_dense))
00355     except struct.error as se: self._check_types(se)
00356     except TypeError as te: self._check_types(te)
00357 
00358   def deserialize_numpy(self, str, numpy):
00359     """
00360     unpack serialized message in str into this message instance using numpy for array types
00361     :param str: byte array of serialized message, ``str``
00362     :param numpy: numpy python module
00363     """
00364     try:
00365       if self.header is None:
00366         self.header = std_msgs.msg.Header()
00367       if self.goal_id is None:
00368         self.goal_id = actionlib_msgs.msg.GoalID()
00369       if self.goal is None:
00370         self.goal = iri_bow_object_detector.msg.GetGraspingPointGoal()
00371       end = 0
00372       _x = self
00373       start = end
00374       end += 12
00375       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00376       start = end
00377       end += 4
00378       (length,) = _struct_I.unpack(str[start:end])
00379       start = end
00380       end += length
00381       if python3:
00382         self.header.frame_id = str[start:end].decode('utf-8')
00383       else:
00384         self.header.frame_id = str[start:end]
00385       _x = self
00386       start = end
00387       end += 8
00388       (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00389       start = end
00390       end += 4
00391       (length,) = _struct_I.unpack(str[start:end])
00392       start = end
00393       end += length
00394       if python3:
00395         self.goal_id.id = str[start:end].decode('utf-8')
00396       else:
00397         self.goal_id.id = str[start:end]
00398       _x = self
00399       start = end
00400       end += 12
00401       (_x.goal.pointcloud.header.seq, _x.goal.pointcloud.header.stamp.secs, _x.goal.pointcloud.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00402       start = end
00403       end += 4
00404       (length,) = _struct_I.unpack(str[start:end])
00405       start = end
00406       end += length
00407       if python3:
00408         self.goal.pointcloud.header.frame_id = str[start:end].decode('utf-8')
00409       else:
00410         self.goal.pointcloud.header.frame_id = str[start:end]
00411       _x = self
00412       start = end
00413       end += 8
00414       (_x.goal.pointcloud.height, _x.goal.pointcloud.width,) = _struct_2I.unpack(str[start:end])
00415       start = end
00416       end += 4
00417       (length,) = _struct_I.unpack(str[start:end])
00418       self.goal.pointcloud.fields = []
00419       for i in range(0, length):
00420         val1 = sensor_msgs.msg.PointField()
00421         start = end
00422         end += 4
00423         (length,) = _struct_I.unpack(str[start:end])
00424         start = end
00425         end += length
00426         if python3:
00427           val1.name = str[start:end].decode('utf-8')
00428         else:
00429           val1.name = str[start:end]
00430         _x = val1
00431         start = end
00432         end += 9
00433         (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00434         self.goal.pointcloud.fields.append(val1)
00435       _x = self
00436       start = end
00437       end += 9
00438       (_x.goal.pointcloud.is_bigendian, _x.goal.pointcloud.point_step, _x.goal.pointcloud.row_step,) = _struct_B2I.unpack(str[start:end])
00439       self.goal.pointcloud.is_bigendian = bool(self.goal.pointcloud.is_bigendian)
00440       start = end
00441       end += 4
00442       (length,) = _struct_I.unpack(str[start:end])
00443       start = end
00444       end += length
00445       if python3:
00446         self.goal.pointcloud.data = str[start:end].decode('utf-8')
00447       else:
00448         self.goal.pointcloud.data = str[start:end]
00449       start = end
00450       end += 1
00451       (self.goal.pointcloud.is_dense,) = _struct_B.unpack(str[start:end])
00452       self.goal.pointcloud.is_dense = bool(self.goal.pointcloud.is_dense)
00453       return self
00454     except struct.error as e:
00455       raise genpy.DeserializationError(e) #most likely buffer underfill
00456 
00457 _struct_I = genpy.struct_I
00458 _struct_IBI = struct.Struct("<IBI")
00459 _struct_3I = struct.Struct("<3I")
00460 _struct_B = struct.Struct("<B")
00461 _struct_2I = struct.Struct("<2I")
00462 _struct_B2I = struct.Struct("<B2I")


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