00001 """autogenerated by genpy from pr2_object_manipulation_msgs/GetGripperPoseActionResult.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 pr2_object_manipulation_msgs.msg
00008 import geometry_msgs.msg
00009 import genpy
00010 import actionlib_msgs.msg
00011 import std_msgs.msg
00012
00013 class GetGripperPoseActionResult(genpy.Message):
00014 _md5sum = "cf168327f1d79888828811687ef2b95e"
00015 _type = "pr2_object_manipulation_msgs/GetGripperPoseActionResult"
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 GetGripperPoseResult 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: pr2_object_manipulation_msgs/GetGripperPoseResult
00082 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00083 # the returned gripper pose, assuming the user has clicked "accept"
00084 # if the user clicks "cancel" the action aborts
00085 geometry_msgs/PoseStamped gripper_pose
00086 float32 gripper_opening
00087
00088 ================================================================================
00089 MSG: geometry_msgs/PoseStamped
00090 # A Pose with reference coordinate frame and timestamp
00091 Header header
00092 Pose pose
00093
00094 ================================================================================
00095 MSG: geometry_msgs/Pose
00096 # A representation of pose in free space, composed of postion and orientation.
00097 Point position
00098 Quaternion orientation
00099
00100 ================================================================================
00101 MSG: geometry_msgs/Point
00102 # This contains the position of a point in free space
00103 float64 x
00104 float64 y
00105 float64 z
00106
00107 ================================================================================
00108 MSG: geometry_msgs/Quaternion
00109 # This represents an orientation in free space in quaternion form.
00110
00111 float64 x
00112 float64 y
00113 float64 z
00114 float64 w
00115
00116 """
00117 __slots__ = ['header','status','result']
00118 _slot_types = ['std_msgs/Header','actionlib_msgs/GoalStatus','pr2_object_manipulation_msgs/GetGripperPoseResult']
00119
00120 def __init__(self, *args, **kwds):
00121 """
00122 Constructor. Any message fields that are implicitly/explicitly
00123 set to None will be assigned a default value. The recommend
00124 use is keyword arguments as this is more robust to future message
00125 changes. You cannot mix in-order arguments and keyword arguments.
00126
00127 The available fields are:
00128 header,status,result
00129
00130 :param args: complete set of field values, in .msg order
00131 :param kwds: use keyword arguments corresponding to message field names
00132 to set specific fields.
00133 """
00134 if args or kwds:
00135 super(GetGripperPoseActionResult, self).__init__(*args, **kwds)
00136
00137 if self.header is None:
00138 self.header = std_msgs.msg.Header()
00139 if self.status is None:
00140 self.status = actionlib_msgs.msg.GoalStatus()
00141 if self.result is None:
00142 self.result = pr2_object_manipulation_msgs.msg.GetGripperPoseResult()
00143 else:
00144 self.header = std_msgs.msg.Header()
00145 self.status = actionlib_msgs.msg.GoalStatus()
00146 self.result = pr2_object_manipulation_msgs.msg.GetGripperPoseResult()
00147
00148 def _get_types(self):
00149 """
00150 internal API method
00151 """
00152 return self._slot_types
00153
00154 def serialize(self, buff):
00155 """
00156 serialize message into buffer
00157 :param buff: buffer, ``StringIO``
00158 """
00159 try:
00160 _x = self
00161 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00162 _x = self.header.frame_id
00163 length = len(_x)
00164 if python3 or type(_x) == unicode:
00165 _x = _x.encode('utf-8')
00166 length = len(_x)
00167 buff.write(struct.pack('<I%ss'%length, length, _x))
00168 _x = self
00169 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs))
00170 _x = self.status.goal_id.id
00171 length = len(_x)
00172 if python3 or type(_x) == unicode:
00173 _x = _x.encode('utf-8')
00174 length = len(_x)
00175 buff.write(struct.pack('<I%ss'%length, length, _x))
00176 buff.write(_struct_B.pack(self.status.status))
00177 _x = self.status.text
00178 length = len(_x)
00179 if python3 or type(_x) == unicode:
00180 _x = _x.encode('utf-8')
00181 length = len(_x)
00182 buff.write(struct.pack('<I%ss'%length, length, _x))
00183 _x = self
00184 buff.write(_struct_3I.pack(_x.result.gripper_pose.header.seq, _x.result.gripper_pose.header.stamp.secs, _x.result.gripper_pose.header.stamp.nsecs))
00185 _x = self.result.gripper_pose.header.frame_id
00186 length = len(_x)
00187 if python3 or type(_x) == unicode:
00188 _x = _x.encode('utf-8')
00189 length = len(_x)
00190 buff.write(struct.pack('<I%ss'%length, length, _x))
00191 _x = self
00192 buff.write(_struct_7df.pack(_x.result.gripper_pose.pose.position.x, _x.result.gripper_pose.pose.position.y, _x.result.gripper_pose.pose.position.z, _x.result.gripper_pose.pose.orientation.x, _x.result.gripper_pose.pose.orientation.y, _x.result.gripper_pose.pose.orientation.z, _x.result.gripper_pose.pose.orientation.w, _x.result.gripper_opening))
00193 except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00194 except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00195
00196 def deserialize(self, str):
00197 """
00198 unpack serialized message in str into this message instance
00199 :param str: byte array of serialized message, ``str``
00200 """
00201 try:
00202 if self.header is None:
00203 self.header = std_msgs.msg.Header()
00204 if self.status is None:
00205 self.status = actionlib_msgs.msg.GoalStatus()
00206 if self.result is None:
00207 self.result = pr2_object_manipulation_msgs.msg.GetGripperPoseResult()
00208 end = 0
00209 _x = self
00210 start = end
00211 end += 12
00212 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00213 start = end
00214 end += 4
00215 (length,) = _struct_I.unpack(str[start:end])
00216 start = end
00217 end += length
00218 if python3:
00219 self.header.frame_id = str[start:end].decode('utf-8')
00220 else:
00221 self.header.frame_id = str[start:end]
00222 _x = self
00223 start = end
00224 end += 8
00225 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00226 start = end
00227 end += 4
00228 (length,) = _struct_I.unpack(str[start:end])
00229 start = end
00230 end += length
00231 if python3:
00232 self.status.goal_id.id = str[start:end].decode('utf-8')
00233 else:
00234 self.status.goal_id.id = str[start:end]
00235 start = end
00236 end += 1
00237 (self.status.status,) = _struct_B.unpack(str[start:end])
00238 start = end
00239 end += 4
00240 (length,) = _struct_I.unpack(str[start:end])
00241 start = end
00242 end += length
00243 if python3:
00244 self.status.text = str[start:end].decode('utf-8')
00245 else:
00246 self.status.text = str[start:end]
00247 _x = self
00248 start = end
00249 end += 12
00250 (_x.result.gripper_pose.header.seq, _x.result.gripper_pose.header.stamp.secs, _x.result.gripper_pose.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00251 start = end
00252 end += 4
00253 (length,) = _struct_I.unpack(str[start:end])
00254 start = end
00255 end += length
00256 if python3:
00257 self.result.gripper_pose.header.frame_id = str[start:end].decode('utf-8')
00258 else:
00259 self.result.gripper_pose.header.frame_id = str[start:end]
00260 _x = self
00261 start = end
00262 end += 60
00263 (_x.result.gripper_pose.pose.position.x, _x.result.gripper_pose.pose.position.y, _x.result.gripper_pose.pose.position.z, _x.result.gripper_pose.pose.orientation.x, _x.result.gripper_pose.pose.orientation.y, _x.result.gripper_pose.pose.orientation.z, _x.result.gripper_pose.pose.orientation.w, _x.result.gripper_opening,) = _struct_7df.unpack(str[start:end])
00264 return self
00265 except struct.error as e:
00266 raise genpy.DeserializationError(e)
00267
00268
00269 def serialize_numpy(self, buff, numpy):
00270 """
00271 serialize message with numpy array types into buffer
00272 :param buff: buffer, ``StringIO``
00273 :param numpy: numpy python module
00274 """
00275 try:
00276 _x = self
00277 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00278 _x = self.header.frame_id
00279 length = len(_x)
00280 if python3 or type(_x) == unicode:
00281 _x = _x.encode('utf-8')
00282 length = len(_x)
00283 buff.write(struct.pack('<I%ss'%length, length, _x))
00284 _x = self
00285 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs))
00286 _x = self.status.goal_id.id
00287 length = len(_x)
00288 if python3 or type(_x) == unicode:
00289 _x = _x.encode('utf-8')
00290 length = len(_x)
00291 buff.write(struct.pack('<I%ss'%length, length, _x))
00292 buff.write(_struct_B.pack(self.status.status))
00293 _x = self.status.text
00294 length = len(_x)
00295 if python3 or type(_x) == unicode:
00296 _x = _x.encode('utf-8')
00297 length = len(_x)
00298 buff.write(struct.pack('<I%ss'%length, length, _x))
00299 _x = self
00300 buff.write(_struct_3I.pack(_x.result.gripper_pose.header.seq, _x.result.gripper_pose.header.stamp.secs, _x.result.gripper_pose.header.stamp.nsecs))
00301 _x = self.result.gripper_pose.header.frame_id
00302 length = len(_x)
00303 if python3 or type(_x) == unicode:
00304 _x = _x.encode('utf-8')
00305 length = len(_x)
00306 buff.write(struct.pack('<I%ss'%length, length, _x))
00307 _x = self
00308 buff.write(_struct_7df.pack(_x.result.gripper_pose.pose.position.x, _x.result.gripper_pose.pose.position.y, _x.result.gripper_pose.pose.position.z, _x.result.gripper_pose.pose.orientation.x, _x.result.gripper_pose.pose.orientation.y, _x.result.gripper_pose.pose.orientation.z, _x.result.gripper_pose.pose.orientation.w, _x.result.gripper_opening))
00309 except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00310 except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00311
00312 def deserialize_numpy(self, str, numpy):
00313 """
00314 unpack serialized message in str into this message instance using numpy for array types
00315 :param str: byte array of serialized message, ``str``
00316 :param numpy: numpy python module
00317 """
00318 try:
00319 if self.header is None:
00320 self.header = std_msgs.msg.Header()
00321 if self.status is None:
00322 self.status = actionlib_msgs.msg.GoalStatus()
00323 if self.result is None:
00324 self.result = pr2_object_manipulation_msgs.msg.GetGripperPoseResult()
00325 end = 0
00326 _x = self
00327 start = end
00328 end += 12
00329 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00330 start = end
00331 end += 4
00332 (length,) = _struct_I.unpack(str[start:end])
00333 start = end
00334 end += length
00335 if python3:
00336 self.header.frame_id = str[start:end].decode('utf-8')
00337 else:
00338 self.header.frame_id = str[start:end]
00339 _x = self
00340 start = end
00341 end += 8
00342 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00343 start = end
00344 end += 4
00345 (length,) = _struct_I.unpack(str[start:end])
00346 start = end
00347 end += length
00348 if python3:
00349 self.status.goal_id.id = str[start:end].decode('utf-8')
00350 else:
00351 self.status.goal_id.id = str[start:end]
00352 start = end
00353 end += 1
00354 (self.status.status,) = _struct_B.unpack(str[start:end])
00355 start = end
00356 end += 4
00357 (length,) = _struct_I.unpack(str[start:end])
00358 start = end
00359 end += length
00360 if python3:
00361 self.status.text = str[start:end].decode('utf-8')
00362 else:
00363 self.status.text = str[start:end]
00364 _x = self
00365 start = end
00366 end += 12
00367 (_x.result.gripper_pose.header.seq, _x.result.gripper_pose.header.stamp.secs, _x.result.gripper_pose.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00368 start = end
00369 end += 4
00370 (length,) = _struct_I.unpack(str[start:end])
00371 start = end
00372 end += length
00373 if python3:
00374 self.result.gripper_pose.header.frame_id = str[start:end].decode('utf-8')
00375 else:
00376 self.result.gripper_pose.header.frame_id = str[start:end]
00377 _x = self
00378 start = end
00379 end += 60
00380 (_x.result.gripper_pose.pose.position.x, _x.result.gripper_pose.pose.position.y, _x.result.gripper_pose.pose.position.z, _x.result.gripper_pose.pose.orientation.x, _x.result.gripper_pose.pose.orientation.y, _x.result.gripper_pose.pose.orientation.z, _x.result.gripper_pose.pose.orientation.w, _x.result.gripper_opening,) = _struct_7df.unpack(str[start:end])
00381 return self
00382 except struct.error as e:
00383 raise genpy.DeserializationError(e)
00384
00385 _struct_I = genpy.struct_I
00386 _struct_3I = struct.Struct("<3I")
00387 _struct_B = struct.Struct("<B")
00388 _struct_2I = struct.Struct("<2I")
00389 _struct_7df = struct.Struct("<7df")