00001 """autogenerated by genpy from geographic_msgs/GetRoutePlanRequest.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 uuid_msgs.msg
00008
00009 class GetRoutePlanRequest(genpy.Message):
00010 _md5sum = "e56ac34268c6d575dabb30f42da4a47a"
00011 _type = "geographic_msgs/GetRoutePlanRequest"
00012 _has_header = False
00013 _full_text = """
00014
00015
00016
00017 uuid_msgs/UniqueID network
00018 uuid_msgs/UniqueID start
00019 uuid_msgs/UniqueID goal
00020
00021
00022 ================================================================================
00023 MSG: uuid_msgs/UniqueID
00024 # A universally unique identifier (UUID).
00025 #
00026 # http://en.wikipedia.org/wiki/Universally_unique_identifier
00027 # http://tools.ietf.org/html/rfc4122.html
00028
00029 uint8[16] uuid
00030
00031 """
00032 __slots__ = ['network','start','goal']
00033 _slot_types = ['uuid_msgs/UniqueID','uuid_msgs/UniqueID','uuid_msgs/UniqueID']
00034
00035 def __init__(self, *args, **kwds):
00036 """
00037 Constructor. Any message fields that are implicitly/explicitly
00038 set to None will be assigned a default value. The recommend
00039 use is keyword arguments as this is more robust to future message
00040 changes. You cannot mix in-order arguments and keyword arguments.
00041
00042 The available fields are:
00043 network,start,goal
00044
00045 :param args: complete set of field values, in .msg order
00046 :param kwds: use keyword arguments corresponding to message field names
00047 to set specific fields.
00048 """
00049 if args or kwds:
00050 super(GetRoutePlanRequest, self).__init__(*args, **kwds)
00051
00052 if self.network is None:
00053 self.network = uuid_msgs.msg.UniqueID()
00054 if self.start is None:
00055 self.start = uuid_msgs.msg.UniqueID()
00056 if self.goal is None:
00057 self.goal = uuid_msgs.msg.UniqueID()
00058 else:
00059 self.network = uuid_msgs.msg.UniqueID()
00060 self.start = uuid_msgs.msg.UniqueID()
00061 self.goal = uuid_msgs.msg.UniqueID()
00062
00063 def _get_types(self):
00064 """
00065 internal API method
00066 """
00067 return self._slot_types
00068
00069 def serialize(self, buff):
00070 """
00071 serialize message into buffer
00072 :param buff: buffer, ``StringIO``
00073 """
00074 try:
00075 _x = self.network.uuid
00076
00077 if type(_x) in [list, tuple]:
00078 buff.write(_struct_16B.pack(*_x))
00079 else:
00080 buff.write(_struct_16s.pack(_x))
00081 _x = self.start.uuid
00082
00083 if type(_x) in [list, tuple]:
00084 buff.write(_struct_16B.pack(*_x))
00085 else:
00086 buff.write(_struct_16s.pack(_x))
00087 _x = self.goal.uuid
00088
00089 if type(_x) in [list, tuple]:
00090 buff.write(_struct_16B.pack(*_x))
00091 else:
00092 buff.write(_struct_16s.pack(_x))
00093 except struct.error as se: self._check_types(se)
00094 except TypeError as te: self._check_types(te)
00095
00096 def deserialize(self, str):
00097 """
00098 unpack serialized message in str into this message instance
00099 :param str: byte array of serialized message, ``str``
00100 """
00101 try:
00102 if self.network is None:
00103 self.network = uuid_msgs.msg.UniqueID()
00104 if self.start is None:
00105 self.start = uuid_msgs.msg.UniqueID()
00106 if self.goal is None:
00107 self.goal = uuid_msgs.msg.UniqueID()
00108 end = 0
00109 start = end
00110 end += 16
00111 self.network.uuid = str[start:end]
00112 start = end
00113 end += 16
00114 self.start.uuid = str[start:end]
00115 start = end
00116 end += 16
00117 self.goal.uuid = str[start:end]
00118 return self
00119 except struct.error as e:
00120 raise genpy.DeserializationError(e)
00121
00122
00123 def serialize_numpy(self, buff, numpy):
00124 """
00125 serialize message with numpy array types into buffer
00126 :param buff: buffer, ``StringIO``
00127 :param numpy: numpy python module
00128 """
00129 try:
00130 _x = self.network.uuid
00131
00132 if type(_x) in [list, tuple]:
00133 buff.write(_struct_16B.pack(*_x))
00134 else:
00135 buff.write(_struct_16s.pack(_x))
00136 _x = self.start.uuid
00137
00138 if type(_x) in [list, tuple]:
00139 buff.write(_struct_16B.pack(*_x))
00140 else:
00141 buff.write(_struct_16s.pack(_x))
00142 _x = self.goal.uuid
00143
00144 if type(_x) in [list, tuple]:
00145 buff.write(_struct_16B.pack(*_x))
00146 else:
00147 buff.write(_struct_16s.pack(_x))
00148 except struct.error as se: self._check_types(se)
00149 except TypeError as te: self._check_types(te)
00150
00151 def deserialize_numpy(self, str, numpy):
00152 """
00153 unpack serialized message in str into this message instance using numpy for array types
00154 :param str: byte array of serialized message, ``str``
00155 :param numpy: numpy python module
00156 """
00157 try:
00158 if self.network is None:
00159 self.network = uuid_msgs.msg.UniqueID()
00160 if self.start is None:
00161 self.start = uuid_msgs.msg.UniqueID()
00162 if self.goal is None:
00163 self.goal = uuid_msgs.msg.UniqueID()
00164 end = 0
00165 start = end
00166 end += 16
00167 self.network.uuid = str[start:end]
00168 start = end
00169 end += 16
00170 self.start.uuid = str[start:end]
00171 start = end
00172 end += 16
00173 self.goal.uuid = str[start:end]
00174 return self
00175 except struct.error as e:
00176 raise genpy.DeserializationError(e)
00177
00178 _struct_I = genpy.struct_I
00179 _struct_16B = struct.Struct("<16B")
00180 _struct_16s = struct.Struct("<16s")
00181 """autogenerated by genpy from geographic_msgs/GetRoutePlanResponse.msg. Do not edit."""
00182 import sys
00183 python3 = True if sys.hexversion > 0x03000000 else False
00184 import genpy
00185 import struct
00186
00187 import uuid_msgs.msg
00188 import geographic_msgs.msg
00189 import std_msgs.msg
00190
00191 class GetRoutePlanResponse(genpy.Message):
00192 _md5sum = "28ee54f0ccb2ab28b46048ebc6fa5aff"
00193 _type = "geographic_msgs/GetRoutePlanResponse"
00194 _has_header = False
00195 _full_text = """
00196 bool success
00197 string status
00198
00199 RoutePath plan
00200
00201
00202 ================================================================================
00203 MSG: geographic_msgs/RoutePath
00204 # Path through a route network.
00205 #
00206 # A path is a sequence of RouteSegment edges. This information is
00207 # extracted from a RouteNetwork graph. A RoutePath lists the route
00208 # segments needed to reach some chosen goal.
00209
00210 Header header
00211
00212 uuid_msgs/UniqueID network # Route network containing this path
00213 uuid_msgs/UniqueID[] segments # Sequence of RouteSegment IDs
00214 KeyValue[] props # Key/value properties
00215
00216 ================================================================================
00217 MSG: std_msgs/Header
00218 # Standard metadata for higher-level stamped data types.
00219 # This is generally used to communicate timestamped data
00220 # in a particular coordinate frame.
00221 #
00222 # sequence ID: consecutively increasing ID
00223 uint32 seq
00224 #Two-integer timestamp that is expressed as:
00225 # * stamp.secs: seconds (stamp_secs) since epoch
00226 # * stamp.nsecs: nanoseconds since stamp_secs
00227 # time-handling sugar is provided by the client library
00228 time stamp
00229 #Frame this data is associated with
00230 # 0: no frame
00231 # 1: global frame
00232 string frame_id
00233
00234 ================================================================================
00235 MSG: uuid_msgs/UniqueID
00236 # A universally unique identifier (UUID).
00237 #
00238 # http://en.wikipedia.org/wiki/Universally_unique_identifier
00239 # http://tools.ietf.org/html/rfc4122.html
00240
00241 uint8[16] uuid
00242
00243 ================================================================================
00244 MSG: geographic_msgs/KeyValue
00245 # Geographic map tag (key, value) pair
00246 #
00247 # This is equivalent to diagnostic_msgs/KeyValue, repeated here to
00248 # avoid introducing a trivial stack dependency.
00249
00250 string key # tag label
00251 string value # corresponding value
00252
00253 """
00254 __slots__ = ['success','status','plan']
00255 _slot_types = ['bool','string','geographic_msgs/RoutePath']
00256
00257 def __init__(self, *args, **kwds):
00258 """
00259 Constructor. Any message fields that are implicitly/explicitly
00260 set to None will be assigned a default value. The recommend
00261 use is keyword arguments as this is more robust to future message
00262 changes. You cannot mix in-order arguments and keyword arguments.
00263
00264 The available fields are:
00265 success,status,plan
00266
00267 :param args: complete set of field values, in .msg order
00268 :param kwds: use keyword arguments corresponding to message field names
00269 to set specific fields.
00270 """
00271 if args or kwds:
00272 super(GetRoutePlanResponse, self).__init__(*args, **kwds)
00273
00274 if self.success is None:
00275 self.success = False
00276 if self.status is None:
00277 self.status = ''
00278 if self.plan is None:
00279 self.plan = geographic_msgs.msg.RoutePath()
00280 else:
00281 self.success = False
00282 self.status = ''
00283 self.plan = geographic_msgs.msg.RoutePath()
00284
00285 def _get_types(self):
00286 """
00287 internal API method
00288 """
00289 return self._slot_types
00290
00291 def serialize(self, buff):
00292 """
00293 serialize message into buffer
00294 :param buff: buffer, ``StringIO``
00295 """
00296 try:
00297 buff.write(_struct_B.pack(self.success))
00298 _x = self.status
00299 length = len(_x)
00300 if python3 or type(_x) == unicode:
00301 _x = _x.encode('utf-8')
00302 length = len(_x)
00303 buff.write(struct.pack('<I%ss'%length, length, _x))
00304 _x = self
00305 buff.write(_struct_3I.pack(_x.plan.header.seq, _x.plan.header.stamp.secs, _x.plan.header.stamp.nsecs))
00306 _x = self.plan.header.frame_id
00307 length = len(_x)
00308 if python3 or type(_x) == unicode:
00309 _x = _x.encode('utf-8')
00310 length = len(_x)
00311 buff.write(struct.pack('<I%ss'%length, length, _x))
00312 _x = self.plan.network.uuid
00313
00314 if type(_x) in [list, tuple]:
00315 buff.write(_struct_16B.pack(*_x))
00316 else:
00317 buff.write(_struct_16s.pack(_x))
00318 length = len(self.plan.segments)
00319 buff.write(_struct_I.pack(length))
00320 for val1 in self.plan.segments:
00321 _x = val1.uuid
00322
00323 if type(_x) in [list, tuple]:
00324 buff.write(_struct_16B.pack(*_x))
00325 else:
00326 buff.write(_struct_16s.pack(_x))
00327 length = len(self.plan.props)
00328 buff.write(_struct_I.pack(length))
00329 for val1 in self.plan.props:
00330 _x = val1.key
00331 length = len(_x)
00332 if python3 or type(_x) == unicode:
00333 _x = _x.encode('utf-8')
00334 length = len(_x)
00335 buff.write(struct.pack('<I%ss'%length, length, _x))
00336 _x = val1.value
00337 length = len(_x)
00338 if python3 or type(_x) == unicode:
00339 _x = _x.encode('utf-8')
00340 length = len(_x)
00341 buff.write(struct.pack('<I%ss'%length, length, _x))
00342 except struct.error as se: self._check_types(se)
00343 except TypeError as te: self._check_types(te)
00344
00345 def deserialize(self, str):
00346 """
00347 unpack serialized message in str into this message instance
00348 :param str: byte array of serialized message, ``str``
00349 """
00350 try:
00351 if self.plan is None:
00352 self.plan = geographic_msgs.msg.RoutePath()
00353 end = 0
00354 start = end
00355 end += 1
00356 (self.success,) = _struct_B.unpack(str[start:end])
00357 self.success = bool(self.success)
00358 start = end
00359 end += 4
00360 (length,) = _struct_I.unpack(str[start:end])
00361 start = end
00362 end += length
00363 if python3:
00364 self.status = str[start:end].decode('utf-8')
00365 else:
00366 self.status = str[start:end]
00367 _x = self
00368 start = end
00369 end += 12
00370 (_x.plan.header.seq, _x.plan.header.stamp.secs, _x.plan.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00371 start = end
00372 end += 4
00373 (length,) = _struct_I.unpack(str[start:end])
00374 start = end
00375 end += length
00376 if python3:
00377 self.plan.header.frame_id = str[start:end].decode('utf-8')
00378 else:
00379 self.plan.header.frame_id = str[start:end]
00380 start = end
00381 end += 16
00382 self.plan.network.uuid = str[start:end]
00383 start = end
00384 end += 4
00385 (length,) = _struct_I.unpack(str[start:end])
00386 self.plan.segments = []
00387 for i in range(0, length):
00388 val1 = uuid_msgs.msg.UniqueID()
00389 start = end
00390 end += 16
00391 val1.uuid = str[start:end]
00392 self.plan.segments.append(val1)
00393 start = end
00394 end += 4
00395 (length,) = _struct_I.unpack(str[start:end])
00396 self.plan.props = []
00397 for i in range(0, length):
00398 val1 = geographic_msgs.msg.KeyValue()
00399 start = end
00400 end += 4
00401 (length,) = _struct_I.unpack(str[start:end])
00402 start = end
00403 end += length
00404 if python3:
00405 val1.key = str[start:end].decode('utf-8')
00406 else:
00407 val1.key = str[start:end]
00408 start = end
00409 end += 4
00410 (length,) = _struct_I.unpack(str[start:end])
00411 start = end
00412 end += length
00413 if python3:
00414 val1.value = str[start:end].decode('utf-8')
00415 else:
00416 val1.value = str[start:end]
00417 self.plan.props.append(val1)
00418 return self
00419 except struct.error as e:
00420 raise genpy.DeserializationError(e)
00421
00422
00423 def serialize_numpy(self, buff, numpy):
00424 """
00425 serialize message with numpy array types into buffer
00426 :param buff: buffer, ``StringIO``
00427 :param numpy: numpy python module
00428 """
00429 try:
00430 buff.write(_struct_B.pack(self.success))
00431 _x = self.status
00432 length = len(_x)
00433 if python3 or type(_x) == unicode:
00434 _x = _x.encode('utf-8')
00435 length = len(_x)
00436 buff.write(struct.pack('<I%ss'%length, length, _x))
00437 _x = self
00438 buff.write(_struct_3I.pack(_x.plan.header.seq, _x.plan.header.stamp.secs, _x.plan.header.stamp.nsecs))
00439 _x = self.plan.header.frame_id
00440 length = len(_x)
00441 if python3 or type(_x) == unicode:
00442 _x = _x.encode('utf-8')
00443 length = len(_x)
00444 buff.write(struct.pack('<I%ss'%length, length, _x))
00445 _x = self.plan.network.uuid
00446
00447 if type(_x) in [list, tuple]:
00448 buff.write(_struct_16B.pack(*_x))
00449 else:
00450 buff.write(_struct_16s.pack(_x))
00451 length = len(self.plan.segments)
00452 buff.write(_struct_I.pack(length))
00453 for val1 in self.plan.segments:
00454 _x = val1.uuid
00455
00456 if type(_x) in [list, tuple]:
00457 buff.write(_struct_16B.pack(*_x))
00458 else:
00459 buff.write(_struct_16s.pack(_x))
00460 length = len(self.plan.props)
00461 buff.write(_struct_I.pack(length))
00462 for val1 in self.plan.props:
00463 _x = val1.key
00464 length = len(_x)
00465 if python3 or type(_x) == unicode:
00466 _x = _x.encode('utf-8')
00467 length = len(_x)
00468 buff.write(struct.pack('<I%ss'%length, length, _x))
00469 _x = val1.value
00470 length = len(_x)
00471 if python3 or type(_x) == unicode:
00472 _x = _x.encode('utf-8')
00473 length = len(_x)
00474 buff.write(struct.pack('<I%ss'%length, length, _x))
00475 except struct.error as se: self._check_types(se)
00476 except TypeError as te: self._check_types(te)
00477
00478 def deserialize_numpy(self, str, numpy):
00479 """
00480 unpack serialized message in str into this message instance using numpy for array types
00481 :param str: byte array of serialized message, ``str``
00482 :param numpy: numpy python module
00483 """
00484 try:
00485 if self.plan is None:
00486 self.plan = geographic_msgs.msg.RoutePath()
00487 end = 0
00488 start = end
00489 end += 1
00490 (self.success,) = _struct_B.unpack(str[start:end])
00491 self.success = bool(self.success)
00492 start = end
00493 end += 4
00494 (length,) = _struct_I.unpack(str[start:end])
00495 start = end
00496 end += length
00497 if python3:
00498 self.status = str[start:end].decode('utf-8')
00499 else:
00500 self.status = str[start:end]
00501 _x = self
00502 start = end
00503 end += 12
00504 (_x.plan.header.seq, _x.plan.header.stamp.secs, _x.plan.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00505 start = end
00506 end += 4
00507 (length,) = _struct_I.unpack(str[start:end])
00508 start = end
00509 end += length
00510 if python3:
00511 self.plan.header.frame_id = str[start:end].decode('utf-8')
00512 else:
00513 self.plan.header.frame_id = str[start:end]
00514 start = end
00515 end += 16
00516 self.plan.network.uuid = str[start:end]
00517 start = end
00518 end += 4
00519 (length,) = _struct_I.unpack(str[start:end])
00520 self.plan.segments = []
00521 for i in range(0, length):
00522 val1 = uuid_msgs.msg.UniqueID()
00523 start = end
00524 end += 16
00525 val1.uuid = str[start:end]
00526 self.plan.segments.append(val1)
00527 start = end
00528 end += 4
00529 (length,) = _struct_I.unpack(str[start:end])
00530 self.plan.props = []
00531 for i in range(0, length):
00532 val1 = geographic_msgs.msg.KeyValue()
00533 start = end
00534 end += 4
00535 (length,) = _struct_I.unpack(str[start:end])
00536 start = end
00537 end += length
00538 if python3:
00539 val1.key = str[start:end].decode('utf-8')
00540 else:
00541 val1.key = str[start:end]
00542 start = end
00543 end += 4
00544 (length,) = _struct_I.unpack(str[start:end])
00545 start = end
00546 end += length
00547 if python3:
00548 val1.value = str[start:end].decode('utf-8')
00549 else:
00550 val1.value = str[start:end]
00551 self.plan.props.append(val1)
00552 return self
00553 except struct.error as e:
00554 raise genpy.DeserializationError(e)
00555
00556 _struct_I = genpy.struct_I
00557 _struct_3I = struct.Struct("<3I")
00558 _struct_B = struct.Struct("<B")
00559 _struct_16B = struct.Struct("<16B")
00560 _struct_16s = struct.Struct("<16s")
00561 class GetRoutePlan(object):
00562 _type = 'geographic_msgs/GetRoutePlan'
00563 _md5sum = '04479050c4f2a58d915ceec419e70b4e'
00564 _request_class = GetRoutePlanRequest
00565 _response_class = GetRoutePlanResponse