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