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


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