_GettfMessage.py
Go to the documentation of this file.
00001 """autogenerated by genpy from pr2_clutter_helper/GettfMessageRequest.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 GettfMessageRequest(genpy.Message):
00009   _md5sum = "1fc3395bd7ef8ea8266cfd8605a3b789"
00010   _type = "pr2_clutter_helper/GettfMessageRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """
00013 
00014 
00015 string topic_name
00016 string msg_type
00017 string child_frame_id
00018 string frame_id
00019 
00020 """
00021   __slots__ = ['topic_name','msg_type','child_frame_id','frame_id']
00022   _slot_types = ['string','string','string','string']
00023 
00024   def __init__(self, *args, **kwds):
00025     """
00026     Constructor. Any message fields that are implicitly/explicitly
00027     set to None will be assigned a default value. The recommend
00028     use is keyword arguments as this is more robust to future message
00029     changes.  You cannot mix in-order arguments and keyword arguments.
00030 
00031     The available fields are:
00032        topic_name,msg_type,child_frame_id,frame_id
00033 
00034     :param args: complete set of field values, in .msg order
00035     :param kwds: use keyword arguments corresponding to message field names
00036     to set specific fields.
00037     """
00038     if args or kwds:
00039       super(GettfMessageRequest, self).__init__(*args, **kwds)
00040       #message fields cannot be None, assign default values for those that are
00041       if self.topic_name is None:
00042         self.topic_name = ''
00043       if self.msg_type is None:
00044         self.msg_type = ''
00045       if self.child_frame_id is None:
00046         self.child_frame_id = ''
00047       if self.frame_id is None:
00048         self.frame_id = ''
00049     else:
00050       self.topic_name = ''
00051       self.msg_type = ''
00052       self.child_frame_id = ''
00053       self.frame_id = ''
00054 
00055   def _get_types(self):
00056     """
00057     internal API method
00058     """
00059     return self._slot_types
00060 
00061   def serialize(self, buff):
00062     """
00063     serialize message into buffer
00064     :param buff: buffer, ``StringIO``
00065     """
00066     try:
00067       _x = self.topic_name
00068       length = len(_x)
00069       if python3 or type(_x) == unicode:
00070         _x = _x.encode('utf-8')
00071         length = len(_x)
00072       buff.write(struct.pack('<I%ss'%length, length, _x))
00073       _x = self.msg_type
00074       length = len(_x)
00075       if python3 or type(_x) == unicode:
00076         _x = _x.encode('utf-8')
00077         length = len(_x)
00078       buff.write(struct.pack('<I%ss'%length, length, _x))
00079       _x = self.child_frame_id
00080       length = len(_x)
00081       if python3 or type(_x) == unicode:
00082         _x = _x.encode('utf-8')
00083         length = len(_x)
00084       buff.write(struct.pack('<I%ss'%length, length, _x))
00085       _x = self.frame_id
00086       length = len(_x)
00087       if python3 or type(_x) == unicode:
00088         _x = _x.encode('utf-8')
00089         length = len(_x)
00090       buff.write(struct.pack('<I%ss'%length, length, _x))
00091     except struct.error as se: self._check_types(se)
00092     except TypeError as te: self._check_types(te)
00093 
00094   def deserialize(self, str):
00095     """
00096     unpack serialized message in str into this message instance
00097     :param str: byte array of serialized message, ``str``
00098     """
00099     try:
00100       end = 0
00101       start = end
00102       end += 4
00103       (length,) = _struct_I.unpack(str[start:end])
00104       start = end
00105       end += length
00106       if python3:
00107         self.topic_name = str[start:end].decode('utf-8')
00108       else:
00109         self.topic_name = str[start:end]
00110       start = end
00111       end += 4
00112       (length,) = _struct_I.unpack(str[start:end])
00113       start = end
00114       end += length
00115       if python3:
00116         self.msg_type = str[start:end].decode('utf-8')
00117       else:
00118         self.msg_type = str[start:end]
00119       start = end
00120       end += 4
00121       (length,) = _struct_I.unpack(str[start:end])
00122       start = end
00123       end += length
00124       if python3:
00125         self.child_frame_id = str[start:end].decode('utf-8')
00126       else:
00127         self.child_frame_id = str[start:end]
00128       start = end
00129       end += 4
00130       (length,) = _struct_I.unpack(str[start:end])
00131       start = end
00132       end += length
00133       if python3:
00134         self.frame_id = str[start:end].decode('utf-8')
00135       else:
00136         self.frame_id = str[start:end]
00137       return self
00138     except struct.error as e:
00139       raise genpy.DeserializationError(e) #most likely buffer underfill
00140 
00141 
00142   def serialize_numpy(self, buff, numpy):
00143     """
00144     serialize message with numpy array types into buffer
00145     :param buff: buffer, ``StringIO``
00146     :param numpy: numpy python module
00147     """
00148     try:
00149       _x = self.topic_name
00150       length = len(_x)
00151       if python3 or type(_x) == unicode:
00152         _x = _x.encode('utf-8')
00153         length = len(_x)
00154       buff.write(struct.pack('<I%ss'%length, length, _x))
00155       _x = self.msg_type
00156       length = len(_x)
00157       if python3 or type(_x) == unicode:
00158         _x = _x.encode('utf-8')
00159         length = len(_x)
00160       buff.write(struct.pack('<I%ss'%length, length, _x))
00161       _x = self.child_frame_id
00162       length = len(_x)
00163       if python3 or type(_x) == unicode:
00164         _x = _x.encode('utf-8')
00165         length = len(_x)
00166       buff.write(struct.pack('<I%ss'%length, length, _x))
00167       _x = self.frame_id
00168       length = len(_x)
00169       if python3 or type(_x) == unicode:
00170         _x = _x.encode('utf-8')
00171         length = len(_x)
00172       buff.write(struct.pack('<I%ss'%length, length, _x))
00173     except struct.error as se: self._check_types(se)
00174     except TypeError as te: self._check_types(te)
00175 
00176   def deserialize_numpy(self, str, numpy):
00177     """
00178     unpack serialized message in str into this message instance using numpy for array types
00179     :param str: byte array of serialized message, ``str``
00180     :param numpy: numpy python module
00181     """
00182     try:
00183       end = 0
00184       start = end
00185       end += 4
00186       (length,) = _struct_I.unpack(str[start:end])
00187       start = end
00188       end += length
00189       if python3:
00190         self.topic_name = str[start:end].decode('utf-8')
00191       else:
00192         self.topic_name = str[start:end]
00193       start = end
00194       end += 4
00195       (length,) = _struct_I.unpack(str[start:end])
00196       start = end
00197       end += length
00198       if python3:
00199         self.msg_type = str[start:end].decode('utf-8')
00200       else:
00201         self.msg_type = str[start:end]
00202       start = end
00203       end += 4
00204       (length,) = _struct_I.unpack(str[start:end])
00205       start = end
00206       end += length
00207       if python3:
00208         self.child_frame_id = str[start:end].decode('utf-8')
00209       else:
00210         self.child_frame_id = str[start:end]
00211       start = end
00212       end += 4
00213       (length,) = _struct_I.unpack(str[start:end])
00214       start = end
00215       end += length
00216       if python3:
00217         self.frame_id = str[start:end].decode('utf-8')
00218       else:
00219         self.frame_id = str[start:end]
00220       return self
00221     except struct.error as e:
00222       raise genpy.DeserializationError(e) #most likely buffer underfill
00223 
00224 _struct_I = genpy.struct_I
00225 """autogenerated by genpy from pr2_clutter_helper/GettfMessageResponse.msg. Do not edit."""
00226 import sys
00227 python3 = True if sys.hexversion > 0x03000000 else False
00228 import genpy
00229 import struct
00230 
00231 import std_msgs.msg
00232 import geometry_msgs.msg
00233 import tf.msg
00234 
00235 class GettfMessageResponse(genpy.Message):
00236   _md5sum = "f42aae93f48668afc6805e2a9215f6e1"
00237   _type = "pr2_clutter_helper/GettfMessageResponse"
00238   _has_header = False #flag to mark the presence of a Header object
00239   _full_text = """tf/tfMessage transform
00240 
00241 
00242 ================================================================================
00243 MSG: tf/tfMessage
00244 geometry_msgs/TransformStamped[] transforms
00245 
00246 ================================================================================
00247 MSG: geometry_msgs/TransformStamped
00248 # This expresses a transform from coordinate frame header.frame_id
00249 # to the coordinate frame child_frame_id
00250 #
00251 # This message is mostly used by the 
00252 # <a href="http://www.ros.org/wiki/tf">tf</a> package. 
00253 # See it's documentation for more information.
00254 
00255 Header header
00256 string child_frame_id # the frame id of the child frame
00257 Transform transform
00258 
00259 ================================================================================
00260 MSG: std_msgs/Header
00261 # Standard metadata for higher-level stamped data types.
00262 # This is generally used to communicate timestamped data 
00263 # in a particular coordinate frame.
00264 # 
00265 # sequence ID: consecutively increasing ID 
00266 uint32 seq
00267 #Two-integer timestamp that is expressed as:
00268 # * stamp.secs: seconds (stamp_secs) since epoch
00269 # * stamp.nsecs: nanoseconds since stamp_secs
00270 # time-handling sugar is provided by the client library
00271 time stamp
00272 #Frame this data is associated with
00273 # 0: no frame
00274 # 1: global frame
00275 string frame_id
00276 
00277 ================================================================================
00278 MSG: geometry_msgs/Transform
00279 # This represents the transform between two coordinate frames in free space.
00280 
00281 Vector3 translation
00282 Quaternion rotation
00283 
00284 ================================================================================
00285 MSG: geometry_msgs/Vector3
00286 # This represents a vector in free space. 
00287 
00288 float64 x
00289 float64 y
00290 float64 z
00291 ================================================================================
00292 MSG: geometry_msgs/Quaternion
00293 # This represents an orientation in free space in quaternion form.
00294 
00295 float64 x
00296 float64 y
00297 float64 z
00298 float64 w
00299 
00300 """
00301   __slots__ = ['transform']
00302   _slot_types = ['tf/tfMessage']
00303 
00304   def __init__(self, *args, **kwds):
00305     """
00306     Constructor. Any message fields that are implicitly/explicitly
00307     set to None will be assigned a default value. The recommend
00308     use is keyword arguments as this is more robust to future message
00309     changes.  You cannot mix in-order arguments and keyword arguments.
00310 
00311     The available fields are:
00312        transform
00313 
00314     :param args: complete set of field values, in .msg order
00315     :param kwds: use keyword arguments corresponding to message field names
00316     to set specific fields.
00317     """
00318     if args or kwds:
00319       super(GettfMessageResponse, self).__init__(*args, **kwds)
00320       #message fields cannot be None, assign default values for those that are
00321       if self.transform is None:
00322         self.transform = tf.msg.tfMessage()
00323     else:
00324       self.transform = tf.msg.tfMessage()
00325 
00326   def _get_types(self):
00327     """
00328     internal API method
00329     """
00330     return self._slot_types
00331 
00332   def serialize(self, buff):
00333     """
00334     serialize message into buffer
00335     :param buff: buffer, ``StringIO``
00336     """
00337     try:
00338       length = len(self.transform.transforms)
00339       buff.write(_struct_I.pack(length))
00340       for val1 in self.transform.transforms:
00341         _v1 = val1.header
00342         buff.write(_struct_I.pack(_v1.seq))
00343         _v2 = _v1.stamp
00344         _x = _v2
00345         buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00346         _x = _v1.frame_id
00347         length = len(_x)
00348         if python3 or type(_x) == unicode:
00349           _x = _x.encode('utf-8')
00350           length = len(_x)
00351         buff.write(struct.pack('<I%ss'%length, length, _x))
00352         _x = val1.child_frame_id
00353         length = len(_x)
00354         if python3 or type(_x) == unicode:
00355           _x = _x.encode('utf-8')
00356           length = len(_x)
00357         buff.write(struct.pack('<I%ss'%length, length, _x))
00358         _v3 = val1.transform
00359         _v4 = _v3.translation
00360         _x = _v4
00361         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00362         _v5 = _v3.rotation
00363         _x = _v5
00364         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00365     except struct.error as se: self._check_types(se)
00366     except TypeError as te: self._check_types(te)
00367 
00368   def deserialize(self, str):
00369     """
00370     unpack serialized message in str into this message instance
00371     :param str: byte array of serialized message, ``str``
00372     """
00373     try:
00374       if self.transform is None:
00375         self.transform = tf.msg.tfMessage()
00376       end = 0
00377       start = end
00378       end += 4
00379       (length,) = _struct_I.unpack(str[start:end])
00380       self.transform.transforms = []
00381       for i in range(0, length):
00382         val1 = geometry_msgs.msg.TransformStamped()
00383         _v6 = val1.header
00384         start = end
00385         end += 4
00386         (_v6.seq,) = _struct_I.unpack(str[start:end])
00387         _v7 = _v6.stamp
00388         _x = _v7
00389         start = end
00390         end += 8
00391         (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00392         start = end
00393         end += 4
00394         (length,) = _struct_I.unpack(str[start:end])
00395         start = end
00396         end += length
00397         if python3:
00398           _v6.frame_id = str[start:end].decode('utf-8')
00399         else:
00400           _v6.frame_id = str[start:end]
00401         start = end
00402         end += 4
00403         (length,) = _struct_I.unpack(str[start:end])
00404         start = end
00405         end += length
00406         if python3:
00407           val1.child_frame_id = str[start:end].decode('utf-8')
00408         else:
00409           val1.child_frame_id = str[start:end]
00410         _v8 = val1.transform
00411         _v9 = _v8.translation
00412         _x = _v9
00413         start = end
00414         end += 24
00415         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00416         _v10 = _v8.rotation
00417         _x = _v10
00418         start = end
00419         end += 32
00420         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00421         self.transform.transforms.append(val1)
00422       return self
00423     except struct.error as e:
00424       raise genpy.DeserializationError(e) #most likely buffer underfill
00425 
00426 
00427   def serialize_numpy(self, buff, numpy):
00428     """
00429     serialize message with numpy array types into buffer
00430     :param buff: buffer, ``StringIO``
00431     :param numpy: numpy python module
00432     """
00433     try:
00434       length = len(self.transform.transforms)
00435       buff.write(_struct_I.pack(length))
00436       for val1 in self.transform.transforms:
00437         _v11 = val1.header
00438         buff.write(_struct_I.pack(_v11.seq))
00439         _v12 = _v11.stamp
00440         _x = _v12
00441         buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00442         _x = _v11.frame_id
00443         length = len(_x)
00444         if python3 or type(_x) == unicode:
00445           _x = _x.encode('utf-8')
00446           length = len(_x)
00447         buff.write(struct.pack('<I%ss'%length, length, _x))
00448         _x = val1.child_frame_id
00449         length = len(_x)
00450         if python3 or type(_x) == unicode:
00451           _x = _x.encode('utf-8')
00452           length = len(_x)
00453         buff.write(struct.pack('<I%ss'%length, length, _x))
00454         _v13 = val1.transform
00455         _v14 = _v13.translation
00456         _x = _v14
00457         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00458         _v15 = _v13.rotation
00459         _x = _v15
00460         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00461     except struct.error as se: self._check_types(se)
00462     except TypeError as te: self._check_types(te)
00463 
00464   def deserialize_numpy(self, str, numpy):
00465     """
00466     unpack serialized message in str into this message instance using numpy for array types
00467     :param str: byte array of serialized message, ``str``
00468     :param numpy: numpy python module
00469     """
00470     try:
00471       if self.transform is None:
00472         self.transform = tf.msg.tfMessage()
00473       end = 0
00474       start = end
00475       end += 4
00476       (length,) = _struct_I.unpack(str[start:end])
00477       self.transform.transforms = []
00478       for i in range(0, length):
00479         val1 = geometry_msgs.msg.TransformStamped()
00480         _v16 = val1.header
00481         start = end
00482         end += 4
00483         (_v16.seq,) = _struct_I.unpack(str[start:end])
00484         _v17 = _v16.stamp
00485         _x = _v17
00486         start = end
00487         end += 8
00488         (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00489         start = end
00490         end += 4
00491         (length,) = _struct_I.unpack(str[start:end])
00492         start = end
00493         end += length
00494         if python3:
00495           _v16.frame_id = str[start:end].decode('utf-8')
00496         else:
00497           _v16.frame_id = str[start:end]
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.child_frame_id = str[start:end].decode('utf-8')
00505         else:
00506           val1.child_frame_id = str[start:end]
00507         _v18 = val1.transform
00508         _v19 = _v18.translation
00509         _x = _v19
00510         start = end
00511         end += 24
00512         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00513         _v20 = _v18.rotation
00514         _x = _v20
00515         start = end
00516         end += 32
00517         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00518         self.transform.transforms.append(val1)
00519       return self
00520     except struct.error as e:
00521       raise genpy.DeserializationError(e) #most likely buffer underfill
00522 
00523 _struct_I = genpy.struct_I
00524 _struct_4d = struct.Struct("<4d")
00525 _struct_2I = struct.Struct("<2I")
00526 _struct_3d = struct.Struct("<3d")
00527 class GettfMessage(object):
00528   _type          = 'pr2_clutter_helper/GettfMessage'
00529   _md5sum = 'fbad55ff04fc42790d65a78aa6d33310'
00530   _request_class  = GettfMessageRequest
00531   _response_class = GettfMessageResponse


pr2_clutter_helper
Author(s): Jason Okerman, Advisors: Prof. Charlie Kemp and Jim Regh, Lab: Healthcare Robotics Lab at Georgia Tech
autogenerated on Wed Nov 27 2013 11:53:06