$search
00001 """autogenerated by genmsg_py from PointArray.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import geometry_msgs.msg 00006 import std_msgs.msg 00007 00008 class PointArray(roslib.message.Message): 00009 _md5sum = "2199cac4695ce1fc0f346db535dda30d" 00010 _type = "cob_3d_mapping_msgs/PointArray" 00011 _has_header = True #flag to mark the presence of a Header object 00012 _full_text = """# DEPRECATED: An array of poses with a header for global reference. 00013 00014 Header header 00015 00016 geometry_msgs/Point[] points 00017 00018 ================================================================================ 00019 MSG: std_msgs/Header 00020 # Standard metadata for higher-level stamped data types. 00021 # This is generally used to communicate timestamped data 00022 # in a particular coordinate frame. 00023 # 00024 # sequence ID: consecutively increasing ID 00025 uint32 seq 00026 #Two-integer timestamp that is expressed as: 00027 # * stamp.secs: seconds (stamp_secs) since epoch 00028 # * stamp.nsecs: nanoseconds since stamp_secs 00029 # time-handling sugar is provided by the client library 00030 time stamp 00031 #Frame this data is associated with 00032 # 0: no frame 00033 # 1: global frame 00034 string frame_id 00035 00036 ================================================================================ 00037 MSG: geometry_msgs/Point 00038 # This contains the position of a point in free space 00039 float64 x 00040 float64 y 00041 float64 z 00042 00043 """ 00044 __slots__ = ['header','points'] 00045 _slot_types = ['Header','geometry_msgs/Point[]'] 00046 00047 def __init__(self, *args, **kwds): 00048 """ 00049 Constructor. Any message fields that are implicitly/explicitly 00050 set to None will be assigned a default value. The recommend 00051 use is keyword arguments as this is more robust to future message 00052 changes. You cannot mix in-order arguments and keyword arguments. 00053 00054 The available fields are: 00055 header,points 00056 00057 @param args: complete set of field values, in .msg order 00058 @param kwds: use keyword arguments corresponding to message field names 00059 to set specific fields. 00060 """ 00061 if args or kwds: 00062 super(PointArray, self).__init__(*args, **kwds) 00063 #message fields cannot be None, assign default values for those that are 00064 if self.header is None: 00065 self.header = std_msgs.msg._Header.Header() 00066 if self.points is None: 00067 self.points = [] 00068 else: 00069 self.header = std_msgs.msg._Header.Header() 00070 self.points = [] 00071 00072 def _get_types(self): 00073 """ 00074 internal API method 00075 """ 00076 return self._slot_types 00077 00078 def serialize(self, buff): 00079 """ 00080 serialize message into buffer 00081 @param buff: buffer 00082 @type buff: StringIO 00083 """ 00084 try: 00085 _x = self 00086 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00087 _x = self.header.frame_id 00088 length = len(_x) 00089 buff.write(struct.pack('<I%ss'%length, length, _x)) 00090 length = len(self.points) 00091 buff.write(_struct_I.pack(length)) 00092 for val1 in self.points: 00093 _x = val1 00094 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00095 except struct.error as se: self._check_types(se) 00096 except TypeError as te: self._check_types(te) 00097 00098 def deserialize(self, str): 00099 """ 00100 unpack serialized message in str into this message instance 00101 @param str: byte array of serialized message 00102 @type str: str 00103 """ 00104 try: 00105 if self.header is None: 00106 self.header = std_msgs.msg._Header.Header() 00107 end = 0 00108 _x = self 00109 start = end 00110 end += 12 00111 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00112 start = end 00113 end += 4 00114 (length,) = _struct_I.unpack(str[start:end]) 00115 start = end 00116 end += length 00117 self.header.frame_id = str[start:end] 00118 start = end 00119 end += 4 00120 (length,) = _struct_I.unpack(str[start:end]) 00121 self.points = [] 00122 for i in range(0, length): 00123 val1 = geometry_msgs.msg.Point() 00124 _x = val1 00125 start = end 00126 end += 24 00127 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00128 self.points.append(val1) 00129 return self 00130 except struct.error as e: 00131 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00132 00133 00134 def serialize_numpy(self, buff, numpy): 00135 """ 00136 serialize message with numpy array types into buffer 00137 @param buff: buffer 00138 @type buff: StringIO 00139 @param numpy: numpy python module 00140 @type numpy module 00141 """ 00142 try: 00143 _x = self 00144 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00145 _x = self.header.frame_id 00146 length = len(_x) 00147 buff.write(struct.pack('<I%ss'%length, length, _x)) 00148 length = len(self.points) 00149 buff.write(_struct_I.pack(length)) 00150 for val1 in self.points: 00151 _x = val1 00152 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00153 except struct.error as se: self._check_types(se) 00154 except TypeError as te: self._check_types(te) 00155 00156 def deserialize_numpy(self, str, numpy): 00157 """ 00158 unpack serialized message in str into this message instance using numpy for array types 00159 @param str: byte array of serialized message 00160 @type str: str 00161 @param numpy: numpy python module 00162 @type numpy: module 00163 """ 00164 try: 00165 if self.header is None: 00166 self.header = std_msgs.msg._Header.Header() 00167 end = 0 00168 _x = self 00169 start = end 00170 end += 12 00171 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00172 start = end 00173 end += 4 00174 (length,) = _struct_I.unpack(str[start:end]) 00175 start = end 00176 end += length 00177 self.header.frame_id = str[start:end] 00178 start = end 00179 end += 4 00180 (length,) = _struct_I.unpack(str[start:end]) 00181 self.points = [] 00182 for i in range(0, length): 00183 val1 = geometry_msgs.msg.Point() 00184 _x = val1 00185 start = end 00186 end += 24 00187 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00188 self.points.append(val1) 00189 return self 00190 except struct.error as e: 00191 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00192 00193 _struct_I = roslib.message.struct_I 00194 _struct_3I = struct.Struct("<3I") 00195 _struct_3d = struct.Struct("<3d")