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