_PlaceLocationResult.py
Go to the documentation of this file.
00001 """autogenerated by genpy from object_manipulation_msgs/PlaceLocationResult.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 PlaceLocationResult(genpy.Message):
00009   _md5sum = "8dd9edc3a2a98cab298ca81031224cda"
00010   _type = "object_manipulation_msgs/PlaceLocationResult"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """int32 SUCCESS = 1
00013 int32 PLACE_OUT_OF_REACH = 2
00014 int32 PLACE_IN_COLLISION = 3
00015 int32 PLACE_UNFEASIBLE = 4
00016 int32 PREPLACE_OUT_OF_REACH = 5
00017 int32 PREPLACE_IN_COLLISION = 6
00018 int32 PREPLACE_UNFEASIBLE = 7
00019 int32 RETREAT_OUT_OF_REACH = 8
00020 int32 RETREAT_IN_COLLISION = 9
00021 int32 RETREAT_UNFEASIBLE = 10
00022 int32 MOVE_ARM_FAILED = 11
00023 int32 PLACE_FAILED = 12
00024 int32 RETREAT_FAILED = 13
00025 int32 result_code
00026 
00027 # whether the state of the world was disturbed by this attempt. generally, this flag
00028 # shows if another task can be attempted, or a new sensed world model is recommeded
00029 # before proceeding
00030 bool continuation_possible
00031 
00032 """
00033   # Pseudo-constants
00034   SUCCESS = 1
00035   PLACE_OUT_OF_REACH = 2
00036   PLACE_IN_COLLISION = 3
00037   PLACE_UNFEASIBLE = 4
00038   PREPLACE_OUT_OF_REACH = 5
00039   PREPLACE_IN_COLLISION = 6
00040   PREPLACE_UNFEASIBLE = 7
00041   RETREAT_OUT_OF_REACH = 8
00042   RETREAT_IN_COLLISION = 9
00043   RETREAT_UNFEASIBLE = 10
00044   MOVE_ARM_FAILED = 11
00045   PLACE_FAILED = 12
00046   RETREAT_FAILED = 13
00047 
00048   __slots__ = ['result_code','continuation_possible']
00049   _slot_types = ['int32','bool']
00050 
00051   def __init__(self, *args, **kwds):
00052     """
00053     Constructor. Any message fields that are implicitly/explicitly
00054     set to None will be assigned a default value. The recommend
00055     use is keyword arguments as this is more robust to future message
00056     changes.  You cannot mix in-order arguments and keyword arguments.
00057 
00058     The available fields are:
00059        result_code,continuation_possible
00060 
00061     :param args: complete set of field values, in .msg order
00062     :param kwds: use keyword arguments corresponding to message field names
00063     to set specific fields.
00064     """
00065     if args or kwds:
00066       super(PlaceLocationResult, self).__init__(*args, **kwds)
00067       #message fields cannot be None, assign default values for those that are
00068       if self.result_code is None:
00069         self.result_code = 0
00070       if self.continuation_possible is None:
00071         self.continuation_possible = False
00072     else:
00073       self.result_code = 0
00074       self.continuation_possible = False
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       _x = self
00089       buff.write(_struct_iB.pack(_x.result_code, _x.continuation_possible))
00090     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00091     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00092 
00093   def deserialize(self, str):
00094     """
00095     unpack serialized message in str into this message instance
00096     :param str: byte array of serialized message, ``str``
00097     """
00098     try:
00099       end = 0
00100       _x = self
00101       start = end
00102       end += 5
00103       (_x.result_code, _x.continuation_possible,) = _struct_iB.unpack(str[start:end])
00104       self.continuation_possible = bool(self.continuation_possible)
00105       return self
00106     except struct.error as e:
00107       raise genpy.DeserializationError(e) #most likely buffer underfill
00108 
00109 
00110   def serialize_numpy(self, buff, numpy):
00111     """
00112     serialize message with numpy array types into buffer
00113     :param buff: buffer, ``StringIO``
00114     :param numpy: numpy python module
00115     """
00116     try:
00117       _x = self
00118       buff.write(_struct_iB.pack(_x.result_code, _x.continuation_possible))
00119     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00120     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00121 
00122   def deserialize_numpy(self, str, numpy):
00123     """
00124     unpack serialized message in str into this message instance using numpy for array types
00125     :param str: byte array of serialized message, ``str``
00126     :param numpy: numpy python module
00127     """
00128     try:
00129       end = 0
00130       _x = self
00131       start = end
00132       end += 5
00133       (_x.result_code, _x.continuation_possible,) = _struct_iB.unpack(str[start:end])
00134       self.continuation_possible = bool(self.continuation_possible)
00135       return self
00136     except struct.error as e:
00137       raise genpy.DeserializationError(e) #most likely buffer underfill
00138 
00139 _struct_I = genpy.struct_I
00140 _struct_iB = struct.Struct("<iB")


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