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