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


navfn
Author(s): Kurt Konolige, Eitan Marder-Eppstein
autogenerated on Sat Dec 28 2013 17:14:13