_CleanPathReachability.py
Go to the documentation of this file.
00001 """autogenerated by genpy from coverage_3d_tools/CleanPathReachability.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 CleanPathReachability(genpy.Message):
00011   _md5sum = "707bd1fb2ca0bdcb6d70a89715f9112f"
00012   _type = "coverage_3d_tools/CleanPathReachability"
00013   _has_header = False #flag to mark the presence of a Header object
00014   _full_text = """geometry_msgs/PoseStamped pose
00015 uint32[] reachability
00016 ================================================================================
00017 MSG: geometry_msgs/PoseStamped
00018 # A Pose with reference coordinate frame and timestamp
00019 Header header
00020 Pose pose
00021 
00022 ================================================================================
00023 MSG: std_msgs/Header
00024 # Standard metadata for higher-level stamped data types.
00025 # This is generally used to communicate timestamped data 
00026 # in a particular coordinate frame.
00027 # 
00028 # sequence ID: consecutively increasing ID 
00029 uint32 seq
00030 #Two-integer timestamp that is expressed as:
00031 # * stamp.secs: seconds (stamp_secs) since epoch
00032 # * stamp.nsecs: nanoseconds since stamp_secs
00033 # time-handling sugar is provided by the client library
00034 time stamp
00035 #Frame this data is associated with
00036 # 0: no frame
00037 # 1: global frame
00038 string frame_id
00039 
00040 ================================================================================
00041 MSG: geometry_msgs/Pose
00042 # A representation of pose in free space, composed of postion and orientation. 
00043 Point position
00044 Quaternion orientation
00045 
00046 ================================================================================
00047 MSG: geometry_msgs/Point
00048 # This contains the position of a point in free space
00049 float64 x
00050 float64 y
00051 float64 z
00052 
00053 ================================================================================
00054 MSG: geometry_msgs/Quaternion
00055 # This represents an orientation in free space in quaternion form.
00056 
00057 float64 x
00058 float64 y
00059 float64 z
00060 float64 w
00061 
00062 """
00063   __slots__ = ['pose','reachability']
00064   _slot_types = ['geometry_msgs/PoseStamped','uint32[]']
00065 
00066   def __init__(self, *args, **kwds):
00067     """
00068     Constructor. Any message fields that are implicitly/explicitly
00069     set to None will be assigned a default value. The recommend
00070     use is keyword arguments as this is more robust to future message
00071     changes.  You cannot mix in-order arguments and keyword arguments.
00072 
00073     The available fields are:
00074        pose,reachability
00075 
00076     :param args: complete set of field values, in .msg order
00077     :param kwds: use keyword arguments corresponding to message field names
00078     to set specific fields.
00079     """
00080     if args or kwds:
00081       super(CleanPathReachability, self).__init__(*args, **kwds)
00082       #message fields cannot be None, assign default values for those that are
00083       if self.pose is None:
00084         self.pose = geometry_msgs.msg.PoseStamped()
00085       if self.reachability is None:
00086         self.reachability = []
00087     else:
00088       self.pose = geometry_msgs.msg.PoseStamped()
00089       self.reachability = []
00090 
00091   def _get_types(self):
00092     """
00093     internal API method
00094     """
00095     return self._slot_types
00096 
00097   def serialize(self, buff):
00098     """
00099     serialize message into buffer
00100     :param buff: buffer, ``StringIO``
00101     """
00102     try:
00103       _x = self
00104       buff.write(_struct_3I.pack(_x.pose.header.seq, _x.pose.header.stamp.secs, _x.pose.header.stamp.nsecs))
00105       _x = self.pose.header.frame_id
00106       length = len(_x)
00107       if python3 or type(_x) == unicode:
00108         _x = _x.encode('utf-8')
00109         length = len(_x)
00110       buff.write(struct.pack('<I%ss'%length, length, _x))
00111       _x = self
00112       buff.write(_struct_7d.pack(_x.pose.pose.position.x, _x.pose.pose.position.y, _x.pose.pose.position.z, _x.pose.pose.orientation.x, _x.pose.pose.orientation.y, _x.pose.pose.orientation.z, _x.pose.pose.orientation.w))
00113       length = len(self.reachability)
00114       buff.write(_struct_I.pack(length))
00115       pattern = '<%sI'%length
00116       buff.write(struct.pack(pattern, *self.reachability))
00117     except struct.error as se: self._check_types(se)
00118     except TypeError as te: self._check_types(te)
00119 
00120   def deserialize(self, str):
00121     """
00122     unpack serialized message in str into this message instance
00123     :param str: byte array of serialized message, ``str``
00124     """
00125     try:
00126       if self.pose is None:
00127         self.pose = geometry_msgs.msg.PoseStamped()
00128       end = 0
00129       _x = self
00130       start = end
00131       end += 12
00132       (_x.pose.header.seq, _x.pose.header.stamp.secs, _x.pose.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00133       start = end
00134       end += 4
00135       (length,) = _struct_I.unpack(str[start:end])
00136       start = end
00137       end += length
00138       if python3:
00139         self.pose.header.frame_id = str[start:end].decode('utf-8')
00140       else:
00141         self.pose.header.frame_id = str[start:end]
00142       _x = self
00143       start = end
00144       end += 56
00145       (_x.pose.pose.position.x, _x.pose.pose.position.y, _x.pose.pose.position.z, _x.pose.pose.orientation.x, _x.pose.pose.orientation.y, _x.pose.pose.orientation.z, _x.pose.pose.orientation.w,) = _struct_7d.unpack(str[start:end])
00146       start = end
00147       end += 4
00148       (length,) = _struct_I.unpack(str[start:end])
00149       pattern = '<%sI'%length
00150       start = end
00151       end += struct.calcsize(pattern)
00152       self.reachability = struct.unpack(pattern, str[start:end])
00153       return self
00154     except struct.error as e:
00155       raise genpy.DeserializationError(e) #most likely buffer underfill
00156 
00157 
00158   def serialize_numpy(self, buff, numpy):
00159     """
00160     serialize message with numpy array types into buffer
00161     :param buff: buffer, ``StringIO``
00162     :param numpy: numpy python module
00163     """
00164     try:
00165       _x = self
00166       buff.write(_struct_3I.pack(_x.pose.header.seq, _x.pose.header.stamp.secs, _x.pose.header.stamp.nsecs))
00167       _x = self.pose.header.frame_id
00168       length = len(_x)
00169       if python3 or type(_x) == unicode:
00170         _x = _x.encode('utf-8')
00171         length = len(_x)
00172       buff.write(struct.pack('<I%ss'%length, length, _x))
00173       _x = self
00174       buff.write(_struct_7d.pack(_x.pose.pose.position.x, _x.pose.pose.position.y, _x.pose.pose.position.z, _x.pose.pose.orientation.x, _x.pose.pose.orientation.y, _x.pose.pose.orientation.z, _x.pose.pose.orientation.w))
00175       length = len(self.reachability)
00176       buff.write(_struct_I.pack(length))
00177       pattern = '<%sI'%length
00178       buff.write(self.reachability.tostring())
00179     except struct.error as se: self._check_types(se)
00180     except TypeError as te: self._check_types(te)
00181 
00182   def deserialize_numpy(self, str, numpy):
00183     """
00184     unpack serialized message in str into this message instance using numpy for array types
00185     :param str: byte array of serialized message, ``str``
00186     :param numpy: numpy python module
00187     """
00188     try:
00189       if self.pose is None:
00190         self.pose = geometry_msgs.msg.PoseStamped()
00191       end = 0
00192       _x = self
00193       start = end
00194       end += 12
00195       (_x.pose.header.seq, _x.pose.header.stamp.secs, _x.pose.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00196       start = end
00197       end += 4
00198       (length,) = _struct_I.unpack(str[start:end])
00199       start = end
00200       end += length
00201       if python3:
00202         self.pose.header.frame_id = str[start:end].decode('utf-8')
00203       else:
00204         self.pose.header.frame_id = str[start:end]
00205       _x = self
00206       start = end
00207       end += 56
00208       (_x.pose.pose.position.x, _x.pose.pose.position.y, _x.pose.pose.position.z, _x.pose.pose.orientation.x, _x.pose.pose.orientation.y, _x.pose.pose.orientation.z, _x.pose.pose.orientation.w,) = _struct_7d.unpack(str[start:end])
00209       start = end
00210       end += 4
00211       (length,) = _struct_I.unpack(str[start:end])
00212       pattern = '<%sI'%length
00213       start = end
00214       end += struct.calcsize(pattern)
00215       self.reachability = numpy.frombuffer(str[start:end], dtype=numpy.uint32, count=length)
00216       return self
00217     except struct.error as e:
00218       raise genpy.DeserializationError(e) #most likely buffer underfill
00219 
00220 _struct_I = genpy.struct_I
00221 _struct_3I = struct.Struct("<3I")
00222 _struct_7d = struct.Struct("<7d")
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends


coverage_3d_tools
Author(s): Juergen Hess
autogenerated on Wed Dec 26 2012 15:25:37