_GetTransformStamped.py
Go to the documentation of this file.
00001 """autogenerated by genpy from pr2_clutter_helper/GetTransformStampedRequest.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 GetTransformStampedRequest(genpy.Message):
00009   _md5sum = "13abbc87c0c0b2fc9a6d87f74375a5d7"
00010   _type = "pr2_clutter_helper/GetTransformStampedRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """string topic_name
00013 string msg_type
00014 
00015 """
00016   __slots__ = ['topic_name','msg_type']
00017   _slot_types = ['string','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        topic_name,msg_type
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(GetTransformStampedRequest, self).__init__(*args, **kwds)
00035       #message fields cannot be None, assign default values for those that are
00036       if self.topic_name is None:
00037         self.topic_name = ''
00038       if self.msg_type is None:
00039         self.msg_type = ''
00040     else:
00041       self.topic_name = ''
00042       self.msg_type = ''
00043 
00044   def _get_types(self):
00045     """
00046     internal API method
00047     """
00048     return self._slot_types
00049 
00050   def serialize(self, buff):
00051     """
00052     serialize message into buffer
00053     :param buff: buffer, ``StringIO``
00054     """
00055     try:
00056       _x = self.topic_name
00057       length = len(_x)
00058       if python3 or type(_x) == unicode:
00059         _x = _x.encode('utf-8')
00060         length = len(_x)
00061       buff.write(struct.pack('<I%ss'%length, length, _x))
00062       _x = self.msg_type
00063       length = len(_x)
00064       if python3 or type(_x) == unicode:
00065         _x = _x.encode('utf-8')
00066         length = len(_x)
00067       buff.write(struct.pack('<I%ss'%length, length, _x))
00068     except struct.error as se: self._check_types(se)
00069     except TypeError as te: self._check_types(te)
00070 
00071   def deserialize(self, str):
00072     """
00073     unpack serialized message in str into this message instance
00074     :param str: byte array of serialized message, ``str``
00075     """
00076     try:
00077       end = 0
00078       start = end
00079       end += 4
00080       (length,) = _struct_I.unpack(str[start:end])
00081       start = end
00082       end += length
00083       if python3:
00084         self.topic_name = str[start:end].decode('utf-8')
00085       else:
00086         self.topic_name = str[start:end]
00087       start = end
00088       end += 4
00089       (length,) = _struct_I.unpack(str[start:end])
00090       start = end
00091       end += length
00092       if python3:
00093         self.msg_type = str[start:end].decode('utf-8')
00094       else:
00095         self.msg_type = str[start:end]
00096       return self
00097     except struct.error as e:
00098       raise genpy.DeserializationError(e) #most likely buffer underfill
00099 
00100 
00101   def serialize_numpy(self, buff, numpy):
00102     """
00103     serialize message with numpy array types into buffer
00104     :param buff: buffer, ``StringIO``
00105     :param numpy: numpy python module
00106     """
00107     try:
00108       _x = self.topic_name
00109       length = len(_x)
00110       if python3 or type(_x) == unicode:
00111         _x = _x.encode('utf-8')
00112         length = len(_x)
00113       buff.write(struct.pack('<I%ss'%length, length, _x))
00114       _x = self.msg_type
00115       length = len(_x)
00116       if python3 or type(_x) == unicode:
00117         _x = _x.encode('utf-8')
00118         length = len(_x)
00119       buff.write(struct.pack('<I%ss'%length, length, _x))
00120     except struct.error as se: self._check_types(se)
00121     except TypeError as te: self._check_types(te)
00122 
00123   def deserialize_numpy(self, str, numpy):
00124     """
00125     unpack serialized message in str into this message instance using numpy for array types
00126     :param str: byte array of serialized message, ``str``
00127     :param numpy: numpy python module
00128     """
00129     try:
00130       end = 0
00131       start = end
00132       end += 4
00133       (length,) = _struct_I.unpack(str[start:end])
00134       start = end
00135       end += length
00136       if python3:
00137         self.topic_name = str[start:end].decode('utf-8')
00138       else:
00139         self.topic_name = str[start:end]
00140       start = end
00141       end += 4
00142       (length,) = _struct_I.unpack(str[start:end])
00143       start = end
00144       end += length
00145       if python3:
00146         self.msg_type = str[start:end].decode('utf-8')
00147       else:
00148         self.msg_type = str[start:end]
00149       return self
00150     except struct.error as e:
00151       raise genpy.DeserializationError(e) #most likely buffer underfill
00152 
00153 _struct_I = genpy.struct_I
00154 """autogenerated by genpy from pr2_clutter_helper/GetTransformStampedResponse.msg. Do not edit."""
00155 import sys
00156 python3 = True if sys.hexversion > 0x03000000 else False
00157 import genpy
00158 import struct
00159 
00160 import geometry_msgs.msg
00161 import std_msgs.msg
00162 
00163 class GetTransformStampedResponse(genpy.Message):
00164   _md5sum = "627ebb4e09bbb127f87308bbfdbaec08"
00165   _type = "pr2_clutter_helper/GetTransformStampedResponse"
00166   _has_header = False #flag to mark the presence of a Header object
00167   _full_text = """geometry_msgs/TransformStamped transform
00168 
00169 
00170 ================================================================================
00171 MSG: geometry_msgs/TransformStamped
00172 # This expresses a transform from coordinate frame header.frame_id
00173 # to the coordinate frame child_frame_id
00174 #
00175 # This message is mostly used by the 
00176 # <a href="http://www.ros.org/wiki/tf">tf</a> package. 
00177 # See it's documentation for more information.
00178 
00179 Header header
00180 string child_frame_id # the frame id of the child frame
00181 Transform transform
00182 
00183 ================================================================================
00184 MSG: std_msgs/Header
00185 # Standard metadata for higher-level stamped data types.
00186 # This is generally used to communicate timestamped data 
00187 # in a particular coordinate frame.
00188 # 
00189 # sequence ID: consecutively increasing ID 
00190 uint32 seq
00191 #Two-integer timestamp that is expressed as:
00192 # * stamp.secs: seconds (stamp_secs) since epoch
00193 # * stamp.nsecs: nanoseconds since stamp_secs
00194 # time-handling sugar is provided by the client library
00195 time stamp
00196 #Frame this data is associated with
00197 # 0: no frame
00198 # 1: global frame
00199 string frame_id
00200 
00201 ================================================================================
00202 MSG: geometry_msgs/Transform
00203 # This represents the transform between two coordinate frames in free space.
00204 
00205 Vector3 translation
00206 Quaternion rotation
00207 
00208 ================================================================================
00209 MSG: geometry_msgs/Vector3
00210 # This represents a vector in free space. 
00211 
00212 float64 x
00213 float64 y
00214 float64 z
00215 ================================================================================
00216 MSG: geometry_msgs/Quaternion
00217 # This represents an orientation in free space in quaternion form.
00218 
00219 float64 x
00220 float64 y
00221 float64 z
00222 float64 w
00223 
00224 """
00225   __slots__ = ['transform']
00226   _slot_types = ['geometry_msgs/TransformStamped']
00227 
00228   def __init__(self, *args, **kwds):
00229     """
00230     Constructor. Any message fields that are implicitly/explicitly
00231     set to None will be assigned a default value. The recommend
00232     use is keyword arguments as this is more robust to future message
00233     changes.  You cannot mix in-order arguments and keyword arguments.
00234 
00235     The available fields are:
00236        transform
00237 
00238     :param args: complete set of field values, in .msg order
00239     :param kwds: use keyword arguments corresponding to message field names
00240     to set specific fields.
00241     """
00242     if args or kwds:
00243       super(GetTransformStampedResponse, self).__init__(*args, **kwds)
00244       #message fields cannot be None, assign default values for those that are
00245       if self.transform is None:
00246         self.transform = geometry_msgs.msg.TransformStamped()
00247     else:
00248       self.transform = geometry_msgs.msg.TransformStamped()
00249 
00250   def _get_types(self):
00251     """
00252     internal API method
00253     """
00254     return self._slot_types
00255 
00256   def serialize(self, buff):
00257     """
00258     serialize message into buffer
00259     :param buff: buffer, ``StringIO``
00260     """
00261     try:
00262       _x = self
00263       buff.write(_struct_3I.pack(_x.transform.header.seq, _x.transform.header.stamp.secs, _x.transform.header.stamp.nsecs))
00264       _x = self.transform.header.frame_id
00265       length = len(_x)
00266       if python3 or type(_x) == unicode:
00267         _x = _x.encode('utf-8')
00268         length = len(_x)
00269       buff.write(struct.pack('<I%ss'%length, length, _x))
00270       _x = self.transform.child_frame_id
00271       length = len(_x)
00272       if python3 or type(_x) == unicode:
00273         _x = _x.encode('utf-8')
00274         length = len(_x)
00275       buff.write(struct.pack('<I%ss'%length, length, _x))
00276       _x = self
00277       buff.write(_struct_7d.pack(_x.transform.transform.translation.x, _x.transform.transform.translation.y, _x.transform.transform.translation.z, _x.transform.transform.rotation.x, _x.transform.transform.rotation.y, _x.transform.transform.rotation.z, _x.transform.transform.rotation.w))
00278     except struct.error as se: self._check_types(se)
00279     except TypeError as te: self._check_types(te)
00280 
00281   def deserialize(self, str):
00282     """
00283     unpack serialized message in str into this message instance
00284     :param str: byte array of serialized message, ``str``
00285     """
00286     try:
00287       if self.transform is None:
00288         self.transform = geometry_msgs.msg.TransformStamped()
00289       end = 0
00290       _x = self
00291       start = end
00292       end += 12
00293       (_x.transform.header.seq, _x.transform.header.stamp.secs, _x.transform.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00294       start = end
00295       end += 4
00296       (length,) = _struct_I.unpack(str[start:end])
00297       start = end
00298       end += length
00299       if python3:
00300         self.transform.header.frame_id = str[start:end].decode('utf-8')
00301       else:
00302         self.transform.header.frame_id = str[start:end]
00303       start = end
00304       end += 4
00305       (length,) = _struct_I.unpack(str[start:end])
00306       start = end
00307       end += length
00308       if python3:
00309         self.transform.child_frame_id = str[start:end].decode('utf-8')
00310       else:
00311         self.transform.child_frame_id = str[start:end]
00312       _x = self
00313       start = end
00314       end += 56
00315       (_x.transform.transform.translation.x, _x.transform.transform.translation.y, _x.transform.transform.translation.z, _x.transform.transform.rotation.x, _x.transform.transform.rotation.y, _x.transform.transform.rotation.z, _x.transform.transform.rotation.w,) = _struct_7d.unpack(str[start:end])
00316       return self
00317     except struct.error as e:
00318       raise genpy.DeserializationError(e) #most likely buffer underfill
00319 
00320 
00321   def serialize_numpy(self, buff, numpy):
00322     """
00323     serialize message with numpy array types into buffer
00324     :param buff: buffer, ``StringIO``
00325     :param numpy: numpy python module
00326     """
00327     try:
00328       _x = self
00329       buff.write(_struct_3I.pack(_x.transform.header.seq, _x.transform.header.stamp.secs, _x.transform.header.stamp.nsecs))
00330       _x = self.transform.header.frame_id
00331       length = len(_x)
00332       if python3 or type(_x) == unicode:
00333         _x = _x.encode('utf-8')
00334         length = len(_x)
00335       buff.write(struct.pack('<I%ss'%length, length, _x))
00336       _x = self.transform.child_frame_id
00337       length = len(_x)
00338       if python3 or type(_x) == unicode:
00339         _x = _x.encode('utf-8')
00340         length = len(_x)
00341       buff.write(struct.pack('<I%ss'%length, length, _x))
00342       _x = self
00343       buff.write(_struct_7d.pack(_x.transform.transform.translation.x, _x.transform.transform.translation.y, _x.transform.transform.translation.z, _x.transform.transform.rotation.x, _x.transform.transform.rotation.y, _x.transform.transform.rotation.z, _x.transform.transform.rotation.w))
00344     except struct.error as se: self._check_types(se)
00345     except TypeError as te: self._check_types(te)
00346 
00347   def deserialize_numpy(self, str, numpy):
00348     """
00349     unpack serialized message in str into this message instance using numpy for array types
00350     :param str: byte array of serialized message, ``str``
00351     :param numpy: numpy python module
00352     """
00353     try:
00354       if self.transform is None:
00355         self.transform = geometry_msgs.msg.TransformStamped()
00356       end = 0
00357       _x = self
00358       start = end
00359       end += 12
00360       (_x.transform.header.seq, _x.transform.header.stamp.secs, _x.transform.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00361       start = end
00362       end += 4
00363       (length,) = _struct_I.unpack(str[start:end])
00364       start = end
00365       end += length
00366       if python3:
00367         self.transform.header.frame_id = str[start:end].decode('utf-8')
00368       else:
00369         self.transform.header.frame_id = str[start:end]
00370       start = end
00371       end += 4
00372       (length,) = _struct_I.unpack(str[start:end])
00373       start = end
00374       end += length
00375       if python3:
00376         self.transform.child_frame_id = str[start:end].decode('utf-8')
00377       else:
00378         self.transform.child_frame_id = str[start:end]
00379       _x = self
00380       start = end
00381       end += 56
00382       (_x.transform.transform.translation.x, _x.transform.transform.translation.y, _x.transform.transform.translation.z, _x.transform.transform.rotation.x, _x.transform.transform.rotation.y, _x.transform.transform.rotation.z, _x.transform.transform.rotation.w,) = _struct_7d.unpack(str[start:end])
00383       return self
00384     except struct.error as e:
00385       raise genpy.DeserializationError(e) #most likely buffer underfill
00386 
00387 _struct_I = genpy.struct_I
00388 _struct_3I = struct.Struct("<3I")
00389 _struct_7d = struct.Struct("<7d")
00390 class GetTransformStamped(object):
00391   _type          = 'pr2_clutter_helper/GetTransformStamped'
00392   _md5sum = '751c09975a0a9df5fe9c912db584a8f0'
00393   _request_class  = GetTransformStampedRequest
00394   _response_class = GetTransformStampedResponse


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