$search
00001 """autogenerated by genmsg_py from FollowJointTrajectoryFeedback.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import trajectory_msgs.msg 00006 import roslib.rostime 00007 import std_msgs.msg 00008 00009 class FollowJointTrajectoryFeedback(roslib.message.Message): 00010 _md5sum = "b11d532a92ee589417fdd76559eb1d9e" 00011 _type = "control_msgs/FollowJointTrajectoryFeedback" 00012 _has_header = True #flag to mark the presence of a Header object 00013 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00014 Header header 00015 string[] joint_names 00016 trajectory_msgs/JointTrajectoryPoint desired 00017 trajectory_msgs/JointTrajectoryPoint actual 00018 trajectory_msgs/JointTrajectoryPoint error 00019 00020 00021 ================================================================================ 00022 MSG: std_msgs/Header 00023 # Standard metadata for higher-level stamped data types. 00024 # This is generally used to communicate timestamped data 00025 # in a particular coordinate frame. 00026 # 00027 # sequence ID: consecutively increasing ID 00028 uint32 seq 00029 #Two-integer timestamp that is expressed as: 00030 # * stamp.secs: seconds (stamp_secs) since epoch 00031 # * stamp.nsecs: nanoseconds since stamp_secs 00032 # time-handling sugar is provided by the client library 00033 time stamp 00034 #Frame this data is associated with 00035 # 0: no frame 00036 # 1: global frame 00037 string frame_id 00038 00039 ================================================================================ 00040 MSG: trajectory_msgs/JointTrajectoryPoint 00041 float64[] positions 00042 float64[] velocities 00043 float64[] accelerations 00044 duration time_from_start 00045 """ 00046 __slots__ = ['header','joint_names','desired','actual','error'] 00047 _slot_types = ['Header','string[]','trajectory_msgs/JointTrajectoryPoint','trajectory_msgs/JointTrajectoryPoint','trajectory_msgs/JointTrajectoryPoint'] 00048 00049 def __init__(self, *args, **kwds): 00050 """ 00051 Constructor. Any message fields that are implicitly/explicitly 00052 set to None will be assigned a default value. The recommend 00053 use is keyword arguments as this is more robust to future message 00054 changes. You cannot mix in-order arguments and keyword arguments. 00055 00056 The available fields are: 00057 header,joint_names,desired,actual,error 00058 00059 @param args: complete set of field values, in .msg order 00060 @param kwds: use keyword arguments corresponding to message field names 00061 to set specific fields. 00062 """ 00063 if args or kwds: 00064 super(FollowJointTrajectoryFeedback, self).__init__(*args, **kwds) 00065 #message fields cannot be None, assign default values for those that are 00066 if self.header is None: 00067 self.header = std_msgs.msg._Header.Header() 00068 if self.joint_names is None: 00069 self.joint_names = [] 00070 if self.desired is None: 00071 self.desired = trajectory_msgs.msg.JointTrajectoryPoint() 00072 if self.actual is None: 00073 self.actual = trajectory_msgs.msg.JointTrajectoryPoint() 00074 if self.error is None: 00075 self.error = trajectory_msgs.msg.JointTrajectoryPoint() 00076 else: 00077 self.header = std_msgs.msg._Header.Header() 00078 self.joint_names = [] 00079 self.desired = trajectory_msgs.msg.JointTrajectoryPoint() 00080 self.actual = trajectory_msgs.msg.JointTrajectoryPoint() 00081 self.error = trajectory_msgs.msg.JointTrajectoryPoint() 00082 00083 def _get_types(self): 00084 """ 00085 internal API method 00086 """ 00087 return self._slot_types 00088 00089 def serialize(self, buff): 00090 """ 00091 serialize message into buffer 00092 @param buff: buffer 00093 @type buff: StringIO 00094 """ 00095 try: 00096 _x = self 00097 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00098 _x = self.header.frame_id 00099 length = len(_x) 00100 buff.write(struct.pack('<I%ss'%length, length, _x)) 00101 length = len(self.joint_names) 00102 buff.write(_struct_I.pack(length)) 00103 for val1 in self.joint_names: 00104 length = len(val1) 00105 buff.write(struct.pack('<I%ss'%length, length, val1)) 00106 length = len(self.desired.positions) 00107 buff.write(_struct_I.pack(length)) 00108 pattern = '<%sd'%length 00109 buff.write(struct.pack(pattern, *self.desired.positions)) 00110 length = len(self.desired.velocities) 00111 buff.write(_struct_I.pack(length)) 00112 pattern = '<%sd'%length 00113 buff.write(struct.pack(pattern, *self.desired.velocities)) 00114 length = len(self.desired.accelerations) 00115 buff.write(_struct_I.pack(length)) 00116 pattern = '<%sd'%length 00117 buff.write(struct.pack(pattern, *self.desired.accelerations)) 00118 _x = self 00119 buff.write(_struct_2i.pack(_x.desired.time_from_start.secs, _x.desired.time_from_start.nsecs)) 00120 length = len(self.actual.positions) 00121 buff.write(_struct_I.pack(length)) 00122 pattern = '<%sd'%length 00123 buff.write(struct.pack(pattern, *self.actual.positions)) 00124 length = len(self.actual.velocities) 00125 buff.write(_struct_I.pack(length)) 00126 pattern = '<%sd'%length 00127 buff.write(struct.pack(pattern, *self.actual.velocities)) 00128 length = len(self.actual.accelerations) 00129 buff.write(_struct_I.pack(length)) 00130 pattern = '<%sd'%length 00131 buff.write(struct.pack(pattern, *self.actual.accelerations)) 00132 _x = self 00133 buff.write(_struct_2i.pack(_x.actual.time_from_start.secs, _x.actual.time_from_start.nsecs)) 00134 length = len(self.error.positions) 00135 buff.write(_struct_I.pack(length)) 00136 pattern = '<%sd'%length 00137 buff.write(struct.pack(pattern, *self.error.positions)) 00138 length = len(self.error.velocities) 00139 buff.write(_struct_I.pack(length)) 00140 pattern = '<%sd'%length 00141 buff.write(struct.pack(pattern, *self.error.velocities)) 00142 length = len(self.error.accelerations) 00143 buff.write(_struct_I.pack(length)) 00144 pattern = '<%sd'%length 00145 buff.write(struct.pack(pattern, *self.error.accelerations)) 00146 _x = self 00147 buff.write(_struct_2i.pack(_x.error.time_from_start.secs, _x.error.time_from_start.nsecs)) 00148 except struct.error as se: self._check_types(se) 00149 except TypeError as te: self._check_types(te) 00150 00151 def deserialize(self, str): 00152 """ 00153 unpack serialized message in str into this message instance 00154 @param str: byte array of serialized message 00155 @type str: str 00156 """ 00157 try: 00158 if self.header is None: 00159 self.header = std_msgs.msg._Header.Header() 00160 if self.desired is None: 00161 self.desired = trajectory_msgs.msg.JointTrajectoryPoint() 00162 if self.actual is None: 00163 self.actual = trajectory_msgs.msg.JointTrajectoryPoint() 00164 if self.error is None: 00165 self.error = trajectory_msgs.msg.JointTrajectoryPoint() 00166 end = 0 00167 _x = self 00168 start = end 00169 end += 12 00170 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00171 start = end 00172 end += 4 00173 (length,) = _struct_I.unpack(str[start:end]) 00174 start = end 00175 end += length 00176 self.header.frame_id = str[start:end] 00177 start = end 00178 end += 4 00179 (length,) = _struct_I.unpack(str[start:end]) 00180 self.joint_names = [] 00181 for i in range(0, length): 00182 start = end 00183 end += 4 00184 (length,) = _struct_I.unpack(str[start:end]) 00185 start = end 00186 end += length 00187 val1 = str[start:end] 00188 self.joint_names.append(val1) 00189 start = end 00190 end += 4 00191 (length,) = _struct_I.unpack(str[start:end]) 00192 pattern = '<%sd'%length 00193 start = end 00194 end += struct.calcsize(pattern) 00195 self.desired.positions = struct.unpack(pattern, str[start:end]) 00196 start = end 00197 end += 4 00198 (length,) = _struct_I.unpack(str[start:end]) 00199 pattern = '<%sd'%length 00200 start = end 00201 end += struct.calcsize(pattern) 00202 self.desired.velocities = struct.unpack(pattern, str[start:end]) 00203 start = end 00204 end += 4 00205 (length,) = _struct_I.unpack(str[start:end]) 00206 pattern = '<%sd'%length 00207 start = end 00208 end += struct.calcsize(pattern) 00209 self.desired.accelerations = struct.unpack(pattern, str[start:end]) 00210 _x = self 00211 start = end 00212 end += 8 00213 (_x.desired.time_from_start.secs, _x.desired.time_from_start.nsecs,) = _struct_2i.unpack(str[start:end]) 00214 start = end 00215 end += 4 00216 (length,) = _struct_I.unpack(str[start:end]) 00217 pattern = '<%sd'%length 00218 start = end 00219 end += struct.calcsize(pattern) 00220 self.actual.positions = struct.unpack(pattern, str[start:end]) 00221 start = end 00222 end += 4 00223 (length,) = _struct_I.unpack(str[start:end]) 00224 pattern = '<%sd'%length 00225 start = end 00226 end += struct.calcsize(pattern) 00227 self.actual.velocities = struct.unpack(pattern, str[start:end]) 00228 start = end 00229 end += 4 00230 (length,) = _struct_I.unpack(str[start:end]) 00231 pattern = '<%sd'%length 00232 start = end 00233 end += struct.calcsize(pattern) 00234 self.actual.accelerations = struct.unpack(pattern, str[start:end]) 00235 _x = self 00236 start = end 00237 end += 8 00238 (_x.actual.time_from_start.secs, _x.actual.time_from_start.nsecs,) = _struct_2i.unpack(str[start:end]) 00239 start = end 00240 end += 4 00241 (length,) = _struct_I.unpack(str[start:end]) 00242 pattern = '<%sd'%length 00243 start = end 00244 end += struct.calcsize(pattern) 00245 self.error.positions = struct.unpack(pattern, str[start:end]) 00246 start = end 00247 end += 4 00248 (length,) = _struct_I.unpack(str[start:end]) 00249 pattern = '<%sd'%length 00250 start = end 00251 end += struct.calcsize(pattern) 00252 self.error.velocities = struct.unpack(pattern, str[start:end]) 00253 start = end 00254 end += 4 00255 (length,) = _struct_I.unpack(str[start:end]) 00256 pattern = '<%sd'%length 00257 start = end 00258 end += struct.calcsize(pattern) 00259 self.error.accelerations = struct.unpack(pattern, str[start:end]) 00260 _x = self 00261 start = end 00262 end += 8 00263 (_x.error.time_from_start.secs, _x.error.time_from_start.nsecs,) = _struct_2i.unpack(str[start:end]) 00264 return self 00265 except struct.error as e: 00266 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00267 00268 00269 def serialize_numpy(self, buff, numpy): 00270 """ 00271 serialize message with numpy array types into buffer 00272 @param buff: buffer 00273 @type buff: StringIO 00274 @param numpy: numpy python module 00275 @type numpy module 00276 """ 00277 try: 00278 _x = self 00279 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00280 _x = self.header.frame_id 00281 length = len(_x) 00282 buff.write(struct.pack('<I%ss'%length, length, _x)) 00283 length = len(self.joint_names) 00284 buff.write(_struct_I.pack(length)) 00285 for val1 in self.joint_names: 00286 length = len(val1) 00287 buff.write(struct.pack('<I%ss'%length, length, val1)) 00288 length = len(self.desired.positions) 00289 buff.write(_struct_I.pack(length)) 00290 pattern = '<%sd'%length 00291 buff.write(self.desired.positions.tostring()) 00292 length = len(self.desired.velocities) 00293 buff.write(_struct_I.pack(length)) 00294 pattern = '<%sd'%length 00295 buff.write(self.desired.velocities.tostring()) 00296 length = len(self.desired.accelerations) 00297 buff.write(_struct_I.pack(length)) 00298 pattern = '<%sd'%length 00299 buff.write(self.desired.accelerations.tostring()) 00300 _x = self 00301 buff.write(_struct_2i.pack(_x.desired.time_from_start.secs, _x.desired.time_from_start.nsecs)) 00302 length = len(self.actual.positions) 00303 buff.write(_struct_I.pack(length)) 00304 pattern = '<%sd'%length 00305 buff.write(self.actual.positions.tostring()) 00306 length = len(self.actual.velocities) 00307 buff.write(_struct_I.pack(length)) 00308 pattern = '<%sd'%length 00309 buff.write(self.actual.velocities.tostring()) 00310 length = len(self.actual.accelerations) 00311 buff.write(_struct_I.pack(length)) 00312 pattern = '<%sd'%length 00313 buff.write(self.actual.accelerations.tostring()) 00314 _x = self 00315 buff.write(_struct_2i.pack(_x.actual.time_from_start.secs, _x.actual.time_from_start.nsecs)) 00316 length = len(self.error.positions) 00317 buff.write(_struct_I.pack(length)) 00318 pattern = '<%sd'%length 00319 buff.write(self.error.positions.tostring()) 00320 length = len(self.error.velocities) 00321 buff.write(_struct_I.pack(length)) 00322 pattern = '<%sd'%length 00323 buff.write(self.error.velocities.tostring()) 00324 length = len(self.error.accelerations) 00325 buff.write(_struct_I.pack(length)) 00326 pattern = '<%sd'%length 00327 buff.write(self.error.accelerations.tostring()) 00328 _x = self 00329 buff.write(_struct_2i.pack(_x.error.time_from_start.secs, _x.error.time_from_start.nsecs)) 00330 except struct.error as se: self._check_types(se) 00331 except TypeError as te: self._check_types(te) 00332 00333 def deserialize_numpy(self, str, numpy): 00334 """ 00335 unpack serialized message in str into this message instance using numpy for array types 00336 @param str: byte array of serialized message 00337 @type str: str 00338 @param numpy: numpy python module 00339 @type numpy: module 00340 """ 00341 try: 00342 if self.header is None: 00343 self.header = std_msgs.msg._Header.Header() 00344 if self.desired is None: 00345 self.desired = trajectory_msgs.msg.JointTrajectoryPoint() 00346 if self.actual is None: 00347 self.actual = trajectory_msgs.msg.JointTrajectoryPoint() 00348 if self.error is None: 00349 self.error = trajectory_msgs.msg.JointTrajectoryPoint() 00350 end = 0 00351 _x = self 00352 start = end 00353 end += 12 00354 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00355 start = end 00356 end += 4 00357 (length,) = _struct_I.unpack(str[start:end]) 00358 start = end 00359 end += length 00360 self.header.frame_id = str[start:end] 00361 start = end 00362 end += 4 00363 (length,) = _struct_I.unpack(str[start:end]) 00364 self.joint_names = [] 00365 for i in range(0, length): 00366 start = end 00367 end += 4 00368 (length,) = _struct_I.unpack(str[start:end]) 00369 start = end 00370 end += length 00371 val1 = str[start:end] 00372 self.joint_names.append(val1) 00373 start = end 00374 end += 4 00375 (length,) = _struct_I.unpack(str[start:end]) 00376 pattern = '<%sd'%length 00377 start = end 00378 end += struct.calcsize(pattern) 00379 self.desired.positions = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 00380 start = end 00381 end += 4 00382 (length,) = _struct_I.unpack(str[start:end]) 00383 pattern = '<%sd'%length 00384 start = end 00385 end += struct.calcsize(pattern) 00386 self.desired.velocities = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 00387 start = end 00388 end += 4 00389 (length,) = _struct_I.unpack(str[start:end]) 00390 pattern = '<%sd'%length 00391 start = end 00392 end += struct.calcsize(pattern) 00393 self.desired.accelerations = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 00394 _x = self 00395 start = end 00396 end += 8 00397 (_x.desired.time_from_start.secs, _x.desired.time_from_start.nsecs,) = _struct_2i.unpack(str[start:end]) 00398 start = end 00399 end += 4 00400 (length,) = _struct_I.unpack(str[start:end]) 00401 pattern = '<%sd'%length 00402 start = end 00403 end += struct.calcsize(pattern) 00404 self.actual.positions = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 00405 start = end 00406 end += 4 00407 (length,) = _struct_I.unpack(str[start:end]) 00408 pattern = '<%sd'%length 00409 start = end 00410 end += struct.calcsize(pattern) 00411 self.actual.velocities = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 00412 start = end 00413 end += 4 00414 (length,) = _struct_I.unpack(str[start:end]) 00415 pattern = '<%sd'%length 00416 start = end 00417 end += struct.calcsize(pattern) 00418 self.actual.accelerations = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 00419 _x = self 00420 start = end 00421 end += 8 00422 (_x.actual.time_from_start.secs, _x.actual.time_from_start.nsecs,) = _struct_2i.unpack(str[start:end]) 00423 start = end 00424 end += 4 00425 (length,) = _struct_I.unpack(str[start:end]) 00426 pattern = '<%sd'%length 00427 start = end 00428 end += struct.calcsize(pattern) 00429 self.error.positions = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 00430 start = end 00431 end += 4 00432 (length,) = _struct_I.unpack(str[start:end]) 00433 pattern = '<%sd'%length 00434 start = end 00435 end += struct.calcsize(pattern) 00436 self.error.velocities = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 00437 start = end 00438 end += 4 00439 (length,) = _struct_I.unpack(str[start:end]) 00440 pattern = '<%sd'%length 00441 start = end 00442 end += struct.calcsize(pattern) 00443 self.error.accelerations = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 00444 _x = self 00445 start = end 00446 end += 8 00447 (_x.error.time_from_start.secs, _x.error.time_from_start.nsecs,) = _struct_2i.unpack(str[start:end]) 00448 return self 00449 except struct.error as e: 00450 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00451 00452 _struct_I = roslib.message.struct_I 00453 _struct_3I = struct.Struct("<3I") 00454 _struct_2i = struct.Struct("<2i")