00001 """autogenerated by genpy from tf2_msgs/LookupTransformActionResult.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 import actionlib_msgs.msg
00010 import tf2_msgs.msg
00011 import std_msgs.msg
00012
00013 class LookupTransformActionResult(genpy.Message):
00014 _md5sum = "ac26ce75a41384fa8bb4dc10f491ab90"
00015 _type = "tf2_msgs/LookupTransformActionResult"
00016 _has_header = True
00017 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00018
00019 Header header
00020 actionlib_msgs/GoalStatus status
00021 LookupTransformResult result
00022
00023 ================================================================================
00024 MSG: std_msgs/Header
00025 # Standard metadata for higher-level stamped data types.
00026 # This is generally used to communicate timestamped data
00027 # in a particular coordinate frame.
00028 #
00029 # sequence ID: consecutively increasing ID
00030 uint32 seq
00031 #Two-integer timestamp that is expressed as:
00032 # * stamp.secs: seconds (stamp_secs) since epoch
00033 # * stamp.nsecs: nanoseconds since stamp_secs
00034 # time-handling sugar is provided by the client library
00035 time stamp
00036 #Frame this data is associated with
00037 # 0: no frame
00038 # 1: global frame
00039 string frame_id
00040
00041 ================================================================================
00042 MSG: actionlib_msgs/GoalStatus
00043 GoalID goal_id
00044 uint8 status
00045 uint8 PENDING = 0 # The goal has yet to be processed by the action server
00046 uint8 ACTIVE = 1 # The goal is currently being processed by the action server
00047 uint8 PREEMPTED = 2 # The goal received a cancel request after it started executing
00048 # and has since completed its execution (Terminal State)
00049 uint8 SUCCEEDED = 3 # The goal was achieved successfully by the action server (Terminal State)
00050 uint8 ABORTED = 4 # The goal was aborted during execution by the action server due
00051 # to some failure (Terminal State)
00052 uint8 REJECTED = 5 # The goal was rejected by the action server without being processed,
00053 # because the goal was unattainable or invalid (Terminal State)
00054 uint8 PREEMPTING = 6 # The goal received a cancel request after it started executing
00055 # and has not yet completed execution
00056 uint8 RECALLING = 7 # The goal received a cancel request before it started executing,
00057 # but the action server has not yet confirmed that the goal is canceled
00058 uint8 RECALLED = 8 # The goal received a cancel request before it started executing
00059 # and was successfully cancelled (Terminal State)
00060 uint8 LOST = 9 # An action client can determine that a goal is LOST. This should not be
00061 # sent over the wire by an action server
00062
00063 #Allow for the user to associate a string with GoalStatus for debugging
00064 string text
00065
00066
00067 ================================================================================
00068 MSG: actionlib_msgs/GoalID
00069 # The stamp should store the time at which this goal was requested.
00070 # It is used by an action server when it tries to preempt all
00071 # goals that were requested before a certain time
00072 time stamp
00073
00074 # The id provides a way to associate feedback and
00075 # result message with specific goal requests. The id
00076 # specified must be unique.
00077 string id
00078
00079
00080 ================================================================================
00081 MSG: tf2_msgs/LookupTransformResult
00082 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00083 geometry_msgs/TransformStamped transform
00084 tf2_msgs/TF2Error error
00085
00086 ================================================================================
00087 MSG: geometry_msgs/TransformStamped
00088 # This expresses a transform from coordinate frame header.frame_id
00089 # to the coordinate frame child_frame_id
00090 #
00091 # This message is mostly used by the
00092 # <a href="http://www.ros.org/wiki/tf">tf</a> package.
00093 # See it's documentation for more information.
00094
00095 Header header
00096 string child_frame_id # the frame id of the child frame
00097 Transform transform
00098
00099 ================================================================================
00100 MSG: geometry_msgs/Transform
00101 # This represents the transform between two coordinate frames in free space.
00102
00103 Vector3 translation
00104 Quaternion rotation
00105
00106 ================================================================================
00107 MSG: geometry_msgs/Vector3
00108 # This represents a vector in free space.
00109
00110 float64 x
00111 float64 y
00112 float64 z
00113 ================================================================================
00114 MSG: geometry_msgs/Quaternion
00115 # This represents an orientation in free space in quaternion form.
00116
00117 float64 x
00118 float64 y
00119 float64 z
00120 float64 w
00121
00122 ================================================================================
00123 MSG: tf2_msgs/TF2Error
00124 uint8 NO_ERROR = 0
00125 uint8 LOOKUP_ERROR = 1
00126 uint8 CONNECTIVITY_ERROR = 2
00127 uint8 EXTRAPOLATION_ERROR = 3
00128 uint8 INVALID_ARGUMENT_ERROR = 4
00129 uint8 TIMEOUT_ERROR = 5
00130 uint8 TRANSFORM_ERROR = 6
00131
00132 uint8 error
00133 string error_string
00134
00135 """
00136 __slots__ = ['header','status','result']
00137 _slot_types = ['std_msgs/Header','actionlib_msgs/GoalStatus','tf2_msgs/LookupTransformResult']
00138
00139 def __init__(self, *args, **kwds):
00140 """
00141 Constructor. Any message fields that are implicitly/explicitly
00142 set to None will be assigned a default value. The recommend
00143 use is keyword arguments as this is more robust to future message
00144 changes. You cannot mix in-order arguments and keyword arguments.
00145
00146 The available fields are:
00147 header,status,result
00148
00149 :param args: complete set of field values, in .msg order
00150 :param kwds: use keyword arguments corresponding to message field names
00151 to set specific fields.
00152 """
00153 if args or kwds:
00154 super(LookupTransformActionResult, self).__init__(*args, **kwds)
00155
00156 if self.header is None:
00157 self.header = std_msgs.msg.Header()
00158 if self.status is None:
00159 self.status = actionlib_msgs.msg.GoalStatus()
00160 if self.result is None:
00161 self.result = tf2_msgs.msg.LookupTransformResult()
00162 else:
00163 self.header = std_msgs.msg.Header()
00164 self.status = actionlib_msgs.msg.GoalStatus()
00165 self.result = tf2_msgs.msg.LookupTransformResult()
00166
00167 def _get_types(self):
00168 """
00169 internal API method
00170 """
00171 return self._slot_types
00172
00173 def serialize(self, buff):
00174 """
00175 serialize message into buffer
00176 :param buff: buffer, ``StringIO``
00177 """
00178 try:
00179 _x = self
00180 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00181 _x = self.header.frame_id
00182 length = len(_x)
00183 if python3 or type(_x) == unicode:
00184 _x = _x.encode('utf-8')
00185 length = len(_x)
00186 buff.write(struct.pack('<I%ss'%length, length, _x))
00187 _x = self
00188 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs))
00189 _x = self.status.goal_id.id
00190 length = len(_x)
00191 if python3 or type(_x) == unicode:
00192 _x = _x.encode('utf-8')
00193 length = len(_x)
00194 buff.write(struct.pack('<I%ss'%length, length, _x))
00195 buff.write(_struct_B.pack(self.status.status))
00196 _x = self.status.text
00197 length = len(_x)
00198 if python3 or type(_x) == unicode:
00199 _x = _x.encode('utf-8')
00200 length = len(_x)
00201 buff.write(struct.pack('<I%ss'%length, length, _x))
00202 _x = self
00203 buff.write(_struct_3I.pack(_x.result.transform.header.seq, _x.result.transform.header.stamp.secs, _x.result.transform.header.stamp.nsecs))
00204 _x = self.result.transform.header.frame_id
00205 length = len(_x)
00206 if python3 or type(_x) == unicode:
00207 _x = _x.encode('utf-8')
00208 length = len(_x)
00209 buff.write(struct.pack('<I%ss'%length, length, _x))
00210 _x = self.result.transform.child_frame_id
00211 length = len(_x)
00212 if python3 or type(_x) == unicode:
00213 _x = _x.encode('utf-8')
00214 length = len(_x)
00215 buff.write(struct.pack('<I%ss'%length, length, _x))
00216 _x = self
00217 buff.write(_struct_7dB.pack(_x.result.transform.transform.translation.x, _x.result.transform.transform.translation.y, _x.result.transform.transform.translation.z, _x.result.transform.transform.rotation.x, _x.result.transform.transform.rotation.y, _x.result.transform.transform.rotation.z, _x.result.transform.transform.rotation.w, _x.result.error.error))
00218 _x = self.result.error.error_string
00219 length = len(_x)
00220 if python3 or type(_x) == unicode:
00221 _x = _x.encode('utf-8')
00222 length = len(_x)
00223 buff.write(struct.pack('<I%ss'%length, length, _x))
00224 except struct.error as se: self._check_types(se)
00225 except TypeError as te: self._check_types(te)
00226
00227 def deserialize(self, str):
00228 """
00229 unpack serialized message in str into this message instance
00230 :param str: byte array of serialized message, ``str``
00231 """
00232 try:
00233 if self.header is None:
00234 self.header = std_msgs.msg.Header()
00235 if self.status is None:
00236 self.status = actionlib_msgs.msg.GoalStatus()
00237 if self.result is None:
00238 self.result = tf2_msgs.msg.LookupTransformResult()
00239 end = 0
00240 _x = self
00241 start = end
00242 end += 12
00243 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.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 if python3:
00250 self.header.frame_id = str[start:end].decode('utf-8')
00251 else:
00252 self.header.frame_id = str[start:end]
00253 _x = self
00254 start = end
00255 end += 8
00256 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00257 start = end
00258 end += 4
00259 (length,) = _struct_I.unpack(str[start:end])
00260 start = end
00261 end += length
00262 if python3:
00263 self.status.goal_id.id = str[start:end].decode('utf-8')
00264 else:
00265 self.status.goal_id.id = str[start:end]
00266 start = end
00267 end += 1
00268 (self.status.status,) = _struct_B.unpack(str[start:end])
00269 start = end
00270 end += 4
00271 (length,) = _struct_I.unpack(str[start:end])
00272 start = end
00273 end += length
00274 if python3:
00275 self.status.text = str[start:end].decode('utf-8')
00276 else:
00277 self.status.text = str[start:end]
00278 _x = self
00279 start = end
00280 end += 12
00281 (_x.result.transform.header.seq, _x.result.transform.header.stamp.secs, _x.result.transform.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00282 start = end
00283 end += 4
00284 (length,) = _struct_I.unpack(str[start:end])
00285 start = end
00286 end += length
00287 if python3:
00288 self.result.transform.header.frame_id = str[start:end].decode('utf-8')
00289 else:
00290 self.result.transform.header.frame_id = str[start:end]
00291 start = end
00292 end += 4
00293 (length,) = _struct_I.unpack(str[start:end])
00294 start = end
00295 end += length
00296 if python3:
00297 self.result.transform.child_frame_id = str[start:end].decode('utf-8')
00298 else:
00299 self.result.transform.child_frame_id = str[start:end]
00300 _x = self
00301 start = end
00302 end += 57
00303 (_x.result.transform.transform.translation.x, _x.result.transform.transform.translation.y, _x.result.transform.transform.translation.z, _x.result.transform.transform.rotation.x, _x.result.transform.transform.rotation.y, _x.result.transform.transform.rotation.z, _x.result.transform.transform.rotation.w, _x.result.error.error,) = _struct_7dB.unpack(str[start:end])
00304 start = end
00305 end += 4
00306 (length,) = _struct_I.unpack(str[start:end])
00307 start = end
00308 end += length
00309 if python3:
00310 self.result.error.error_string = str[start:end].decode('utf-8')
00311 else:
00312 self.result.error.error_string = str[start:end]
00313 return self
00314 except struct.error as e:
00315 raise genpy.DeserializationError(e)
00316
00317
00318 def serialize_numpy(self, buff, numpy):
00319 """
00320 serialize message with numpy array types into buffer
00321 :param buff: buffer, ``StringIO``
00322 :param numpy: numpy python module
00323 """
00324 try:
00325 _x = self
00326 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00327 _x = self.header.frame_id
00328 length = len(_x)
00329 if python3 or type(_x) == unicode:
00330 _x = _x.encode('utf-8')
00331 length = len(_x)
00332 buff.write(struct.pack('<I%ss'%length, length, _x))
00333 _x = self
00334 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs))
00335 _x = self.status.goal_id.id
00336 length = len(_x)
00337 if python3 or type(_x) == unicode:
00338 _x = _x.encode('utf-8')
00339 length = len(_x)
00340 buff.write(struct.pack('<I%ss'%length, length, _x))
00341 buff.write(_struct_B.pack(self.status.status))
00342 _x = self.status.text
00343 length = len(_x)
00344 if python3 or type(_x) == unicode:
00345 _x = _x.encode('utf-8')
00346 length = len(_x)
00347 buff.write(struct.pack('<I%ss'%length, length, _x))
00348 _x = self
00349 buff.write(_struct_3I.pack(_x.result.transform.header.seq, _x.result.transform.header.stamp.secs, _x.result.transform.header.stamp.nsecs))
00350 _x = self.result.transform.header.frame_id
00351 length = len(_x)
00352 if python3 or type(_x) == unicode:
00353 _x = _x.encode('utf-8')
00354 length = len(_x)
00355 buff.write(struct.pack('<I%ss'%length, length, _x))
00356 _x = self.result.transform.child_frame_id
00357 length = len(_x)
00358 if python3 or type(_x) == unicode:
00359 _x = _x.encode('utf-8')
00360 length = len(_x)
00361 buff.write(struct.pack('<I%ss'%length, length, _x))
00362 _x = self
00363 buff.write(_struct_7dB.pack(_x.result.transform.transform.translation.x, _x.result.transform.transform.translation.y, _x.result.transform.transform.translation.z, _x.result.transform.transform.rotation.x, _x.result.transform.transform.rotation.y, _x.result.transform.transform.rotation.z, _x.result.transform.transform.rotation.w, _x.result.error.error))
00364 _x = self.result.error.error_string
00365 length = len(_x)
00366 if python3 or type(_x) == unicode:
00367 _x = _x.encode('utf-8')
00368 length = len(_x)
00369 buff.write(struct.pack('<I%ss'%length, length, _x))
00370 except struct.error as se: self._check_types(se)
00371 except TypeError as te: self._check_types(te)
00372
00373 def deserialize_numpy(self, str, numpy):
00374 """
00375 unpack serialized message in str into this message instance using numpy for array types
00376 :param str: byte array of serialized message, ``str``
00377 :param numpy: numpy python module
00378 """
00379 try:
00380 if self.header is None:
00381 self.header = std_msgs.msg.Header()
00382 if self.status is None:
00383 self.status = actionlib_msgs.msg.GoalStatus()
00384 if self.result is None:
00385 self.result = tf2_msgs.msg.LookupTransformResult()
00386 end = 0
00387 _x = self
00388 start = end
00389 end += 12
00390 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00391 start = end
00392 end += 4
00393 (length,) = _struct_I.unpack(str[start:end])
00394 start = end
00395 end += length
00396 if python3:
00397 self.header.frame_id = str[start:end].decode('utf-8')
00398 else:
00399 self.header.frame_id = str[start:end]
00400 _x = self
00401 start = end
00402 end += 8
00403 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00404 start = end
00405 end += 4
00406 (length,) = _struct_I.unpack(str[start:end])
00407 start = end
00408 end += length
00409 if python3:
00410 self.status.goal_id.id = str[start:end].decode('utf-8')
00411 else:
00412 self.status.goal_id.id = str[start:end]
00413 start = end
00414 end += 1
00415 (self.status.status,) = _struct_B.unpack(str[start:end])
00416 start = end
00417 end += 4
00418 (length,) = _struct_I.unpack(str[start:end])
00419 start = end
00420 end += length
00421 if python3:
00422 self.status.text = str[start:end].decode('utf-8')
00423 else:
00424 self.status.text = str[start:end]
00425 _x = self
00426 start = end
00427 end += 12
00428 (_x.result.transform.header.seq, _x.result.transform.header.stamp.secs, _x.result.transform.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00429 start = end
00430 end += 4
00431 (length,) = _struct_I.unpack(str[start:end])
00432 start = end
00433 end += length
00434 if python3:
00435 self.result.transform.header.frame_id = str[start:end].decode('utf-8')
00436 else:
00437 self.result.transform.header.frame_id = str[start:end]
00438 start = end
00439 end += 4
00440 (length,) = _struct_I.unpack(str[start:end])
00441 start = end
00442 end += length
00443 if python3:
00444 self.result.transform.child_frame_id = str[start:end].decode('utf-8')
00445 else:
00446 self.result.transform.child_frame_id = str[start:end]
00447 _x = self
00448 start = end
00449 end += 57
00450 (_x.result.transform.transform.translation.x, _x.result.transform.transform.translation.y, _x.result.transform.transform.translation.z, _x.result.transform.transform.rotation.x, _x.result.transform.transform.rotation.y, _x.result.transform.transform.rotation.z, _x.result.transform.transform.rotation.w, _x.result.error.error,) = _struct_7dB.unpack(str[start:end])
00451 start = end
00452 end += 4
00453 (length,) = _struct_I.unpack(str[start:end])
00454 start = end
00455 end += length
00456 if python3:
00457 self.result.error.error_string = str[start:end].decode('utf-8')
00458 else:
00459 self.result.error.error_string = str[start:end]
00460 return self
00461 except struct.error as e:
00462 raise genpy.DeserializationError(e)
00463
00464 _struct_I = genpy.struct_I
00465 _struct_3I = struct.Struct("<3I")
00466 _struct_B = struct.Struct("<B")
00467 _struct_2I = struct.Struct("<2I")
00468 _struct_7dB = struct.Struct("<7dB")