00001 """autogenerated by genpy from visp_camera_calibration/CalibPoint.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 CalibPoint(genpy.Message):
00009 _md5sum = "9b9d41ff2127a593c07cec2a11858ac5"
00010 _type = "visp_camera_calibration/CalibPoint"
00011 _has_header = False
00012 _full_text = """# a vpPoint
00013
00014 int32 i
00015 int32 j
00016 float64 X
00017 float64 Y
00018 float64 Z
00019
00020
00021 """
00022 __slots__ = ['i','j','X','Y','Z']
00023 _slot_types = ['int32','int32','float64','float64','float64']
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 i,j,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(CalibPoint, self).__init__(*args, **kwds)
00041
00042 if self.i is None:
00043 self.i = 0
00044 if self.j is None:
00045 self.j = 0
00046 if self.X is None:
00047 self.X = 0.
00048 if self.Y is None:
00049 self.Y = 0.
00050 if self.Z is None:
00051 self.Z = 0.
00052 else:
00053 self.i = 0
00054 self.j = 0
00055 self.X = 0.
00056 self.Y = 0.
00057 self.Z = 0.
00058
00059 def _get_types(self):
00060 """
00061 internal API method
00062 """
00063 return self._slot_types
00064
00065 def serialize(self, buff):
00066 """
00067 serialize message into buffer
00068 :param buff: buffer, ``StringIO``
00069 """
00070 try:
00071 _x = self
00072 buff.write(_struct_2i3d.pack(_x.i, _x.j, _x.X, _x.Y, _x.Z))
00073 except struct.error as se: self._check_types(se)
00074 except TypeError as 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, ``str``
00080 """
00081 try:
00082 end = 0
00083 _x = self
00084 start = end
00085 end += 32
00086 (_x.i, _x.j, _x.X, _x.Y, _x.Z,) = _struct_2i3d.unpack(str[start:end])
00087 return self
00088 except struct.error as e:
00089 raise genpy.DeserializationError(e)
00090
00091
00092 def serialize_numpy(self, buff, numpy):
00093 """
00094 serialize message with numpy array types into buffer
00095 :param buff: buffer, ``StringIO``
00096 :param numpy: numpy python module
00097 """
00098 try:
00099 _x = self
00100 buff.write(_struct_2i3d.pack(_x.i, _x.j, _x.X, _x.Y, _x.Z))
00101 except struct.error as se: self._check_types(se)
00102 except TypeError as te: self._check_types(te)
00103
00104 def deserialize_numpy(self, str, numpy):
00105 """
00106 unpack serialized message in str into this message instance using numpy for array types
00107 :param str: byte array of serialized message, ``str``
00108 :param numpy: numpy python module
00109 """
00110 try:
00111 end = 0
00112 _x = self
00113 start = end
00114 end += 32
00115 (_x.i, _x.j, _x.X, _x.Y, _x.Z,) = _struct_2i3d.unpack(str[start:end])
00116 return self
00117 except struct.error as e:
00118 raise genpy.DeserializationError(e)
00119
00120 _struct_I = genpy.struct_I
00121 _struct_2i3d = struct.Struct("<2i3d")