00001 """autogenerated by genmsg_py from MoveArmActionResult.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import motion_planning_msgs.msg
00006 import actionlib_msgs.msg
00007 import planning_environment_msgs.msg
00008 import geometry_msgs.msg
00009 import roslib.rostime
00010 import std_msgs.msg
00011 import move_arm_msgs.msg
00012
00013 class MoveArmActionResult(roslib.message.Message):
00014 _md5sum = "3e2bd2d3bd64d9942c0ef04de381c628"
00015 _type = "move_arm_msgs/MoveArmActionResult"
00016 _has_header = True
00017 _full_text = """
00018 Header header
00019 actionlib_msgs/GoalStatus status
00020 MoveArmResult result
00021
00022 ================================================================================
00023 MSG: std_msgs/Header
00024 # Standard metadata for higher-level stamped data types.
00025 # This is generally used to communicate timestamped data
00026 # in a particular coordinate frame.
00027 #
00028 # sequence ID: consecutively increasing ID
00029 uint32 seq
00030 #Two-integer timestamp that is expressed as:
00031 # * stamp.secs: seconds (stamp_secs) since epoch
00032 # * stamp.nsecs: nanoseconds since stamp_secs
00033 # time-handling sugar is provided by the client library
00034 time stamp
00035 #Frame this data is associated with
00036 # 0: no frame
00037 # 1: global frame
00038 string frame_id
00039
00040 ================================================================================
00041 MSG: actionlib_msgs/GoalStatus
00042 GoalID goal_id
00043 uint8 status
00044 uint8 PENDING = 0 # The goal has yet to be processed by the action server
00045 uint8 ACTIVE = 1 # The goal is currently being processed by the action server
00046 uint8 PREEMPTED = 2 # The goal received a cancel request after it started executing
00047 # and has since completed its execution (Terminal State)
00048 uint8 SUCCEEDED = 3 # The goal was achieved successfully by the action server (Terminal State)
00049 uint8 ABORTED = 4 # The goal was aborted during execution by the action server due
00050 # to some failure (Terminal State)
00051 uint8 REJECTED = 5 # The goal was rejected by the action server without being processed,
00052 # because the goal was unattainable or invalid (Terminal State)
00053 uint8 PREEMPTING = 6 # The goal received a cancel request after it started executing
00054 # and has not yet completed execution
00055 uint8 RECALLING = 7 # The goal received a cancel request before it started executing,
00056 # but the action server has not yet confirmed that the goal is canceled
00057 uint8 RECALLED = 8 # The goal received a cancel request before it started executing
00058 # and was successfully cancelled (Terminal State)
00059 uint8 LOST = 9 # An action client can determine that a goal is LOST. This should not be
00060 # sent over the wire by an action server
00061
00062 #Allow for the user to associate a string with GoalStatus for debugging
00063 string text
00064
00065
00066 ================================================================================
00067 MSG: actionlib_msgs/GoalID
00068 # The stamp should store the time at which this goal was requested.
00069 # It is used by an action server when it tries to preempt all
00070 # goals that were requested before a certain time
00071 time stamp
00072
00073 # The id provides a way to associate feedback and
00074 # result message with specific goal requests. The id
00075 # specified must be unique.
00076 string id
00077
00078
00079 ================================================================================
00080 MSG: move_arm_msgs/MoveArmResult
00081 # An error code reflecting what went wrong
00082 motion_planning_msgs/ArmNavigationErrorCodes error_code
00083
00084 planning_environment_msgs/ContactInformation[] contacts
00085 ================================================================================
00086 MSG: motion_planning_msgs/ArmNavigationErrorCodes
00087 int32 val
00088
00089 # overall behavior
00090 int32 PLANNING_FAILED=-1
00091 int32 SUCCESS=1
00092 int32 TIMED_OUT=-2
00093
00094 # start state errors
00095 int32 START_STATE_IN_COLLISION=-3
00096 int32 START_STATE_VIOLATES_PATH_CONSTRAINTS=-4
00097
00098 # goal errors
00099 int32 GOAL_IN_COLLISION=-5
00100 int32 GOAL_VIOLATES_PATH_CONSTRAINTS=-6
00101
00102 # robot state
00103 int32 INVALID_ROBOT_STATE=-7
00104 int32 INCOMPLETE_ROBOT_STATE=-8
00105
00106 # planning request errors
00107 int32 INVALID_PLANNER_ID=-9
00108 int32 INVALID_NUM_PLANNING_ATTEMPTS=-10
00109 int32 INVALID_ALLOWED_PLANNING_TIME=-11
00110 int32 INVALID_GROUP_NAME=-12
00111 int32 INVALID_GOAL_JOINT_CONSTRAINTS=-13
00112 int32 INVALID_GOAL_POSITION_CONSTRAINTS=-14
00113 int32 INVALID_GOAL_ORIENTATION_CONSTRAINTS=-15
00114 int32 INVALID_PATH_JOINT_CONSTRAINTS=-16
00115 int32 INVALID_PATH_POSITION_CONSTRAINTS=-17
00116 int32 INVALID_PATH_ORIENTATION_CONSTRAINTS=-18
00117
00118 # state/trajectory monitor errors
00119 int32 INVALID_TRAJECTORY=-19
00120 int32 INVALID_INDEX=-20
00121 int32 JOINT_LIMITS_VIOLATED=-21
00122 int32 PATH_CONSTRAINTS_VIOLATED=-22
00123 int32 COLLISION_CONSTRAINTS_VIOLATED=-23
00124 int32 GOAL_CONSTRAINTS_VIOLATED=-24
00125 int32 JOINTS_NOT_MOVING=-25
00126 int32 TRAJECTORY_CONTROLLER_FAILED=-26
00127
00128 # system errors
00129 int32 FRAME_TRANSFORM_FAILURE=-27
00130 int32 COLLISION_CHECKING_UNAVAILABLE=-28
00131 int32 ROBOT_STATE_STALE=-29
00132 int32 SENSOR_INFO_STALE=-30
00133
00134 # kinematics errors
00135 int32 NO_IK_SOLUTION=-31
00136 int32 INVALID_LINK_NAME=-32
00137 int32 IK_LINK_IN_COLLISION=-33
00138 int32 NO_FK_SOLUTION=-34
00139 int32 KINEMATICS_STATE_IN_COLLISION=-35
00140
00141 # general errors
00142 int32 INVALID_TIMEOUT=-36
00143
00144
00145 ================================================================================
00146 MSG: planning_environment_msgs/ContactInformation
00147 # Standard ROS header contains information
00148 # about the frame in which this
00149 # contact is specified
00150 Header header
00151
00152 # Position of the contact point
00153 geometry_msgs/Point position
00154
00155 # Normal corresponding to the contact point
00156 geometry_msgs/Vector3 normal
00157
00158 # Depth of contact point
00159 float64 depth
00160
00161 # Name of the first body that is in contact
00162 # This could be a link or a namespace that represents a body
00163 string contact_body_1
00164 string attached_body_1
00165 uint32 body_type_1
00166
00167 # Name of the second body that is in contact
00168 # This could be a link or a namespace that represents a body
00169 string contact_body_2
00170 string attached_body_2
00171 uint32 body_type_2
00172
00173 uint32 ROBOT_LINK=0
00174 uint32 OBJECT=1
00175 uint32 ATTACHED_BODY=2
00176 ================================================================================
00177 MSG: geometry_msgs/Point
00178 # This contains the position of a point in free space
00179 float64 x
00180 float64 y
00181 float64 z
00182
00183 ================================================================================
00184 MSG: geometry_msgs/Vector3
00185 # This represents a vector in free space.
00186
00187 float64 x
00188 float64 y
00189 float64 z
00190 """
00191 __slots__ = ['header','status','result']
00192 _slot_types = ['Header','actionlib_msgs/GoalStatus','move_arm_msgs/MoveArmResult']
00193
00194 def __init__(self, *args, **kwds):
00195 """
00196 Constructor. Any message fields that are implicitly/explicitly
00197 set to None will be assigned a default value. The recommend
00198 use is keyword arguments as this is more robust to future message
00199 changes. You cannot mix in-order arguments and keyword arguments.
00200
00201 The available fields are:
00202 header,status,result
00203
00204 @param args: complete set of field values, in .msg order
00205 @param kwds: use keyword arguments corresponding to message field names
00206 to set specific fields.
00207 """
00208 if args or kwds:
00209 super(MoveArmActionResult, self).__init__(*args, **kwds)
00210
00211 if self.header is None:
00212 self.header = std_msgs.msg._Header.Header()
00213 if self.status is None:
00214 self.status = actionlib_msgs.msg.GoalStatus()
00215 if self.result is None:
00216 self.result = move_arm_msgs.msg.MoveArmResult()
00217 else:
00218 self.header = std_msgs.msg._Header.Header()
00219 self.status = actionlib_msgs.msg.GoalStatus()
00220 self.result = move_arm_msgs.msg.MoveArmResult()
00221
00222 def _get_types(self):
00223 """
00224 internal API method
00225 """
00226 return self._slot_types
00227
00228 def serialize(self, buff):
00229 """
00230 serialize message into buffer
00231 @param buff: buffer
00232 @type buff: StringIO
00233 """
00234 try:
00235 _x = self
00236 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00237 _x = self.header.frame_id
00238 length = len(_x)
00239 buff.write(struct.pack('<I%ss'%length, length, _x))
00240 _x = self
00241 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs))
00242 _x = self.status.goal_id.id
00243 length = len(_x)
00244 buff.write(struct.pack('<I%ss'%length, length, _x))
00245 buff.write(_struct_B.pack(self.status.status))
00246 _x = self.status.text
00247 length = len(_x)
00248 buff.write(struct.pack('<I%ss'%length, length, _x))
00249 buff.write(_struct_i.pack(self.result.error_code.val))
00250 length = len(self.result.contacts)
00251 buff.write(_struct_I.pack(length))
00252 for val1 in self.result.contacts:
00253 _v1 = val1.header
00254 buff.write(_struct_I.pack(_v1.seq))
00255 _v2 = _v1.stamp
00256 _x = _v2
00257 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00258 _x = _v1.frame_id
00259 length = len(_x)
00260 buff.write(struct.pack('<I%ss'%length, length, _x))
00261 _v3 = val1.position
00262 _x = _v3
00263 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00264 _v4 = val1.normal
00265 _x = _v4
00266 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00267 buff.write(_struct_d.pack(val1.depth))
00268 _x = val1.contact_body_1
00269 length = len(_x)
00270 buff.write(struct.pack('<I%ss'%length, length, _x))
00271 _x = val1.attached_body_1
00272 length = len(_x)
00273 buff.write(struct.pack('<I%ss'%length, length, _x))
00274 buff.write(_struct_I.pack(val1.body_type_1))
00275 _x = val1.contact_body_2
00276 length = len(_x)
00277 buff.write(struct.pack('<I%ss'%length, length, _x))
00278 _x = val1.attached_body_2
00279 length = len(_x)
00280 buff.write(struct.pack('<I%ss'%length, length, _x))
00281 buff.write(_struct_I.pack(val1.body_type_2))
00282 except struct.error, se: self._check_types(se)
00283 except TypeError, te: self._check_types(te)
00284
00285 def deserialize(self, str):
00286 """
00287 unpack serialized message in str into this message instance
00288 @param str: byte array of serialized message
00289 @type str: str
00290 """
00291 try:
00292 if self.header is None:
00293 self.header = std_msgs.msg._Header.Header()
00294 if self.status is None:
00295 self.status = actionlib_msgs.msg.GoalStatus()
00296 if self.result is None:
00297 self.result = move_arm_msgs.msg.MoveArmResult()
00298 end = 0
00299 _x = self
00300 start = end
00301 end += 12
00302 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00303 start = end
00304 end += 4
00305 (length,) = _struct_I.unpack(str[start:end])
00306 start = end
00307 end += length
00308 self.header.frame_id = str[start:end]
00309 _x = self
00310 start = end
00311 end += 8
00312 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.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 self.status.goal_id.id = str[start:end]
00319 start = end
00320 end += 1
00321 (self.status.status,) = _struct_B.unpack(str[start:end])
00322 start = end
00323 end += 4
00324 (length,) = _struct_I.unpack(str[start:end])
00325 start = end
00326 end += length
00327 self.status.text = str[start:end]
00328 start = end
00329 end += 4
00330 (self.result.error_code.val,) = _struct_i.unpack(str[start:end])
00331 start = end
00332 end += 4
00333 (length,) = _struct_I.unpack(str[start:end])
00334 self.result.contacts = []
00335 for i in xrange(0, length):
00336 val1 = planning_environment_msgs.msg.ContactInformation()
00337 _v5 = val1.header
00338 start = end
00339 end += 4
00340 (_v5.seq,) = _struct_I.unpack(str[start:end])
00341 _v6 = _v5.stamp
00342 _x = _v6
00343 start = end
00344 end += 8
00345 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00346 start = end
00347 end += 4
00348 (length,) = _struct_I.unpack(str[start:end])
00349 start = end
00350 end += length
00351 _v5.frame_id = str[start:end]
00352 _v7 = val1.position
00353 _x = _v7
00354 start = end
00355 end += 24
00356 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00357 _v8 = val1.normal
00358 _x = _v8
00359 start = end
00360 end += 24
00361 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00362 start = end
00363 end += 8
00364 (val1.depth,) = _struct_d.unpack(str[start:end])
00365 start = end
00366 end += 4
00367 (length,) = _struct_I.unpack(str[start:end])
00368 start = end
00369 end += length
00370 val1.contact_body_1 = str[start:end]
00371 start = end
00372 end += 4
00373 (length,) = _struct_I.unpack(str[start:end])
00374 start = end
00375 end += length
00376 val1.attached_body_1 = str[start:end]
00377 start = end
00378 end += 4
00379 (val1.body_type_1,) = _struct_I.unpack(str[start:end])
00380 start = end
00381 end += 4
00382 (length,) = _struct_I.unpack(str[start:end])
00383 start = end
00384 end += length
00385 val1.contact_body_2 = str[start:end]
00386 start = end
00387 end += 4
00388 (length,) = _struct_I.unpack(str[start:end])
00389 start = end
00390 end += length
00391 val1.attached_body_2 = str[start:end]
00392 start = end
00393 end += 4
00394 (val1.body_type_2,) = _struct_I.unpack(str[start:end])
00395 self.result.contacts.append(val1)
00396 return self
00397 except struct.error, e:
00398 raise roslib.message.DeserializationError(e)
00399
00400
00401 def serialize_numpy(self, buff, numpy):
00402 """
00403 serialize message with numpy array types into buffer
00404 @param buff: buffer
00405 @type buff: StringIO
00406 @param numpy: numpy python module
00407 @type numpy module
00408 """
00409 try:
00410 _x = self
00411 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00412 _x = self.header.frame_id
00413 length = len(_x)
00414 buff.write(struct.pack('<I%ss'%length, length, _x))
00415 _x = self
00416 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs))
00417 _x = self.status.goal_id.id
00418 length = len(_x)
00419 buff.write(struct.pack('<I%ss'%length, length, _x))
00420 buff.write(_struct_B.pack(self.status.status))
00421 _x = self.status.text
00422 length = len(_x)
00423 buff.write(struct.pack('<I%ss'%length, length, _x))
00424 buff.write(_struct_i.pack(self.result.error_code.val))
00425 length = len(self.result.contacts)
00426 buff.write(_struct_I.pack(length))
00427 for val1 in self.result.contacts:
00428 _v9 = val1.header
00429 buff.write(_struct_I.pack(_v9.seq))
00430 _v10 = _v9.stamp
00431 _x = _v10
00432 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00433 _x = _v9.frame_id
00434 length = len(_x)
00435 buff.write(struct.pack('<I%ss'%length, length, _x))
00436 _v11 = val1.position
00437 _x = _v11
00438 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00439 _v12 = val1.normal
00440 _x = _v12
00441 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00442 buff.write(_struct_d.pack(val1.depth))
00443 _x = val1.contact_body_1
00444 length = len(_x)
00445 buff.write(struct.pack('<I%ss'%length, length, _x))
00446 _x = val1.attached_body_1
00447 length = len(_x)
00448 buff.write(struct.pack('<I%ss'%length, length, _x))
00449 buff.write(_struct_I.pack(val1.body_type_1))
00450 _x = val1.contact_body_2
00451 length = len(_x)
00452 buff.write(struct.pack('<I%ss'%length, length, _x))
00453 _x = val1.attached_body_2
00454 length = len(_x)
00455 buff.write(struct.pack('<I%ss'%length, length, _x))
00456 buff.write(_struct_I.pack(val1.body_type_2))
00457 except struct.error, se: self._check_types(se)
00458 except TypeError, te: self._check_types(te)
00459
00460 def deserialize_numpy(self, str, numpy):
00461 """
00462 unpack serialized message in str into this message instance using numpy for array types
00463 @param str: byte array of serialized message
00464 @type str: str
00465 @param numpy: numpy python module
00466 @type numpy: module
00467 """
00468 try:
00469 if self.header is None:
00470 self.header = std_msgs.msg._Header.Header()
00471 if self.status is None:
00472 self.status = actionlib_msgs.msg.GoalStatus()
00473 if self.result is None:
00474 self.result = move_arm_msgs.msg.MoveArmResult()
00475 end = 0
00476 _x = self
00477 start = end
00478 end += 12
00479 (_x.header.seq, _x.header.stamp.secs, _x.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.header.frame_id = str[start:end]
00486 _x = self
00487 start = end
00488 end += 8
00489 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00490 start = end
00491 end += 4
00492 (length,) = _struct_I.unpack(str[start:end])
00493 start = end
00494 end += length
00495 self.status.goal_id.id = str[start:end]
00496 start = end
00497 end += 1
00498 (self.status.status,) = _struct_B.unpack(str[start:end])
00499 start = end
00500 end += 4
00501 (length,) = _struct_I.unpack(str[start:end])
00502 start = end
00503 end += length
00504 self.status.text = str[start:end]
00505 start = end
00506 end += 4
00507 (self.result.error_code.val,) = _struct_i.unpack(str[start:end])
00508 start = end
00509 end += 4
00510 (length,) = _struct_I.unpack(str[start:end])
00511 self.result.contacts = []
00512 for i in xrange(0, length):
00513 val1 = planning_environment_msgs.msg.ContactInformation()
00514 _v13 = val1.header
00515 start = end
00516 end += 4
00517 (_v13.seq,) = _struct_I.unpack(str[start:end])
00518 _v14 = _v13.stamp
00519 _x = _v14
00520 start = end
00521 end += 8
00522 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00523 start = end
00524 end += 4
00525 (length,) = _struct_I.unpack(str[start:end])
00526 start = end
00527 end += length
00528 _v13.frame_id = str[start:end]
00529 _v15 = val1.position
00530 _x = _v15
00531 start = end
00532 end += 24
00533 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00534 _v16 = val1.normal
00535 _x = _v16
00536 start = end
00537 end += 24
00538 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00539 start = end
00540 end += 8
00541 (val1.depth,) = _struct_d.unpack(str[start:end])
00542 start = end
00543 end += 4
00544 (length,) = _struct_I.unpack(str[start:end])
00545 start = end
00546 end += length
00547 val1.contact_body_1 = str[start:end]
00548 start = end
00549 end += 4
00550 (length,) = _struct_I.unpack(str[start:end])
00551 start = end
00552 end += length
00553 val1.attached_body_1 = str[start:end]
00554 start = end
00555 end += 4
00556 (val1.body_type_1,) = _struct_I.unpack(str[start:end])
00557 start = end
00558 end += 4
00559 (length,) = _struct_I.unpack(str[start:end])
00560 start = end
00561 end += length
00562 val1.contact_body_2 = str[start:end]
00563 start = end
00564 end += 4
00565 (length,) = _struct_I.unpack(str[start:end])
00566 start = end
00567 end += length
00568 val1.attached_body_2 = str[start:end]
00569 start = end
00570 end += 4
00571 (val1.body_type_2,) = _struct_I.unpack(str[start:end])
00572 self.result.contacts.append(val1)
00573 return self
00574 except struct.error, e:
00575 raise roslib.message.DeserializationError(e)
00576
00577 _struct_I = roslib.message.struct_I
00578 _struct_B = struct.Struct("<B")
00579 _struct_d = struct.Struct("<d")
00580 _struct_i = struct.Struct("<i")
00581 _struct_3I = struct.Struct("<3I")
00582 _struct_2I = struct.Struct("<2I")
00583 _struct_3d = struct.Struct("<3d")