_GetLocation.py
Go to the documentation of this file.
00001 """autogenerated by genpy from location_memorizer/GetLocationRequest.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 GetLocationRequest(genpy.Message):
00009   _md5sum = "c1f3d28f1b044c871e6eff2e9fc3c667"
00010   _type = "location_memorizer/GetLocationRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """string name
00013 
00014 """
00015   __slots__ = ['name']
00016   _slot_types = ['string']
00017 
00018   def __init__(self, *args, **kwds):
00019     """
00020     Constructor. Any message fields that are implicitly/explicitly
00021     set to None will be assigned a default value. The recommend
00022     use is keyword arguments as this is more robust to future message
00023     changes.  You cannot mix in-order arguments and keyword arguments.
00024 
00025     The available fields are:
00026        name
00027 
00028     :param args: complete set of field values, in .msg order
00029     :param kwds: use keyword arguments corresponding to message field names
00030     to set specific fields.
00031     """
00032     if args or kwds:
00033       super(GetLocationRequest, self).__init__(*args, **kwds)
00034       #message fields cannot be None, assign default values for those that are
00035       if self.name is None:
00036         self.name = ''
00037     else:
00038       self.name = ''
00039 
00040   def _get_types(self):
00041     """
00042     internal API method
00043     """
00044     return self._slot_types
00045 
00046   def serialize(self, buff):
00047     """
00048     serialize message into buffer
00049     :param buff: buffer, ``StringIO``
00050     """
00051     try:
00052       _x = self.name
00053       length = len(_x)
00054       if python3 or type(_x) == unicode:
00055         _x = _x.encode('utf-8')
00056         length = len(_x)
00057       buff.write(struct.pack('<I%ss'%length, length, _x))
00058     except struct.error as se: self._check_types(se)
00059     except TypeError as te: self._check_types(te)
00060 
00061   def deserialize(self, str):
00062     """
00063     unpack serialized message in str into this message instance
00064     :param str: byte array of serialized message, ``str``
00065     """
00066     try:
00067       end = 0
00068       start = end
00069       end += 4
00070       (length,) = _struct_I.unpack(str[start:end])
00071       start = end
00072       end += length
00073       if python3:
00074         self.name = str[start:end].decode('utf-8')
00075       else:
00076         self.name = str[start:end]
00077       return self
00078     except struct.error as e:
00079       raise genpy.DeserializationError(e) #most likely buffer underfill
00080 
00081 
00082   def serialize_numpy(self, buff, numpy):
00083     """
00084     serialize message with numpy array types into buffer
00085     :param buff: buffer, ``StringIO``
00086     :param numpy: numpy python module
00087     """
00088     try:
00089       _x = self.name
00090       length = len(_x)
00091       if python3 or type(_x) == unicode:
00092         _x = _x.encode('utf-8')
00093         length = len(_x)
00094       buff.write(struct.pack('<I%ss'%length, length, _x))
00095     except struct.error as se: self._check_types(se)
00096     except TypeError as te: self._check_types(te)
00097 
00098   def deserialize_numpy(self, str, numpy):
00099     """
00100     unpack serialized message in str into this message instance using numpy for array types
00101     :param str: byte array of serialized message, ``str``
00102     :param numpy: numpy python module
00103     """
00104     try:
00105       end = 0
00106       start = end
00107       end += 4
00108       (length,) = _struct_I.unpack(str[start:end])
00109       start = end
00110       end += length
00111       if python3:
00112         self.name = str[start:end].decode('utf-8')
00113       else:
00114         self.name = str[start:end]
00115       return self
00116     except struct.error as e:
00117       raise genpy.DeserializationError(e) #most likely buffer underfill
00118 
00119 _struct_I = genpy.struct_I
00120 """autogenerated by genpy from location_memorizer/GetLocationResponse.msg. Do not edit."""
00121 import sys
00122 python3 = True if sys.hexversion > 0x03000000 else False
00123 import genpy
00124 import struct
00125 
00126 import geometry_msgs.msg
00127 import std_msgs.msg
00128 
00129 class GetLocationResponse(genpy.Message):
00130   _md5sum = "236213ed6979c1ab1c49bd1bc04ace9e"
00131   _type = "location_memorizer/GetLocationResponse"
00132   _has_header = False #flag to mark the presence of a Header object
00133   _full_text = """bool success
00134 geometry_msgs/PoseStamped pose
00135 
00136 
00137 ================================================================================
00138 MSG: geometry_msgs/PoseStamped
00139 # A Pose with reference coordinate frame and timestamp
00140 Header header
00141 Pose pose
00142 
00143 ================================================================================
00144 MSG: std_msgs/Header
00145 # Standard metadata for higher-level stamped data types.
00146 # This is generally used to communicate timestamped data 
00147 # in a particular coordinate frame.
00148 # 
00149 # sequence ID: consecutively increasing ID 
00150 uint32 seq
00151 #Two-integer timestamp that is expressed as:
00152 # * stamp.secs: seconds (stamp_secs) since epoch
00153 # * stamp.nsecs: nanoseconds since stamp_secs
00154 # time-handling sugar is provided by the client library
00155 time stamp
00156 #Frame this data is associated with
00157 # 0: no frame
00158 # 1: global frame
00159 string frame_id
00160 
00161 ================================================================================
00162 MSG: geometry_msgs/Pose
00163 # A representation of pose in free space, composed of postion and orientation. 
00164 Point position
00165 Quaternion orientation
00166 
00167 ================================================================================
00168 MSG: geometry_msgs/Point
00169 # This contains the position of a point in free space
00170 float64 x
00171 float64 y
00172 float64 z
00173 
00174 ================================================================================
00175 MSG: geometry_msgs/Quaternion
00176 # This represents an orientation in free space in quaternion form.
00177 
00178 float64 x
00179 float64 y
00180 float64 z
00181 float64 w
00182 
00183 """
00184   __slots__ = ['success','pose']
00185   _slot_types = ['bool','geometry_msgs/PoseStamped']
00186 
00187   def __init__(self, *args, **kwds):
00188     """
00189     Constructor. Any message fields that are implicitly/explicitly
00190     set to None will be assigned a default value. The recommend
00191     use is keyword arguments as this is more robust to future message
00192     changes.  You cannot mix in-order arguments and keyword arguments.
00193 
00194     The available fields are:
00195        success,pose
00196 
00197     :param args: complete set of field values, in .msg order
00198     :param kwds: use keyword arguments corresponding to message field names
00199     to set specific fields.
00200     """
00201     if args or kwds:
00202       super(GetLocationResponse, self).__init__(*args, **kwds)
00203       #message fields cannot be None, assign default values for those that are
00204       if self.success is None:
00205         self.success = False
00206       if self.pose is None:
00207         self.pose = geometry_msgs.msg.PoseStamped()
00208     else:
00209       self.success = False
00210       self.pose = geometry_msgs.msg.PoseStamped()
00211 
00212   def _get_types(self):
00213     """
00214     internal API method
00215     """
00216     return self._slot_types
00217 
00218   def serialize(self, buff):
00219     """
00220     serialize message into buffer
00221     :param buff: buffer, ``StringIO``
00222     """
00223     try:
00224       _x = self
00225       buff.write(_struct_B3I.pack(_x.success, _x.pose.header.seq, _x.pose.header.stamp.secs, _x.pose.header.stamp.nsecs))
00226       _x = self.pose.header.frame_id
00227       length = len(_x)
00228       if python3 or type(_x) == unicode:
00229         _x = _x.encode('utf-8')
00230         length = len(_x)
00231       buff.write(struct.pack('<I%ss'%length, length, _x))
00232       _x = self
00233       buff.write(_struct_7d.pack(_x.pose.pose.position.x, _x.pose.pose.position.y, _x.pose.pose.position.z, _x.pose.pose.orientation.x, _x.pose.pose.orientation.y, _x.pose.pose.orientation.z, _x.pose.pose.orientation.w))
00234     except struct.error as se: self._check_types(se)
00235     except TypeError as te: self._check_types(te)
00236 
00237   def deserialize(self, str):
00238     """
00239     unpack serialized message in str into this message instance
00240     :param str: byte array of serialized message, ``str``
00241     """
00242     try:
00243       if self.pose is None:
00244         self.pose = geometry_msgs.msg.PoseStamped()
00245       end = 0
00246       _x = self
00247       start = end
00248       end += 13
00249       (_x.success, _x.pose.header.seq, _x.pose.header.stamp.secs, _x.pose.header.stamp.nsecs,) = _struct_B3I.unpack(str[start:end])
00250       self.success = bool(self.success)
00251       start = end
00252       end += 4
00253       (length,) = _struct_I.unpack(str[start:end])
00254       start = end
00255       end += length
00256       if python3:
00257         self.pose.header.frame_id = str[start:end].decode('utf-8')
00258       else:
00259         self.pose.header.frame_id = str[start:end]
00260       _x = self
00261       start = end
00262       end += 56
00263       (_x.pose.pose.position.x, _x.pose.pose.position.y, _x.pose.pose.position.z, _x.pose.pose.orientation.x, _x.pose.pose.orientation.y, _x.pose.pose.orientation.z, _x.pose.pose.orientation.w,) = _struct_7d.unpack(str[start:end])
00264       return self
00265     except struct.error as e:
00266       raise genpy.DeserializationError(e) #most likely buffer underfill
00267 
00268 
00269   def serialize_numpy(self, buff, numpy):
00270     """
00271     serialize message with numpy array types into buffer
00272     :param buff: buffer, ``StringIO``
00273     :param numpy: numpy python module
00274     """
00275     try:
00276       _x = self
00277       buff.write(_struct_B3I.pack(_x.success, _x.pose.header.seq, _x.pose.header.stamp.secs, _x.pose.header.stamp.nsecs))
00278       _x = self.pose.header.frame_id
00279       length = len(_x)
00280       if python3 or type(_x) == unicode:
00281         _x = _x.encode('utf-8')
00282         length = len(_x)
00283       buff.write(struct.pack('<I%ss'%length, length, _x))
00284       _x = self
00285       buff.write(_struct_7d.pack(_x.pose.pose.position.x, _x.pose.pose.position.y, _x.pose.pose.position.z, _x.pose.pose.orientation.x, _x.pose.pose.orientation.y, _x.pose.pose.orientation.z, _x.pose.pose.orientation.w))
00286     except struct.error as se: self._check_types(se)
00287     except TypeError as te: self._check_types(te)
00288 
00289   def deserialize_numpy(self, str, numpy):
00290     """
00291     unpack serialized message in str into this message instance using numpy for array types
00292     :param str: byte array of serialized message, ``str``
00293     :param numpy: numpy python module
00294     """
00295     try:
00296       if self.pose is None:
00297         self.pose = geometry_msgs.msg.PoseStamped()
00298       end = 0
00299       _x = self
00300       start = end
00301       end += 13
00302       (_x.success, _x.pose.header.seq, _x.pose.header.stamp.secs, _x.pose.header.stamp.nsecs,) = _struct_B3I.unpack(str[start:end])
00303       self.success = bool(self.success)
00304       start = end
00305       end += 4
00306       (length,) = _struct_I.unpack(str[start:end])
00307       start = end
00308       end += length
00309       if python3:
00310         self.pose.header.frame_id = str[start:end].decode('utf-8')
00311       else:
00312         self.pose.header.frame_id = str[start:end]
00313       _x = self
00314       start = end
00315       end += 56
00316       (_x.pose.pose.position.x, _x.pose.pose.position.y, _x.pose.pose.position.z, _x.pose.pose.orientation.x, _x.pose.pose.orientation.y, _x.pose.pose.orientation.z, _x.pose.pose.orientation.w,) = _struct_7d.unpack(str[start:end])
00317       return self
00318     except struct.error as e:
00319       raise genpy.DeserializationError(e) #most likely buffer underfill
00320 
00321 _struct_I = genpy.struct_I
00322 _struct_7d = struct.Struct("<7d")
00323 _struct_B3I = struct.Struct("<B3I")
00324 class GetLocation(object):
00325   _type          = 'location_memorizer/GetLocation'
00326   _md5sum = '063bc9ef3579ffcc1f68f8803767c82b'
00327   _request_class  = GetLocationRequest
00328   _response_class = GetLocationResponse


location_memorizer
Author(s): Brian Thomas
autogenerated on Fri Dec 6 2013 20:36:23