00001 """autogenerated by genmsg_py from LookupTransformResult.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import geometry_msgs.msg
00006 import tf2_msgs.msg
00007 import std_msgs.msg
00008
00009 class LookupTransformResult(roslib.message.Message):
00010 _md5sum = "3fe5db6a19ca9cfb675418c5ad875c36"
00011 _type = "tf2_msgs/LookupTransformResult"
00012 _has_header = False
00013 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00014 geometry_msgs/TransformStamped transform
00015 tf2_msgs/TF2Error error
00016
00017 ================================================================================
00018 MSG: geometry_msgs/TransformStamped
00019 # This expresses a transform from coordinate frame header.frame_id
00020 # to the coordinate frame child_frame_id
00021 #
00022 # This message is mostly used by the
00023 # <a href="http://www.ros.org/wiki/tf">tf</a> package.
00024 # See it's documentation for more information.
00025
00026 Header header
00027 string child_frame_id # the frame id of the child frame
00028 Transform transform
00029
00030 ================================================================================
00031 MSG: std_msgs/Header
00032 # Standard metadata for higher-level stamped data types.
00033 # This is generally used to communicate timestamped data
00034 # in a particular coordinate frame.
00035 #
00036 # sequence ID: consecutively increasing ID
00037 uint32 seq
00038 #Two-integer timestamp that is expressed as:
00039 # * stamp.secs: seconds (stamp_secs) since epoch
00040 # * stamp.nsecs: nanoseconds since stamp_secs
00041 # time-handling sugar is provided by the client library
00042 time stamp
00043 #Frame this data is associated with
00044 # 0: no frame
00045 # 1: global frame
00046 string frame_id
00047
00048 ================================================================================
00049 MSG: geometry_msgs/Transform
00050 # This represents the transform between two coordinate frames in free space.
00051
00052 Vector3 translation
00053 Quaternion rotation
00054
00055 ================================================================================
00056 MSG: geometry_msgs/Vector3
00057 # This represents a vector in free space.
00058
00059 float64 x
00060 float64 y
00061 float64 z
00062 ================================================================================
00063 MSG: geometry_msgs/Quaternion
00064 # This represents an orientation in free space in quaternion form.
00065
00066 float64 x
00067 float64 y
00068 float64 z
00069 float64 w
00070
00071 ================================================================================
00072 MSG: tf2_msgs/TF2Error
00073 uint8 NO_ERROR = 0
00074 uint8 LOOKUP_ERROR = 1
00075 uint8 CONNECTIVITY_ERROR = 2
00076 uint8 EXTRAPOLATION_ERROR = 3
00077 uint8 INVALID_ARGUMENT_ERROR = 4
00078 uint8 TIMEOUT_ERROR = 5
00079 uint8 TRANSFORM_ERROR = 6
00080
00081 uint8 error
00082 string error_string
00083
00084 """
00085 __slots__ = ['transform','error']
00086 _slot_types = ['geometry_msgs/TransformStamped','tf2_msgs/TF2Error']
00087
00088 def __init__(self, *args, **kwds):
00089 """
00090 Constructor. Any message fields that are implicitly/explicitly
00091 set to None will be assigned a default value. The recommend
00092 use is keyword arguments as this is more robust to future message
00093 changes. You cannot mix in-order arguments and keyword arguments.
00094
00095 The available fields are:
00096 transform,error
00097
00098 @param args: complete set of field values, in .msg order
00099 @param kwds: use keyword arguments corresponding to message field names
00100 to set specific fields.
00101 """
00102 if args or kwds:
00103 super(LookupTransformResult, self).__init__(*args, **kwds)
00104
00105 if self.transform is None:
00106 self.transform = geometry_msgs.msg.TransformStamped()
00107 if self.error is None:
00108 self.error = tf2_msgs.msg.TF2Error()
00109 else:
00110 self.transform = geometry_msgs.msg.TransformStamped()
00111 self.error = tf2_msgs.msg.TF2Error()
00112
00113 def _get_types(self):
00114 """
00115 internal API method
00116 """
00117 return self._slot_types
00118
00119 def serialize(self, buff):
00120 """
00121 serialize message into buffer
00122 @param buff: buffer
00123 @type buff: StringIO
00124 """
00125 try:
00126 _x = self
00127 buff.write(_struct_3I.pack(_x.transform.header.seq, _x.transform.header.stamp.secs, _x.transform.header.stamp.nsecs))
00128 _x = self.transform.header.frame_id
00129 length = len(_x)
00130 buff.write(struct.pack('<I%ss'%length, length, _x))
00131 _x = self.transform.child_frame_id
00132 length = len(_x)
00133 buff.write(struct.pack('<I%ss'%length, length, _x))
00134 _x = self
00135 buff.write(_struct_7dB.pack(_x.transform.transform.translation.x, _x.transform.transform.translation.y, _x.transform.transform.translation.z, _x.transform.transform.rotation.x, _x.transform.transform.rotation.y, _x.transform.transform.rotation.z, _x.transform.transform.rotation.w, _x.error.error))
00136 _x = self.error.error_string
00137 length = len(_x)
00138 buff.write(struct.pack('<I%ss'%length, length, _x))
00139 except struct.error, se: self._check_types(se)
00140 except TypeError, te: self._check_types(te)
00141
00142 def deserialize(self, str):
00143 """
00144 unpack serialized message in str into this message instance
00145 @param str: byte array of serialized message
00146 @type str: str
00147 """
00148 try:
00149 if self.transform is None:
00150 self.transform = geometry_msgs.msg.TransformStamped()
00151 if self.error is None:
00152 self.error = tf2_msgs.msg.TF2Error()
00153 end = 0
00154 _x = self
00155 start = end
00156 end += 12
00157 (_x.transform.header.seq, _x.transform.header.stamp.secs, _x.transform.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00158 start = end
00159 end += 4
00160 (length,) = _struct_I.unpack(str[start:end])
00161 start = end
00162 end += length
00163 self.transform.header.frame_id = str[start:end]
00164 start = end
00165 end += 4
00166 (length,) = _struct_I.unpack(str[start:end])
00167 start = end
00168 end += length
00169 self.transform.child_frame_id = str[start:end]
00170 _x = self
00171 start = end
00172 end += 57
00173 (_x.transform.transform.translation.x, _x.transform.transform.translation.y, _x.transform.transform.translation.z, _x.transform.transform.rotation.x, _x.transform.transform.rotation.y, _x.transform.transform.rotation.z, _x.transform.transform.rotation.w, _x.error.error,) = _struct_7dB.unpack(str[start:end])
00174 start = end
00175 end += 4
00176 (length,) = _struct_I.unpack(str[start:end])
00177 start = end
00178 end += length
00179 self.error.error_string = str[start:end]
00180 return self
00181 except struct.error, e:
00182 raise roslib.message.DeserializationError(e)
00183
00184
00185 def serialize_numpy(self, buff, numpy):
00186 """
00187 serialize message with numpy array types into buffer
00188 @param buff: buffer
00189 @type buff: StringIO
00190 @param numpy: numpy python module
00191 @type numpy module
00192 """
00193 try:
00194 _x = self
00195 buff.write(_struct_3I.pack(_x.transform.header.seq, _x.transform.header.stamp.secs, _x.transform.header.stamp.nsecs))
00196 _x = self.transform.header.frame_id
00197 length = len(_x)
00198 buff.write(struct.pack('<I%ss'%length, length, _x))
00199 _x = self.transform.child_frame_id
00200 length = len(_x)
00201 buff.write(struct.pack('<I%ss'%length, length, _x))
00202 _x = self
00203 buff.write(_struct_7dB.pack(_x.transform.transform.translation.x, _x.transform.transform.translation.y, _x.transform.transform.translation.z, _x.transform.transform.rotation.x, _x.transform.transform.rotation.y, _x.transform.transform.rotation.z, _x.transform.transform.rotation.w, _x.error.error))
00204 _x = self.error.error_string
00205 length = len(_x)
00206 buff.write(struct.pack('<I%ss'%length, length, _x))
00207 except struct.error, se: self._check_types(se)
00208 except TypeError, te: self._check_types(te)
00209
00210 def deserialize_numpy(self, str, numpy):
00211 """
00212 unpack serialized message in str into this message instance using numpy for array types
00213 @param str: byte array of serialized message
00214 @type str: str
00215 @param numpy: numpy python module
00216 @type numpy: module
00217 """
00218 try:
00219 if self.transform is None:
00220 self.transform = geometry_msgs.msg.TransformStamped()
00221 if self.error is None:
00222 self.error = tf2_msgs.msg.TF2Error()
00223 end = 0
00224 _x = self
00225 start = end
00226 end += 12
00227 (_x.transform.header.seq, _x.transform.header.stamp.secs, _x.transform.header.stamp.nsecs,) = _struct_3I.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 self.transform.header.frame_id = str[start:end]
00234 start = end
00235 end += 4
00236 (length,) = _struct_I.unpack(str[start:end])
00237 start = end
00238 end += length
00239 self.transform.child_frame_id = str[start:end]
00240 _x = self
00241 start = end
00242 end += 57
00243 (_x.transform.transform.translation.x, _x.transform.transform.translation.y, _x.transform.transform.translation.z, _x.transform.transform.rotation.x, _x.transform.transform.rotation.y, _x.transform.transform.rotation.z, _x.transform.transform.rotation.w, _x.error.error,) = _struct_7dB.unpack(str[start:end])
00244 start = end
00245 end += 4
00246 (length,) = _struct_I.unpack(str[start:end])
00247 start = end
00248 end += length
00249 self.error.error_string = str[start:end]
00250 return self
00251 except struct.error, e:
00252 raise roslib.message.DeserializationError(e)
00253
00254 _struct_I = roslib.message.struct_I
00255 _struct_3I = struct.Struct("<3I")
00256 _struct_7dB = struct.Struct("<7dB")