Go to the documentation of this file.00001 """autogenerated by genpy from fast_plane_detection/SlavePoint.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 geometry_msgs.msg
00008
00009 class SlavePoint(genpy.Message):
00010 _md5sum = "97fcacf5bd73886a5a75c1efaa16ed95"
00011 _type = "fast_plane_detection/SlavePoint"
00012 _has_header = False
00013 _full_text = """# The coordinates of the 3D point around which the local plane is estimated
00014 geometry_msgs/Point32 end_effector
00015
00016 # Describes the contact situation
00017 bool contact
00018 ================================================================================
00019 MSG: geometry_msgs/Point32
00020 # This contains the position of a point in free space(with 32 bits of precision).
00021 # It is recommeded to use Point wherever possible instead of Point32.
00022 #
00023 # This recommendation is to promote interoperability.
00024 #
00025 # This message is designed to take up less space when sending
00026 # lots of points at once, as in the case of a PointCloud.
00027
00028 float32 x
00029 float32 y
00030 float32 z
00031 """
00032 __slots__ = ['end_effector','contact']
00033 _slot_types = ['geometry_msgs/Point32','bool']
00034
00035 def __init__(self, *args, **kwds):
00036 """
00037 Constructor. Any message fields that are implicitly/explicitly
00038 set to None will be assigned a default value. The recommend
00039 use is keyword arguments as this is more robust to future message
00040 changes. You cannot mix in-order arguments and keyword arguments.
00041
00042 The available fields are:
00043 end_effector,contact
00044
00045 :param args: complete set of field values, in .msg order
00046 :param kwds: use keyword arguments corresponding to message field names
00047 to set specific fields.
00048 """
00049 if args or kwds:
00050 super(SlavePoint, self).__init__(*args, **kwds)
00051
00052 if self.end_effector is None:
00053 self.end_effector = geometry_msgs.msg.Point32()
00054 if self.contact is None:
00055 self.contact = False
00056 else:
00057 self.end_effector = geometry_msgs.msg.Point32()
00058 self.contact = False
00059
00060 def _get_types(self):
00061 """
00062 internal API method
00063 """
00064 return self._slot_types
00065
00066 def serialize(self, buff):
00067 """
00068 serialize message into buffer
00069 :param buff: buffer, ``StringIO``
00070 """
00071 try:
00072 _x = self
00073 buff.write(_struct_3fB.pack(_x.end_effector.x, _x.end_effector.y, _x.end_effector.z, _x.contact))
00074 except struct.error as se: self._check_types(se)
00075 except TypeError as te: self._check_types(te)
00076
00077 def deserialize(self, str):
00078 """
00079 unpack serialized message in str into this message instance
00080 :param str: byte array of serialized message, ``str``
00081 """
00082 try:
00083 if self.end_effector is None:
00084 self.end_effector = geometry_msgs.msg.Point32()
00085 end = 0
00086 _x = self
00087 start = end
00088 end += 13
00089 (_x.end_effector.x, _x.end_effector.y, _x.end_effector.z, _x.contact,) = _struct_3fB.unpack(str[start:end])
00090 self.contact = bool(self.contact)
00091 return self
00092 except struct.error as e:
00093 raise genpy.DeserializationError(e)
00094
00095
00096 def serialize_numpy(self, buff, numpy):
00097 """
00098 serialize message with numpy array types into buffer
00099 :param buff: buffer, ``StringIO``
00100 :param numpy: numpy python module
00101 """
00102 try:
00103 _x = self
00104 buff.write(_struct_3fB.pack(_x.end_effector.x, _x.end_effector.y, _x.end_effector.z, _x.contact))
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 if self.end_effector is None:
00116 self.end_effector = geometry_msgs.msg.Point32()
00117 end = 0
00118 _x = self
00119 start = end
00120 end += 13
00121 (_x.end_effector.x, _x.end_effector.y, _x.end_effector.z, _x.contact,) = _struct_3fB.unpack(str[start:end])
00122 self.contact = bool(self.contact)
00123 return self
00124 except struct.error as e:
00125 raise genpy.DeserializationError(e)
00126
00127 _struct_I = genpy.struct_I
00128 _struct_3fB = struct.Struct("<3fB")