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