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


tidyup_msgs
Author(s): Maintained by Christian Dornhege
autogenerated on Wed Dec 26 2012 15:47:07