_DoorStateSrv.py
Go to the documentation of this file.
00001 """autogenerated by genpy from door_perception_msgs/DoorStateSrvRequest.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 DoorStateSrvRequest(genpy.Message):
00009   _md5sum = "d41d8cd98f00b204e9800998ecf8427e"
00010   _type = "door_perception_msgs/DoorStateSrvRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """
00013 """
00014   __slots__ = []
00015   _slot_types = []
00016 
00017   def __init__(self, *args, **kwds):
00018     """
00019     Constructor. Any message fields that are implicitly/explicitly
00020     set to None will be assigned a default value. The recommend
00021     use is keyword arguments as this is more robust to future message
00022     changes.  You cannot mix in-order arguments and keyword arguments.
00023 
00024     The available fields are:
00025        
00026 
00027     :param args: complete set of field values, in .msg order
00028     :param kwds: use keyword arguments corresponding to message field names
00029     to set specific fields.
00030     """
00031     if args or kwds:
00032       super(DoorStateSrvRequest, self).__init__(*args, **kwds)
00033 
00034   def _get_types(self):
00035     """
00036     internal API method
00037     """
00038     return self._slot_types
00039 
00040   def serialize(self, buff):
00041     """
00042     serialize message into buffer
00043     :param buff: buffer, ``StringIO``
00044     """
00045     try:
00046       pass
00047     except struct.error as se: self._check_types(se)
00048     except TypeError as te: self._check_types(te)
00049 
00050   def deserialize(self, str):
00051     """
00052     unpack serialized message in str into this message instance
00053     :param str: byte array of serialized message, ``str``
00054     """
00055     try:
00056       end = 0
00057       return self
00058     except struct.error as e:
00059       raise genpy.DeserializationError(e) #most likely buffer underfill
00060 
00061 
00062   def serialize_numpy(self, buff, numpy):
00063     """
00064     serialize message with numpy array types into buffer
00065     :param buff: buffer, ``StringIO``
00066     :param numpy: numpy python module
00067     """
00068     try:
00069       pass
00070     except struct.error as se: self._check_types(se)
00071     except TypeError as te: self._check_types(te)
00072 
00073   def deserialize_numpy(self, str, numpy):
00074     """
00075     unpack serialized message in str into this message instance using numpy for array types
00076     :param str: byte array of serialized message, ``str``
00077     :param numpy: numpy python module
00078     """
00079     try:
00080       end = 0
00081       return self
00082     except struct.error as e:
00083       raise genpy.DeserializationError(e) #most likely buffer underfill
00084 
00085 _struct_I = genpy.struct_I
00086 """autogenerated by genpy from door_perception_msgs/DoorStateSrvResponse.msg. Do not edit."""
00087 import sys
00088 python3 = True if sys.hexversion > 0x03000000 else False
00089 import genpy
00090 import struct
00091 
00092 import door_perception_msgs.msg
00093 import std_msgs.msg
00094 
00095 class DoorStateSrvResponse(genpy.Message):
00096   _md5sum = "37530d10263f735dadac82953dab2863"
00097   _type = "door_perception_msgs/DoorStateSrvResponse"
00098   _has_header = False #flag to mark the presence of a Header object
00099   _full_text = """door_perception_msgs/DoorState state
00100 
00101 
00102 ================================================================================
00103 MSG: door_perception_msgs/DoorState
00104 Header header
00105 #Door is considered latched at this angle
00106 float64 DOOR_OPEN_ANGLE=1.5708
00107 #Door is considered traversable at this angle (or above)
00108 float64 DOOR_CLOSED_ANGLE=0.0
00109 #Indicates whether a line could be fit to the sensor data
00110 bool door_found
00111 #Only meaningful if door_found is true
00112 float64 angle
00113 
00114 
00115 ================================================================================
00116 MSG: std_msgs/Header
00117 # Standard metadata for higher-level stamped data types.
00118 # This is generally used to communicate timestamped data 
00119 # in a particular coordinate frame.
00120 # 
00121 # sequence ID: consecutively increasing ID 
00122 uint32 seq
00123 #Two-integer timestamp that is expressed as:
00124 # * stamp.secs: seconds (stamp_secs) since epoch
00125 # * stamp.nsecs: nanoseconds since stamp_secs
00126 # time-handling sugar is provided by the client library
00127 time stamp
00128 #Frame this data is associated with
00129 # 0: no frame
00130 # 1: global frame
00131 string frame_id
00132 
00133 """
00134   __slots__ = ['state']
00135   _slot_types = ['door_perception_msgs/DoorState']
00136 
00137   def __init__(self, *args, **kwds):
00138     """
00139     Constructor. Any message fields that are implicitly/explicitly
00140     set to None will be assigned a default value. The recommend
00141     use is keyword arguments as this is more robust to future message
00142     changes.  You cannot mix in-order arguments and keyword arguments.
00143 
00144     The available fields are:
00145        state
00146 
00147     :param args: complete set of field values, in .msg order
00148     :param kwds: use keyword arguments corresponding to message field names
00149     to set specific fields.
00150     """
00151     if args or kwds:
00152       super(DoorStateSrvResponse, self).__init__(*args, **kwds)
00153       #message fields cannot be None, assign default values for those that are
00154       if self.state is None:
00155         self.state = door_perception_msgs.msg.DoorState()
00156     else:
00157       self.state = door_perception_msgs.msg.DoorState()
00158 
00159   def _get_types(self):
00160     """
00161     internal API method
00162     """
00163     return self._slot_types
00164 
00165   def serialize(self, buff):
00166     """
00167     serialize message into buffer
00168     :param buff: buffer, ``StringIO``
00169     """
00170     try:
00171       _x = self
00172       buff.write(_struct_3I.pack(_x.state.header.seq, _x.state.header.stamp.secs, _x.state.header.stamp.nsecs))
00173       _x = self.state.header.frame_id
00174       length = len(_x)
00175       if python3 or type(_x) == unicode:
00176         _x = _x.encode('utf-8')
00177         length = len(_x)
00178       buff.write(struct.pack('<I%ss'%length, length, _x))
00179       _x = self
00180       buff.write(_struct_Bd.pack(_x.state.door_found, _x.state.angle))
00181     except struct.error as se: self._check_types(se)
00182     except TypeError as te: self._check_types(te)
00183 
00184   def deserialize(self, str):
00185     """
00186     unpack serialized message in str into this message instance
00187     :param str: byte array of serialized message, ``str``
00188     """
00189     try:
00190       if self.state is None:
00191         self.state = door_perception_msgs.msg.DoorState()
00192       end = 0
00193       _x = self
00194       start = end
00195       end += 12
00196       (_x.state.header.seq, _x.state.header.stamp.secs, _x.state.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00197       start = end
00198       end += 4
00199       (length,) = _struct_I.unpack(str[start:end])
00200       start = end
00201       end += length
00202       if python3:
00203         self.state.header.frame_id = str[start:end].decode('utf-8')
00204       else:
00205         self.state.header.frame_id = str[start:end]
00206       _x = self
00207       start = end
00208       end += 9
00209       (_x.state.door_found, _x.state.angle,) = _struct_Bd.unpack(str[start:end])
00210       self.state.door_found = bool(self.state.door_found)
00211       return self
00212     except struct.error as e:
00213       raise genpy.DeserializationError(e) #most likely buffer underfill
00214 
00215 
00216   def serialize_numpy(self, buff, numpy):
00217     """
00218     serialize message with numpy array types into buffer
00219     :param buff: buffer, ``StringIO``
00220     :param numpy: numpy python module
00221     """
00222     try:
00223       _x = self
00224       buff.write(_struct_3I.pack(_x.state.header.seq, _x.state.header.stamp.secs, _x.state.header.stamp.nsecs))
00225       _x = self.state.header.frame_id
00226       length = len(_x)
00227       if python3 or type(_x) == unicode:
00228         _x = _x.encode('utf-8')
00229         length = len(_x)
00230       buff.write(struct.pack('<I%ss'%length, length, _x))
00231       _x = self
00232       buff.write(_struct_Bd.pack(_x.state.door_found, _x.state.angle))
00233     except struct.error as se: self._check_types(se)
00234     except TypeError as te: self._check_types(te)
00235 
00236   def deserialize_numpy(self, str, numpy):
00237     """
00238     unpack serialized message in str into this message instance using numpy for array types
00239     :param str: byte array of serialized message, ``str``
00240     :param numpy: numpy python module
00241     """
00242     try:
00243       if self.state is None:
00244         self.state = door_perception_msgs.msg.DoorState()
00245       end = 0
00246       _x = self
00247       start = end
00248       end += 12
00249       (_x.state.header.seq, _x.state.header.stamp.secs, _x.state.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00250       start = end
00251       end += 4
00252       (length,) = _struct_I.unpack(str[start:end])
00253       start = end
00254       end += length
00255       if python3:
00256         self.state.header.frame_id = str[start:end].decode('utf-8')
00257       else:
00258         self.state.header.frame_id = str[start:end]
00259       _x = self
00260       start = end
00261       end += 9
00262       (_x.state.door_found, _x.state.angle,) = _struct_Bd.unpack(str[start:end])
00263       self.state.door_found = bool(self.state.door_found)
00264       return self
00265     except struct.error as e:
00266       raise genpy.DeserializationError(e) #most likely buffer underfill
00267 
00268 _struct_I = genpy.struct_I
00269 _struct_Bd = struct.Struct("<Bd")
00270 _struct_3I = struct.Struct("<3I")
00271 class DoorStateSrv(object):
00272   _type          = 'door_perception_msgs/DoorStateSrv'
00273   _md5sum = '37530d10263f735dadac82953dab2863'
00274   _request_class  = DoorStateSrvRequest
00275   _response_class = DoorStateSrvResponse
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends


door_perception_msgs
Author(s): Felix Endres
autogenerated on Wed Dec 26 2012 15:29:43