$search
00001 """autogenerated by genmsg_py from GetRobotTrajectoryRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class GetRobotTrajectoryRequest(roslib.message.Message): 00007 _md5sum = "d41d8cd98f00b204e9800998ecf8427e" 00008 _type = "hector_nav_msgs/GetRobotTrajectoryRequest" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """ 00011 00012 00013 00014 00015 00016 """ 00017 __slots__ = [] 00018 _slot_types = [] 00019 00020 def __init__(self, *args, **kwds): 00021 """ 00022 Constructor. Any message fields that are implicitly/explicitly 00023 set to None will be assigned a default value. The recommend 00024 use is keyword arguments as this is more robust to future message 00025 changes. You cannot mix in-order arguments and keyword arguments. 00026 00027 The available fields are: 00028 00029 00030 @param args: complete set of field values, in .msg order 00031 @param kwds: use keyword arguments corresponding to message field names 00032 to set specific fields. 00033 """ 00034 if args or kwds: 00035 super(GetRobotTrajectoryRequest, self).__init__(*args, **kwds) 00036 00037 def _get_types(self): 00038 """ 00039 internal API method 00040 """ 00041 return self._slot_types 00042 00043 def serialize(self, buff): 00044 """ 00045 serialize message into buffer 00046 @param buff: buffer 00047 @type buff: StringIO 00048 """ 00049 try: 00050 pass 00051 except struct.error as se: self._check_types(se) 00052 except TypeError as te: self._check_types(te) 00053 00054 def deserialize(self, str): 00055 """ 00056 unpack serialized message in str into this message instance 00057 @param str: byte array of serialized message 00058 @type str: str 00059 """ 00060 try: 00061 end = 0 00062 return self 00063 except struct.error as e: 00064 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00065 00066 00067 def serialize_numpy(self, buff, numpy): 00068 """ 00069 serialize message with numpy array types into buffer 00070 @param buff: buffer 00071 @type buff: StringIO 00072 @param numpy: numpy python module 00073 @type numpy module 00074 """ 00075 try: 00076 pass 00077 except struct.error as se: self._check_types(se) 00078 except TypeError as te: self._check_types(te) 00079 00080 def deserialize_numpy(self, str, numpy): 00081 """ 00082 unpack serialized message in str into this message instance using numpy for array types 00083 @param str: byte array of serialized message 00084 @type str: str 00085 @param numpy: numpy python module 00086 @type numpy: module 00087 """ 00088 try: 00089 end = 0 00090 return self 00091 except struct.error as e: 00092 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00093 00094 _struct_I = roslib.message.struct_I 00095 """autogenerated by genmsg_py from GetRobotTrajectoryResponse.msg. Do not edit.""" 00096 import roslib.message 00097 import struct 00098 00099 import geometry_msgs.msg 00100 import nav_msgs.msg 00101 import std_msgs.msg 00102 00103 class GetRobotTrajectoryResponse(roslib.message.Message): 00104 _md5sum = "c7bd40129c5786fc26351edbd33b8d33" 00105 _type = "hector_nav_msgs/GetRobotTrajectoryResponse" 00106 _has_header = False #flag to mark the presence of a Header object 00107 _full_text = """nav_msgs/Path trajectory 00108 00109 00110 00111 ================================================================================ 00112 MSG: nav_msgs/Path 00113 #An array of poses that represents a Path for a robot to follow 00114 Header header 00115 geometry_msgs/PoseStamped[] poses 00116 00117 ================================================================================ 00118 MSG: std_msgs/Header 00119 # Standard metadata for higher-level stamped data types. 00120 # This is generally used to communicate timestamped data 00121 # in a particular coordinate frame. 00122 # 00123 # sequence ID: consecutively increasing ID 00124 uint32 seq 00125 #Two-integer timestamp that is expressed as: 00126 # * stamp.secs: seconds (stamp_secs) since epoch 00127 # * stamp.nsecs: nanoseconds since stamp_secs 00128 # time-handling sugar is provided by the client library 00129 time stamp 00130 #Frame this data is associated with 00131 # 0: no frame 00132 # 1: global frame 00133 string frame_id 00134 00135 ================================================================================ 00136 MSG: geometry_msgs/PoseStamped 00137 # A Pose with reference coordinate frame and timestamp 00138 Header header 00139 Pose pose 00140 00141 ================================================================================ 00142 MSG: geometry_msgs/Pose 00143 # A representation of pose in free space, composed of postion and orientation. 00144 Point position 00145 Quaternion orientation 00146 00147 ================================================================================ 00148 MSG: geometry_msgs/Point 00149 # This contains the position of a point in free space 00150 float64 x 00151 float64 y 00152 float64 z 00153 00154 ================================================================================ 00155 MSG: geometry_msgs/Quaternion 00156 # This represents an orientation in free space in quaternion form. 00157 00158 float64 x 00159 float64 y 00160 float64 z 00161 float64 w 00162 00163 """ 00164 __slots__ = ['trajectory'] 00165 _slot_types = ['nav_msgs/Path'] 00166 00167 def __init__(self, *args, **kwds): 00168 """ 00169 Constructor. Any message fields that are implicitly/explicitly 00170 set to None will be assigned a default value. The recommend 00171 use is keyword arguments as this is more robust to future message 00172 changes. You cannot mix in-order arguments and keyword arguments. 00173 00174 The available fields are: 00175 trajectory 00176 00177 @param args: complete set of field values, in .msg order 00178 @param kwds: use keyword arguments corresponding to message field names 00179 to set specific fields. 00180 """ 00181 if args or kwds: 00182 super(GetRobotTrajectoryResponse, self).__init__(*args, **kwds) 00183 #message fields cannot be None, assign default values for those that are 00184 if self.trajectory is None: 00185 self.trajectory = nav_msgs.msg.Path() 00186 else: 00187 self.trajectory = nav_msgs.msg.Path() 00188 00189 def _get_types(self): 00190 """ 00191 internal API method 00192 """ 00193 return self._slot_types 00194 00195 def serialize(self, buff): 00196 """ 00197 serialize message into buffer 00198 @param buff: buffer 00199 @type buff: StringIO 00200 """ 00201 try: 00202 _x = self 00203 buff.write(_struct_3I.pack(_x.trajectory.header.seq, _x.trajectory.header.stamp.secs, _x.trajectory.header.stamp.nsecs)) 00204 _x = self.trajectory.header.frame_id 00205 length = len(_x) 00206 buff.write(struct.pack('<I%ss'%length, length, _x)) 00207 length = len(self.trajectory.poses) 00208 buff.write(_struct_I.pack(length)) 00209 for val1 in self.trajectory.poses: 00210 _v1 = val1.header 00211 buff.write(_struct_I.pack(_v1.seq)) 00212 _v2 = _v1.stamp 00213 _x = _v2 00214 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00215 _x = _v1.frame_id 00216 length = len(_x) 00217 buff.write(struct.pack('<I%ss'%length, length, _x)) 00218 _v3 = val1.pose 00219 _v4 = _v3.position 00220 _x = _v4 00221 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00222 _v5 = _v3.orientation 00223 _x = _v5 00224 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00225 except struct.error as se: self._check_types(se) 00226 except TypeError as te: self._check_types(te) 00227 00228 def deserialize(self, str): 00229 """ 00230 unpack serialized message in str into this message instance 00231 @param str: byte array of serialized message 00232 @type str: str 00233 """ 00234 try: 00235 if self.trajectory is None: 00236 self.trajectory = nav_msgs.msg.Path() 00237 end = 0 00238 _x = self 00239 start = end 00240 end += 12 00241 (_x.trajectory.header.seq, _x.trajectory.header.stamp.secs, _x.trajectory.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00242 start = end 00243 end += 4 00244 (length,) = _struct_I.unpack(str[start:end]) 00245 start = end 00246 end += length 00247 self.trajectory.header.frame_id = str[start:end] 00248 start = end 00249 end += 4 00250 (length,) = _struct_I.unpack(str[start:end]) 00251 self.trajectory.poses = [] 00252 for i in range(0, length): 00253 val1 = geometry_msgs.msg.PoseStamped() 00254 _v6 = val1.header 00255 start = end 00256 end += 4 00257 (_v6.seq,) = _struct_I.unpack(str[start:end]) 00258 _v7 = _v6.stamp 00259 _x = _v7 00260 start = end 00261 end += 8 00262 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00263 start = end 00264 end += 4 00265 (length,) = _struct_I.unpack(str[start:end]) 00266 start = end 00267 end += length 00268 _v6.frame_id = str[start:end] 00269 _v8 = val1.pose 00270 _v9 = _v8.position 00271 _x = _v9 00272 start = end 00273 end += 24 00274 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00275 _v10 = _v8.orientation 00276 _x = _v10 00277 start = end 00278 end += 32 00279 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00280 self.trajectory.poses.append(val1) 00281 return self 00282 except struct.error as e: 00283 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00284 00285 00286 def serialize_numpy(self, buff, numpy): 00287 """ 00288 serialize message with numpy array types into buffer 00289 @param buff: buffer 00290 @type buff: StringIO 00291 @param numpy: numpy python module 00292 @type numpy module 00293 """ 00294 try: 00295 _x = self 00296 buff.write(_struct_3I.pack(_x.trajectory.header.seq, _x.trajectory.header.stamp.secs, _x.trajectory.header.stamp.nsecs)) 00297 _x = self.trajectory.header.frame_id 00298 length = len(_x) 00299 buff.write(struct.pack('<I%ss'%length, length, _x)) 00300 length = len(self.trajectory.poses) 00301 buff.write(_struct_I.pack(length)) 00302 for val1 in self.trajectory.poses: 00303 _v11 = val1.header 00304 buff.write(_struct_I.pack(_v11.seq)) 00305 _v12 = _v11.stamp 00306 _x = _v12 00307 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00308 _x = _v11.frame_id 00309 length = len(_x) 00310 buff.write(struct.pack('<I%ss'%length, length, _x)) 00311 _v13 = val1.pose 00312 _v14 = _v13.position 00313 _x = _v14 00314 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00315 _v15 = _v13.orientation 00316 _x = _v15 00317 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00318 except struct.error as se: self._check_types(se) 00319 except TypeError as te: self._check_types(te) 00320 00321 def deserialize_numpy(self, str, numpy): 00322 """ 00323 unpack serialized message in str into this message instance using numpy for array types 00324 @param str: byte array of serialized message 00325 @type str: str 00326 @param numpy: numpy python module 00327 @type numpy: module 00328 """ 00329 try: 00330 if self.trajectory is None: 00331 self.trajectory = nav_msgs.msg.Path() 00332 end = 0 00333 _x = self 00334 start = end 00335 end += 12 00336 (_x.trajectory.header.seq, _x.trajectory.header.stamp.secs, _x.trajectory.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00337 start = end 00338 end += 4 00339 (length,) = _struct_I.unpack(str[start:end]) 00340 start = end 00341 end += length 00342 self.trajectory.header.frame_id = str[start:end] 00343 start = end 00344 end += 4 00345 (length,) = _struct_I.unpack(str[start:end]) 00346 self.trajectory.poses = [] 00347 for i in range(0, length): 00348 val1 = geometry_msgs.msg.PoseStamped() 00349 _v16 = val1.header 00350 start = end 00351 end += 4 00352 (_v16.seq,) = _struct_I.unpack(str[start:end]) 00353 _v17 = _v16.stamp 00354 _x = _v17 00355 start = end 00356 end += 8 00357 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00358 start = end 00359 end += 4 00360 (length,) = _struct_I.unpack(str[start:end]) 00361 start = end 00362 end += length 00363 _v16.frame_id = str[start:end] 00364 _v18 = val1.pose 00365 _v19 = _v18.position 00366 _x = _v19 00367 start = end 00368 end += 24 00369 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00370 _v20 = _v18.orientation 00371 _x = _v20 00372 start = end 00373 end += 32 00374 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00375 self.trajectory.poses.append(val1) 00376 return self 00377 except struct.error as e: 00378 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00379 00380 _struct_I = roslib.message.struct_I 00381 _struct_4d = struct.Struct("<4d") 00382 _struct_3I = struct.Struct("<3I") 00383 _struct_2I = struct.Struct("<2I") 00384 _struct_3d = struct.Struct("<3d") 00385 class GetRobotTrajectory(roslib.message.ServiceDefinition): 00386 _type = 'hector_nav_msgs/GetRobotTrajectory' 00387 _md5sum = 'c7bd40129c5786fc26351edbd33b8d33' 00388 _request_class = GetRobotTrajectoryRequest 00389 _response_class = GetRobotTrajectoryResponse