$search
00001 """autogenerated by genmsg_py from CalibPoint.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class CalibPoint(roslib.message.Message): 00007 _md5sum = "9b9d41ff2127a593c07cec2a11858ac5" 00008 _type = "visp_camera_calibration/CalibPoint" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """# a vpPoint 00011 00012 int32 i 00013 int32 j 00014 float64 X 00015 float64 Y 00016 float64 Z 00017 00018 00019 """ 00020 __slots__ = ['i','j','X','Y','Z'] 00021 _slot_types = ['int32','int32','float64','float64','float64'] 00022 00023 def __init__(self, *args, **kwds): 00024 """ 00025 Constructor. Any message fields that are implicitly/explicitly 00026 set to None will be assigned a default value. The recommend 00027 use is keyword arguments as this is more robust to future message 00028 changes. You cannot mix in-order arguments and keyword arguments. 00029 00030 The available fields are: 00031 i,j,X,Y,Z 00032 00033 @param args: complete set of field values, in .msg order 00034 @param kwds: use keyword arguments corresponding to message field names 00035 to set specific fields. 00036 """ 00037 if args or kwds: 00038 super(CalibPoint, self).__init__(*args, **kwds) 00039 #message fields cannot be None, assign default values for those that are 00040 if self.i is None: 00041 self.i = 0 00042 if self.j is None: 00043 self.j = 0 00044 if self.X is None: 00045 self.X = 0. 00046 if self.Y is None: 00047 self.Y = 0. 00048 if self.Z is None: 00049 self.Z = 0. 00050 else: 00051 self.i = 0 00052 self.j = 0 00053 self.X = 0. 00054 self.Y = 0. 00055 self.Z = 0. 00056 00057 def _get_types(self): 00058 """ 00059 internal API method 00060 """ 00061 return self._slot_types 00062 00063 def serialize(self, buff): 00064 """ 00065 serialize message into buffer 00066 @param buff: buffer 00067 @type buff: StringIO 00068 """ 00069 try: 00070 _x = self 00071 buff.write(_struct_2i3d.pack(_x.i, _x.j, _x.X, _x.Y, _x.Z)) 00072 except struct.error as se: self._check_types(se) 00073 except TypeError as te: self._check_types(te) 00074 00075 def deserialize(self, str): 00076 """ 00077 unpack serialized message in str into this message instance 00078 @param str: byte array of serialized message 00079 @type str: 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 roslib.message.DeserializationError(e) #most likely buffer underfill 00090 00091 00092 def serialize_numpy(self, buff, numpy): 00093 """ 00094 serialize message with numpy array types into buffer 00095 @param buff: buffer 00096 @type buff: StringIO 00097 @param numpy: numpy python module 00098 @type numpy module 00099 """ 00100 try: 00101 _x = self 00102 buff.write(_struct_2i3d.pack(_x.i, _x.j, _x.X, _x.Y, _x.Z)) 00103 except struct.error as se: self._check_types(se) 00104 except TypeError as te: self._check_types(te) 00105 00106 def deserialize_numpy(self, str, numpy): 00107 """ 00108 unpack serialized message in str into this message instance using numpy for array types 00109 @param str: byte array of serialized message 00110 @type str: str 00111 @param numpy: numpy python module 00112 @type numpy: module 00113 """ 00114 try: 00115 end = 0 00116 _x = self 00117 start = end 00118 end += 32 00119 (_x.i, _x.j, _x.X, _x.Y, _x.Z,) = _struct_2i3d.unpack(str[start:end]) 00120 return self 00121 except struct.error as e: 00122 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00123 00124 _struct_I = roslib.message.struct_I 00125 _struct_2i3d = struct.Struct("<2i3d")