$search
00001 """autogenerated by genmsg_py from GetGripperPoseResult.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import geometry_msgs.msg 00006 import std_msgs.msg 00007 00008 class GetGripperPoseResult(roslib.message.Message): 00009 _md5sum = "376ba9325430425e1115a2f7597dc0e7" 00010 _type = "pr2_object_manipulation_msgs/GetGripperPoseResult" 00011 _has_header = False #flag to mark the presence of a Header object 00012 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00013 # the returned gripper pose, assuming the user has clicked "accept" 00014 # if the user clicks "cancel" the action aborts 00015 geometry_msgs/PoseStamped gripper_pose 00016 float32 gripper_opening 00017 00018 ================================================================================ 00019 MSG: geometry_msgs/PoseStamped 00020 # A Pose with reference coordinate frame and timestamp 00021 Header header 00022 Pose pose 00023 00024 ================================================================================ 00025 MSG: std_msgs/Header 00026 # Standard metadata for higher-level stamped data types. 00027 # This is generally used to communicate timestamped data 00028 # in a particular coordinate frame. 00029 # 00030 # sequence ID: consecutively increasing ID 00031 uint32 seq 00032 #Two-integer timestamp that is expressed as: 00033 # * stamp.secs: seconds (stamp_secs) since epoch 00034 # * stamp.nsecs: nanoseconds since stamp_secs 00035 # time-handling sugar is provided by the client library 00036 time stamp 00037 #Frame this data is associated with 00038 # 0: no frame 00039 # 1: global frame 00040 string frame_id 00041 00042 ================================================================================ 00043 MSG: geometry_msgs/Pose 00044 # A representation of pose in free space, composed of postion and orientation. 00045 Point position 00046 Quaternion orientation 00047 00048 ================================================================================ 00049 MSG: geometry_msgs/Point 00050 # This contains the position of a point in free space 00051 float64 x 00052 float64 y 00053 float64 z 00054 00055 ================================================================================ 00056 MSG: geometry_msgs/Quaternion 00057 # This represents an orientation in free space in quaternion form. 00058 00059 float64 x 00060 float64 y 00061 float64 z 00062 float64 w 00063 00064 """ 00065 __slots__ = ['gripper_pose','gripper_opening'] 00066 _slot_types = ['geometry_msgs/PoseStamped','float32'] 00067 00068 def __init__(self, *args, **kwds): 00069 """ 00070 Constructor. Any message fields that are implicitly/explicitly 00071 set to None will be assigned a default value. The recommend 00072 use is keyword arguments as this is more robust to future message 00073 changes. You cannot mix in-order arguments and keyword arguments. 00074 00075 The available fields are: 00076 gripper_pose,gripper_opening 00077 00078 @param args: complete set of field values, in .msg order 00079 @param kwds: use keyword arguments corresponding to message field names 00080 to set specific fields. 00081 """ 00082 if args or kwds: 00083 super(GetGripperPoseResult, self).__init__(*args, **kwds) 00084 #message fields cannot be None, assign default values for those that are 00085 if self.gripper_pose is None: 00086 self.gripper_pose = geometry_msgs.msg.PoseStamped() 00087 if self.gripper_opening is None: 00088 self.gripper_opening = 0. 00089 else: 00090 self.gripper_pose = geometry_msgs.msg.PoseStamped() 00091 self.gripper_opening = 0. 00092 00093 def _get_types(self): 00094 """ 00095 internal API method 00096 """ 00097 return self._slot_types 00098 00099 def serialize(self, buff): 00100 """ 00101 serialize message into buffer 00102 @param buff: buffer 00103 @type buff: StringIO 00104 """ 00105 try: 00106 _x = self 00107 buff.write(_struct_3I.pack(_x.gripper_pose.header.seq, _x.gripper_pose.header.stamp.secs, _x.gripper_pose.header.stamp.nsecs)) 00108 _x = self.gripper_pose.header.frame_id 00109 length = len(_x) 00110 buff.write(struct.pack('<I%ss'%length, length, _x)) 00111 _x = self 00112 buff.write(_struct_7df.pack(_x.gripper_pose.pose.position.x, _x.gripper_pose.pose.position.y, _x.gripper_pose.pose.position.z, _x.gripper_pose.pose.orientation.x, _x.gripper_pose.pose.orientation.y, _x.gripper_pose.pose.orientation.z, _x.gripper_pose.pose.orientation.w, _x.gripper_opening)) 00113 except struct.error as se: self._check_types(se) 00114 except TypeError as te: self._check_types(te) 00115 00116 def deserialize(self, str): 00117 """ 00118 unpack serialized message in str into this message instance 00119 @param str: byte array of serialized message 00120 @type str: str 00121 """ 00122 try: 00123 if self.gripper_pose is None: 00124 self.gripper_pose = geometry_msgs.msg.PoseStamped() 00125 end = 0 00126 _x = self 00127 start = end 00128 end += 12 00129 (_x.gripper_pose.header.seq, _x.gripper_pose.header.stamp.secs, _x.gripper_pose.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00130 start = end 00131 end += 4 00132 (length,) = _struct_I.unpack(str[start:end]) 00133 start = end 00134 end += length 00135 self.gripper_pose.header.frame_id = str[start:end] 00136 _x = self 00137 start = end 00138 end += 60 00139 (_x.gripper_pose.pose.position.x, _x.gripper_pose.pose.position.y, _x.gripper_pose.pose.position.z, _x.gripper_pose.pose.orientation.x, _x.gripper_pose.pose.orientation.y, _x.gripper_pose.pose.orientation.z, _x.gripper_pose.pose.orientation.w, _x.gripper_opening,) = _struct_7df.unpack(str[start:end]) 00140 return self 00141 except struct.error as e: 00142 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00143 00144 00145 def serialize_numpy(self, buff, numpy): 00146 """ 00147 serialize message with numpy array types into buffer 00148 @param buff: buffer 00149 @type buff: StringIO 00150 @param numpy: numpy python module 00151 @type numpy module 00152 """ 00153 try: 00154 _x = self 00155 buff.write(_struct_3I.pack(_x.gripper_pose.header.seq, _x.gripper_pose.header.stamp.secs, _x.gripper_pose.header.stamp.nsecs)) 00156 _x = self.gripper_pose.header.frame_id 00157 length = len(_x) 00158 buff.write(struct.pack('<I%ss'%length, length, _x)) 00159 _x = self 00160 buff.write(_struct_7df.pack(_x.gripper_pose.pose.position.x, _x.gripper_pose.pose.position.y, _x.gripper_pose.pose.position.z, _x.gripper_pose.pose.orientation.x, _x.gripper_pose.pose.orientation.y, _x.gripper_pose.pose.orientation.z, _x.gripper_pose.pose.orientation.w, _x.gripper_opening)) 00161 except struct.error as se: self._check_types(se) 00162 except TypeError as te: self._check_types(te) 00163 00164 def deserialize_numpy(self, str, numpy): 00165 """ 00166 unpack serialized message in str into this message instance using numpy for array types 00167 @param str: byte array of serialized message 00168 @type str: str 00169 @param numpy: numpy python module 00170 @type numpy: module 00171 """ 00172 try: 00173 if self.gripper_pose is None: 00174 self.gripper_pose = geometry_msgs.msg.PoseStamped() 00175 end = 0 00176 _x = self 00177 start = end 00178 end += 12 00179 (_x.gripper_pose.header.seq, _x.gripper_pose.header.stamp.secs, _x.gripper_pose.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00180 start = end 00181 end += 4 00182 (length,) = _struct_I.unpack(str[start:end]) 00183 start = end 00184 end += length 00185 self.gripper_pose.header.frame_id = str[start:end] 00186 _x = self 00187 start = end 00188 end += 60 00189 (_x.gripper_pose.pose.position.x, _x.gripper_pose.pose.position.y, _x.gripper_pose.pose.position.z, _x.gripper_pose.pose.orientation.x, _x.gripper_pose.pose.orientation.y, _x.gripper_pose.pose.orientation.z, _x.gripper_pose.pose.orientation.w, _x.gripper_opening,) = _struct_7df.unpack(str[start:end]) 00190 return self 00191 except struct.error as e: 00192 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00193 00194 _struct_I = roslib.message.struct_I 00195 _struct_3I = struct.Struct("<3I") 00196 _struct_7df = struct.Struct("<7df")