$search
00001 """autogenerated by genmsg_py from BodyPoseAction.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import roslib.rostime 00006 import nao_msgs.msg 00007 import actionlib_msgs.msg 00008 import std_msgs.msg 00009 00010 class BodyPoseAction(roslib.message.Message): 00011 _md5sum = "bc58fd1218bb64624b76dca7ad8a5a81" 00012 _type = "nao_msgs/BodyPoseAction" 00013 _has_header = False #flag to mark the presence of a Header object 00014 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00015 00016 BodyPoseActionGoal action_goal 00017 BodyPoseActionResult action_result 00018 BodyPoseActionFeedback action_feedback 00019 00020 ================================================================================ 00021 MSG: nao_msgs/BodyPoseActionGoal 00022 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00023 00024 Header header 00025 actionlib_msgs/GoalID goal_id 00026 BodyPoseGoal goal 00027 00028 ================================================================================ 00029 MSG: std_msgs/Header 00030 # Standard metadata for higher-level stamped data types. 00031 # This is generally used to communicate timestamped data 00032 # in a particular coordinate frame. 00033 # 00034 # sequence ID: consecutively increasing ID 00035 uint32 seq 00036 #Two-integer timestamp that is expressed as: 00037 # * stamp.secs: seconds (stamp_secs) since epoch 00038 # * stamp.nsecs: nanoseconds since stamp_secs 00039 # time-handling sugar is provided by the client library 00040 time stamp 00041 #Frame this data is associated with 00042 # 0: no frame 00043 # 1: global frame 00044 string frame_id 00045 00046 ================================================================================ 00047 MSG: actionlib_msgs/GoalID 00048 # The stamp should store the time at which this goal was requested. 00049 # It is used by an action server when it tries to preempt all 00050 # goals that were requested before a certain time 00051 time stamp 00052 00053 # The id provides a way to associate feedback and 00054 # result message with specific goal requests. The id 00055 # specified must be unique. 00056 string id 00057 00058 00059 ================================================================================ 00060 MSG: nao_msgs/BodyPoseGoal 00061 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00062 # goal: a registered body pose name 00063 string pose_name 00064 00065 ================================================================================ 00066 MSG: nao_msgs/BodyPoseActionResult 00067 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00068 00069 Header header 00070 actionlib_msgs/GoalStatus status 00071 BodyPoseResult result 00072 00073 ================================================================================ 00074 MSG: actionlib_msgs/GoalStatus 00075 GoalID goal_id 00076 uint8 status 00077 uint8 PENDING = 0 # The goal has yet to be processed by the action server 00078 uint8 ACTIVE = 1 # The goal is currently being processed by the action server 00079 uint8 PREEMPTED = 2 # The goal received a cancel request after it started executing 00080 # and has since completed its execution (Terminal State) 00081 uint8 SUCCEEDED = 3 # The goal was achieved successfully by the action server (Terminal State) 00082 uint8 ABORTED = 4 # The goal was aborted during execution by the action server due 00083 # to some failure (Terminal State) 00084 uint8 REJECTED = 5 # The goal was rejected by the action server without being processed, 00085 # because the goal was unattainable or invalid (Terminal State) 00086 uint8 PREEMPTING = 6 # The goal received a cancel request after it started executing 00087 # and has not yet completed execution 00088 uint8 RECALLING = 7 # The goal received a cancel request before it started executing, 00089 # but the action server has not yet confirmed that the goal is canceled 00090 uint8 RECALLED = 8 # The goal received a cancel request before it started executing 00091 # and was successfully cancelled (Terminal State) 00092 uint8 LOST = 9 # An action client can determine that a goal is LOST. This should not be 00093 # sent over the wire by an action server 00094 00095 #Allow for the user to associate a string with GoalStatus for debugging 00096 string text 00097 00098 00099 ================================================================================ 00100 MSG: nao_msgs/BodyPoseResult 00101 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00102 # no result currently 00103 00104 ================================================================================ 00105 MSG: nao_msgs/BodyPoseActionFeedback 00106 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00107 00108 Header header 00109 actionlib_msgs/GoalStatus status 00110 BodyPoseFeedback feedback 00111 00112 ================================================================================ 00113 MSG: nao_msgs/BodyPoseFeedback 00114 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00115 # no feedback currently 00116 00117 """ 00118 __slots__ = ['action_goal','action_result','action_feedback'] 00119 _slot_types = ['nao_msgs/BodyPoseActionGoal','nao_msgs/BodyPoseActionResult','nao_msgs/BodyPoseActionFeedback'] 00120 00121 def __init__(self, *args, **kwds): 00122 """ 00123 Constructor. Any message fields that are implicitly/explicitly 00124 set to None will be assigned a default value. The recommend 00125 use is keyword arguments as this is more robust to future message 00126 changes. You cannot mix in-order arguments and keyword arguments. 00127 00128 The available fields are: 00129 action_goal,action_result,action_feedback 00130 00131 @param args: complete set of field values, in .msg order 00132 @param kwds: use keyword arguments corresponding to message field names 00133 to set specific fields. 00134 """ 00135 if args or kwds: 00136 super(BodyPoseAction, self).__init__(*args, **kwds) 00137 #message fields cannot be None, assign default values for those that are 00138 if self.action_goal is None: 00139 self.action_goal = nao_msgs.msg.BodyPoseActionGoal() 00140 if self.action_result is None: 00141 self.action_result = nao_msgs.msg.BodyPoseActionResult() 00142 if self.action_feedback is None: 00143 self.action_feedback = nao_msgs.msg.BodyPoseActionFeedback() 00144 else: 00145 self.action_goal = nao_msgs.msg.BodyPoseActionGoal() 00146 self.action_result = nao_msgs.msg.BodyPoseActionResult() 00147 self.action_feedback = nao_msgs.msg.BodyPoseActionFeedback() 00148 00149 def _get_types(self): 00150 """ 00151 internal API method 00152 """ 00153 return self._slot_types 00154 00155 def serialize(self, buff): 00156 """ 00157 serialize message into buffer 00158 @param buff: buffer 00159 @type buff: StringIO 00160 """ 00161 try: 00162 _x = self 00163 buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs)) 00164 _x = self.action_goal.header.frame_id 00165 length = len(_x) 00166 buff.write(struct.pack('<I%ss'%length, length, _x)) 00167 _x = self 00168 buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs)) 00169 _x = self.action_goal.goal_id.id 00170 length = len(_x) 00171 buff.write(struct.pack('<I%ss'%length, length, _x)) 00172 _x = self.action_goal.goal.pose_name 00173 length = len(_x) 00174 buff.write(struct.pack('<I%ss'%length, length, _x)) 00175 _x = self 00176 buff.write(_struct_3I.pack(_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs)) 00177 _x = self.action_result.header.frame_id 00178 length = len(_x) 00179 buff.write(struct.pack('<I%ss'%length, length, _x)) 00180 _x = self 00181 buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs)) 00182 _x = self.action_result.status.goal_id.id 00183 length = len(_x) 00184 buff.write(struct.pack('<I%ss'%length, length, _x)) 00185 buff.write(_struct_B.pack(self.action_result.status.status)) 00186 _x = self.action_result.status.text 00187 length = len(_x) 00188 buff.write(struct.pack('<I%ss'%length, length, _x)) 00189 _x = self 00190 buff.write(_struct_3I.pack(_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs)) 00191 _x = self.action_feedback.header.frame_id 00192 length = len(_x) 00193 buff.write(struct.pack('<I%ss'%length, length, _x)) 00194 _x = self 00195 buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs)) 00196 _x = self.action_feedback.status.goal_id.id 00197 length = len(_x) 00198 buff.write(struct.pack('<I%ss'%length, length, _x)) 00199 buff.write(_struct_B.pack(self.action_feedback.status.status)) 00200 _x = self.action_feedback.status.text 00201 length = len(_x) 00202 buff.write(struct.pack('<I%ss'%length, length, _x)) 00203 except struct.error as se: self._check_types(se) 00204 except TypeError as te: self._check_types(te) 00205 00206 def deserialize(self, str): 00207 """ 00208 unpack serialized message in str into this message instance 00209 @param str: byte array of serialized message 00210 @type str: str 00211 """ 00212 try: 00213 if self.action_goal is None: 00214 self.action_goal = nao_msgs.msg.BodyPoseActionGoal() 00215 if self.action_result is None: 00216 self.action_result = nao_msgs.msg.BodyPoseActionResult() 00217 if self.action_feedback is None: 00218 self.action_feedback = nao_msgs.msg.BodyPoseActionFeedback() 00219 end = 0 00220 _x = self 00221 start = end 00222 end += 12 00223 (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00224 start = end 00225 end += 4 00226 (length,) = _struct_I.unpack(str[start:end]) 00227 start = end 00228 end += length 00229 self.action_goal.header.frame_id = str[start:end] 00230 _x = self 00231 start = end 00232 end += 8 00233 (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00234 start = end 00235 end += 4 00236 (length,) = _struct_I.unpack(str[start:end]) 00237 start = end 00238 end += length 00239 self.action_goal.goal_id.id = str[start:end] 00240 start = end 00241 end += 4 00242 (length,) = _struct_I.unpack(str[start:end]) 00243 start = end 00244 end += length 00245 self.action_goal.goal.pose_name = str[start:end] 00246 _x = self 00247 start = end 00248 end += 12 00249 (_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00250 start = end 00251 end += 4 00252 (length,) = _struct_I.unpack(str[start:end]) 00253 start = end 00254 end += length 00255 self.action_result.header.frame_id = str[start:end] 00256 _x = self 00257 start = end 00258 end += 8 00259 (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00260 start = end 00261 end += 4 00262 (length,) = _struct_I.unpack(str[start:end]) 00263 start = end 00264 end += length 00265 self.action_result.status.goal_id.id = str[start:end] 00266 start = end 00267 end += 1 00268 (self.action_result.status.status,) = _struct_B.unpack(str[start:end]) 00269 start = end 00270 end += 4 00271 (length,) = _struct_I.unpack(str[start:end]) 00272 start = end 00273 end += length 00274 self.action_result.status.text = str[start:end] 00275 _x = self 00276 start = end 00277 end += 12 00278 (_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00279 start = end 00280 end += 4 00281 (length,) = _struct_I.unpack(str[start:end]) 00282 start = end 00283 end += length 00284 self.action_feedback.header.frame_id = str[start:end] 00285 _x = self 00286 start = end 00287 end += 8 00288 (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00289 start = end 00290 end += 4 00291 (length,) = _struct_I.unpack(str[start:end]) 00292 start = end 00293 end += length 00294 self.action_feedback.status.goal_id.id = str[start:end] 00295 start = end 00296 end += 1 00297 (self.action_feedback.status.status,) = _struct_B.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.action_feedback.status.text = str[start:end] 00304 return self 00305 except struct.error as e: 00306 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00307 00308 00309 def serialize_numpy(self, buff, numpy): 00310 """ 00311 serialize message with numpy array types into buffer 00312 @param buff: buffer 00313 @type buff: StringIO 00314 @param numpy: numpy python module 00315 @type numpy module 00316 """ 00317 try: 00318 _x = self 00319 buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs)) 00320 _x = self.action_goal.header.frame_id 00321 length = len(_x) 00322 buff.write(struct.pack('<I%ss'%length, length, _x)) 00323 _x = self 00324 buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs)) 00325 _x = self.action_goal.goal_id.id 00326 length = len(_x) 00327 buff.write(struct.pack('<I%ss'%length, length, _x)) 00328 _x = self.action_goal.goal.pose_name 00329 length = len(_x) 00330 buff.write(struct.pack('<I%ss'%length, length, _x)) 00331 _x = self 00332 buff.write(_struct_3I.pack(_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs)) 00333 _x = self.action_result.header.frame_id 00334 length = len(_x) 00335 buff.write(struct.pack('<I%ss'%length, length, _x)) 00336 _x = self 00337 buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs)) 00338 _x = self.action_result.status.goal_id.id 00339 length = len(_x) 00340 buff.write(struct.pack('<I%ss'%length, length, _x)) 00341 buff.write(_struct_B.pack(self.action_result.status.status)) 00342 _x = self.action_result.status.text 00343 length = len(_x) 00344 buff.write(struct.pack('<I%ss'%length, length, _x)) 00345 _x = self 00346 buff.write(_struct_3I.pack(_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs)) 00347 _x = self.action_feedback.header.frame_id 00348 length = len(_x) 00349 buff.write(struct.pack('<I%ss'%length, length, _x)) 00350 _x = self 00351 buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs)) 00352 _x = self.action_feedback.status.goal_id.id 00353 length = len(_x) 00354 buff.write(struct.pack('<I%ss'%length, length, _x)) 00355 buff.write(_struct_B.pack(self.action_feedback.status.status)) 00356 _x = self.action_feedback.status.text 00357 length = len(_x) 00358 buff.write(struct.pack('<I%ss'%length, length, _x)) 00359 except struct.error as se: self._check_types(se) 00360 except TypeError as te: self._check_types(te) 00361 00362 def deserialize_numpy(self, str, numpy): 00363 """ 00364 unpack serialized message in str into this message instance using numpy for array types 00365 @param str: byte array of serialized message 00366 @type str: str 00367 @param numpy: numpy python module 00368 @type numpy: module 00369 """ 00370 try: 00371 if self.action_goal is None: 00372 self.action_goal = nao_msgs.msg.BodyPoseActionGoal() 00373 if self.action_result is None: 00374 self.action_result = nao_msgs.msg.BodyPoseActionResult() 00375 if self.action_feedback is None: 00376 self.action_feedback = nao_msgs.msg.BodyPoseActionFeedback() 00377 end = 0 00378 _x = self 00379 start = end 00380 end += 12 00381 (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00382 start = end 00383 end += 4 00384 (length,) = _struct_I.unpack(str[start:end]) 00385 start = end 00386 end += length 00387 self.action_goal.header.frame_id = str[start:end] 00388 _x = self 00389 start = end 00390 end += 8 00391 (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00392 start = end 00393 end += 4 00394 (length,) = _struct_I.unpack(str[start:end]) 00395 start = end 00396 end += length 00397 self.action_goal.goal_id.id = str[start:end] 00398 start = end 00399 end += 4 00400 (length,) = _struct_I.unpack(str[start:end]) 00401 start = end 00402 end += length 00403 self.action_goal.goal.pose_name = str[start:end] 00404 _x = self 00405 start = end 00406 end += 12 00407 (_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00408 start = end 00409 end += 4 00410 (length,) = _struct_I.unpack(str[start:end]) 00411 start = end 00412 end += length 00413 self.action_result.header.frame_id = str[start:end] 00414 _x = self 00415 start = end 00416 end += 8 00417 (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00418 start = end 00419 end += 4 00420 (length,) = _struct_I.unpack(str[start:end]) 00421 start = end 00422 end += length 00423 self.action_result.status.goal_id.id = str[start:end] 00424 start = end 00425 end += 1 00426 (self.action_result.status.status,) = _struct_B.unpack(str[start:end]) 00427 start = end 00428 end += 4 00429 (length,) = _struct_I.unpack(str[start:end]) 00430 start = end 00431 end += length 00432 self.action_result.status.text = str[start:end] 00433 _x = self 00434 start = end 00435 end += 12 00436 (_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00437 start = end 00438 end += 4 00439 (length,) = _struct_I.unpack(str[start:end]) 00440 start = end 00441 end += length 00442 self.action_feedback.header.frame_id = str[start:end] 00443 _x = self 00444 start = end 00445 end += 8 00446 (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00447 start = end 00448 end += 4 00449 (length,) = _struct_I.unpack(str[start:end]) 00450 start = end 00451 end += length 00452 self.action_feedback.status.goal_id.id = str[start:end] 00453 start = end 00454 end += 1 00455 (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end]) 00456 start = end 00457 end += 4 00458 (length,) = _struct_I.unpack(str[start:end]) 00459 start = end 00460 end += length 00461 self.action_feedback.status.text = str[start:end] 00462 return self 00463 except struct.error as e: 00464 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00465 00466 _struct_I = roslib.message.struct_I 00467 _struct_3I = struct.Struct("<3I") 00468 _struct_B = struct.Struct("<B") 00469 _struct_2I = struct.Struct("<2I")