_Checkpoint.py
Go to the documentation of this file.
00001 """autogenerated by genpy from iri_checkpoint_nav/CheckpointRequest.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 geometry_msgs.msg
00008 
00009 class CheckpointRequest(genpy.Message):
00010   _md5sum = "c1262a652e514f59589d3adfe47158a8"
00011   _type = "iri_checkpoint_nav/CheckpointRequest"
00012   _has_header = False #flag to mark the presence of a Header object
00013   _full_text = """byte id
00014 string ref_frame
00015 geometry_msgs/Point position
00016 
00017 ================================================================================
00018 MSG: geometry_msgs/Point
00019 # This contains the position of a point in free space
00020 float64 x
00021 float64 y
00022 float64 z
00023 
00024 """
00025   __slots__ = ['id','ref_frame','position']
00026   _slot_types = ['byte','string','geometry_msgs/Point']
00027 
00028   def __init__(self, *args, **kwds):
00029     """
00030     Constructor. Any message fields that are implicitly/explicitly
00031     set to None will be assigned a default value. The recommend
00032     use is keyword arguments as this is more robust to future message
00033     changes.  You cannot mix in-order arguments and keyword arguments.
00034 
00035     The available fields are:
00036        id,ref_frame,position
00037 
00038     :param args: complete set of field values, in .msg order
00039     :param kwds: use keyword arguments corresponding to message field names
00040     to set specific fields.
00041     """
00042     if args or kwds:
00043       super(CheckpointRequest, self).__init__(*args, **kwds)
00044       #message fields cannot be None, assign default values for those that are
00045       if self.id is None:
00046         self.id = 0
00047       if self.ref_frame is None:
00048         self.ref_frame = ''
00049       if self.position is None:
00050         self.position = geometry_msgs.msg.Point()
00051     else:
00052       self.id = 0
00053       self.ref_frame = ''
00054       self.position = geometry_msgs.msg.Point()
00055 
00056   def _get_types(self):
00057     """
00058     internal API method
00059     """
00060     return self._slot_types
00061 
00062   def serialize(self, buff):
00063     """
00064     serialize message into buffer
00065     :param buff: buffer, ``StringIO``
00066     """
00067     try:
00068       buff.write(_struct_b.pack(self.id))
00069       _x = self.ref_frame
00070       length = len(_x)
00071       if python3 or type(_x) == unicode:
00072         _x = _x.encode('utf-8')
00073         length = len(_x)
00074       buff.write(struct.pack('<I%ss'%length, length, _x))
00075       _x = self
00076       buff.write(_struct_3d.pack(_x.position.x, _x.position.y, _x.position.z))
00077     except struct.error as se: self._check_types(se)
00078     except TypeError as te: self._check_types(te)
00079 
00080   def deserialize(self, str):
00081     """
00082     unpack serialized message in str into this message instance
00083     :param str: byte array of serialized message, ``str``
00084     """
00085     try:
00086       if self.position is None:
00087         self.position = geometry_msgs.msg.Point()
00088       end = 0
00089       start = end
00090       end += 1
00091       (self.id,) = _struct_b.unpack(str[start:end])
00092       start = end
00093       end += 4
00094       (length,) = _struct_I.unpack(str[start:end])
00095       start = end
00096       end += length
00097       if python3:
00098         self.ref_frame = str[start:end].decode('utf-8')
00099       else:
00100         self.ref_frame = str[start:end]
00101       _x = self
00102       start = end
00103       end += 24
00104       (_x.position.x, _x.position.y, _x.position.z,) = _struct_3d.unpack(str[start:end])
00105       return self
00106     except struct.error as e:
00107       raise genpy.DeserializationError(e) #most likely buffer underfill
00108 
00109 
00110   def serialize_numpy(self, buff, numpy):
00111     """
00112     serialize message with numpy array types into buffer
00113     :param buff: buffer, ``StringIO``
00114     :param numpy: numpy python module
00115     """
00116     try:
00117       buff.write(_struct_b.pack(self.id))
00118       _x = self.ref_frame
00119       length = len(_x)
00120       if python3 or type(_x) == unicode:
00121         _x = _x.encode('utf-8')
00122         length = len(_x)
00123       buff.write(struct.pack('<I%ss'%length, length, _x))
00124       _x = self
00125       buff.write(_struct_3d.pack(_x.position.x, _x.position.y, _x.position.z))
00126     except struct.error as se: self._check_types(se)
00127     except TypeError as te: self._check_types(te)
00128 
00129   def deserialize_numpy(self, str, numpy):
00130     """
00131     unpack serialized message in str into this message instance using numpy for array types
00132     :param str: byte array of serialized message, ``str``
00133     :param numpy: numpy python module
00134     """
00135     try:
00136       if self.position is None:
00137         self.position = geometry_msgs.msg.Point()
00138       end = 0
00139       start = end
00140       end += 1
00141       (self.id,) = _struct_b.unpack(str[start:end])
00142       start = end
00143       end += 4
00144       (length,) = _struct_I.unpack(str[start:end])
00145       start = end
00146       end += length
00147       if python3:
00148         self.ref_frame = str[start:end].decode('utf-8')
00149       else:
00150         self.ref_frame = str[start:end]
00151       _x = self
00152       start = end
00153       end += 24
00154       (_x.position.x, _x.position.y, _x.position.z,) = _struct_3d.unpack(str[start:end])
00155       return self
00156     except struct.error as e:
00157       raise genpy.DeserializationError(e) #most likely buffer underfill
00158 
00159 _struct_I = genpy.struct_I
00160 _struct_b = struct.Struct("<b")
00161 _struct_3d = struct.Struct("<3d")
00162 """autogenerated by genpy from iri_checkpoint_nav/CheckpointResponse.msg. Do not edit."""
00163 import sys
00164 python3 = True if sys.hexversion > 0x03000000 else False
00165 import genpy
00166 import struct
00167 
00168 
00169 class CheckpointResponse(genpy.Message):
00170   _md5sum = "358e233cde0c8a8bcfea4ce193f8fc15"
00171   _type = "iri_checkpoint_nav/CheckpointResponse"
00172   _has_header = False #flag to mark the presence of a Header object
00173   _full_text = """bool success
00174 
00175 
00176 """
00177   __slots__ = ['success']
00178   _slot_types = ['bool']
00179 
00180   def __init__(self, *args, **kwds):
00181     """
00182     Constructor. Any message fields that are implicitly/explicitly
00183     set to None will be assigned a default value. The recommend
00184     use is keyword arguments as this is more robust to future message
00185     changes.  You cannot mix in-order arguments and keyword arguments.
00186 
00187     The available fields are:
00188        success
00189 
00190     :param args: complete set of field values, in .msg order
00191     :param kwds: use keyword arguments corresponding to message field names
00192     to set specific fields.
00193     """
00194     if args or kwds:
00195       super(CheckpointResponse, self).__init__(*args, **kwds)
00196       #message fields cannot be None, assign default values for those that are
00197       if self.success is None:
00198         self.success = False
00199     else:
00200       self.success = False
00201 
00202   def _get_types(self):
00203     """
00204     internal API method
00205     """
00206     return self._slot_types
00207 
00208   def serialize(self, buff):
00209     """
00210     serialize message into buffer
00211     :param buff: buffer, ``StringIO``
00212     """
00213     try:
00214       buff.write(_struct_B.pack(self.success))
00215     except struct.error as se: self._check_types(se)
00216     except TypeError as te: self._check_types(te)
00217 
00218   def deserialize(self, str):
00219     """
00220     unpack serialized message in str into this message instance
00221     :param str: byte array of serialized message, ``str``
00222     """
00223     try:
00224       end = 0
00225       start = end
00226       end += 1
00227       (self.success,) = _struct_B.unpack(str[start:end])
00228       self.success = bool(self.success)
00229       return self
00230     except struct.error as e:
00231       raise genpy.DeserializationError(e) #most likely buffer underfill
00232 
00233 
00234   def serialize_numpy(self, buff, numpy):
00235     """
00236     serialize message with numpy array types into buffer
00237     :param buff: buffer, ``StringIO``
00238     :param numpy: numpy python module
00239     """
00240     try:
00241       buff.write(_struct_B.pack(self.success))
00242     except struct.error as se: self._check_types(se)
00243     except TypeError as te: self._check_types(te)
00244 
00245   def deserialize_numpy(self, str, numpy):
00246     """
00247     unpack serialized message in str into this message instance using numpy for array types
00248     :param str: byte array of serialized message, ``str``
00249     :param numpy: numpy python module
00250     """
00251     try:
00252       end = 0
00253       start = end
00254       end += 1
00255       (self.success,) = _struct_B.unpack(str[start:end])
00256       self.success = bool(self.success)
00257       return self
00258     except struct.error as e:
00259       raise genpy.DeserializationError(e) #most likely buffer underfill
00260 
00261 _struct_I = genpy.struct_I
00262 _struct_B = struct.Struct("<B")
00263 class Checkpoint(object):
00264   _type          = 'iri_checkpoint_nav/Checkpoint'
00265   _md5sum = 'a675eb5d72460daf788b38fd23a0161d'
00266   _request_class  = CheckpointRequest
00267   _response_class = CheckpointResponse


iri_checkpoint_nav
Author(s): Jose Luis Rivero
autogenerated on Fri Dec 6 2013 22:56:27