$search
00001 """autogenerated by genmsg_py from GetPoseActionResult.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import pr2_object_manipulation_msgs.msg 00006 import geometry_msgs.msg 00007 import roslib.rostime 00008 import actionlib_msgs.msg 00009 import std_msgs.msg 00010 00011 class GetPoseActionResult(roslib.message.Message): 00012 _md5sum = "6d0edd723ba2f2ae6bcfa76c98c311f7" 00013 _type = "pr2_object_manipulation_msgs/GetPoseActionResult" 00014 _has_header = True #flag to mark the presence of a Header object 00015 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00016 00017 Header header 00018 actionlib_msgs/GoalStatus status 00019 GetPoseResult result 00020 00021 ================================================================================ 00022 MSG: std_msgs/Header 00023 # Standard metadata for higher-level stamped data types. 00024 # This is generally used to communicate timestamped data 00025 # in a particular coordinate frame. 00026 # 00027 # sequence ID: consecutively increasing ID 00028 uint32 seq 00029 #Two-integer timestamp that is expressed as: 00030 # * stamp.secs: seconds (stamp_secs) since epoch 00031 # * stamp.nsecs: nanoseconds since stamp_secs 00032 # time-handling sugar is provided by the client library 00033 time stamp 00034 #Frame this data is associated with 00035 # 0: no frame 00036 # 1: global frame 00037 string frame_id 00038 00039 ================================================================================ 00040 MSG: actionlib_msgs/GoalStatus 00041 GoalID goal_id 00042 uint8 status 00043 uint8 PENDING = 0 # The goal has yet to be processed by the action server 00044 uint8 ACTIVE = 1 # The goal is currently being processed by the action server 00045 uint8 PREEMPTED = 2 # The goal received a cancel request after it started executing 00046 # and has since completed its execution (Terminal State) 00047 uint8 SUCCEEDED = 3 # The goal was achieved successfully by the action server (Terminal State) 00048 uint8 ABORTED = 4 # The goal was aborted during execution by the action server due 00049 # to some failure (Terminal State) 00050 uint8 REJECTED = 5 # The goal was rejected by the action server without being processed, 00051 # because the goal was unattainable or invalid (Terminal State) 00052 uint8 PREEMPTING = 6 # The goal received a cancel request after it started executing 00053 # and has not yet completed execution 00054 uint8 RECALLING = 7 # The goal received a cancel request before it started executing, 00055 # but the action server has not yet confirmed that the goal is canceled 00056 uint8 RECALLED = 8 # The goal received a cancel request before it started executing 00057 # and was successfully cancelled (Terminal State) 00058 uint8 LOST = 9 # An action client can determine that a goal is LOST. This should not be 00059 # sent over the wire by an action server 00060 00061 #Allow for the user to associate a string with GoalStatus for debugging 00062 string text 00063 00064 00065 ================================================================================ 00066 MSG: actionlib_msgs/GoalID 00067 # The stamp should store the time at which this goal was requested. 00068 # It is used by an action server when it tries to preempt all 00069 # goals that were requested before a certain time 00070 time stamp 00071 00072 # The id provides a way to associate feedback and 00073 # result message with specific goal requests. The id 00074 # specified must be unique. 00075 string id 00076 00077 00078 ================================================================================ 00079 MSG: pr2_object_manipulation_msgs/GetPoseResult 00080 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00081 # the returned pose, assuming the user has clicked "accept" 00082 # if the user clicks "cancel" the action aborts 00083 geometry_msgs/PoseStamped pose 00084 00085 00086 ================================================================================ 00087 MSG: geometry_msgs/PoseStamped 00088 # A Pose with reference coordinate frame and timestamp 00089 Header header 00090 Pose pose 00091 00092 ================================================================================ 00093 MSG: geometry_msgs/Pose 00094 # A representation of pose in free space, composed of postion and orientation. 00095 Point position 00096 Quaternion orientation 00097 00098 ================================================================================ 00099 MSG: geometry_msgs/Point 00100 # This contains the position of a point in free space 00101 float64 x 00102 float64 y 00103 float64 z 00104 00105 ================================================================================ 00106 MSG: geometry_msgs/Quaternion 00107 # This represents an orientation in free space in quaternion form. 00108 00109 float64 x 00110 float64 y 00111 float64 z 00112 float64 w 00113 00114 """ 00115 __slots__ = ['header','status','result'] 00116 _slot_types = ['Header','actionlib_msgs/GoalStatus','pr2_object_manipulation_msgs/GetPoseResult'] 00117 00118 def __init__(self, *args, **kwds): 00119 """ 00120 Constructor. Any message fields that are implicitly/explicitly 00121 set to None will be assigned a default value. The recommend 00122 use is keyword arguments as this is more robust to future message 00123 changes. You cannot mix in-order arguments and keyword arguments. 00124 00125 The available fields are: 00126 header,status,result 00127 00128 @param args: complete set of field values, in .msg order 00129 @param kwds: use keyword arguments corresponding to message field names 00130 to set specific fields. 00131 """ 00132 if args or kwds: 00133 super(GetPoseActionResult, self).__init__(*args, **kwds) 00134 #message fields cannot be None, assign default values for those that are 00135 if self.header is None: 00136 self.header = std_msgs.msg._Header.Header() 00137 if self.status is None: 00138 self.status = actionlib_msgs.msg.GoalStatus() 00139 if self.result is None: 00140 self.result = pr2_object_manipulation_msgs.msg.GetPoseResult() 00141 else: 00142 self.header = std_msgs.msg._Header.Header() 00143 self.status = actionlib_msgs.msg.GoalStatus() 00144 self.result = pr2_object_manipulation_msgs.msg.GetPoseResult() 00145 00146 def _get_types(self): 00147 """ 00148 internal API method 00149 """ 00150 return self._slot_types 00151 00152 def serialize(self, buff): 00153 """ 00154 serialize message into buffer 00155 @param buff: buffer 00156 @type buff: StringIO 00157 """ 00158 try: 00159 _x = self 00160 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00161 _x = self.header.frame_id 00162 length = len(_x) 00163 buff.write(struct.pack('<I%ss'%length, length, _x)) 00164 _x = self 00165 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs)) 00166 _x = self.status.goal_id.id 00167 length = len(_x) 00168 buff.write(struct.pack('<I%ss'%length, length, _x)) 00169 buff.write(_struct_B.pack(self.status.status)) 00170 _x = self.status.text 00171 length = len(_x) 00172 buff.write(struct.pack('<I%ss'%length, length, _x)) 00173 _x = self 00174 buff.write(_struct_3I.pack(_x.result.pose.header.seq, _x.result.pose.header.stamp.secs, _x.result.pose.header.stamp.nsecs)) 00175 _x = self.result.pose.header.frame_id 00176 length = len(_x) 00177 buff.write(struct.pack('<I%ss'%length, length, _x)) 00178 _x = self 00179 buff.write(_struct_7d.pack(_x.result.pose.pose.position.x, _x.result.pose.pose.position.y, _x.result.pose.pose.position.z, _x.result.pose.pose.orientation.x, _x.result.pose.pose.orientation.y, _x.result.pose.pose.orientation.z, _x.result.pose.pose.orientation.w)) 00180 except struct.error as se: self._check_types(se) 00181 except TypeError as te: self._check_types(te) 00182 00183 def deserialize(self, str): 00184 """ 00185 unpack serialized message in str into this message instance 00186 @param str: byte array of serialized message 00187 @type str: str 00188 """ 00189 try: 00190 if self.header is None: 00191 self.header = std_msgs.msg._Header.Header() 00192 if self.status is None: 00193 self.status = actionlib_msgs.msg.GoalStatus() 00194 if self.result is None: 00195 self.result = pr2_object_manipulation_msgs.msg.GetPoseResult() 00196 end = 0 00197 _x = self 00198 start = end 00199 end += 12 00200 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00201 start = end 00202 end += 4 00203 (length,) = _struct_I.unpack(str[start:end]) 00204 start = end 00205 end += length 00206 self.header.frame_id = str[start:end] 00207 _x = self 00208 start = end 00209 end += 8 00210 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00211 start = end 00212 end += 4 00213 (length,) = _struct_I.unpack(str[start:end]) 00214 start = end 00215 end += length 00216 self.status.goal_id.id = str[start:end] 00217 start = end 00218 end += 1 00219 (self.status.status,) = _struct_B.unpack(str[start:end]) 00220 start = end 00221 end += 4 00222 (length,) = _struct_I.unpack(str[start:end]) 00223 start = end 00224 end += length 00225 self.status.text = str[start:end] 00226 _x = self 00227 start = end 00228 end += 12 00229 (_x.result.pose.header.seq, _x.result.pose.header.stamp.secs, _x.result.pose.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00230 start = end 00231 end += 4 00232 (length,) = _struct_I.unpack(str[start:end]) 00233 start = end 00234 end += length 00235 self.result.pose.header.frame_id = str[start:end] 00236 _x = self 00237 start = end 00238 end += 56 00239 (_x.result.pose.pose.position.x, _x.result.pose.pose.position.y, _x.result.pose.pose.position.z, _x.result.pose.pose.orientation.x, _x.result.pose.pose.orientation.y, _x.result.pose.pose.orientation.z, _x.result.pose.pose.orientation.w,) = _struct_7d.unpack(str[start:end]) 00240 return self 00241 except struct.error as e: 00242 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00243 00244 00245 def serialize_numpy(self, buff, numpy): 00246 """ 00247 serialize message with numpy array types into buffer 00248 @param buff: buffer 00249 @type buff: StringIO 00250 @param numpy: numpy python module 00251 @type numpy module 00252 """ 00253 try: 00254 _x = self 00255 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00256 _x = self.header.frame_id 00257 length = len(_x) 00258 buff.write(struct.pack('<I%ss'%length, length, _x)) 00259 _x = self 00260 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs)) 00261 _x = self.status.goal_id.id 00262 length = len(_x) 00263 buff.write(struct.pack('<I%ss'%length, length, _x)) 00264 buff.write(_struct_B.pack(self.status.status)) 00265 _x = self.status.text 00266 length = len(_x) 00267 buff.write(struct.pack('<I%ss'%length, length, _x)) 00268 _x = self 00269 buff.write(_struct_3I.pack(_x.result.pose.header.seq, _x.result.pose.header.stamp.secs, _x.result.pose.header.stamp.nsecs)) 00270 _x = self.result.pose.header.frame_id 00271 length = len(_x) 00272 buff.write(struct.pack('<I%ss'%length, length, _x)) 00273 _x = self 00274 buff.write(_struct_7d.pack(_x.result.pose.pose.position.x, _x.result.pose.pose.position.y, _x.result.pose.pose.position.z, _x.result.pose.pose.orientation.x, _x.result.pose.pose.orientation.y, _x.result.pose.pose.orientation.z, _x.result.pose.pose.orientation.w)) 00275 except struct.error as se: self._check_types(se) 00276 except TypeError as te: self._check_types(te) 00277 00278 def deserialize_numpy(self, str, numpy): 00279 """ 00280 unpack serialized message in str into this message instance using numpy for array types 00281 @param str: byte array of serialized message 00282 @type str: str 00283 @param numpy: numpy python module 00284 @type numpy: module 00285 """ 00286 try: 00287 if self.header is None: 00288 self.header = std_msgs.msg._Header.Header() 00289 if self.status is None: 00290 self.status = actionlib_msgs.msg.GoalStatus() 00291 if self.result is None: 00292 self.result = pr2_object_manipulation_msgs.msg.GetPoseResult() 00293 end = 0 00294 _x = self 00295 start = end 00296 end += 12 00297 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00298 start = end 00299 end += 4 00300 (length,) = _struct_I.unpack(str[start:end]) 00301 start = end 00302 end += length 00303 self.header.frame_id = str[start:end] 00304 _x = self 00305 start = end 00306 end += 8 00307 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00308 start = end 00309 end += 4 00310 (length,) = _struct_I.unpack(str[start:end]) 00311 start = end 00312 end += length 00313 self.status.goal_id.id = str[start:end] 00314 start = end 00315 end += 1 00316 (self.status.status,) = _struct_B.unpack(str[start:end]) 00317 start = end 00318 end += 4 00319 (length,) = _struct_I.unpack(str[start:end]) 00320 start = end 00321 end += length 00322 self.status.text = str[start:end] 00323 _x = self 00324 start = end 00325 end += 12 00326 (_x.result.pose.header.seq, _x.result.pose.header.stamp.secs, _x.result.pose.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00327 start = end 00328 end += 4 00329 (length,) = _struct_I.unpack(str[start:end]) 00330 start = end 00331 end += length 00332 self.result.pose.header.frame_id = str[start:end] 00333 _x = self 00334 start = end 00335 end += 56 00336 (_x.result.pose.pose.position.x, _x.result.pose.pose.position.y, _x.result.pose.pose.position.z, _x.result.pose.pose.orientation.x, _x.result.pose.pose.orientation.y, _x.result.pose.pose.orientation.z, _x.result.pose.pose.orientation.w,) = _struct_7d.unpack(str[start:end]) 00337 return self 00338 except struct.error as e: 00339 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00340 00341 _struct_I = roslib.message.struct_I 00342 _struct_3I = struct.Struct("<3I") 00343 _struct_B = struct.Struct("<B") 00344 _struct_7d = struct.Struct("<7d") 00345 _struct_2I = struct.Struct("<2I")