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