_TestGripperPoseAction.py
Go to the documentation of this file.
00001 """autogenerated by genpy from pr2_object_manipulation_msgs/TestGripperPoseAction.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 TestGripperPoseAction(genpy.Message):
00014   _md5sum = "1d58ed18524d59cde728c53aef5bec4d"
00015   _type = "pr2_object_manipulation_msgs/TestGripperPoseAction"
00016   _has_header = False #flag to mark the presence of a Header object
00017   _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00018 
00019 TestGripperPoseActionGoal action_goal
00020 TestGripperPoseActionResult action_result
00021 TestGripperPoseActionFeedback action_feedback
00022 
00023 ================================================================================
00024 MSG: pr2_object_manipulation_msgs/TestGripperPoseActionGoal
00025 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00026 
00027 Header header
00028 actionlib_msgs/GoalID goal_id
00029 TestGripperPoseGoal goal
00030 
00031 ================================================================================
00032 MSG: std_msgs/Header
00033 # Standard metadata for higher-level stamped data types.
00034 # This is generally used to communicate timestamped data 
00035 # in a particular coordinate frame.
00036 # 
00037 # sequence ID: consecutively increasing ID 
00038 uint32 seq
00039 #Two-integer timestamp that is expressed as:
00040 # * stamp.secs: seconds (stamp_secs) since epoch
00041 # * stamp.nsecs: nanoseconds since stamp_secs
00042 # time-handling sugar is provided by the client library
00043 time stamp
00044 #Frame this data is associated with
00045 # 0: no frame
00046 # 1: global frame
00047 string frame_id
00048 
00049 ================================================================================
00050 MSG: actionlib_msgs/GoalID
00051 # The stamp should store the time at which this goal was requested.
00052 # It is used by an action server when it tries to preempt all
00053 # goals that were requested before a certain time
00054 time stamp
00055 
00056 # The id provides a way to associate feedback and
00057 # result message with specific goal requests. The id
00058 # specified must be unique.
00059 string id
00060 
00061 
00062 ================================================================================
00063 MSG: pr2_object_manipulation_msgs/TestGripperPoseGoal
00064 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00065 geometry_msgs/PoseStamped[] gripper_poses
00066 float32[] gripper_openings
00067 
00068 ================================================================================
00069 MSG: geometry_msgs/PoseStamped
00070 # A Pose with reference coordinate frame and timestamp
00071 Header header
00072 Pose pose
00073 
00074 ================================================================================
00075 MSG: geometry_msgs/Pose
00076 # A representation of pose in free space, composed of postion and orientation. 
00077 Point position
00078 Quaternion orientation
00079 
00080 ================================================================================
00081 MSG: geometry_msgs/Point
00082 # This contains the position of a point in free space
00083 float64 x
00084 float64 y
00085 float64 z
00086 
00087 ================================================================================
00088 MSG: geometry_msgs/Quaternion
00089 # This represents an orientation in free space in quaternion form.
00090 
00091 float64 x
00092 float64 y
00093 float64 z
00094 float64 w
00095 
00096 ================================================================================
00097 MSG: pr2_object_manipulation_msgs/TestGripperPoseActionResult
00098 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00099 
00100 Header header
00101 actionlib_msgs/GoalStatus status
00102 TestGripperPoseResult result
00103 
00104 ================================================================================
00105 MSG: actionlib_msgs/GoalStatus
00106 GoalID goal_id
00107 uint8 status
00108 uint8 PENDING         = 0   # The goal has yet to be processed by the action server
00109 uint8 ACTIVE          = 1   # The goal is currently being processed by the action server
00110 uint8 PREEMPTED       = 2   # The goal received a cancel request after it started executing
00111                             #   and has since completed its execution (Terminal State)
00112 uint8 SUCCEEDED       = 3   # The goal was achieved successfully by the action server (Terminal State)
00113 uint8 ABORTED         = 4   # The goal was aborted during execution by the action server due
00114                             #    to some failure (Terminal State)
00115 uint8 REJECTED        = 5   # The goal was rejected by the action server without being processed,
00116                             #    because the goal was unattainable or invalid (Terminal State)
00117 uint8 PREEMPTING      = 6   # The goal received a cancel request after it started executing
00118                             #    and has not yet completed execution
00119 uint8 RECALLING       = 7   # The goal received a cancel request before it started executing,
00120                             #    but the action server has not yet confirmed that the goal is canceled
00121 uint8 RECALLED        = 8   # The goal received a cancel request before it started executing
00122                             #    and was successfully cancelled (Terminal State)
00123 uint8 LOST            = 9   # An action client can determine that a goal is LOST. This should not be
00124                             #    sent over the wire by an action server
00125 
00126 #Allow for the user to associate a string with GoalStatus for debugging
00127 string text
00128 
00129 
00130 ================================================================================
00131 MSG: pr2_object_manipulation_msgs/TestGripperPoseResult
00132 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00133 bool[] valid
00134 
00135 ================================================================================
00136 MSG: pr2_object_manipulation_msgs/TestGripperPoseActionFeedback
00137 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00138 
00139 Header header
00140 actionlib_msgs/GoalStatus status
00141 TestGripperPoseFeedback feedback
00142 
00143 ================================================================================
00144 MSG: pr2_object_manipulation_msgs/TestGripperPoseFeedback
00145 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00146 
00147 """
00148   __slots__ = ['action_goal','action_result','action_feedback']
00149   _slot_types = ['pr2_object_manipulation_msgs/TestGripperPoseActionGoal','pr2_object_manipulation_msgs/TestGripperPoseActionResult','pr2_object_manipulation_msgs/TestGripperPoseActionFeedback']
00150 
00151   def __init__(self, *args, **kwds):
00152     """
00153     Constructor. Any message fields that are implicitly/explicitly
00154     set to None will be assigned a default value. The recommend
00155     use is keyword arguments as this is more robust to future message
00156     changes.  You cannot mix in-order arguments and keyword arguments.
00157 
00158     The available fields are:
00159        action_goal,action_result,action_feedback
00160 
00161     :param args: complete set of field values, in .msg order
00162     :param kwds: use keyword arguments corresponding to message field names
00163     to set specific fields.
00164     """
00165     if args or kwds:
00166       super(TestGripperPoseAction, self).__init__(*args, **kwds)
00167       #message fields cannot be None, assign default values for those that are
00168       if self.action_goal is None:
00169         self.action_goal = pr2_object_manipulation_msgs.msg.TestGripperPoseActionGoal()
00170       if self.action_result is None:
00171         self.action_result = pr2_object_manipulation_msgs.msg.TestGripperPoseActionResult()
00172       if self.action_feedback is None:
00173         self.action_feedback = pr2_object_manipulation_msgs.msg.TestGripperPoseActionFeedback()
00174     else:
00175       self.action_goal = pr2_object_manipulation_msgs.msg.TestGripperPoseActionGoal()
00176       self.action_result = pr2_object_manipulation_msgs.msg.TestGripperPoseActionResult()
00177       self.action_feedback = pr2_object_manipulation_msgs.msg.TestGripperPoseActionFeedback()
00178 
00179   def _get_types(self):
00180     """
00181     internal API method
00182     """
00183     return self._slot_types
00184 
00185   def serialize(self, buff):
00186     """
00187     serialize message into buffer
00188     :param buff: buffer, ``StringIO``
00189     """
00190     try:
00191       _x = self
00192       buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs))
00193       _x = self.action_goal.header.frame_id
00194       length = len(_x)
00195       if python3 or type(_x) == unicode:
00196         _x = _x.encode('utf-8')
00197         length = len(_x)
00198       buff.write(struct.pack('<I%ss'%length, length, _x))
00199       _x = self
00200       buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs))
00201       _x = self.action_goal.goal_id.id
00202       length = len(_x)
00203       if python3 or type(_x) == unicode:
00204         _x = _x.encode('utf-8')
00205         length = len(_x)
00206       buff.write(struct.pack('<I%ss'%length, length, _x))
00207       length = len(self.action_goal.goal.gripper_poses)
00208       buff.write(_struct_I.pack(length))
00209       for val1 in self.action_goal.goal.gripper_poses:
00210         _v1 = val1.header
00211         buff.write(_struct_I.pack(_v1.seq))
00212         _v2 = _v1.stamp
00213         _x = _v2
00214         buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00215         _x = _v1.frame_id
00216         length = len(_x)
00217         if python3 or type(_x) == unicode:
00218           _x = _x.encode('utf-8')
00219           length = len(_x)
00220         buff.write(struct.pack('<I%ss'%length, length, _x))
00221         _v3 = val1.pose
00222         _v4 = _v3.position
00223         _x = _v4
00224         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00225         _v5 = _v3.orientation
00226         _x = _v5
00227         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00228       length = len(self.action_goal.goal.gripper_openings)
00229       buff.write(_struct_I.pack(length))
00230       pattern = '<%sf'%length
00231       buff.write(struct.pack(pattern, *self.action_goal.goal.gripper_openings))
00232       _x = self
00233       buff.write(_struct_3I.pack(_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs))
00234       _x = self.action_result.header.frame_id
00235       length = len(_x)
00236       if python3 or type(_x) == unicode:
00237         _x = _x.encode('utf-8')
00238         length = len(_x)
00239       buff.write(struct.pack('<I%ss'%length, length, _x))
00240       _x = self
00241       buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs))
00242       _x = self.action_result.status.goal_id.id
00243       length = len(_x)
00244       if python3 or type(_x) == unicode:
00245         _x = _x.encode('utf-8')
00246         length = len(_x)
00247       buff.write(struct.pack('<I%ss'%length, length, _x))
00248       buff.write(_struct_B.pack(self.action_result.status.status))
00249       _x = self.action_result.status.text
00250       length = len(_x)
00251       if python3 or type(_x) == unicode:
00252         _x = _x.encode('utf-8')
00253         length = len(_x)
00254       buff.write(struct.pack('<I%ss'%length, length, _x))
00255       length = len(self.action_result.result.valid)
00256       buff.write(_struct_I.pack(length))
00257       pattern = '<%sB'%length
00258       buff.write(struct.pack(pattern, *self.action_result.result.valid))
00259       _x = self
00260       buff.write(_struct_3I.pack(_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs))
00261       _x = self.action_feedback.header.frame_id
00262       length = len(_x)
00263       if python3 or type(_x) == unicode:
00264         _x = _x.encode('utf-8')
00265         length = len(_x)
00266       buff.write(struct.pack('<I%ss'%length, length, _x))
00267       _x = self
00268       buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs))
00269       _x = self.action_feedback.status.goal_id.id
00270       length = len(_x)
00271       if python3 or type(_x) == unicode:
00272         _x = _x.encode('utf-8')
00273         length = len(_x)
00274       buff.write(struct.pack('<I%ss'%length, length, _x))
00275       buff.write(_struct_B.pack(self.action_feedback.status.status))
00276       _x = self.action_feedback.status.text
00277       length = len(_x)
00278       if python3 or type(_x) == unicode:
00279         _x = _x.encode('utf-8')
00280         length = len(_x)
00281       buff.write(struct.pack('<I%ss'%length, length, _x))
00282     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00283     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00284 
00285   def deserialize(self, str):
00286     """
00287     unpack serialized message in str into this message instance
00288     :param str: byte array of serialized message, ``str``
00289     """
00290     try:
00291       if self.action_goal is None:
00292         self.action_goal = pr2_object_manipulation_msgs.msg.TestGripperPoseActionGoal()
00293       if self.action_result is None:
00294         self.action_result = pr2_object_manipulation_msgs.msg.TestGripperPoseActionResult()
00295       if self.action_feedback is None:
00296         self.action_feedback = pr2_object_manipulation_msgs.msg.TestGripperPoseActionFeedback()
00297       end = 0
00298       _x = self
00299       start = end
00300       end += 12
00301       (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00302       start = end
00303       end += 4
00304       (length,) = _struct_I.unpack(str[start:end])
00305       start = end
00306       end += length
00307       if python3:
00308         self.action_goal.header.frame_id = str[start:end].decode('utf-8')
00309       else:
00310         self.action_goal.header.frame_id = str[start:end]
00311       _x = self
00312       start = end
00313       end += 8
00314       (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00315       start = end
00316       end += 4
00317       (length,) = _struct_I.unpack(str[start:end])
00318       start = end
00319       end += length
00320       if python3:
00321         self.action_goal.goal_id.id = str[start:end].decode('utf-8')
00322       else:
00323         self.action_goal.goal_id.id = str[start:end]
00324       start = end
00325       end += 4
00326       (length,) = _struct_I.unpack(str[start:end])
00327       self.action_goal.goal.gripper_poses = []
00328       for i in range(0, length):
00329         val1 = geometry_msgs.msg.PoseStamped()
00330         _v6 = val1.header
00331         start = end
00332         end += 4
00333         (_v6.seq,) = _struct_I.unpack(str[start:end])
00334         _v7 = _v6.stamp
00335         _x = _v7
00336         start = end
00337         end += 8
00338         (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00339         start = end
00340         end += 4
00341         (length,) = _struct_I.unpack(str[start:end])
00342         start = end
00343         end += length
00344         if python3:
00345           _v6.frame_id = str[start:end].decode('utf-8')
00346         else:
00347           _v6.frame_id = str[start:end]
00348         _v8 = val1.pose
00349         _v9 = _v8.position
00350         _x = _v9
00351         start = end
00352         end += 24
00353         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00354         _v10 = _v8.orientation
00355         _x = _v10
00356         start = end
00357         end += 32
00358         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00359         self.action_goal.goal.gripper_poses.append(val1)
00360       start = end
00361       end += 4
00362       (length,) = _struct_I.unpack(str[start:end])
00363       pattern = '<%sf'%length
00364       start = end
00365       end += struct.calcsize(pattern)
00366       self.action_goal.goal.gripper_openings = struct.unpack(pattern, str[start:end])
00367       _x = self
00368       start = end
00369       end += 12
00370       (_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00371       start = end
00372       end += 4
00373       (length,) = _struct_I.unpack(str[start:end])
00374       start = end
00375       end += length
00376       if python3:
00377         self.action_result.header.frame_id = str[start:end].decode('utf-8')
00378       else:
00379         self.action_result.header.frame_id = str[start:end]
00380       _x = self
00381       start = end
00382       end += 8
00383       (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00384       start = end
00385       end += 4
00386       (length,) = _struct_I.unpack(str[start:end])
00387       start = end
00388       end += length
00389       if python3:
00390         self.action_result.status.goal_id.id = str[start:end].decode('utf-8')
00391       else:
00392         self.action_result.status.goal_id.id = str[start:end]
00393       start = end
00394       end += 1
00395       (self.action_result.status.status,) = _struct_B.unpack(str[start:end])
00396       start = end
00397       end += 4
00398       (length,) = _struct_I.unpack(str[start:end])
00399       start = end
00400       end += length
00401       if python3:
00402         self.action_result.status.text = str[start:end].decode('utf-8')
00403       else:
00404         self.action_result.status.text = str[start:end]
00405       start = end
00406       end += 4
00407       (length,) = _struct_I.unpack(str[start:end])
00408       pattern = '<%sB'%length
00409       start = end
00410       end += struct.calcsize(pattern)
00411       self.action_result.result.valid = struct.unpack(pattern, str[start:end])
00412       self.action_result.result.valid = map(bool, self.action_result.result.valid)
00413       _x = self
00414       start = end
00415       end += 12
00416       (_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00417       start = end
00418       end += 4
00419       (length,) = _struct_I.unpack(str[start:end])
00420       start = end
00421       end += length
00422       if python3:
00423         self.action_feedback.header.frame_id = str[start:end].decode('utf-8')
00424       else:
00425         self.action_feedback.header.frame_id = str[start:end]
00426       _x = self
00427       start = end
00428       end += 8
00429       (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00430       start = end
00431       end += 4
00432       (length,) = _struct_I.unpack(str[start:end])
00433       start = end
00434       end += length
00435       if python3:
00436         self.action_feedback.status.goal_id.id = str[start:end].decode('utf-8')
00437       else:
00438         self.action_feedback.status.goal_id.id = str[start:end]
00439       start = end
00440       end += 1
00441       (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end])
00442       start = end
00443       end += 4
00444       (length,) = _struct_I.unpack(str[start:end])
00445       start = end
00446       end += length
00447       if python3:
00448         self.action_feedback.status.text = str[start:end].decode('utf-8')
00449       else:
00450         self.action_feedback.status.text = str[start:end]
00451       return self
00452     except struct.error as e:
00453       raise genpy.DeserializationError(e) #most likely buffer underfill
00454 
00455 
00456   def serialize_numpy(self, buff, numpy):
00457     """
00458     serialize message with numpy array types into buffer
00459     :param buff: buffer, ``StringIO``
00460     :param numpy: numpy python module
00461     """
00462     try:
00463       _x = self
00464       buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs))
00465       _x = self.action_goal.header.frame_id
00466       length = len(_x)
00467       if python3 or type(_x) == unicode:
00468         _x = _x.encode('utf-8')
00469         length = len(_x)
00470       buff.write(struct.pack('<I%ss'%length, length, _x))
00471       _x = self
00472       buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs))
00473       _x = self.action_goal.goal_id.id
00474       length = len(_x)
00475       if python3 or type(_x) == unicode:
00476         _x = _x.encode('utf-8')
00477         length = len(_x)
00478       buff.write(struct.pack('<I%ss'%length, length, _x))
00479       length = len(self.action_goal.goal.gripper_poses)
00480       buff.write(_struct_I.pack(length))
00481       for val1 in self.action_goal.goal.gripper_poses:
00482         _v11 = val1.header
00483         buff.write(_struct_I.pack(_v11.seq))
00484         _v12 = _v11.stamp
00485         _x = _v12
00486         buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00487         _x = _v11.frame_id
00488         length = len(_x)
00489         if python3 or type(_x) == unicode:
00490           _x = _x.encode('utf-8')
00491           length = len(_x)
00492         buff.write(struct.pack('<I%ss'%length, length, _x))
00493         _v13 = val1.pose
00494         _v14 = _v13.position
00495         _x = _v14
00496         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00497         _v15 = _v13.orientation
00498         _x = _v15
00499         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00500       length = len(self.action_goal.goal.gripper_openings)
00501       buff.write(_struct_I.pack(length))
00502       pattern = '<%sf'%length
00503       buff.write(self.action_goal.goal.gripper_openings.tostring())
00504       _x = self
00505       buff.write(_struct_3I.pack(_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs))
00506       _x = self.action_result.header.frame_id
00507       length = len(_x)
00508       if python3 or type(_x) == unicode:
00509         _x = _x.encode('utf-8')
00510         length = len(_x)
00511       buff.write(struct.pack('<I%ss'%length, length, _x))
00512       _x = self
00513       buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs))
00514       _x = self.action_result.status.goal_id.id
00515       length = len(_x)
00516       if python3 or type(_x) == unicode:
00517         _x = _x.encode('utf-8')
00518         length = len(_x)
00519       buff.write(struct.pack('<I%ss'%length, length, _x))
00520       buff.write(_struct_B.pack(self.action_result.status.status))
00521       _x = self.action_result.status.text
00522       length = len(_x)
00523       if python3 or type(_x) == unicode:
00524         _x = _x.encode('utf-8')
00525         length = len(_x)
00526       buff.write(struct.pack('<I%ss'%length, length, _x))
00527       length = len(self.action_result.result.valid)
00528       buff.write(_struct_I.pack(length))
00529       pattern = '<%sB'%length
00530       buff.write(self.action_result.result.valid.tostring())
00531       _x = self
00532       buff.write(_struct_3I.pack(_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs))
00533       _x = self.action_feedback.header.frame_id
00534       length = len(_x)
00535       if python3 or type(_x) == unicode:
00536         _x = _x.encode('utf-8')
00537         length = len(_x)
00538       buff.write(struct.pack('<I%ss'%length, length, _x))
00539       _x = self
00540       buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs))
00541       _x = self.action_feedback.status.goal_id.id
00542       length = len(_x)
00543       if python3 or type(_x) == unicode:
00544         _x = _x.encode('utf-8')
00545         length = len(_x)
00546       buff.write(struct.pack('<I%ss'%length, length, _x))
00547       buff.write(_struct_B.pack(self.action_feedback.status.status))
00548       _x = self.action_feedback.status.text
00549       length = len(_x)
00550       if python3 or type(_x) == unicode:
00551         _x = _x.encode('utf-8')
00552         length = len(_x)
00553       buff.write(struct.pack('<I%ss'%length, length, _x))
00554     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00555     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00556 
00557   def deserialize_numpy(self, str, numpy):
00558     """
00559     unpack serialized message in str into this message instance using numpy for array types
00560     :param str: byte array of serialized message, ``str``
00561     :param numpy: numpy python module
00562     """
00563     try:
00564       if self.action_goal is None:
00565         self.action_goal = pr2_object_manipulation_msgs.msg.TestGripperPoseActionGoal()
00566       if self.action_result is None:
00567         self.action_result = pr2_object_manipulation_msgs.msg.TestGripperPoseActionResult()
00568       if self.action_feedback is None:
00569         self.action_feedback = pr2_object_manipulation_msgs.msg.TestGripperPoseActionFeedback()
00570       end = 0
00571       _x = self
00572       start = end
00573       end += 12
00574       (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00575       start = end
00576       end += 4
00577       (length,) = _struct_I.unpack(str[start:end])
00578       start = end
00579       end += length
00580       if python3:
00581         self.action_goal.header.frame_id = str[start:end].decode('utf-8')
00582       else:
00583         self.action_goal.header.frame_id = str[start:end]
00584       _x = self
00585       start = end
00586       end += 8
00587       (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00588       start = end
00589       end += 4
00590       (length,) = _struct_I.unpack(str[start:end])
00591       start = end
00592       end += length
00593       if python3:
00594         self.action_goal.goal_id.id = str[start:end].decode('utf-8')
00595       else:
00596         self.action_goal.goal_id.id = str[start:end]
00597       start = end
00598       end += 4
00599       (length,) = _struct_I.unpack(str[start:end])
00600       self.action_goal.goal.gripper_poses = []
00601       for i in range(0, length):
00602         val1 = geometry_msgs.msg.PoseStamped()
00603         _v16 = val1.header
00604         start = end
00605         end += 4
00606         (_v16.seq,) = _struct_I.unpack(str[start:end])
00607         _v17 = _v16.stamp
00608         _x = _v17
00609         start = end
00610         end += 8
00611         (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00612         start = end
00613         end += 4
00614         (length,) = _struct_I.unpack(str[start:end])
00615         start = end
00616         end += length
00617         if python3:
00618           _v16.frame_id = str[start:end].decode('utf-8')
00619         else:
00620           _v16.frame_id = str[start:end]
00621         _v18 = val1.pose
00622         _v19 = _v18.position
00623         _x = _v19
00624         start = end
00625         end += 24
00626         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00627         _v20 = _v18.orientation
00628         _x = _v20
00629         start = end
00630         end += 32
00631         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00632         self.action_goal.goal.gripper_poses.append(val1)
00633       start = end
00634       end += 4
00635       (length,) = _struct_I.unpack(str[start:end])
00636       pattern = '<%sf'%length
00637       start = end
00638       end += struct.calcsize(pattern)
00639       self.action_goal.goal.gripper_openings = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=length)
00640       _x = self
00641       start = end
00642       end += 12
00643       (_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00644       start = end
00645       end += 4
00646       (length,) = _struct_I.unpack(str[start:end])
00647       start = end
00648       end += length
00649       if python3:
00650         self.action_result.header.frame_id = str[start:end].decode('utf-8')
00651       else:
00652         self.action_result.header.frame_id = str[start:end]
00653       _x = self
00654       start = end
00655       end += 8
00656       (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00657       start = end
00658       end += 4
00659       (length,) = _struct_I.unpack(str[start:end])
00660       start = end
00661       end += length
00662       if python3:
00663         self.action_result.status.goal_id.id = str[start:end].decode('utf-8')
00664       else:
00665         self.action_result.status.goal_id.id = str[start:end]
00666       start = end
00667       end += 1
00668       (self.action_result.status.status,) = _struct_B.unpack(str[start:end])
00669       start = end
00670       end += 4
00671       (length,) = _struct_I.unpack(str[start:end])
00672       start = end
00673       end += length
00674       if python3:
00675         self.action_result.status.text = str[start:end].decode('utf-8')
00676       else:
00677         self.action_result.status.text = str[start:end]
00678       start = end
00679       end += 4
00680       (length,) = _struct_I.unpack(str[start:end])
00681       pattern = '<%sB'%length
00682       start = end
00683       end += struct.calcsize(pattern)
00684       self.action_result.result.valid = numpy.frombuffer(str[start:end], dtype=numpy.bool, count=length)
00685       self.action_result.result.valid = map(bool, self.action_result.result.valid)
00686       _x = self
00687       start = end
00688       end += 12
00689       (_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00690       start = end
00691       end += 4
00692       (length,) = _struct_I.unpack(str[start:end])
00693       start = end
00694       end += length
00695       if python3:
00696         self.action_feedback.header.frame_id = str[start:end].decode('utf-8')
00697       else:
00698         self.action_feedback.header.frame_id = str[start:end]
00699       _x = self
00700       start = end
00701       end += 8
00702       (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00703       start = end
00704       end += 4
00705       (length,) = _struct_I.unpack(str[start:end])
00706       start = end
00707       end += length
00708       if python3:
00709         self.action_feedback.status.goal_id.id = str[start:end].decode('utf-8')
00710       else:
00711         self.action_feedback.status.goal_id.id = str[start:end]
00712       start = end
00713       end += 1
00714       (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end])
00715       start = end
00716       end += 4
00717       (length,) = _struct_I.unpack(str[start:end])
00718       start = end
00719       end += length
00720       if python3:
00721         self.action_feedback.status.text = str[start:end].decode('utf-8')
00722       else:
00723         self.action_feedback.status.text = str[start:end]
00724       return self
00725     except struct.error as e:
00726       raise genpy.DeserializationError(e) #most likely buffer underfill
00727 
00728 _struct_I = genpy.struct_I
00729 _struct_B = struct.Struct("<B")
00730 _struct_3I = struct.Struct("<3I")
00731 _struct_4d = struct.Struct("<4d")
00732 _struct_2I = struct.Struct("<2I")
00733 _struct_3d = struct.Struct("<3d")


pr2_object_manipulation_msgs
Author(s): Matei Ciocarlie
autogenerated on Mon Oct 6 2014 11:55:20