00001 """autogenerated by genpy from re_msgs/SeenObject.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 genpy
00009
00010 class SeenObject(genpy.Message):
00011 _md5sum = "9d793db59f53f1c133df1a2136f9483a"
00012 _type = "re_msgs/SeenObject"
00013 _has_header = False
00014 _full_text = """#This represents a Object
00015 time stamp
00016 string name
00017 geometry_msgs/Pose pose
00018
00019 ================================================================================
00020 MSG: geometry_msgs/Pose
00021 # A representation of pose in free space, composed of postion and orientation.
00022 Point position
00023 Quaternion orientation
00024
00025 ================================================================================
00026 MSG: geometry_msgs/Point
00027 # This contains the position of a point in free space
00028 float64 x
00029 float64 y
00030 float64 z
00031
00032 ================================================================================
00033 MSG: geometry_msgs/Quaternion
00034 # This represents an orientation in free space in quaternion form.
00035
00036 float64 x
00037 float64 y
00038 float64 z
00039 float64 w
00040
00041 """
00042 __slots__ = ['stamp','name','pose']
00043 _slot_types = ['time','string','geometry_msgs/Pose']
00044
00045 def __init__(self, *args, **kwds):
00046 """
00047 Constructor. Any message fields that are implicitly/explicitly
00048 set to None will be assigned a default value. The recommend
00049 use is keyword arguments as this is more robust to future message
00050 changes. You cannot mix in-order arguments and keyword arguments.
00051
00052 The available fields are:
00053 stamp,name,pose
00054
00055 :param args: complete set of field values, in .msg order
00056 :param kwds: use keyword arguments corresponding to message field names
00057 to set specific fields.
00058 """
00059 if args or kwds:
00060 super(SeenObject, self).__init__(*args, **kwds)
00061
00062 if self.stamp is None:
00063 self.stamp = genpy.Time()
00064 if self.name is None:
00065 self.name = ''
00066 if self.pose is None:
00067 self.pose = geometry_msgs.msg.Pose()
00068 else:
00069 self.stamp = genpy.Time()
00070 self.name = ''
00071 self.pose = geometry_msgs.msg.Pose()
00072
00073 def _get_types(self):
00074 """
00075 internal API method
00076 """
00077 return self._slot_types
00078
00079 def serialize(self, buff):
00080 """
00081 serialize message into buffer
00082 :param buff: buffer, ``StringIO``
00083 """
00084 try:
00085 _x = self
00086 buff.write(_struct_2I.pack(_x.stamp.secs, _x.stamp.nsecs))
00087 _x = self.name
00088 length = len(_x)
00089 if python3 or type(_x) == unicode:
00090 _x = _x.encode('utf-8')
00091 length = len(_x)
00092 buff.write(struct.pack('<I%ss'%length, length, _x))
00093 _x = self
00094 buff.write(_struct_7d.pack(_x.pose.position.x, _x.pose.position.y, _x.pose.position.z, _x.pose.orientation.x, _x.pose.orientation.y, _x.pose.orientation.z, _x.pose.orientation.w))
00095 except struct.error as se: self._check_types(se)
00096 except TypeError as te: self._check_types(te)
00097
00098 def deserialize(self, str):
00099 """
00100 unpack serialized message in str into this message instance
00101 :param str: byte array of serialized message, ``str``
00102 """
00103 try:
00104 if self.stamp is None:
00105 self.stamp = genpy.Time()
00106 if self.pose is None:
00107 self.pose = geometry_msgs.msg.Pose()
00108 end = 0
00109 _x = self
00110 start = end
00111 end += 8
00112 (_x.stamp.secs, _x.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00113 start = end
00114 end += 4
00115 (length,) = _struct_I.unpack(str[start:end])
00116 start = end
00117 end += length
00118 if python3:
00119 self.name = str[start:end].decode('utf-8')
00120 else:
00121 self.name = str[start:end]
00122 _x = self
00123 start = end
00124 end += 56
00125 (_x.pose.position.x, _x.pose.position.y, _x.pose.position.z, _x.pose.orientation.x, _x.pose.orientation.y, _x.pose.orientation.z, _x.pose.orientation.w,) = _struct_7d.unpack(str[start:end])
00126 self.stamp.canon()
00127 return self
00128 except struct.error as e:
00129 raise genpy.DeserializationError(e)
00130
00131
00132 def serialize_numpy(self, buff, numpy):
00133 """
00134 serialize message with numpy array types into buffer
00135 :param buff: buffer, ``StringIO``
00136 :param numpy: numpy python module
00137 """
00138 try:
00139 _x = self
00140 buff.write(_struct_2I.pack(_x.stamp.secs, _x.stamp.nsecs))
00141 _x = self.name
00142 length = len(_x)
00143 if python3 or type(_x) == unicode:
00144 _x = _x.encode('utf-8')
00145 length = len(_x)
00146 buff.write(struct.pack('<I%ss'%length, length, _x))
00147 _x = self
00148 buff.write(_struct_7d.pack(_x.pose.position.x, _x.pose.position.y, _x.pose.position.z, _x.pose.orientation.x, _x.pose.orientation.y, _x.pose.orientation.z, _x.pose.orientation.w))
00149 except struct.error as se: self._check_types(se)
00150 except TypeError as te: self._check_types(te)
00151
00152 def deserialize_numpy(self, str, numpy):
00153 """
00154 unpack serialized message in str into this message instance using numpy for array types
00155 :param str: byte array of serialized message, ``str``
00156 :param numpy: numpy python module
00157 """
00158 try:
00159 if self.stamp is None:
00160 self.stamp = genpy.Time()
00161 if self.pose is None:
00162 self.pose = geometry_msgs.msg.Pose()
00163 end = 0
00164 _x = self
00165 start = end
00166 end += 8
00167 (_x.stamp.secs, _x.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00168 start = end
00169 end += 4
00170 (length,) = _struct_I.unpack(str[start:end])
00171 start = end
00172 end += length
00173 if python3:
00174 self.name = str[start:end].decode('utf-8')
00175 else:
00176 self.name = str[start:end]
00177 _x = self
00178 start = end
00179 end += 56
00180 (_x.pose.position.x, _x.pose.position.y, _x.pose.position.z, _x.pose.orientation.x, _x.pose.orientation.y, _x.pose.orientation.z, _x.pose.orientation.w,) = _struct_7d.unpack(str[start:end])
00181 self.stamp.canon()
00182 return self
00183 except struct.error as e:
00184 raise genpy.DeserializationError(e)
00185
00186 _struct_I = genpy.struct_I
00187 _struct_7d = struct.Struct("<7d")
00188 _struct_2I = struct.Struct("<2I")