00001 """autogenerated by genmsg_py from MatchResult.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import geometry_msgs.msg
00006
00007 class MatchResult(roslib.message.Message):
00008 _md5sum = "3c16c949138ee087a73814f2c032b3d6"
00009 _type = "kidnapped_robot/MatchResult"
00010 _has_header = False
00011 _full_text = """geometry_msgs/Transform transform
00012 #uint32 request_id
00013 uint32 match_id
00014
00015 ================================================================================
00016 MSG: geometry_msgs/Transform
00017 # This represents the transform between two coordinate frames in free space.
00018
00019 Vector3 translation
00020 Quaternion rotation
00021
00022 ================================================================================
00023 MSG: geometry_msgs/Vector3
00024 # This represents a vector in free space.
00025
00026 float64 x
00027 float64 y
00028 float64 z
00029 ================================================================================
00030 MSG: geometry_msgs/Quaternion
00031 # This represents an orientation in free space in quaternion form.
00032
00033 float64 x
00034 float64 y
00035 float64 z
00036 float64 w
00037
00038 """
00039 __slots__ = ['transform','match_id']
00040 _slot_types = ['geometry_msgs/Transform','uint32']
00041
00042 def __init__(self, *args, **kwds):
00043 """
00044 Constructor. Any message fields that are implicitly/explicitly
00045 set to None will be assigned a default value. The recommend
00046 use is keyword arguments as this is more robust to future message
00047 changes. You cannot mix in-order arguments and keyword arguments.
00048
00049 The available fields are:
00050 transform,match_id
00051
00052 @param args: complete set of field values, in .msg order
00053 @param kwds: use keyword arguments corresponding to message field names
00054 to set specific fields.
00055 """
00056 if args or kwds:
00057 super(MatchResult, self).__init__(*args, **kwds)
00058
00059 if self.transform is None:
00060 self.transform = geometry_msgs.msg.Transform()
00061 if self.match_id is None:
00062 self.match_id = 0
00063 else:
00064 self.transform = geometry_msgs.msg.Transform()
00065 self.match_id = 0
00066
00067 def _get_types(self):
00068 """
00069 internal API method
00070 """
00071 return self._slot_types
00072
00073 def serialize(self, buff):
00074 """
00075 serialize message into buffer
00076 @param buff: buffer
00077 @type buff: StringIO
00078 """
00079 try:
00080 _x = self
00081 buff.write(_struct_7dI.pack(_x.transform.translation.x, _x.transform.translation.y, _x.transform.translation.z, _x.transform.rotation.x, _x.transform.rotation.y, _x.transform.rotation.z, _x.transform.rotation.w, _x.match_id))
00082 except struct.error, se: self._check_types(se)
00083 except TypeError, te: self._check_types(te)
00084
00085 def deserialize(self, str):
00086 """
00087 unpack serialized message in str into this message instance
00088 @param str: byte array of serialized message
00089 @type str: str
00090 """
00091 try:
00092 if self.transform is None:
00093 self.transform = geometry_msgs.msg.Transform()
00094 end = 0
00095 _x = self
00096 start = end
00097 end += 60
00098 (_x.transform.translation.x, _x.transform.translation.y, _x.transform.translation.z, _x.transform.rotation.x, _x.transform.rotation.y, _x.transform.rotation.z, _x.transform.rotation.w, _x.match_id,) = _struct_7dI.unpack(str[start:end])
00099 return self
00100 except struct.error, e:
00101 raise roslib.message.DeserializationError(e)
00102
00103
00104 def serialize_numpy(self, buff, numpy):
00105 """
00106 serialize message with numpy array types into buffer
00107 @param buff: buffer
00108 @type buff: StringIO
00109 @param numpy: numpy python module
00110 @type numpy module
00111 """
00112 try:
00113 _x = self
00114 buff.write(_struct_7dI.pack(_x.transform.translation.x, _x.transform.translation.y, _x.transform.translation.z, _x.transform.rotation.x, _x.transform.rotation.y, _x.transform.rotation.z, _x.transform.rotation.w, _x.match_id))
00115 except struct.error, se: self._check_types(se)
00116 except TypeError, te: self._check_types(te)
00117
00118 def deserialize_numpy(self, str, numpy):
00119 """
00120 unpack serialized message in str into this message instance using numpy for array types
00121 @param str: byte array of serialized message
00122 @type str: str
00123 @param numpy: numpy python module
00124 @type numpy: module
00125 """
00126 try:
00127 if self.transform is None:
00128 self.transform = geometry_msgs.msg.Transform()
00129 end = 0
00130 _x = self
00131 start = end
00132 end += 60
00133 (_x.transform.translation.x, _x.transform.translation.y, _x.transform.translation.z, _x.transform.rotation.x, _x.transform.rotation.y, _x.transform.rotation.z, _x.transform.rotation.w, _x.match_id,) = _struct_7dI.unpack(str[start:end])
00134 return self
00135 except struct.error, e:
00136 raise roslib.message.DeserializationError(e)
00137
00138 _struct_I = roslib.message.struct_I
00139 _struct_7dI = struct.Struct("<7dI")