$search
00001 """autogenerated by genmsg_py from PathPoint3d.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 PathPoint3d(roslib.message.Message): 00009 _md5sum = "b8ec4b27b30b44420f0c462b1ebbe47d" 00010 _type = "walk_msgs/PathPoint3d" 00011 _has_header = True #flag to mark the presence of a Header object 00012 _full_text = """Header header 00013 geometry_msgs/PointStamped[] points 00014 00015 ================================================================================ 00016 MSG: std_msgs/Header 00017 # Standard metadata for higher-level stamped data types. 00018 # This is generally used to communicate timestamped data 00019 # in a particular coordinate frame. 00020 # 00021 # sequence ID: consecutively increasing ID 00022 uint32 seq 00023 #Two-integer timestamp that is expressed as: 00024 # * stamp.secs: seconds (stamp_secs) since epoch 00025 # * stamp.nsecs: nanoseconds since stamp_secs 00026 # time-handling sugar is provided by the client library 00027 time stamp 00028 #Frame this data is associated with 00029 # 0: no frame 00030 # 1: global frame 00031 string frame_id 00032 00033 ================================================================================ 00034 MSG: geometry_msgs/PointStamped 00035 # This represents a Point with reference coordinate frame and timestamp 00036 Header header 00037 Point point 00038 00039 ================================================================================ 00040 MSG: geometry_msgs/Point 00041 # This contains the position of a point in free space 00042 float64 x 00043 float64 y 00044 float64 z 00045 00046 """ 00047 __slots__ = ['header','points'] 00048 _slot_types = ['Header','geometry_msgs/PointStamped[]'] 00049 00050 def __init__(self, *args, **kwds): 00051 """ 00052 Constructor. Any message fields that are implicitly/explicitly 00053 set to None will be assigned a default value. The recommend 00054 use is keyword arguments as this is more robust to future message 00055 changes. You cannot mix in-order arguments and keyword arguments. 00056 00057 The available fields are: 00058 header,points 00059 00060 @param args: complete set of field values, in .msg order 00061 @param kwds: use keyword arguments corresponding to message field names 00062 to set specific fields. 00063 """ 00064 if args or kwds: 00065 super(PathPoint3d, self).__init__(*args, **kwds) 00066 #message fields cannot be None, assign default values for those that are 00067 if self.header is None: 00068 self.header = std_msgs.msg._Header.Header() 00069 if self.points is None: 00070 self.points = [] 00071 else: 00072 self.header = std_msgs.msg._Header.Header() 00073 self.points = [] 00074 00075 def _get_types(self): 00076 """ 00077 internal API method 00078 """ 00079 return self._slot_types 00080 00081 def serialize(self, buff): 00082 """ 00083 serialize message into buffer 00084 @param buff: buffer 00085 @type buff: StringIO 00086 """ 00087 try: 00088 _x = self 00089 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00090 _x = self.header.frame_id 00091 length = len(_x) 00092 buff.write(struct.pack('<I%ss'%length, length, _x)) 00093 length = len(self.points) 00094 buff.write(_struct_I.pack(length)) 00095 for val1 in self.points: 00096 _v1 = val1.header 00097 buff.write(_struct_I.pack(_v1.seq)) 00098 _v2 = _v1.stamp 00099 _x = _v2 00100 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00101 _x = _v1.frame_id 00102 length = len(_x) 00103 buff.write(struct.pack('<I%ss'%length, length, _x)) 00104 _v3 = val1.point 00105 _x = _v3 00106 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 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 if self.header is None: 00118 self.header = std_msgs.msg._Header.Header() 00119 end = 0 00120 _x = self 00121 start = end 00122 end += 12 00123 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00124 start = end 00125 end += 4 00126 (length,) = _struct_I.unpack(str[start:end]) 00127 start = end 00128 end += length 00129 self.header.frame_id = str[start:end] 00130 start = end 00131 end += 4 00132 (length,) = _struct_I.unpack(str[start:end]) 00133 self.points = [] 00134 for i in range(0, length): 00135 val1 = geometry_msgs.msg.PointStamped() 00136 _v4 = val1.header 00137 start = end 00138 end += 4 00139 (_v4.seq,) = _struct_I.unpack(str[start:end]) 00140 _v5 = _v4.stamp 00141 _x = _v5 00142 start = end 00143 end += 8 00144 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00145 start = end 00146 end += 4 00147 (length,) = _struct_I.unpack(str[start:end]) 00148 start = end 00149 end += length 00150 _v4.frame_id = str[start:end] 00151 _v6 = val1.point 00152 _x = _v6 00153 start = end 00154 end += 24 00155 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00156 self.points.append(val1) 00157 return self 00158 except struct.error as e: 00159 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00160 00161 00162 def serialize_numpy(self, buff, numpy): 00163 """ 00164 serialize message with numpy array types into buffer 00165 @param buff: buffer 00166 @type buff: StringIO 00167 @param numpy: numpy python module 00168 @type numpy module 00169 """ 00170 try: 00171 _x = self 00172 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00173 _x = self.header.frame_id 00174 length = len(_x) 00175 buff.write(struct.pack('<I%ss'%length, length, _x)) 00176 length = len(self.points) 00177 buff.write(_struct_I.pack(length)) 00178 for val1 in self.points: 00179 _v7 = val1.header 00180 buff.write(_struct_I.pack(_v7.seq)) 00181 _v8 = _v7.stamp 00182 _x = _v8 00183 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00184 _x = _v7.frame_id 00185 length = len(_x) 00186 buff.write(struct.pack('<I%ss'%length, length, _x)) 00187 _v9 = val1.point 00188 _x = _v9 00189 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00190 except struct.error as se: self._check_types(se) 00191 except TypeError as te: self._check_types(te) 00192 00193 def deserialize_numpy(self, str, numpy): 00194 """ 00195 unpack serialized message in str into this message instance using numpy for array types 00196 @param str: byte array of serialized message 00197 @type str: str 00198 @param numpy: numpy python module 00199 @type numpy: module 00200 """ 00201 try: 00202 if self.header is None: 00203 self.header = std_msgs.msg._Header.Header() 00204 end = 0 00205 _x = self 00206 start = end 00207 end += 12 00208 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00209 start = end 00210 end += 4 00211 (length,) = _struct_I.unpack(str[start:end]) 00212 start = end 00213 end += length 00214 self.header.frame_id = str[start:end] 00215 start = end 00216 end += 4 00217 (length,) = _struct_I.unpack(str[start:end]) 00218 self.points = [] 00219 for i in range(0, length): 00220 val1 = geometry_msgs.msg.PointStamped() 00221 _v10 = val1.header 00222 start = end 00223 end += 4 00224 (_v10.seq,) = _struct_I.unpack(str[start:end]) 00225 _v11 = _v10.stamp 00226 _x = _v11 00227 start = end 00228 end += 8 00229 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00230 start = end 00231 end += 4 00232 (length,) = _struct_I.unpack(str[start:end]) 00233 start = end 00234 end += length 00235 _v10.frame_id = str[start:end] 00236 _v12 = val1.point 00237 _x = _v12 00238 start = end 00239 end += 24 00240 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00241 self.points.append(val1) 00242 return self 00243 except struct.error as e: 00244 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00245 00246 _struct_I = roslib.message.struct_I 00247 _struct_3I = struct.Struct("<3I") 00248 _struct_2I = struct.Struct("<2I") 00249 _struct_3d = struct.Struct("<3d")