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


object_manipulation_msgs
Author(s): Matei Ciocarlie
autogenerated on Thu Jan 2 2014 11:38:11