_DetectGraspableObjects.py
Go to the documentation of this file.
00001 """autogenerated by genpy from tidyup_msgs/DetectGraspableObjectsRequest.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006 
00007 
00008 class DetectGraspableObjectsRequest(genpy.Message):
00009   _md5sum = "9cbec46ace647bea411f8eab6504a508"
00010   _type = "tidyup_msgs/DetectGraspableObjectsRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """
00013 string static_object
00014 
00015 """
00016   __slots__ = ['static_object']
00017   _slot_types = ['string']
00018 
00019   def __init__(self, *args, **kwds):
00020     """
00021     Constructor. Any message fields that are implicitly/explicitly
00022     set to None will be assigned a default value. The recommend
00023     use is keyword arguments as this is more robust to future message
00024     changes.  You cannot mix in-order arguments and keyword arguments.
00025 
00026     The available fields are:
00027        static_object
00028 
00029     :param args: complete set of field values, in .msg order
00030     :param kwds: use keyword arguments corresponding to message field names
00031     to set specific fields.
00032     """
00033     if args or kwds:
00034       super(DetectGraspableObjectsRequest, self).__init__(*args, **kwds)
00035       #message fields cannot be None, assign default values for those that are
00036       if self.static_object is None:
00037         self.static_object = ''
00038     else:
00039       self.static_object = ''
00040 
00041   def _get_types(self):
00042     """
00043     internal API method
00044     """
00045     return self._slot_types
00046 
00047   def serialize(self, buff):
00048     """
00049     serialize message into buffer
00050     :param buff: buffer, ``StringIO``
00051     """
00052     try:
00053       _x = self.static_object
00054       length = len(_x)
00055       if python3 or type(_x) == unicode:
00056         _x = _x.encode('utf-8')
00057         length = len(_x)
00058       buff.write(struct.pack('<I%ss'%length, length, _x))
00059     except struct.error as se: self._check_types(se)
00060     except TypeError as te: self._check_types(te)
00061 
00062   def deserialize(self, str):
00063     """
00064     unpack serialized message in str into this message instance
00065     :param str: byte array of serialized message, ``str``
00066     """
00067     try:
00068       end = 0
00069       start = end
00070       end += 4
00071       (length,) = _struct_I.unpack(str[start:end])
00072       start = end
00073       end += length
00074       if python3:
00075         self.static_object = str[start:end].decode('utf-8')
00076       else:
00077         self.static_object = str[start:end]
00078       return self
00079     except struct.error as e:
00080       raise genpy.DeserializationError(e) #most likely buffer underfill
00081 
00082 
00083   def serialize_numpy(self, buff, numpy):
00084     """
00085     serialize message with numpy array types into buffer
00086     :param buff: buffer, ``StringIO``
00087     :param numpy: numpy python module
00088     """
00089     try:
00090       _x = self.static_object
00091       length = len(_x)
00092       if python3 or type(_x) == unicode:
00093         _x = _x.encode('utf-8')
00094         length = len(_x)
00095       buff.write(struct.pack('<I%ss'%length, length, _x))
00096     except struct.error as se: self._check_types(se)
00097     except TypeError as te: self._check_types(te)
00098 
00099   def deserialize_numpy(self, str, numpy):
00100     """
00101     unpack serialized message in str into this message instance using numpy for array types
00102     :param str: byte array of serialized message, ``str``
00103     :param numpy: numpy python module
00104     """
00105     try:
00106       end = 0
00107       start = end
00108       end += 4
00109       (length,) = _struct_I.unpack(str[start:end])
00110       start = end
00111       end += length
00112       if python3:
00113         self.static_object = str[start:end].decode('utf-8')
00114       else:
00115         self.static_object = str[start:end]
00116       return self
00117     except struct.error as e:
00118       raise genpy.DeserializationError(e) #most likely buffer underfill
00119 
00120 _struct_I = genpy.struct_I
00121 """autogenerated by genpy from tidyup_msgs/DetectGraspableObjectsResponse.msg. Do not edit."""
00122 import sys
00123 python3 = True if sys.hexversion > 0x03000000 else False
00124 import genpy
00125 import struct
00126 
00127 import tidyup_msgs.msg
00128 import geometry_msgs.msg
00129 import std_msgs.msg
00130 
00131 class DetectGraspableObjectsResponse(genpy.Message):
00132   _md5sum = "acbf1200f36a3bead1e66f5d85b89b55"
00133   _type = "tidyup_msgs/DetectGraspableObjectsResponse"
00134   _has_header = False #flag to mark the presence of a Header object
00135   _full_text = """tidyup_msgs/GraspableObject[] objects
00136 tidyup_msgs/WipeGoal[] wipe_goals
00137 
00138 
00139 ================================================================================
00140 MSG: tidyup_msgs/GraspableObject
00141 # an object that can be grasped in principle
00142 string name
00143 geometry_msgs/PoseStamped pose
00144 bool reachable_left_arm      # if true, the object is reachable now to be grasped with the left_arm
00145 bool reachable_right_arm
00146 
00147 ================================================================================
00148 MSG: geometry_msgs/PoseStamped
00149 # A Pose with reference coordinate frame and timestamp
00150 Header header
00151 Pose pose
00152 
00153 ================================================================================
00154 MSG: std_msgs/Header
00155 # Standard metadata for higher-level stamped data types.
00156 # This is generally used to communicate timestamped data 
00157 # in a particular coordinate frame.
00158 # 
00159 # sequence ID: consecutively increasing ID 
00160 uint32 seq
00161 #Two-integer timestamp that is expressed as:
00162 # * stamp.secs: seconds (stamp_secs) since epoch
00163 # * stamp.nsecs: nanoseconds since stamp_secs
00164 # time-handling sugar is provided by the client library
00165 time stamp
00166 #Frame this data is associated with
00167 # 0: no frame
00168 # 1: global frame
00169 string frame_id
00170 
00171 ================================================================================
00172 MSG: geometry_msgs/Pose
00173 # A representation of pose in free space, composed of postion and orientation. 
00174 Point position
00175 Quaternion orientation
00176 
00177 ================================================================================
00178 MSG: geometry_msgs/Point
00179 # This contains the position of a point in free space
00180 float64 x
00181 float64 y
00182 float64 z
00183 
00184 ================================================================================
00185 MSG: geometry_msgs/Quaternion
00186 # This represents an orientation in free space in quaternion form.
00187 
00188 float64 x
00189 float64 y
00190 float64 z
00191 float64 w
00192 
00193 ================================================================================
00194 MSG: tidyup_msgs/WipeGoal
00195 string name
00196 float64 box_size
00197 geometry_msgs/PointStamped spot
00198 
00199 ================================================================================
00200 MSG: geometry_msgs/PointStamped
00201 # This represents a Point with reference coordinate frame and timestamp
00202 Header header
00203 Point point
00204 
00205 """
00206   __slots__ = ['objects','wipe_goals']
00207   _slot_types = ['tidyup_msgs/GraspableObject[]','tidyup_msgs/WipeGoal[]']
00208 
00209   def __init__(self, *args, **kwds):
00210     """
00211     Constructor. Any message fields that are implicitly/explicitly
00212     set to None will be assigned a default value. The recommend
00213     use is keyword arguments as this is more robust to future message
00214     changes.  You cannot mix in-order arguments and keyword arguments.
00215 
00216     The available fields are:
00217        objects,wipe_goals
00218 
00219     :param args: complete set of field values, in .msg order
00220     :param kwds: use keyword arguments corresponding to message field names
00221     to set specific fields.
00222     """
00223     if args or kwds:
00224       super(DetectGraspableObjectsResponse, self).__init__(*args, **kwds)
00225       #message fields cannot be None, assign default values for those that are
00226       if self.objects is None:
00227         self.objects = []
00228       if self.wipe_goals is None:
00229         self.wipe_goals = []
00230     else:
00231       self.objects = []
00232       self.wipe_goals = []
00233 
00234   def _get_types(self):
00235     """
00236     internal API method
00237     """
00238     return self._slot_types
00239 
00240   def serialize(self, buff):
00241     """
00242     serialize message into buffer
00243     :param buff: buffer, ``StringIO``
00244     """
00245     try:
00246       length = len(self.objects)
00247       buff.write(_struct_I.pack(length))
00248       for val1 in self.objects:
00249         _x = val1.name
00250         length = len(_x)
00251         if python3 or type(_x) == unicode:
00252           _x = _x.encode('utf-8')
00253           length = len(_x)
00254         buff.write(struct.pack('<I%ss'%length, length, _x))
00255         _v1 = val1.pose
00256         _v2 = _v1.header
00257         buff.write(_struct_I.pack(_v2.seq))
00258         _v3 = _v2.stamp
00259         _x = _v3
00260         buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00261         _x = _v2.frame_id
00262         length = len(_x)
00263         if python3 or type(_x) == unicode:
00264           _x = _x.encode('utf-8')
00265           length = len(_x)
00266         buff.write(struct.pack('<I%ss'%length, length, _x))
00267         _v4 = _v1.pose
00268         _v5 = _v4.position
00269         _x = _v5
00270         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00271         _v6 = _v4.orientation
00272         _x = _v6
00273         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00274         _x = val1
00275         buff.write(_struct_2B.pack(_x.reachable_left_arm, _x.reachable_right_arm))
00276       length = len(self.wipe_goals)
00277       buff.write(_struct_I.pack(length))
00278       for val1 in self.wipe_goals:
00279         _x = val1.name
00280         length = len(_x)
00281         if python3 or type(_x) == unicode:
00282           _x = _x.encode('utf-8')
00283           length = len(_x)
00284         buff.write(struct.pack('<I%ss'%length, length, _x))
00285         buff.write(_struct_d.pack(val1.box_size))
00286         _v7 = val1.spot
00287         _v8 = _v7.header
00288         buff.write(_struct_I.pack(_v8.seq))
00289         _v9 = _v8.stamp
00290         _x = _v9
00291         buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00292         _x = _v8.frame_id
00293         length = len(_x)
00294         if python3 or type(_x) == unicode:
00295           _x = _x.encode('utf-8')
00296           length = len(_x)
00297         buff.write(struct.pack('<I%ss'%length, length, _x))
00298         _v10 = _v7.point
00299         _x = _v10
00300         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00301     except struct.error as se: self._check_types(se)
00302     except TypeError as te: self._check_types(te)
00303 
00304   def deserialize(self, str):
00305     """
00306     unpack serialized message in str into this message instance
00307     :param str: byte array of serialized message, ``str``
00308     """
00309     try:
00310       if self.objects is None:
00311         self.objects = None
00312       if self.wipe_goals is None:
00313         self.wipe_goals = None
00314       end = 0
00315       start = end
00316       end += 4
00317       (length,) = _struct_I.unpack(str[start:end])
00318       self.objects = []
00319       for i in range(0, length):
00320         val1 = tidyup_msgs.msg.GraspableObject()
00321         start = end
00322         end += 4
00323         (length,) = _struct_I.unpack(str[start:end])
00324         start = end
00325         end += length
00326         if python3:
00327           val1.name = str[start:end].decode('utf-8')
00328         else:
00329           val1.name = str[start:end]
00330         _v11 = val1.pose
00331         _v12 = _v11.header
00332         start = end
00333         end += 4
00334         (_v12.seq,) = _struct_I.unpack(str[start:end])
00335         _v13 = _v12.stamp
00336         _x = _v13
00337         start = end
00338         end += 8
00339         (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00340         start = end
00341         end += 4
00342         (length,) = _struct_I.unpack(str[start:end])
00343         start = end
00344         end += length
00345         if python3:
00346           _v12.frame_id = str[start:end].decode('utf-8')
00347         else:
00348           _v12.frame_id = str[start:end]
00349         _v14 = _v11.pose
00350         _v15 = _v14.position
00351         _x = _v15
00352         start = end
00353         end += 24
00354         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00355         _v16 = _v14.orientation
00356         _x = _v16
00357         start = end
00358         end += 32
00359         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00360         _x = val1
00361         start = end
00362         end += 2
00363         (_x.reachable_left_arm, _x.reachable_right_arm,) = _struct_2B.unpack(str[start:end])
00364         val1.reachable_left_arm = bool(val1.reachable_left_arm)
00365         val1.reachable_right_arm = bool(val1.reachable_right_arm)
00366         self.objects.append(val1)
00367       start = end
00368       end += 4
00369       (length,) = _struct_I.unpack(str[start:end])
00370       self.wipe_goals = []
00371       for i in range(0, length):
00372         val1 = tidyup_msgs.msg.WipeGoal()
00373         start = end
00374         end += 4
00375         (length,) = _struct_I.unpack(str[start:end])
00376         start = end
00377         end += length
00378         if python3:
00379           val1.name = str[start:end].decode('utf-8')
00380         else:
00381           val1.name = str[start:end]
00382         start = end
00383         end += 8
00384         (val1.box_size,) = _struct_d.unpack(str[start:end])
00385         _v17 = val1.spot
00386         _v18 = _v17.header
00387         start = end
00388         end += 4
00389         (_v18.seq,) = _struct_I.unpack(str[start:end])
00390         _v19 = _v18.stamp
00391         _x = _v19
00392         start = end
00393         end += 8
00394         (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00395         start = end
00396         end += 4
00397         (length,) = _struct_I.unpack(str[start:end])
00398         start = end
00399         end += length
00400         if python3:
00401           _v18.frame_id = str[start:end].decode('utf-8')
00402         else:
00403           _v18.frame_id = str[start:end]
00404         _v20 = _v17.point
00405         _x = _v20
00406         start = end
00407         end += 24
00408         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00409         self.wipe_goals.append(val1)
00410       return self
00411     except struct.error as e:
00412       raise genpy.DeserializationError(e) #most likely buffer underfill
00413 
00414 
00415   def serialize_numpy(self, buff, numpy):
00416     """
00417     serialize message with numpy array types into buffer
00418     :param buff: buffer, ``StringIO``
00419     :param numpy: numpy python module
00420     """
00421     try:
00422       length = len(self.objects)
00423       buff.write(_struct_I.pack(length))
00424       for val1 in self.objects:
00425         _x = val1.name
00426         length = len(_x)
00427         if python3 or type(_x) == unicode:
00428           _x = _x.encode('utf-8')
00429           length = len(_x)
00430         buff.write(struct.pack('<I%ss'%length, length, _x))
00431         _v21 = val1.pose
00432         _v22 = _v21.header
00433         buff.write(_struct_I.pack(_v22.seq))
00434         _v23 = _v22.stamp
00435         _x = _v23
00436         buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00437         _x = _v22.frame_id
00438         length = len(_x)
00439         if python3 or type(_x) == unicode:
00440           _x = _x.encode('utf-8')
00441           length = len(_x)
00442         buff.write(struct.pack('<I%ss'%length, length, _x))
00443         _v24 = _v21.pose
00444         _v25 = _v24.position
00445         _x = _v25
00446         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00447         _v26 = _v24.orientation
00448         _x = _v26
00449         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00450         _x = val1
00451         buff.write(_struct_2B.pack(_x.reachable_left_arm, _x.reachable_right_arm))
00452       length = len(self.wipe_goals)
00453       buff.write(_struct_I.pack(length))
00454       for val1 in self.wipe_goals:
00455         _x = val1.name
00456         length = len(_x)
00457         if python3 or type(_x) == unicode:
00458           _x = _x.encode('utf-8')
00459           length = len(_x)
00460         buff.write(struct.pack('<I%ss'%length, length, _x))
00461         buff.write(_struct_d.pack(val1.box_size))
00462         _v27 = val1.spot
00463         _v28 = _v27.header
00464         buff.write(_struct_I.pack(_v28.seq))
00465         _v29 = _v28.stamp
00466         _x = _v29
00467         buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00468         _x = _v28.frame_id
00469         length = len(_x)
00470         if python3 or type(_x) == unicode:
00471           _x = _x.encode('utf-8')
00472           length = len(_x)
00473         buff.write(struct.pack('<I%ss'%length, length, _x))
00474         _v30 = _v27.point
00475         _x = _v30
00476         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00477     except struct.error as se: self._check_types(se)
00478     except TypeError as te: self._check_types(te)
00479 
00480   def deserialize_numpy(self, str, numpy):
00481     """
00482     unpack serialized message in str into this message instance using numpy for array types
00483     :param str: byte array of serialized message, ``str``
00484     :param numpy: numpy python module
00485     """
00486     try:
00487       if self.objects is None:
00488         self.objects = None
00489       if self.wipe_goals is None:
00490         self.wipe_goals = None
00491       end = 0
00492       start = end
00493       end += 4
00494       (length,) = _struct_I.unpack(str[start:end])
00495       self.objects = []
00496       for i in range(0, length):
00497         val1 = tidyup_msgs.msg.GraspableObject()
00498         start = end
00499         end += 4
00500         (length,) = _struct_I.unpack(str[start:end])
00501         start = end
00502         end += length
00503         if python3:
00504           val1.name = str[start:end].decode('utf-8')
00505         else:
00506           val1.name = str[start:end]
00507         _v31 = val1.pose
00508         _v32 = _v31.header
00509         start = end
00510         end += 4
00511         (_v32.seq,) = _struct_I.unpack(str[start:end])
00512         _v33 = _v32.stamp
00513         _x = _v33
00514         start = end
00515         end += 8
00516         (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00517         start = end
00518         end += 4
00519         (length,) = _struct_I.unpack(str[start:end])
00520         start = end
00521         end += length
00522         if python3:
00523           _v32.frame_id = str[start:end].decode('utf-8')
00524         else:
00525           _v32.frame_id = str[start:end]
00526         _v34 = _v31.pose
00527         _v35 = _v34.position
00528         _x = _v35
00529         start = end
00530         end += 24
00531         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00532         _v36 = _v34.orientation
00533         _x = _v36
00534         start = end
00535         end += 32
00536         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00537         _x = val1
00538         start = end
00539         end += 2
00540         (_x.reachable_left_arm, _x.reachable_right_arm,) = _struct_2B.unpack(str[start:end])
00541         val1.reachable_left_arm = bool(val1.reachable_left_arm)
00542         val1.reachable_right_arm = bool(val1.reachable_right_arm)
00543         self.objects.append(val1)
00544       start = end
00545       end += 4
00546       (length,) = _struct_I.unpack(str[start:end])
00547       self.wipe_goals = []
00548       for i in range(0, length):
00549         val1 = tidyup_msgs.msg.WipeGoal()
00550         start = end
00551         end += 4
00552         (length,) = _struct_I.unpack(str[start:end])
00553         start = end
00554         end += length
00555         if python3:
00556           val1.name = str[start:end].decode('utf-8')
00557         else:
00558           val1.name = str[start:end]
00559         start = end
00560         end += 8
00561         (val1.box_size,) = _struct_d.unpack(str[start:end])
00562         _v37 = val1.spot
00563         _v38 = _v37.header
00564         start = end
00565         end += 4
00566         (_v38.seq,) = _struct_I.unpack(str[start:end])
00567         _v39 = _v38.stamp
00568         _x = _v39
00569         start = end
00570         end += 8
00571         (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00572         start = end
00573         end += 4
00574         (length,) = _struct_I.unpack(str[start:end])
00575         start = end
00576         end += length
00577         if python3:
00578           _v38.frame_id = str[start:end].decode('utf-8')
00579         else:
00580           _v38.frame_id = str[start:end]
00581         _v40 = _v37.point
00582         _x = _v40
00583         start = end
00584         end += 24
00585         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00586         self.wipe_goals.append(val1)
00587       return self
00588     except struct.error as e:
00589       raise genpy.DeserializationError(e) #most likely buffer underfill
00590 
00591 _struct_I = genpy.struct_I
00592 _struct_d = struct.Struct("<d")
00593 _struct_2B = struct.Struct("<2B")
00594 _struct_4d = struct.Struct("<4d")
00595 _struct_2I = struct.Struct("<2I")
00596 _struct_3d = struct.Struct("<3d")
00597 class DetectGraspableObjects(object):
00598   _type          = 'tidyup_msgs/DetectGraspableObjects'
00599   _md5sum = '89c1e67f607877db23bbcb1be5f85aaf'
00600   _request_class  = DetectGraspableObjectsRequest
00601   _response_class = DetectGraspableObjectsResponse
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends


tidyup_msgs
Author(s): Maintained by Christian Dornhege
autogenerated on Wed Dec 26 2012 15:47:07