_ReactiveLiftFeedback.py
Go to the documentation of this file.
00001 """autogenerated by genpy from object_manipulation_msgs/ReactiveLiftFeedback.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 object_manipulation_msgs.msg
00008 
00009 class ReactiveLiftFeedback(genpy.Message):
00010   _md5sum = "f5854fd8810580aa0bc24d4d76384836"
00011   _type = "object_manipulation_msgs/ReactiveLiftFeedback"
00012   _has_header = False #flag to mark the presence of a Header object
00013   _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00014 
00015 # Which phase the lift is in
00016 
00017 ManipulationPhase manipulation_phase
00018 
00019 
00020 
00021 ================================================================================
00022 MSG: object_manipulation_msgs/ManipulationPhase
00023 int32 CHECKING_FEASIBILITY = 0
00024 int32 MOVING_TO_PREGRASP = 1
00025 int32 MOVING_TO_GRASP = 2
00026 int32 CLOSING = 3 
00027 int32 ADJUSTING_GRASP = 4
00028 int32 LIFTING = 5
00029 int32 MOVING_WITH_OBJECT = 6
00030 int32 MOVING_TO_PLACE = 7
00031 int32 PLACING = 8
00032 int32 OPENING = 9
00033 int32 RETREATING = 10
00034 int32 MOVING_WITHOUT_OBJECT = 11
00035 int32 SHAKING = 12
00036 int32 SUCCEEDED = 13
00037 int32 FAILED = 14
00038 int32 ABORTED = 15
00039 int32 HOLDING_OBJECT = 16
00040 
00041 int32 phase
00042 """
00043   __slots__ = ['manipulation_phase']
00044   _slot_types = ['object_manipulation_msgs/ManipulationPhase']
00045 
00046   def __init__(self, *args, **kwds):
00047     """
00048     Constructor. Any message fields that are implicitly/explicitly
00049     set to None will be assigned a default value. The recommend
00050     use is keyword arguments as this is more robust to future message
00051     changes.  You cannot mix in-order arguments and keyword arguments.
00052 
00053     The available fields are:
00054        manipulation_phase
00055 
00056     :param args: complete set of field values, in .msg order
00057     :param kwds: use keyword arguments corresponding to message field names
00058     to set specific fields.
00059     """
00060     if args or kwds:
00061       super(ReactiveLiftFeedback, self).__init__(*args, **kwds)
00062       #message fields cannot be None, assign default values for those that are
00063       if self.manipulation_phase is None:
00064         self.manipulation_phase = object_manipulation_msgs.msg.ManipulationPhase()
00065     else:
00066       self.manipulation_phase = object_manipulation_msgs.msg.ManipulationPhase()
00067 
00068   def _get_types(self):
00069     """
00070     internal API method
00071     """
00072     return self._slot_types
00073 
00074   def serialize(self, buff):
00075     """
00076     serialize message into buffer
00077     :param buff: buffer, ``StringIO``
00078     """
00079     try:
00080       buff.write(_struct_i.pack(self.manipulation_phase.phase))
00081     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00082     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00083 
00084   def deserialize(self, str):
00085     """
00086     unpack serialized message in str into this message instance
00087     :param str: byte array of serialized message, ``str``
00088     """
00089     try:
00090       if self.manipulation_phase is None:
00091         self.manipulation_phase = object_manipulation_msgs.msg.ManipulationPhase()
00092       end = 0
00093       start = end
00094       end += 4
00095       (self.manipulation_phase.phase,) = _struct_i.unpack(str[start:end])
00096       return self
00097     except struct.error as e:
00098       raise genpy.DeserializationError(e) #most likely buffer underfill
00099 
00100 
00101   def serialize_numpy(self, buff, numpy):
00102     """
00103     serialize message with numpy array types into buffer
00104     :param buff: buffer, ``StringIO``
00105     :param numpy: numpy python module
00106     """
00107     try:
00108       buff.write(_struct_i.pack(self.manipulation_phase.phase))
00109     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00110     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00111 
00112   def deserialize_numpy(self, str, numpy):
00113     """
00114     unpack serialized message in str into this message instance using numpy for array types
00115     :param str: byte array of serialized message, ``str``
00116     :param numpy: numpy python module
00117     """
00118     try:
00119       if self.manipulation_phase is None:
00120         self.manipulation_phase = object_manipulation_msgs.msg.ManipulationPhase()
00121       end = 0
00122       start = end
00123       end += 4
00124       (self.manipulation_phase.phase,) = _struct_i.unpack(str[start:end])
00125       return self
00126     except struct.error as e:
00127       raise genpy.DeserializationError(e) #most likely buffer underfill
00128 
00129 _struct_I = genpy.struct_I
00130 _struct_i = struct.Struct("<i")


object_manipulation_msgs
Author(s): Matei Ciocarlie
autogenerated on Mon Oct 6 2014 02:58:11