$search
00001 """autogenerated by genmsg_py from TurtlebotMoveAction.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import std_msgs.msg 00006 import roslib.rostime 00007 import actionlib_msgs.msg 00008 import turtlebot_actions.msg 00009 00010 class TurtlebotMoveAction(roslib.message.Message): 00011 _md5sum = "339929f411dcfd188670046028b412ee" 00012 _type = "turtlebot_actions/TurtlebotMoveAction" 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 TurtlebotMoveActionGoal action_goal 00017 TurtlebotMoveActionResult action_result 00018 TurtlebotMoveActionFeedback action_feedback 00019 00020 ================================================================================ 00021 MSG: turtlebot_actions/TurtlebotMoveActionGoal 00022 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00023 00024 Header header 00025 actionlib_msgs/GoalID goal_id 00026 TurtlebotMoveGoal 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: turtlebot_actions/TurtlebotMoveGoal 00061 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00062 #goal definition 00063 float32 turn_distance # in radians, ccw = +, cw = - 00064 float32 forward_distance # in meters, forward = +, backward = - 00065 00066 ================================================================================ 00067 MSG: turtlebot_actions/TurtlebotMoveActionResult 00068 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00069 00070 Header header 00071 actionlib_msgs/GoalStatus status 00072 TurtlebotMoveResult result 00073 00074 ================================================================================ 00075 MSG: actionlib_msgs/GoalStatus 00076 GoalID goal_id 00077 uint8 status 00078 uint8 PENDING = 0 # The goal has yet to be processed by the action server 00079 uint8 ACTIVE = 1 # The goal is currently being processed by the action server 00080 uint8 PREEMPTED = 2 # The goal received a cancel request after it started executing 00081 # and has since completed its execution (Terminal State) 00082 uint8 SUCCEEDED = 3 # The goal was achieved successfully by the action server (Terminal State) 00083 uint8 ABORTED = 4 # The goal was aborted during execution by the action server due 00084 # to some failure (Terminal State) 00085 uint8 REJECTED = 5 # The goal was rejected by the action server without being processed, 00086 # because the goal was unattainable or invalid (Terminal State) 00087 uint8 PREEMPTING = 6 # The goal received a cancel request after it started executing 00088 # and has not yet completed execution 00089 uint8 RECALLING = 7 # The goal received a cancel request before it started executing, 00090 # but the action server has not yet confirmed that the goal is canceled 00091 uint8 RECALLED = 8 # The goal received a cancel request before it started executing 00092 # and was successfully cancelled (Terminal State) 00093 uint8 LOST = 9 # An action client can determine that a goal is LOST. This should not be 00094 # sent over the wire by an action server 00095 00096 #Allow for the user to associate a string with GoalStatus for debugging 00097 string text 00098 00099 00100 ================================================================================ 00101 MSG: turtlebot_actions/TurtlebotMoveResult 00102 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00103 #result definition 00104 float32 turn_distance 00105 float32 forward_distance 00106 00107 ================================================================================ 00108 MSG: turtlebot_actions/TurtlebotMoveActionFeedback 00109 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00110 00111 Header header 00112 actionlib_msgs/GoalStatus status 00113 TurtlebotMoveFeedback feedback 00114 00115 ================================================================================ 00116 MSG: turtlebot_actions/TurtlebotMoveFeedback 00117 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00118 #feedback 00119 float32 turn_distance 00120 float32 forward_distance 00121 00122 00123 """ 00124 __slots__ = ['action_goal','action_result','action_feedback'] 00125 _slot_types = ['turtlebot_actions/TurtlebotMoveActionGoal','turtlebot_actions/TurtlebotMoveActionResult','turtlebot_actions/TurtlebotMoveActionFeedback'] 00126 00127 def __init__(self, *args, **kwds): 00128 """ 00129 Constructor. Any message fields that are implicitly/explicitly 00130 set to None will be assigned a default value. The recommend 00131 use is keyword arguments as this is more robust to future message 00132 changes. You cannot mix in-order arguments and keyword arguments. 00133 00134 The available fields are: 00135 action_goal,action_result,action_feedback 00136 00137 @param args: complete set of field values, in .msg order 00138 @param kwds: use keyword arguments corresponding to message field names 00139 to set specific fields. 00140 """ 00141 if args or kwds: 00142 super(TurtlebotMoveAction, self).__init__(*args, **kwds) 00143 #message fields cannot be None, assign default values for those that are 00144 if self.action_goal is None: 00145 self.action_goal = turtlebot_actions.msg.TurtlebotMoveActionGoal() 00146 if self.action_result is None: 00147 self.action_result = turtlebot_actions.msg.TurtlebotMoveActionResult() 00148 if self.action_feedback is None: 00149 self.action_feedback = turtlebot_actions.msg.TurtlebotMoveActionFeedback() 00150 else: 00151 self.action_goal = turtlebot_actions.msg.TurtlebotMoveActionGoal() 00152 self.action_result = turtlebot_actions.msg.TurtlebotMoveActionResult() 00153 self.action_feedback = turtlebot_actions.msg.TurtlebotMoveActionFeedback() 00154 00155 def _get_types(self): 00156 """ 00157 internal API method 00158 """ 00159 return self._slot_types 00160 00161 def serialize(self, buff): 00162 """ 00163 serialize message into buffer 00164 @param buff: buffer 00165 @type buff: StringIO 00166 """ 00167 try: 00168 _x = self 00169 buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs)) 00170 _x = self.action_goal.header.frame_id 00171 length = len(_x) 00172 buff.write(struct.pack('<I%ss'%length, length, _x)) 00173 _x = self 00174 buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs)) 00175 _x = self.action_goal.goal_id.id 00176 length = len(_x) 00177 buff.write(struct.pack('<I%ss'%length, length, _x)) 00178 _x = self 00179 buff.write(_struct_2f3I.pack(_x.action_goal.goal.turn_distance, _x.action_goal.goal.forward_distance, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs)) 00180 _x = self.action_result.header.frame_id 00181 length = len(_x) 00182 buff.write(struct.pack('<I%ss'%length, length, _x)) 00183 _x = self 00184 buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs)) 00185 _x = self.action_result.status.goal_id.id 00186 length = len(_x) 00187 buff.write(struct.pack('<I%ss'%length, length, _x)) 00188 buff.write(_struct_B.pack(self.action_result.status.status)) 00189 _x = self.action_result.status.text 00190 length = len(_x) 00191 buff.write(struct.pack('<I%ss'%length, length, _x)) 00192 _x = self 00193 buff.write(_struct_2f3I.pack(_x.action_result.result.turn_distance, _x.action_result.result.forward_distance, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs)) 00194 _x = self.action_feedback.header.frame_id 00195 length = len(_x) 00196 buff.write(struct.pack('<I%ss'%length, length, _x)) 00197 _x = self 00198 buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs)) 00199 _x = self.action_feedback.status.goal_id.id 00200 length = len(_x) 00201 buff.write(struct.pack('<I%ss'%length, length, _x)) 00202 buff.write(_struct_B.pack(self.action_feedback.status.status)) 00203 _x = self.action_feedback.status.text 00204 length = len(_x) 00205 buff.write(struct.pack('<I%ss'%length, length, _x)) 00206 _x = self 00207 buff.write(_struct_2f.pack(_x.action_feedback.feedback.turn_distance, _x.action_feedback.feedback.forward_distance)) 00208 except struct.error as se: self._check_types(se) 00209 except TypeError as te: self._check_types(te) 00210 00211 def deserialize(self, str): 00212 """ 00213 unpack serialized message in str into this message instance 00214 @param str: byte array of serialized message 00215 @type str: str 00216 """ 00217 try: 00218 if self.action_goal is None: 00219 self.action_goal = turtlebot_actions.msg.TurtlebotMoveActionGoal() 00220 if self.action_result is None: 00221 self.action_result = turtlebot_actions.msg.TurtlebotMoveActionResult() 00222 if self.action_feedback is None: 00223 self.action_feedback = turtlebot_actions.msg.TurtlebotMoveActionFeedback() 00224 end = 0 00225 _x = self 00226 start = end 00227 end += 12 00228 (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00229 start = end 00230 end += 4 00231 (length,) = _struct_I.unpack(str[start:end]) 00232 start = end 00233 end += length 00234 self.action_goal.header.frame_id = str[start:end] 00235 _x = self 00236 start = end 00237 end += 8 00238 (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00239 start = end 00240 end += 4 00241 (length,) = _struct_I.unpack(str[start:end]) 00242 start = end 00243 end += length 00244 self.action_goal.goal_id.id = str[start:end] 00245 _x = self 00246 start = end 00247 end += 20 00248 (_x.action_goal.goal.turn_distance, _x.action_goal.goal.forward_distance, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_2f3I.unpack(str[start:end]) 00249 start = end 00250 end += 4 00251 (length,) = _struct_I.unpack(str[start:end]) 00252 start = end 00253 end += length 00254 self.action_result.header.frame_id = str[start:end] 00255 _x = self 00256 start = end 00257 end += 8 00258 (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00259 start = end 00260 end += 4 00261 (length,) = _struct_I.unpack(str[start:end]) 00262 start = end 00263 end += length 00264 self.action_result.status.goal_id.id = str[start:end] 00265 start = end 00266 end += 1 00267 (self.action_result.status.status,) = _struct_B.unpack(str[start:end]) 00268 start = end 00269 end += 4 00270 (length,) = _struct_I.unpack(str[start:end]) 00271 start = end 00272 end += length 00273 self.action_result.status.text = str[start:end] 00274 _x = self 00275 start = end 00276 end += 20 00277 (_x.action_result.result.turn_distance, _x.action_result.result.forward_distance, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_2f3I.unpack(str[start:end]) 00278 start = end 00279 end += 4 00280 (length,) = _struct_I.unpack(str[start:end]) 00281 start = end 00282 end += length 00283 self.action_feedback.header.frame_id = str[start:end] 00284 _x = self 00285 start = end 00286 end += 8 00287 (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00288 start = end 00289 end += 4 00290 (length,) = _struct_I.unpack(str[start:end]) 00291 start = end 00292 end += length 00293 self.action_feedback.status.goal_id.id = str[start:end] 00294 start = end 00295 end += 1 00296 (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end]) 00297 start = end 00298 end += 4 00299 (length,) = _struct_I.unpack(str[start:end]) 00300 start = end 00301 end += length 00302 self.action_feedback.status.text = str[start:end] 00303 _x = self 00304 start = end 00305 end += 8 00306 (_x.action_feedback.feedback.turn_distance, _x.action_feedback.feedback.forward_distance,) = _struct_2f.unpack(str[start:end]) 00307 return self 00308 except struct.error as e: 00309 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00310 00311 00312 def serialize_numpy(self, buff, numpy): 00313 """ 00314 serialize message with numpy array types into buffer 00315 @param buff: buffer 00316 @type buff: StringIO 00317 @param numpy: numpy python module 00318 @type numpy module 00319 """ 00320 try: 00321 _x = self 00322 buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs)) 00323 _x = self.action_goal.header.frame_id 00324 length = len(_x) 00325 buff.write(struct.pack('<I%ss'%length, length, _x)) 00326 _x = self 00327 buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs)) 00328 _x = self.action_goal.goal_id.id 00329 length = len(_x) 00330 buff.write(struct.pack('<I%ss'%length, length, _x)) 00331 _x = self 00332 buff.write(_struct_2f3I.pack(_x.action_goal.goal.turn_distance, _x.action_goal.goal.forward_distance, _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_2f3I.pack(_x.action_result.result.turn_distance, _x.action_result.result.forward_distance, _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 _x = self 00360 buff.write(_struct_2f.pack(_x.action_feedback.feedback.turn_distance, _x.action_feedback.feedback.forward_distance)) 00361 except struct.error as se: self._check_types(se) 00362 except TypeError as te: self._check_types(te) 00363 00364 def deserialize_numpy(self, str, numpy): 00365 """ 00366 unpack serialized message in str into this message instance using numpy for array types 00367 @param str: byte array of serialized message 00368 @type str: str 00369 @param numpy: numpy python module 00370 @type numpy: module 00371 """ 00372 try: 00373 if self.action_goal is None: 00374 self.action_goal = turtlebot_actions.msg.TurtlebotMoveActionGoal() 00375 if self.action_result is None: 00376 self.action_result = turtlebot_actions.msg.TurtlebotMoveActionResult() 00377 if self.action_feedback is None: 00378 self.action_feedback = turtlebot_actions.msg.TurtlebotMoveActionFeedback() 00379 end = 0 00380 _x = self 00381 start = end 00382 end += 12 00383 (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.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 self.action_goal.header.frame_id = str[start:end] 00390 _x = self 00391 start = end 00392 end += 8 00393 (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00394 start = end 00395 end += 4 00396 (length,) = _struct_I.unpack(str[start:end]) 00397 start = end 00398 end += length 00399 self.action_goal.goal_id.id = str[start:end] 00400 _x = self 00401 start = end 00402 end += 20 00403 (_x.action_goal.goal.turn_distance, _x.action_goal.goal.forward_distance, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_2f3I.unpack(str[start:end]) 00404 start = end 00405 end += 4 00406 (length,) = _struct_I.unpack(str[start:end]) 00407 start = end 00408 end += length 00409 self.action_result.header.frame_id = str[start:end] 00410 _x = self 00411 start = end 00412 end += 8 00413 (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00414 start = end 00415 end += 4 00416 (length,) = _struct_I.unpack(str[start:end]) 00417 start = end 00418 end += length 00419 self.action_result.status.goal_id.id = str[start:end] 00420 start = end 00421 end += 1 00422 (self.action_result.status.status,) = _struct_B.unpack(str[start:end]) 00423 start = end 00424 end += 4 00425 (length,) = _struct_I.unpack(str[start:end]) 00426 start = end 00427 end += length 00428 self.action_result.status.text = str[start:end] 00429 _x = self 00430 start = end 00431 end += 20 00432 (_x.action_result.result.turn_distance, _x.action_result.result.forward_distance, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_2f3I.unpack(str[start:end]) 00433 start = end 00434 end += 4 00435 (length,) = _struct_I.unpack(str[start:end]) 00436 start = end 00437 end += length 00438 self.action_feedback.header.frame_id = str[start:end] 00439 _x = self 00440 start = end 00441 end += 8 00442 (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00443 start = end 00444 end += 4 00445 (length,) = _struct_I.unpack(str[start:end]) 00446 start = end 00447 end += length 00448 self.action_feedback.status.goal_id.id = str[start:end] 00449 start = end 00450 end += 1 00451 (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end]) 00452 start = end 00453 end += 4 00454 (length,) = _struct_I.unpack(str[start:end]) 00455 start = end 00456 end += length 00457 self.action_feedback.status.text = str[start:end] 00458 _x = self 00459 start = end 00460 end += 8 00461 (_x.action_feedback.feedback.turn_distance, _x.action_feedback.feedback.forward_distance,) = _struct_2f.unpack(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_2f3I = struct.Struct("<2f3I") 00470 _struct_2I = struct.Struct("<2I") 00471 _struct_2f = struct.Struct("<2f")