$search
00001 """autogenerated by genmsg_py from SingleJointPositionAction.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import roslib.rostime 00006 import pr2_controllers_msgs.msg 00007 import actionlib_msgs.msg 00008 import std_msgs.msg 00009 00010 class SingleJointPositionAction(roslib.message.Message): 00011 _md5sum = "c4a786b7d53e5d0983decf967a5a779e" 00012 _type = "pr2_controllers_msgs/SingleJointPositionAction" 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 SingleJointPositionActionGoal action_goal 00017 SingleJointPositionActionResult action_result 00018 SingleJointPositionActionFeedback action_feedback 00019 00020 ================================================================================ 00021 MSG: pr2_controllers_msgs/SingleJointPositionActionGoal 00022 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00023 00024 Header header 00025 actionlib_msgs/GoalID goal_id 00026 SingleJointPositionGoal 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: pr2_controllers_msgs/SingleJointPositionGoal 00061 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00062 float64 position 00063 duration min_duration 00064 float64 max_velocity 00065 00066 ================================================================================ 00067 MSG: pr2_controllers_msgs/SingleJointPositionActionResult 00068 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00069 00070 Header header 00071 actionlib_msgs/GoalStatus status 00072 SingleJointPositionResult 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: pr2_controllers_msgs/SingleJointPositionResult 00102 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00103 00104 ================================================================================ 00105 MSG: pr2_controllers_msgs/SingleJointPositionActionFeedback 00106 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00107 00108 Header header 00109 actionlib_msgs/GoalStatus status 00110 SingleJointPositionFeedback feedback 00111 00112 ================================================================================ 00113 MSG: pr2_controllers_msgs/SingleJointPositionFeedback 00114 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00115 Header header 00116 float64 position 00117 float64 velocity 00118 float64 error 00119 00120 00121 """ 00122 __slots__ = ['action_goal','action_result','action_feedback'] 00123 _slot_types = ['pr2_controllers_msgs/SingleJointPositionActionGoal','pr2_controllers_msgs/SingleJointPositionActionResult','pr2_controllers_msgs/SingleJointPositionActionFeedback'] 00124 00125 def __init__(self, *args, **kwds): 00126 """ 00127 Constructor. Any message fields that are implicitly/explicitly 00128 set to None will be assigned a default value. The recommend 00129 use is keyword arguments as this is more robust to future message 00130 changes. You cannot mix in-order arguments and keyword arguments. 00131 00132 The available fields are: 00133 action_goal,action_result,action_feedback 00134 00135 @param args: complete set of field values, in .msg order 00136 @param kwds: use keyword arguments corresponding to message field names 00137 to set specific fields. 00138 """ 00139 if args or kwds: 00140 super(SingleJointPositionAction, self).__init__(*args, **kwds) 00141 #message fields cannot be None, assign default values for those that are 00142 if self.action_goal is None: 00143 self.action_goal = pr2_controllers_msgs.msg.SingleJointPositionActionGoal() 00144 if self.action_result is None: 00145 self.action_result = pr2_controllers_msgs.msg.SingleJointPositionActionResult() 00146 if self.action_feedback is None: 00147 self.action_feedback = pr2_controllers_msgs.msg.SingleJointPositionActionFeedback() 00148 else: 00149 self.action_goal = pr2_controllers_msgs.msg.SingleJointPositionActionGoal() 00150 self.action_result = pr2_controllers_msgs.msg.SingleJointPositionActionResult() 00151 self.action_feedback = pr2_controllers_msgs.msg.SingleJointPositionActionFeedback() 00152 00153 def _get_types(self): 00154 """ 00155 internal API method 00156 """ 00157 return self._slot_types 00158 00159 def serialize(self, buff): 00160 """ 00161 serialize message into buffer 00162 @param buff: buffer 00163 @type buff: StringIO 00164 """ 00165 try: 00166 _x = self 00167 buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs)) 00168 _x = self.action_goal.header.frame_id 00169 length = len(_x) 00170 buff.write(struct.pack('<I%ss'%length, length, _x)) 00171 _x = self 00172 buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs)) 00173 _x = self.action_goal.goal_id.id 00174 length = len(_x) 00175 buff.write(struct.pack('<I%ss'%length, length, _x)) 00176 _x = self 00177 buff.write(_struct_d2id3I.pack(_x.action_goal.goal.position, _x.action_goal.goal.min_duration.secs, _x.action_goal.goal.min_duration.nsecs, _x.action_goal.goal.max_velocity, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs)) 00178 _x = self.action_result.header.frame_id 00179 length = len(_x) 00180 buff.write(struct.pack('<I%ss'%length, length, _x)) 00181 _x = self 00182 buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs)) 00183 _x = self.action_result.status.goal_id.id 00184 length = len(_x) 00185 buff.write(struct.pack('<I%ss'%length, length, _x)) 00186 buff.write(_struct_B.pack(self.action_result.status.status)) 00187 _x = self.action_result.status.text 00188 length = len(_x) 00189 buff.write(struct.pack('<I%ss'%length, length, _x)) 00190 _x = self 00191 buff.write(_struct_3I.pack(_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs)) 00192 _x = self.action_feedback.header.frame_id 00193 length = len(_x) 00194 buff.write(struct.pack('<I%ss'%length, length, _x)) 00195 _x = self 00196 buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs)) 00197 _x = self.action_feedback.status.goal_id.id 00198 length = len(_x) 00199 buff.write(struct.pack('<I%ss'%length, length, _x)) 00200 buff.write(_struct_B.pack(self.action_feedback.status.status)) 00201 _x = self.action_feedback.status.text 00202 length = len(_x) 00203 buff.write(struct.pack('<I%ss'%length, length, _x)) 00204 _x = self 00205 buff.write(_struct_3I.pack(_x.action_feedback.feedback.header.seq, _x.action_feedback.feedback.header.stamp.secs, _x.action_feedback.feedback.header.stamp.nsecs)) 00206 _x = self.action_feedback.feedback.header.frame_id 00207 length = len(_x) 00208 buff.write(struct.pack('<I%ss'%length, length, _x)) 00209 _x = self 00210 buff.write(_struct_3d.pack(_x.action_feedback.feedback.position, _x.action_feedback.feedback.velocity, _x.action_feedback.feedback.error)) 00211 except struct.error as se: self._check_types(se) 00212 except TypeError as te: self._check_types(te) 00213 00214 def deserialize(self, str): 00215 """ 00216 unpack serialized message in str into this message instance 00217 @param str: byte array of serialized message 00218 @type str: str 00219 """ 00220 try: 00221 if self.action_goal is None: 00222 self.action_goal = pr2_controllers_msgs.msg.SingleJointPositionActionGoal() 00223 if self.action_result is None: 00224 self.action_result = pr2_controllers_msgs.msg.SingleJointPositionActionResult() 00225 if self.action_feedback is None: 00226 self.action_feedback = pr2_controllers_msgs.msg.SingleJointPositionActionFeedback() 00227 end = 0 00228 _x = self 00229 start = end 00230 end += 12 00231 (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00232 start = end 00233 end += 4 00234 (length,) = _struct_I.unpack(str[start:end]) 00235 start = end 00236 end += length 00237 self.action_goal.header.frame_id = str[start:end] 00238 _x = self 00239 start = end 00240 end += 8 00241 (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00242 start = end 00243 end += 4 00244 (length,) = _struct_I.unpack(str[start:end]) 00245 start = end 00246 end += length 00247 self.action_goal.goal_id.id = str[start:end] 00248 _x = self 00249 start = end 00250 end += 36 00251 (_x.action_goal.goal.position, _x.action_goal.goal.min_duration.secs, _x.action_goal.goal.min_duration.nsecs, _x.action_goal.goal.max_velocity, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_d2id3I.unpack(str[start:end]) 00252 start = end 00253 end += 4 00254 (length,) = _struct_I.unpack(str[start:end]) 00255 start = end 00256 end += length 00257 self.action_result.header.frame_id = str[start:end] 00258 _x = self 00259 start = end 00260 end += 8 00261 (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00262 start = end 00263 end += 4 00264 (length,) = _struct_I.unpack(str[start:end]) 00265 start = end 00266 end += length 00267 self.action_result.status.goal_id.id = str[start:end] 00268 start = end 00269 end += 1 00270 (self.action_result.status.status,) = _struct_B.unpack(str[start:end]) 00271 start = end 00272 end += 4 00273 (length,) = _struct_I.unpack(str[start:end]) 00274 start = end 00275 end += length 00276 self.action_result.status.text = str[start:end] 00277 _x = self 00278 start = end 00279 end += 12 00280 (_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00281 start = end 00282 end += 4 00283 (length,) = _struct_I.unpack(str[start:end]) 00284 start = end 00285 end += length 00286 self.action_feedback.header.frame_id = str[start:end] 00287 _x = self 00288 start = end 00289 end += 8 00290 (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00291 start = end 00292 end += 4 00293 (length,) = _struct_I.unpack(str[start:end]) 00294 start = end 00295 end += length 00296 self.action_feedback.status.goal_id.id = str[start:end] 00297 start = end 00298 end += 1 00299 (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end]) 00300 start = end 00301 end += 4 00302 (length,) = _struct_I.unpack(str[start:end]) 00303 start = end 00304 end += length 00305 self.action_feedback.status.text = str[start:end] 00306 _x = self 00307 start = end 00308 end += 12 00309 (_x.action_feedback.feedback.header.seq, _x.action_feedback.feedback.header.stamp.secs, _x.action_feedback.feedback.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00310 start = end 00311 end += 4 00312 (length,) = _struct_I.unpack(str[start:end]) 00313 start = end 00314 end += length 00315 self.action_feedback.feedback.header.frame_id = str[start:end] 00316 _x = self 00317 start = end 00318 end += 24 00319 (_x.action_feedback.feedback.position, _x.action_feedback.feedback.velocity, _x.action_feedback.feedback.error,) = _struct_3d.unpack(str[start:end]) 00320 return self 00321 except struct.error as e: 00322 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00323 00324 00325 def serialize_numpy(self, buff, numpy): 00326 """ 00327 serialize message with numpy array types into buffer 00328 @param buff: buffer 00329 @type buff: StringIO 00330 @param numpy: numpy python module 00331 @type numpy module 00332 """ 00333 try: 00334 _x = self 00335 buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs)) 00336 _x = self.action_goal.header.frame_id 00337 length = len(_x) 00338 buff.write(struct.pack('<I%ss'%length, length, _x)) 00339 _x = self 00340 buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs)) 00341 _x = self.action_goal.goal_id.id 00342 length = len(_x) 00343 buff.write(struct.pack('<I%ss'%length, length, _x)) 00344 _x = self 00345 buff.write(_struct_d2id3I.pack(_x.action_goal.goal.position, _x.action_goal.goal.min_duration.secs, _x.action_goal.goal.min_duration.nsecs, _x.action_goal.goal.max_velocity, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs)) 00346 _x = self.action_result.header.frame_id 00347 length = len(_x) 00348 buff.write(struct.pack('<I%ss'%length, length, _x)) 00349 _x = self 00350 buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs)) 00351 _x = self.action_result.status.goal_id.id 00352 length = len(_x) 00353 buff.write(struct.pack('<I%ss'%length, length, _x)) 00354 buff.write(_struct_B.pack(self.action_result.status.status)) 00355 _x = self.action_result.status.text 00356 length = len(_x) 00357 buff.write(struct.pack('<I%ss'%length, length, _x)) 00358 _x = self 00359 buff.write(_struct_3I.pack(_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs)) 00360 _x = self.action_feedback.header.frame_id 00361 length = len(_x) 00362 buff.write(struct.pack('<I%ss'%length, length, _x)) 00363 _x = self 00364 buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs)) 00365 _x = self.action_feedback.status.goal_id.id 00366 length = len(_x) 00367 buff.write(struct.pack('<I%ss'%length, length, _x)) 00368 buff.write(_struct_B.pack(self.action_feedback.status.status)) 00369 _x = self.action_feedback.status.text 00370 length = len(_x) 00371 buff.write(struct.pack('<I%ss'%length, length, _x)) 00372 _x = self 00373 buff.write(_struct_3I.pack(_x.action_feedback.feedback.header.seq, _x.action_feedback.feedback.header.stamp.secs, _x.action_feedback.feedback.header.stamp.nsecs)) 00374 _x = self.action_feedback.feedback.header.frame_id 00375 length = len(_x) 00376 buff.write(struct.pack('<I%ss'%length, length, _x)) 00377 _x = self 00378 buff.write(_struct_3d.pack(_x.action_feedback.feedback.position, _x.action_feedback.feedback.velocity, _x.action_feedback.feedback.error)) 00379 except struct.error as se: self._check_types(se) 00380 except TypeError as te: self._check_types(te) 00381 00382 def deserialize_numpy(self, str, numpy): 00383 """ 00384 unpack serialized message in str into this message instance using numpy for array types 00385 @param str: byte array of serialized message 00386 @type str: str 00387 @param numpy: numpy python module 00388 @type numpy: module 00389 """ 00390 try: 00391 if self.action_goal is None: 00392 self.action_goal = pr2_controllers_msgs.msg.SingleJointPositionActionGoal() 00393 if self.action_result is None: 00394 self.action_result = pr2_controllers_msgs.msg.SingleJointPositionActionResult() 00395 if self.action_feedback is None: 00396 self.action_feedback = pr2_controllers_msgs.msg.SingleJointPositionActionFeedback() 00397 end = 0 00398 _x = self 00399 start = end 00400 end += 12 00401 (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00402 start = end 00403 end += 4 00404 (length,) = _struct_I.unpack(str[start:end]) 00405 start = end 00406 end += length 00407 self.action_goal.header.frame_id = str[start:end] 00408 _x = self 00409 start = end 00410 end += 8 00411 (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00412 start = end 00413 end += 4 00414 (length,) = _struct_I.unpack(str[start:end]) 00415 start = end 00416 end += length 00417 self.action_goal.goal_id.id = str[start:end] 00418 _x = self 00419 start = end 00420 end += 36 00421 (_x.action_goal.goal.position, _x.action_goal.goal.min_duration.secs, _x.action_goal.goal.min_duration.nsecs, _x.action_goal.goal.max_velocity, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_d2id3I.unpack(str[start:end]) 00422 start = end 00423 end += 4 00424 (length,) = _struct_I.unpack(str[start:end]) 00425 start = end 00426 end += length 00427 self.action_result.header.frame_id = str[start:end] 00428 _x = self 00429 start = end 00430 end += 8 00431 (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00432 start = end 00433 end += 4 00434 (length,) = _struct_I.unpack(str[start:end]) 00435 start = end 00436 end += length 00437 self.action_result.status.goal_id.id = str[start:end] 00438 start = end 00439 end += 1 00440 (self.action_result.status.status,) = _struct_B.unpack(str[start:end]) 00441 start = end 00442 end += 4 00443 (length,) = _struct_I.unpack(str[start:end]) 00444 start = end 00445 end += length 00446 self.action_result.status.text = str[start:end] 00447 _x = self 00448 start = end 00449 end += 12 00450 (_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00451 start = end 00452 end += 4 00453 (length,) = _struct_I.unpack(str[start:end]) 00454 start = end 00455 end += length 00456 self.action_feedback.header.frame_id = str[start:end] 00457 _x = self 00458 start = end 00459 end += 8 00460 (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00461 start = end 00462 end += 4 00463 (length,) = _struct_I.unpack(str[start:end]) 00464 start = end 00465 end += length 00466 self.action_feedback.status.goal_id.id = str[start:end] 00467 start = end 00468 end += 1 00469 (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end]) 00470 start = end 00471 end += 4 00472 (length,) = _struct_I.unpack(str[start:end]) 00473 start = end 00474 end += length 00475 self.action_feedback.status.text = str[start:end] 00476 _x = self 00477 start = end 00478 end += 12 00479 (_x.action_feedback.feedback.header.seq, _x.action_feedback.feedback.header.stamp.secs, _x.action_feedback.feedback.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00480 start = end 00481 end += 4 00482 (length,) = _struct_I.unpack(str[start:end]) 00483 start = end 00484 end += length 00485 self.action_feedback.feedback.header.frame_id = str[start:end] 00486 _x = self 00487 start = end 00488 end += 24 00489 (_x.action_feedback.feedback.position, _x.action_feedback.feedback.velocity, _x.action_feedback.feedback.error,) = _struct_3d.unpack(str[start:end]) 00490 return self 00491 except struct.error as e: 00492 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00493 00494 _struct_I = roslib.message.struct_I 00495 _struct_3I = struct.Struct("<3I") 00496 _struct_d2id3I = struct.Struct("<d2id3I") 00497 _struct_2I = struct.Struct("<2I") 00498 _struct_B = struct.Struct("<B") 00499 _struct_3d = struct.Struct("<3d")