00001 """autogenerated by genpy from pr2_object_manipulation_msgs/PickupIMObjectAction.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006
00007 import pr2_object_manipulation_msgs.msg
00008 import genpy
00009 import actionlib_msgs.msg
00010 import std_msgs.msg
00011
00012 class PickupIMObjectAction(genpy.Message):
00013 _md5sum = "723226c310a010840f9c7090315b44fb"
00014 _type = "pr2_object_manipulation_msgs/PickupIMObjectAction"
00015 _has_header = False
00016 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00017
00018 PickupIMObjectActionGoal action_goal
00019 PickupIMObjectActionResult action_result
00020 PickupIMObjectActionFeedback action_feedback
00021
00022 ================================================================================
00023 MSG: pr2_object_manipulation_msgs/PickupIMObjectActionGoal
00024 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00025
00026 Header header
00027 actionlib_msgs/GoalID goal_id
00028 PickupIMObjectGoal goal
00029
00030 ================================================================================
00031 MSG: std_msgs/Header
00032 # Standard metadata for higher-level stamped data types.
00033 # This is generally used to communicate timestamped data
00034 # in a particular coordinate frame.
00035 #
00036 # sequence ID: consecutively increasing ID
00037 uint32 seq
00038 #Two-integer timestamp that is expressed as:
00039 # * stamp.secs: seconds (stamp_secs) since epoch
00040 # * stamp.nsecs: nanoseconds since stamp_secs
00041 # time-handling sugar is provided by the client library
00042 time stamp
00043 #Frame this data is associated with
00044 # 0: no frame
00045 # 1: global frame
00046 string frame_id
00047
00048 ================================================================================
00049 MSG: actionlib_msgs/GoalID
00050 # The stamp should store the time at which this goal was requested.
00051 # It is used by an action server when it tries to preempt all
00052 # goals that were requested before a certain time
00053 time stamp
00054
00055 # The id provides a way to associate feedback and
00056 # result message with specific goal requests. The id
00057 # specified must be unique.
00058 string id
00059
00060
00061 ================================================================================
00062 MSG: pr2_object_manipulation_msgs/PickupIMObjectGoal
00063 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00064 # objects are numbered in the same order as the GraspableObjectsList (0 start)
00065 int32 object_id
00066
00067 # 0=right, 1=left arm
00068 int32 arm_selection
00069
00070
00071 ================================================================================
00072 MSG: pr2_object_manipulation_msgs/PickupIMObjectActionResult
00073 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00074
00075 Header header
00076 actionlib_msgs/GoalStatus status
00077 PickupIMObjectResult result
00078
00079 ================================================================================
00080 MSG: actionlib_msgs/GoalStatus
00081 GoalID goal_id
00082 uint8 status
00083 uint8 PENDING = 0 # The goal has yet to be processed by the action server
00084 uint8 ACTIVE = 1 # The goal is currently being processed by the action server
00085 uint8 PREEMPTED = 2 # The goal received a cancel request after it started executing
00086 # and has since completed its execution (Terminal State)
00087 uint8 SUCCEEDED = 3 # The goal was achieved successfully by the action server (Terminal State)
00088 uint8 ABORTED = 4 # The goal was aborted during execution by the action server due
00089 # to some failure (Terminal State)
00090 uint8 REJECTED = 5 # The goal was rejected by the action server without being processed,
00091 # because the goal was unattainable or invalid (Terminal State)
00092 uint8 PREEMPTING = 6 # The goal received a cancel request after it started executing
00093 # and has not yet completed execution
00094 uint8 RECALLING = 7 # The goal received a cancel request before it started executing,
00095 # but the action server has not yet confirmed that the goal is canceled
00096 uint8 RECALLED = 8 # The goal received a cancel request before it started executing
00097 # and was successfully cancelled (Terminal State)
00098 uint8 LOST = 9 # An action client can determine that a goal is LOST. This should not be
00099 # sent over the wire by an action server
00100
00101 #Allow for the user to associate a string with GoalStatus for debugging
00102 string text
00103
00104
00105 ================================================================================
00106 MSG: pr2_object_manipulation_msgs/PickupIMObjectResult
00107 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00108
00109
00110 ================================================================================
00111 MSG: pr2_object_manipulation_msgs/PickupIMObjectActionFeedback
00112 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00113
00114 Header header
00115 actionlib_msgs/GoalStatus status
00116 PickupIMObjectFeedback feedback
00117
00118 ================================================================================
00119 MSG: pr2_object_manipulation_msgs/PickupIMObjectFeedback
00120 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00121
00122
00123 """
00124 __slots__ = ['action_goal','action_result','action_feedback']
00125 _slot_types = ['pr2_object_manipulation_msgs/PickupIMObjectActionGoal','pr2_object_manipulation_msgs/PickupIMObjectActionResult','pr2_object_manipulation_msgs/PickupIMObjectActionFeedback']
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(PickupIMObjectAction, self).__init__(*args, **kwds)
00143
00144 if self.action_goal is None:
00145 self.action_goal = pr2_object_manipulation_msgs.msg.PickupIMObjectActionGoal()
00146 if self.action_result is None:
00147 self.action_result = pr2_object_manipulation_msgs.msg.PickupIMObjectActionResult()
00148 if self.action_feedback is None:
00149 self.action_feedback = pr2_object_manipulation_msgs.msg.PickupIMObjectActionFeedback()
00150 else:
00151 self.action_goal = pr2_object_manipulation_msgs.msg.PickupIMObjectActionGoal()
00152 self.action_result = pr2_object_manipulation_msgs.msg.PickupIMObjectActionResult()
00153 self.action_feedback = pr2_object_manipulation_msgs.msg.PickupIMObjectActionFeedback()
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, ``StringIO``
00165 """
00166 try:
00167 _x = self
00168 buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs))
00169 _x = self.action_goal.header.frame_id
00170 length = len(_x)
00171 if python3 or type(_x) == unicode:
00172 _x = _x.encode('utf-8')
00173 length = len(_x)
00174 buff.write(struct.pack('<I%ss'%length, length, _x))
00175 _x = self
00176 buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs))
00177 _x = self.action_goal.goal_id.id
00178 length = len(_x)
00179 if python3 or type(_x) == unicode:
00180 _x = _x.encode('utf-8')
00181 length = len(_x)
00182 buff.write(struct.pack('<I%ss'%length, length, _x))
00183 _x = self
00184 buff.write(_struct_2i3I.pack(_x.action_goal.goal.object_id, _x.action_goal.goal.arm_selection, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs))
00185 _x = self.action_result.header.frame_id
00186 length = len(_x)
00187 if python3 or type(_x) == unicode:
00188 _x = _x.encode('utf-8')
00189 length = len(_x)
00190 buff.write(struct.pack('<I%ss'%length, length, _x))
00191 _x = self
00192 buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs))
00193 _x = self.action_result.status.goal_id.id
00194 length = len(_x)
00195 if python3 or type(_x) == unicode:
00196 _x = _x.encode('utf-8')
00197 length = len(_x)
00198 buff.write(struct.pack('<I%ss'%length, length, _x))
00199 buff.write(_struct_B.pack(self.action_result.status.status))
00200 _x = self.action_result.status.text
00201 length = len(_x)
00202 if python3 or type(_x) == unicode:
00203 _x = _x.encode('utf-8')
00204 length = len(_x)
00205 buff.write(struct.pack('<I%ss'%length, length, _x))
00206 _x = self
00207 buff.write(_struct_3I.pack(_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs))
00208 _x = self.action_feedback.header.frame_id
00209 length = len(_x)
00210 if python3 or type(_x) == unicode:
00211 _x = _x.encode('utf-8')
00212 length = len(_x)
00213 buff.write(struct.pack('<I%ss'%length, length, _x))
00214 _x = self
00215 buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs))
00216 _x = self.action_feedback.status.goal_id.id
00217 length = len(_x)
00218 if python3 or type(_x) == unicode:
00219 _x = _x.encode('utf-8')
00220 length = len(_x)
00221 buff.write(struct.pack('<I%ss'%length, length, _x))
00222 buff.write(_struct_B.pack(self.action_feedback.status.status))
00223 _x = self.action_feedback.status.text
00224 length = len(_x)
00225 if python3 or type(_x) == unicode:
00226 _x = _x.encode('utf-8')
00227 length = len(_x)
00228 buff.write(struct.pack('<I%ss'%length, length, _x))
00229 except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00230 except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00231
00232 def deserialize(self, str):
00233 """
00234 unpack serialized message in str into this message instance
00235 :param str: byte array of serialized message, ``str``
00236 """
00237 try:
00238 if self.action_goal is None:
00239 self.action_goal = pr2_object_manipulation_msgs.msg.PickupIMObjectActionGoal()
00240 if self.action_result is None:
00241 self.action_result = pr2_object_manipulation_msgs.msg.PickupIMObjectActionResult()
00242 if self.action_feedback is None:
00243 self.action_feedback = pr2_object_manipulation_msgs.msg.PickupIMObjectActionFeedback()
00244 end = 0
00245 _x = self
00246 start = end
00247 end += 12
00248 (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.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 if python3:
00255 self.action_goal.header.frame_id = str[start:end].decode('utf-8')
00256 else:
00257 self.action_goal.header.frame_id = str[start:end]
00258 _x = self
00259 start = end
00260 end += 8
00261 (_x.action_goal.goal_id.stamp.secs, _x.action_goal.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 if python3:
00268 self.action_goal.goal_id.id = str[start:end].decode('utf-8')
00269 else:
00270 self.action_goal.goal_id.id = str[start:end]
00271 _x = self
00272 start = end
00273 end += 20
00274 (_x.action_goal.goal.object_id, _x.action_goal.goal.arm_selection, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_2i3I.unpack(str[start:end])
00275 start = end
00276 end += 4
00277 (length,) = _struct_I.unpack(str[start:end])
00278 start = end
00279 end += length
00280 if python3:
00281 self.action_result.header.frame_id = str[start:end].decode('utf-8')
00282 else:
00283 self.action_result.header.frame_id = str[start:end]
00284 _x = self
00285 start = end
00286 end += 8
00287 (_x.action_result.status.goal_id.stamp.secs, _x.action_result.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 if python3:
00294 self.action_result.status.goal_id.id = str[start:end].decode('utf-8')
00295 else:
00296 self.action_result.status.goal_id.id = str[start:end]
00297 start = end
00298 end += 1
00299 (self.action_result.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 if python3:
00306 self.action_result.status.text = str[start:end].decode('utf-8')
00307 else:
00308 self.action_result.status.text = str[start:end]
00309 _x = self
00310 start = end
00311 end += 12
00312 (_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00313 start = end
00314 end += 4
00315 (length,) = _struct_I.unpack(str[start:end])
00316 start = end
00317 end += length
00318 if python3:
00319 self.action_feedback.header.frame_id = str[start:end].decode('utf-8')
00320 else:
00321 self.action_feedback.header.frame_id = str[start:end]
00322 _x = self
00323 start = end
00324 end += 8
00325 (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00326 start = end
00327 end += 4
00328 (length,) = _struct_I.unpack(str[start:end])
00329 start = end
00330 end += length
00331 if python3:
00332 self.action_feedback.status.goal_id.id = str[start:end].decode('utf-8')
00333 else:
00334 self.action_feedback.status.goal_id.id = str[start:end]
00335 start = end
00336 end += 1
00337 (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end])
00338 start = end
00339 end += 4
00340 (length,) = _struct_I.unpack(str[start:end])
00341 start = end
00342 end += length
00343 if python3:
00344 self.action_feedback.status.text = str[start:end].decode('utf-8')
00345 else:
00346 self.action_feedback.status.text = str[start:end]
00347 return self
00348 except struct.error as e:
00349 raise genpy.DeserializationError(e)
00350
00351
00352 def serialize_numpy(self, buff, numpy):
00353 """
00354 serialize message with numpy array types into buffer
00355 :param buff: buffer, ``StringIO``
00356 :param numpy: numpy python module
00357 """
00358 try:
00359 _x = self
00360 buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs))
00361 _x = self.action_goal.header.frame_id
00362 length = len(_x)
00363 if python3 or type(_x) == unicode:
00364 _x = _x.encode('utf-8')
00365 length = len(_x)
00366 buff.write(struct.pack('<I%ss'%length, length, _x))
00367 _x = self
00368 buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs))
00369 _x = self.action_goal.goal_id.id
00370 length = len(_x)
00371 if python3 or type(_x) == unicode:
00372 _x = _x.encode('utf-8')
00373 length = len(_x)
00374 buff.write(struct.pack('<I%ss'%length, length, _x))
00375 _x = self
00376 buff.write(_struct_2i3I.pack(_x.action_goal.goal.object_id, _x.action_goal.goal.arm_selection, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs))
00377 _x = self.action_result.header.frame_id
00378 length = len(_x)
00379 if python3 or type(_x) == unicode:
00380 _x = _x.encode('utf-8')
00381 length = len(_x)
00382 buff.write(struct.pack('<I%ss'%length, length, _x))
00383 _x = self
00384 buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs))
00385 _x = self.action_result.status.goal_id.id
00386 length = len(_x)
00387 if python3 or type(_x) == unicode:
00388 _x = _x.encode('utf-8')
00389 length = len(_x)
00390 buff.write(struct.pack('<I%ss'%length, length, _x))
00391 buff.write(_struct_B.pack(self.action_result.status.status))
00392 _x = self.action_result.status.text
00393 length = len(_x)
00394 if python3 or type(_x) == unicode:
00395 _x = _x.encode('utf-8')
00396 length = len(_x)
00397 buff.write(struct.pack('<I%ss'%length, length, _x))
00398 _x = self
00399 buff.write(_struct_3I.pack(_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs))
00400 _x = self.action_feedback.header.frame_id
00401 length = len(_x)
00402 if python3 or type(_x) == unicode:
00403 _x = _x.encode('utf-8')
00404 length = len(_x)
00405 buff.write(struct.pack('<I%ss'%length, length, _x))
00406 _x = self
00407 buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs))
00408 _x = self.action_feedback.status.goal_id.id
00409 length = len(_x)
00410 if python3 or type(_x) == unicode:
00411 _x = _x.encode('utf-8')
00412 length = len(_x)
00413 buff.write(struct.pack('<I%ss'%length, length, _x))
00414 buff.write(_struct_B.pack(self.action_feedback.status.status))
00415 _x = self.action_feedback.status.text
00416 length = len(_x)
00417 if python3 or type(_x) == unicode:
00418 _x = _x.encode('utf-8')
00419 length = len(_x)
00420 buff.write(struct.pack('<I%ss'%length, length, _x))
00421 except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00422 except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00423
00424 def deserialize_numpy(self, str, numpy):
00425 """
00426 unpack serialized message in str into this message instance using numpy for array types
00427 :param str: byte array of serialized message, ``str``
00428 :param numpy: numpy python module
00429 """
00430 try:
00431 if self.action_goal is None:
00432 self.action_goal = pr2_object_manipulation_msgs.msg.PickupIMObjectActionGoal()
00433 if self.action_result is None:
00434 self.action_result = pr2_object_manipulation_msgs.msg.PickupIMObjectActionResult()
00435 if self.action_feedback is None:
00436 self.action_feedback = pr2_object_manipulation_msgs.msg.PickupIMObjectActionFeedback()
00437 end = 0
00438 _x = self
00439 start = end
00440 end += 12
00441 (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00442 start = end
00443 end += 4
00444 (length,) = _struct_I.unpack(str[start:end])
00445 start = end
00446 end += length
00447 if python3:
00448 self.action_goal.header.frame_id = str[start:end].decode('utf-8')
00449 else:
00450 self.action_goal.header.frame_id = str[start:end]
00451 _x = self
00452 start = end
00453 end += 8
00454 (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00455 start = end
00456 end += 4
00457 (length,) = _struct_I.unpack(str[start:end])
00458 start = end
00459 end += length
00460 if python3:
00461 self.action_goal.goal_id.id = str[start:end].decode('utf-8')
00462 else:
00463 self.action_goal.goal_id.id = str[start:end]
00464 _x = self
00465 start = end
00466 end += 20
00467 (_x.action_goal.goal.object_id, _x.action_goal.goal.arm_selection, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_2i3I.unpack(str[start:end])
00468 start = end
00469 end += 4
00470 (length,) = _struct_I.unpack(str[start:end])
00471 start = end
00472 end += length
00473 if python3:
00474 self.action_result.header.frame_id = str[start:end].decode('utf-8')
00475 else:
00476 self.action_result.header.frame_id = str[start:end]
00477 _x = self
00478 start = end
00479 end += 8
00480 (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00481 start = end
00482 end += 4
00483 (length,) = _struct_I.unpack(str[start:end])
00484 start = end
00485 end += length
00486 if python3:
00487 self.action_result.status.goal_id.id = str[start:end].decode('utf-8')
00488 else:
00489 self.action_result.status.goal_id.id = str[start:end]
00490 start = end
00491 end += 1
00492 (self.action_result.status.status,) = _struct_B.unpack(str[start:end])
00493 start = end
00494 end += 4
00495 (length,) = _struct_I.unpack(str[start:end])
00496 start = end
00497 end += length
00498 if python3:
00499 self.action_result.status.text = str[start:end].decode('utf-8')
00500 else:
00501 self.action_result.status.text = str[start:end]
00502 _x = self
00503 start = end
00504 end += 12
00505 (_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00506 start = end
00507 end += 4
00508 (length,) = _struct_I.unpack(str[start:end])
00509 start = end
00510 end += length
00511 if python3:
00512 self.action_feedback.header.frame_id = str[start:end].decode('utf-8')
00513 else:
00514 self.action_feedback.header.frame_id = str[start:end]
00515 _x = self
00516 start = end
00517 end += 8
00518 (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00519 start = end
00520 end += 4
00521 (length,) = _struct_I.unpack(str[start:end])
00522 start = end
00523 end += length
00524 if python3:
00525 self.action_feedback.status.goal_id.id = str[start:end].decode('utf-8')
00526 else:
00527 self.action_feedback.status.goal_id.id = str[start:end]
00528 start = end
00529 end += 1
00530 (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end])
00531 start = end
00532 end += 4
00533 (length,) = _struct_I.unpack(str[start:end])
00534 start = end
00535 end += length
00536 if python3:
00537 self.action_feedback.status.text = str[start:end].decode('utf-8')
00538 else:
00539 self.action_feedback.status.text = str[start:end]
00540 return self
00541 except struct.error as e:
00542 raise genpy.DeserializationError(e)
00543
00544 _struct_I = genpy.struct_I
00545 _struct_3I = struct.Struct("<3I")
00546 _struct_B = struct.Struct("<B")
00547 _struct_2I = struct.Struct("<2I")
00548 _struct_2i3I = struct.Struct("<2i3I")