_CollisionObjectOperation.py
Go to the documentation of this file.
00001 """autogenerated by genpy from arm_navigation_msgs/CollisionObjectOperation.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 CollisionObjectOperation(genpy.Message):
00009   _md5sum = "66a2b3b971d193145f8da8c3e401a474"
00010   _type = "arm_navigation_msgs/CollisionObjectOperation"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """#Puts the object into the environment
00013 #or updates the object if already added
00014 byte ADD=0
00015 
00016 #Removes the object from the environment entirely
00017 byte REMOVE=1
00018 
00019 #Only valid within the context of a CollisionAttachedObject message
00020 #Will be ignored if sent with an CollisionObject message
00021 #Takes an attached object, detaches from the attached link
00022 #But adds back in as regular object
00023 byte DETACH_AND_ADD_AS_OBJECT=2
00024 
00025 #Only valid within the context of a CollisionAttachedObject message
00026 #Will be ignored if sent with an CollisionObject message
00027 #Takes current object in the environment and removes it as
00028 #a regular object
00029 byte ATTACH_AND_REMOVE_AS_OBJECT=3
00030 
00031 # Byte code for operation
00032 byte operation
00033 
00034 """
00035   # Pseudo-constants
00036   ADD = 0
00037   REMOVE = 1
00038   DETACH_AND_ADD_AS_OBJECT = 2
00039   ATTACH_AND_REMOVE_AS_OBJECT = 3
00040 
00041   __slots__ = ['operation']
00042   _slot_types = ['byte']
00043 
00044   def __init__(self, *args, **kwds):
00045     """
00046     Constructor. Any message fields that are implicitly/explicitly
00047     set to None will be assigned a default value. The recommend
00048     use is keyword arguments as this is more robust to future message
00049     changes.  You cannot mix in-order arguments and keyword arguments.
00050 
00051     The available fields are:
00052        operation
00053 
00054     :param args: complete set of field values, in .msg order
00055     :param kwds: use keyword arguments corresponding to message field names
00056     to set specific fields.
00057     """
00058     if args or kwds:
00059       super(CollisionObjectOperation, self).__init__(*args, **kwds)
00060       #message fields cannot be None, assign default values for those that are
00061       if self.operation is None:
00062         self.operation = 0
00063     else:
00064       self.operation = 0
00065 
00066   def _get_types(self):
00067     """
00068     internal API method
00069     """
00070     return self._slot_types
00071 
00072   def serialize(self, buff):
00073     """
00074     serialize message into buffer
00075     :param buff: buffer, ``StringIO``
00076     """
00077     try:
00078       buff.write(_struct_b.pack(self.operation))
00079     except struct.error as se: self._check_types(se)
00080     except TypeError as te: self._check_types(te)
00081 
00082   def deserialize(self, str):
00083     """
00084     unpack serialized message in str into this message instance
00085     :param str: byte array of serialized message, ``str``
00086     """
00087     try:
00088       end = 0
00089       start = end
00090       end += 1
00091       (self.operation,) = _struct_b.unpack(str[start:end])
00092       return self
00093     except struct.error as e:
00094       raise genpy.DeserializationError(e) #most likely buffer underfill
00095 
00096 
00097   def serialize_numpy(self, buff, numpy):
00098     """
00099     serialize message with numpy array types into buffer
00100     :param buff: buffer, ``StringIO``
00101     :param numpy: numpy python module
00102     """
00103     try:
00104       buff.write(_struct_b.pack(self.operation))
00105     except struct.error as se: self._check_types(se)
00106     except TypeError as te: self._check_types(te)
00107 
00108   def deserialize_numpy(self, str, numpy):
00109     """
00110     unpack serialized message in str into this message instance using numpy for array types
00111     :param str: byte array of serialized message, ``str``
00112     :param numpy: numpy python module
00113     """
00114     try:
00115       end = 0
00116       start = end
00117       end += 1
00118       (self.operation,) = _struct_b.unpack(str[start:end])
00119       return self
00120     except struct.error as e:
00121       raise genpy.DeserializationError(e) #most likely buffer underfill
00122 
00123 _struct_I = genpy.struct_I
00124 _struct_b = struct.Struct("<b")


arm_navigation_msgs
Author(s): Gil Jones
autogenerated on Mon Dec 2 2013 12:31:50