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


hector_nav_msgs
Author(s): Stefan Kohlbrecher
autogenerated on Mon Jul 15 2013 16:47:07