$search
00001 """autogenerated by genmsg_py from CameraCalibration.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import geometry_msgs.msg 00006 import roslib.rostime 00007 00008 class CameraCalibration(roslib.message.Message): 00009 _md5sum = "3cc5d376bac75efd371d4df5fb750ad6" 00010 _type = "camera_pose_calibration/CameraCalibration" 00011 _has_header = False #flag to mark the presence of a Header object 00012 _full_text = """geometry_msgs/Pose[] camera_pose 00013 string[] camera_id 00014 time[] time_stamp 00015 int32 m_count 00016 00017 ================================================================================ 00018 MSG: geometry_msgs/Pose 00019 # A representation of pose in free space, composed of postion and orientation. 00020 Point position 00021 Quaternion orientation 00022 00023 ================================================================================ 00024 MSG: geometry_msgs/Point 00025 # This contains the position of a point in free space 00026 float64 x 00027 float64 y 00028 float64 z 00029 00030 ================================================================================ 00031 MSG: geometry_msgs/Quaternion 00032 # This represents an orientation in free space in quaternion form. 00033 00034 float64 x 00035 float64 y 00036 float64 z 00037 float64 w 00038 00039 """ 00040 __slots__ = ['camera_pose','camera_id','time_stamp','m_count'] 00041 _slot_types = ['geometry_msgs/Pose[]','string[]','time[]','int32'] 00042 00043 def __init__(self, *args, **kwds): 00044 """ 00045 Constructor. Any message fields that are implicitly/explicitly 00046 set to None will be assigned a default value. The recommend 00047 use is keyword arguments as this is more robust to future message 00048 changes. You cannot mix in-order arguments and keyword arguments. 00049 00050 The available fields are: 00051 camera_pose,camera_id,time_stamp,m_count 00052 00053 @param args: complete set of field values, in .msg order 00054 @param kwds: use keyword arguments corresponding to message field names 00055 to set specific fields. 00056 """ 00057 if args or kwds: 00058 super(CameraCalibration, self).__init__(*args, **kwds) 00059 #message fields cannot be None, assign default values for those that are 00060 if self.camera_pose is None: 00061 self.camera_pose = [] 00062 if self.camera_id is None: 00063 self.camera_id = [] 00064 if self.time_stamp is None: 00065 self.time_stamp = [] 00066 if self.m_count is None: 00067 self.m_count = 0 00068 else: 00069 self.camera_pose = [] 00070 self.camera_id = [] 00071 self.time_stamp = [] 00072 self.m_count = 0 00073 00074 def _get_types(self): 00075 """ 00076 internal API method 00077 """ 00078 return self._slot_types 00079 00080 def serialize(self, buff): 00081 """ 00082 serialize message into buffer 00083 @param buff: buffer 00084 @type buff: StringIO 00085 """ 00086 try: 00087 length = len(self.camera_pose) 00088 buff.write(_struct_I.pack(length)) 00089 for val1 in self.camera_pose: 00090 _v1 = val1.position 00091 _x = _v1 00092 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00093 _v2 = val1.orientation 00094 _x = _v2 00095 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00096 length = len(self.camera_id) 00097 buff.write(_struct_I.pack(length)) 00098 for val1 in self.camera_id: 00099 length = len(val1) 00100 buff.write(struct.pack('<I%ss'%length, length, val1)) 00101 length = len(self.time_stamp) 00102 buff.write(_struct_I.pack(length)) 00103 for val1 in self.time_stamp: 00104 _x = val1 00105 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00106 buff.write(_struct_i.pack(self.m_count)) 00107 except struct.error as se: self._check_types(se) 00108 except TypeError as te: self._check_types(te) 00109 00110 def deserialize(self, str): 00111 """ 00112 unpack serialized message in str into this message instance 00113 @param str: byte array of serialized message 00114 @type str: str 00115 """ 00116 try: 00117 end = 0 00118 start = end 00119 end += 4 00120 (length,) = _struct_I.unpack(str[start:end]) 00121 self.camera_pose = [] 00122 for i in range(0, length): 00123 val1 = geometry_msgs.msg.Pose() 00124 _v3 = val1.position 00125 _x = _v3 00126 start = end 00127 end += 24 00128 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00129 _v4 = val1.orientation 00130 _x = _v4 00131 start = end 00132 end += 32 00133 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00134 self.camera_pose.append(val1) 00135 start = end 00136 end += 4 00137 (length,) = _struct_I.unpack(str[start:end]) 00138 self.camera_id = [] 00139 for i in range(0, length): 00140 start = end 00141 end += 4 00142 (length,) = _struct_I.unpack(str[start:end]) 00143 start = end 00144 end += length 00145 val1 = str[start:end] 00146 self.camera_id.append(val1) 00147 start = end 00148 end += 4 00149 (length,) = _struct_I.unpack(str[start:end]) 00150 self.time_stamp = [] 00151 for i in range(0, length): 00152 val1 = roslib.rostime.Time() 00153 _x = val1 00154 start = end 00155 end += 8 00156 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00157 self.time_stamp.append(val1) 00158 start = end 00159 end += 4 00160 (self.m_count,) = _struct_i.unpack(str[start:end]) 00161 return self 00162 except struct.error as e: 00163 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00164 00165 00166 def serialize_numpy(self, buff, numpy): 00167 """ 00168 serialize message with numpy array types into buffer 00169 @param buff: buffer 00170 @type buff: StringIO 00171 @param numpy: numpy python module 00172 @type numpy module 00173 """ 00174 try: 00175 length = len(self.camera_pose) 00176 buff.write(_struct_I.pack(length)) 00177 for val1 in self.camera_pose: 00178 _v5 = val1.position 00179 _x = _v5 00180 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00181 _v6 = val1.orientation 00182 _x = _v6 00183 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00184 length = len(self.camera_id) 00185 buff.write(_struct_I.pack(length)) 00186 for val1 in self.camera_id: 00187 length = len(val1) 00188 buff.write(struct.pack('<I%ss'%length, length, val1)) 00189 length = len(self.time_stamp) 00190 buff.write(_struct_I.pack(length)) 00191 for val1 in self.time_stamp: 00192 _x = val1 00193 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00194 buff.write(_struct_i.pack(self.m_count)) 00195 except struct.error as se: self._check_types(se) 00196 except TypeError as te: self._check_types(te) 00197 00198 def deserialize_numpy(self, str, numpy): 00199 """ 00200 unpack serialized message in str into this message instance using numpy for array types 00201 @param str: byte array of serialized message 00202 @type str: str 00203 @param numpy: numpy python module 00204 @type numpy: module 00205 """ 00206 try: 00207 end = 0 00208 start = end 00209 end += 4 00210 (length,) = _struct_I.unpack(str[start:end]) 00211 self.camera_pose = [] 00212 for i in range(0, length): 00213 val1 = geometry_msgs.msg.Pose() 00214 _v7 = val1.position 00215 _x = _v7 00216 start = end 00217 end += 24 00218 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00219 _v8 = val1.orientation 00220 _x = _v8 00221 start = end 00222 end += 32 00223 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00224 self.camera_pose.append(val1) 00225 start = end 00226 end += 4 00227 (length,) = _struct_I.unpack(str[start:end]) 00228 self.camera_id = [] 00229 for i in range(0, length): 00230 start = end 00231 end += 4 00232 (length,) = _struct_I.unpack(str[start:end]) 00233 start = end 00234 end += length 00235 val1 = str[start:end] 00236 self.camera_id.append(val1) 00237 start = end 00238 end += 4 00239 (length,) = _struct_I.unpack(str[start:end]) 00240 self.time_stamp = [] 00241 for i in range(0, length): 00242 val1 = roslib.rostime.Time() 00243 _x = val1 00244 start = end 00245 end += 8 00246 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00247 self.time_stamp.append(val1) 00248 start = end 00249 end += 4 00250 (self.m_count,) = _struct_i.unpack(str[start:end]) 00251 return self 00252 except struct.error as e: 00253 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00254 00255 _struct_I = roslib.message.struct_I 00256 _struct_i = struct.Struct("<i") 00257 _struct_4d = struct.Struct("<4d") 00258 _struct_2I = struct.Struct("<2I") 00259 _struct_3d = struct.Struct("<3d")