$search
00001 """autogenerated by genmsg_py from WristDiffData.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import joint_qualification_controllers.msg 00006 00007 class WristDiffData(roslib.message.Message): 00008 _md5sum = "b5450bf7a09b17c68a893b9c02e710f1" 00009 _type = "joint_qualification_controllers/WristDiffData" 00010 _has_header = False #flag to mark the presence of a Header object 00011 _full_text = """string flex_joint 00012 string roll_joint 00013 float32[] flex_pid 00014 float32[] roll_pid 00015 string[] arg_name 00016 float32[] arg_value 00017 WristRollTurn left_turn 00018 WristRollTurn right_turn 00019 bool timeout 00020 00021 ================================================================================ 00022 MSG: joint_qualification_controllers/WristRollTurn 00023 float32[] time 00024 float32[] flex_position 00025 float32[] flex_effort 00026 float32[] flex_cmd 00027 float32[] roll_position 00028 float32[] roll_effort 00029 float32[] roll_cmd 00030 float32[] roll_velocity 00031 00032 """ 00033 __slots__ = ['flex_joint','roll_joint','flex_pid','roll_pid','arg_name','arg_value','left_turn','right_turn','timeout'] 00034 _slot_types = ['string','string','float32[]','float32[]','string[]','float32[]','joint_qualification_controllers/WristRollTurn','joint_qualification_controllers/WristRollTurn','bool'] 00035 00036 def __init__(self, *args, **kwds): 00037 """ 00038 Constructor. Any message fields that are implicitly/explicitly 00039 set to None will be assigned a default value. The recommend 00040 use is keyword arguments as this is more robust to future message 00041 changes. You cannot mix in-order arguments and keyword arguments. 00042 00043 The available fields are: 00044 flex_joint,roll_joint,flex_pid,roll_pid,arg_name,arg_value,left_turn,right_turn,timeout 00045 00046 @param args: complete set of field values, in .msg order 00047 @param kwds: use keyword arguments corresponding to message field names 00048 to set specific fields. 00049 """ 00050 if args or kwds: 00051 super(WristDiffData, self).__init__(*args, **kwds) 00052 #message fields cannot be None, assign default values for those that are 00053 if self.flex_joint is None: 00054 self.flex_joint = '' 00055 if self.roll_joint is None: 00056 self.roll_joint = '' 00057 if self.flex_pid is None: 00058 self.flex_pid = [] 00059 if self.roll_pid is None: 00060 self.roll_pid = [] 00061 if self.arg_name is None: 00062 self.arg_name = [] 00063 if self.arg_value is None: 00064 self.arg_value = [] 00065 if self.left_turn is None: 00066 self.left_turn = joint_qualification_controllers.msg.WristRollTurn() 00067 if self.right_turn is None: 00068 self.right_turn = joint_qualification_controllers.msg.WristRollTurn() 00069 if self.timeout is None: 00070 self.timeout = False 00071 else: 00072 self.flex_joint = '' 00073 self.roll_joint = '' 00074 self.flex_pid = [] 00075 self.roll_pid = [] 00076 self.arg_name = [] 00077 self.arg_value = [] 00078 self.left_turn = joint_qualification_controllers.msg.WristRollTurn() 00079 self.right_turn = joint_qualification_controllers.msg.WristRollTurn() 00080 self.timeout = False 00081 00082 def _get_types(self): 00083 """ 00084 internal API method 00085 """ 00086 return self._slot_types 00087 00088 def serialize(self, buff): 00089 """ 00090 serialize message into buffer 00091 @param buff: buffer 00092 @type buff: StringIO 00093 """ 00094 try: 00095 _x = self.flex_joint 00096 length = len(_x) 00097 buff.write(struct.pack('<I%ss'%length, length, _x)) 00098 _x = self.roll_joint 00099 length = len(_x) 00100 buff.write(struct.pack('<I%ss'%length, length, _x)) 00101 length = len(self.flex_pid) 00102 buff.write(_struct_I.pack(length)) 00103 pattern = '<%sf'%length 00104 buff.write(struct.pack(pattern, *self.flex_pid)) 00105 length = len(self.roll_pid) 00106 buff.write(_struct_I.pack(length)) 00107 pattern = '<%sf'%length 00108 buff.write(struct.pack(pattern, *self.roll_pid)) 00109 length = len(self.arg_name) 00110 buff.write(_struct_I.pack(length)) 00111 for val1 in self.arg_name: 00112 length = len(val1) 00113 buff.write(struct.pack('<I%ss'%length, length, val1)) 00114 length = len(self.arg_value) 00115 buff.write(_struct_I.pack(length)) 00116 pattern = '<%sf'%length 00117 buff.write(struct.pack(pattern, *self.arg_value)) 00118 length = len(self.left_turn.time) 00119 buff.write(_struct_I.pack(length)) 00120 pattern = '<%sf'%length 00121 buff.write(struct.pack(pattern, *self.left_turn.time)) 00122 length = len(self.left_turn.flex_position) 00123 buff.write(_struct_I.pack(length)) 00124 pattern = '<%sf'%length 00125 buff.write(struct.pack(pattern, *self.left_turn.flex_position)) 00126 length = len(self.left_turn.flex_effort) 00127 buff.write(_struct_I.pack(length)) 00128 pattern = '<%sf'%length 00129 buff.write(struct.pack(pattern, *self.left_turn.flex_effort)) 00130 length = len(self.left_turn.flex_cmd) 00131 buff.write(_struct_I.pack(length)) 00132 pattern = '<%sf'%length 00133 buff.write(struct.pack(pattern, *self.left_turn.flex_cmd)) 00134 length = len(self.left_turn.roll_position) 00135 buff.write(_struct_I.pack(length)) 00136 pattern = '<%sf'%length 00137 buff.write(struct.pack(pattern, *self.left_turn.roll_position)) 00138 length = len(self.left_turn.roll_effort) 00139 buff.write(_struct_I.pack(length)) 00140 pattern = '<%sf'%length 00141 buff.write(struct.pack(pattern, *self.left_turn.roll_effort)) 00142 length = len(self.left_turn.roll_cmd) 00143 buff.write(_struct_I.pack(length)) 00144 pattern = '<%sf'%length 00145 buff.write(struct.pack(pattern, *self.left_turn.roll_cmd)) 00146 length = len(self.left_turn.roll_velocity) 00147 buff.write(_struct_I.pack(length)) 00148 pattern = '<%sf'%length 00149 buff.write(struct.pack(pattern, *self.left_turn.roll_velocity)) 00150 length = len(self.right_turn.time) 00151 buff.write(_struct_I.pack(length)) 00152 pattern = '<%sf'%length 00153 buff.write(struct.pack(pattern, *self.right_turn.time)) 00154 length = len(self.right_turn.flex_position) 00155 buff.write(_struct_I.pack(length)) 00156 pattern = '<%sf'%length 00157 buff.write(struct.pack(pattern, *self.right_turn.flex_position)) 00158 length = len(self.right_turn.flex_effort) 00159 buff.write(_struct_I.pack(length)) 00160 pattern = '<%sf'%length 00161 buff.write(struct.pack(pattern, *self.right_turn.flex_effort)) 00162 length = len(self.right_turn.flex_cmd) 00163 buff.write(_struct_I.pack(length)) 00164 pattern = '<%sf'%length 00165 buff.write(struct.pack(pattern, *self.right_turn.flex_cmd)) 00166 length = len(self.right_turn.roll_position) 00167 buff.write(_struct_I.pack(length)) 00168 pattern = '<%sf'%length 00169 buff.write(struct.pack(pattern, *self.right_turn.roll_position)) 00170 length = len(self.right_turn.roll_effort) 00171 buff.write(_struct_I.pack(length)) 00172 pattern = '<%sf'%length 00173 buff.write(struct.pack(pattern, *self.right_turn.roll_effort)) 00174 length = len(self.right_turn.roll_cmd) 00175 buff.write(_struct_I.pack(length)) 00176 pattern = '<%sf'%length 00177 buff.write(struct.pack(pattern, *self.right_turn.roll_cmd)) 00178 length = len(self.right_turn.roll_velocity) 00179 buff.write(_struct_I.pack(length)) 00180 pattern = '<%sf'%length 00181 buff.write(struct.pack(pattern, *self.right_turn.roll_velocity)) 00182 buff.write(_struct_B.pack(self.timeout)) 00183 except struct.error as se: self._check_types(se) 00184 except TypeError as te: self._check_types(te) 00185 00186 def deserialize(self, str): 00187 """ 00188 unpack serialized message in str into this message instance 00189 @param str: byte array of serialized message 00190 @type str: str 00191 """ 00192 try: 00193 if self.left_turn is None: 00194 self.left_turn = joint_qualification_controllers.msg.WristRollTurn() 00195 if self.right_turn is None: 00196 self.right_turn = joint_qualification_controllers.msg.WristRollTurn() 00197 end = 0 00198 start = end 00199 end += 4 00200 (length,) = _struct_I.unpack(str[start:end]) 00201 start = end 00202 end += length 00203 self.flex_joint = str[start:end] 00204 start = end 00205 end += 4 00206 (length,) = _struct_I.unpack(str[start:end]) 00207 start = end 00208 end += length 00209 self.roll_joint = str[start:end] 00210 start = end 00211 end += 4 00212 (length,) = _struct_I.unpack(str[start:end]) 00213 pattern = '<%sf'%length 00214 start = end 00215 end += struct.calcsize(pattern) 00216 self.flex_pid = struct.unpack(pattern, str[start:end]) 00217 start = end 00218 end += 4 00219 (length,) = _struct_I.unpack(str[start:end]) 00220 pattern = '<%sf'%length 00221 start = end 00222 end += struct.calcsize(pattern) 00223 self.roll_pid = struct.unpack(pattern, str[start:end]) 00224 start = end 00225 end += 4 00226 (length,) = _struct_I.unpack(str[start:end]) 00227 self.arg_name = [] 00228 for i in range(0, length): 00229 start = end 00230 end += 4 00231 (length,) = _struct_I.unpack(str[start:end]) 00232 start = end 00233 end += length 00234 val1 = str[start:end] 00235 self.arg_name.append(val1) 00236 start = end 00237 end += 4 00238 (length,) = _struct_I.unpack(str[start:end]) 00239 pattern = '<%sf'%length 00240 start = end 00241 end += struct.calcsize(pattern) 00242 self.arg_value = struct.unpack(pattern, str[start:end]) 00243 start = end 00244 end += 4 00245 (length,) = _struct_I.unpack(str[start:end]) 00246 pattern = '<%sf'%length 00247 start = end 00248 end += struct.calcsize(pattern) 00249 self.left_turn.time = struct.unpack(pattern, str[start:end]) 00250 start = end 00251 end += 4 00252 (length,) = _struct_I.unpack(str[start:end]) 00253 pattern = '<%sf'%length 00254 start = end 00255 end += struct.calcsize(pattern) 00256 self.left_turn.flex_position = struct.unpack(pattern, str[start:end]) 00257 start = end 00258 end += 4 00259 (length,) = _struct_I.unpack(str[start:end]) 00260 pattern = '<%sf'%length 00261 start = end 00262 end += struct.calcsize(pattern) 00263 self.left_turn.flex_effort = struct.unpack(pattern, str[start:end]) 00264 start = end 00265 end += 4 00266 (length,) = _struct_I.unpack(str[start:end]) 00267 pattern = '<%sf'%length 00268 start = end 00269 end += struct.calcsize(pattern) 00270 self.left_turn.flex_cmd = struct.unpack(pattern, str[start:end]) 00271 start = end 00272 end += 4 00273 (length,) = _struct_I.unpack(str[start:end]) 00274 pattern = '<%sf'%length 00275 start = end 00276 end += struct.calcsize(pattern) 00277 self.left_turn.roll_position = struct.unpack(pattern, str[start:end]) 00278 start = end 00279 end += 4 00280 (length,) = _struct_I.unpack(str[start:end]) 00281 pattern = '<%sf'%length 00282 start = end 00283 end += struct.calcsize(pattern) 00284 self.left_turn.roll_effort = struct.unpack(pattern, str[start:end]) 00285 start = end 00286 end += 4 00287 (length,) = _struct_I.unpack(str[start:end]) 00288 pattern = '<%sf'%length 00289 start = end 00290 end += struct.calcsize(pattern) 00291 self.left_turn.roll_cmd = struct.unpack(pattern, str[start:end]) 00292 start = end 00293 end += 4 00294 (length,) = _struct_I.unpack(str[start:end]) 00295 pattern = '<%sf'%length 00296 start = end 00297 end += struct.calcsize(pattern) 00298 self.left_turn.roll_velocity = struct.unpack(pattern, str[start:end]) 00299 start = end 00300 end += 4 00301 (length,) = _struct_I.unpack(str[start:end]) 00302 pattern = '<%sf'%length 00303 start = end 00304 end += struct.calcsize(pattern) 00305 self.right_turn.time = struct.unpack(pattern, str[start:end]) 00306 start = end 00307 end += 4 00308 (length,) = _struct_I.unpack(str[start:end]) 00309 pattern = '<%sf'%length 00310 start = end 00311 end += struct.calcsize(pattern) 00312 self.right_turn.flex_position = struct.unpack(pattern, str[start:end]) 00313 start = end 00314 end += 4 00315 (length,) = _struct_I.unpack(str[start:end]) 00316 pattern = '<%sf'%length 00317 start = end 00318 end += struct.calcsize(pattern) 00319 self.right_turn.flex_effort = struct.unpack(pattern, str[start:end]) 00320 start = end 00321 end += 4 00322 (length,) = _struct_I.unpack(str[start:end]) 00323 pattern = '<%sf'%length 00324 start = end 00325 end += struct.calcsize(pattern) 00326 self.right_turn.flex_cmd = struct.unpack(pattern, str[start:end]) 00327 start = end 00328 end += 4 00329 (length,) = _struct_I.unpack(str[start:end]) 00330 pattern = '<%sf'%length 00331 start = end 00332 end += struct.calcsize(pattern) 00333 self.right_turn.roll_position = struct.unpack(pattern, str[start:end]) 00334 start = end 00335 end += 4 00336 (length,) = _struct_I.unpack(str[start:end]) 00337 pattern = '<%sf'%length 00338 start = end 00339 end += struct.calcsize(pattern) 00340 self.right_turn.roll_effort = struct.unpack(pattern, str[start:end]) 00341 start = end 00342 end += 4 00343 (length,) = _struct_I.unpack(str[start:end]) 00344 pattern = '<%sf'%length 00345 start = end 00346 end += struct.calcsize(pattern) 00347 self.right_turn.roll_cmd = struct.unpack(pattern, str[start:end]) 00348 start = end 00349 end += 4 00350 (length,) = _struct_I.unpack(str[start:end]) 00351 pattern = '<%sf'%length 00352 start = end 00353 end += struct.calcsize(pattern) 00354 self.right_turn.roll_velocity = struct.unpack(pattern, str[start:end]) 00355 start = end 00356 end += 1 00357 (self.timeout,) = _struct_B.unpack(str[start:end]) 00358 self.timeout = bool(self.timeout) 00359 return self 00360 except struct.error as e: 00361 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00362 00363 00364 def serialize_numpy(self, buff, numpy): 00365 """ 00366 serialize message with numpy array types into buffer 00367 @param buff: buffer 00368 @type buff: StringIO 00369 @param numpy: numpy python module 00370 @type numpy module 00371 """ 00372 try: 00373 _x = self.flex_joint 00374 length = len(_x) 00375 buff.write(struct.pack('<I%ss'%length, length, _x)) 00376 _x = self.roll_joint 00377 length = len(_x) 00378 buff.write(struct.pack('<I%ss'%length, length, _x)) 00379 length = len(self.flex_pid) 00380 buff.write(_struct_I.pack(length)) 00381 pattern = '<%sf'%length 00382 buff.write(self.flex_pid.tostring()) 00383 length = len(self.roll_pid) 00384 buff.write(_struct_I.pack(length)) 00385 pattern = '<%sf'%length 00386 buff.write(self.roll_pid.tostring()) 00387 length = len(self.arg_name) 00388 buff.write(_struct_I.pack(length)) 00389 for val1 in self.arg_name: 00390 length = len(val1) 00391 buff.write(struct.pack('<I%ss'%length, length, val1)) 00392 length = len(self.arg_value) 00393 buff.write(_struct_I.pack(length)) 00394 pattern = '<%sf'%length 00395 buff.write(self.arg_value.tostring()) 00396 length = len(self.left_turn.time) 00397 buff.write(_struct_I.pack(length)) 00398 pattern = '<%sf'%length 00399 buff.write(self.left_turn.time.tostring()) 00400 length = len(self.left_turn.flex_position) 00401 buff.write(_struct_I.pack(length)) 00402 pattern = '<%sf'%length 00403 buff.write(self.left_turn.flex_position.tostring()) 00404 length = len(self.left_turn.flex_effort) 00405 buff.write(_struct_I.pack(length)) 00406 pattern = '<%sf'%length 00407 buff.write(self.left_turn.flex_effort.tostring()) 00408 length = len(self.left_turn.flex_cmd) 00409 buff.write(_struct_I.pack(length)) 00410 pattern = '<%sf'%length 00411 buff.write(self.left_turn.flex_cmd.tostring()) 00412 length = len(self.left_turn.roll_position) 00413 buff.write(_struct_I.pack(length)) 00414 pattern = '<%sf'%length 00415 buff.write(self.left_turn.roll_position.tostring()) 00416 length = len(self.left_turn.roll_effort) 00417 buff.write(_struct_I.pack(length)) 00418 pattern = '<%sf'%length 00419 buff.write(self.left_turn.roll_effort.tostring()) 00420 length = len(self.left_turn.roll_cmd) 00421 buff.write(_struct_I.pack(length)) 00422 pattern = '<%sf'%length 00423 buff.write(self.left_turn.roll_cmd.tostring()) 00424 length = len(self.left_turn.roll_velocity) 00425 buff.write(_struct_I.pack(length)) 00426 pattern = '<%sf'%length 00427 buff.write(self.left_turn.roll_velocity.tostring()) 00428 length = len(self.right_turn.time) 00429 buff.write(_struct_I.pack(length)) 00430 pattern = '<%sf'%length 00431 buff.write(self.right_turn.time.tostring()) 00432 length = len(self.right_turn.flex_position) 00433 buff.write(_struct_I.pack(length)) 00434 pattern = '<%sf'%length 00435 buff.write(self.right_turn.flex_position.tostring()) 00436 length = len(self.right_turn.flex_effort) 00437 buff.write(_struct_I.pack(length)) 00438 pattern = '<%sf'%length 00439 buff.write(self.right_turn.flex_effort.tostring()) 00440 length = len(self.right_turn.flex_cmd) 00441 buff.write(_struct_I.pack(length)) 00442 pattern = '<%sf'%length 00443 buff.write(self.right_turn.flex_cmd.tostring()) 00444 length = len(self.right_turn.roll_position) 00445 buff.write(_struct_I.pack(length)) 00446 pattern = '<%sf'%length 00447 buff.write(self.right_turn.roll_position.tostring()) 00448 length = len(self.right_turn.roll_effort) 00449 buff.write(_struct_I.pack(length)) 00450 pattern = '<%sf'%length 00451 buff.write(self.right_turn.roll_effort.tostring()) 00452 length = len(self.right_turn.roll_cmd) 00453 buff.write(_struct_I.pack(length)) 00454 pattern = '<%sf'%length 00455 buff.write(self.right_turn.roll_cmd.tostring()) 00456 length = len(self.right_turn.roll_velocity) 00457 buff.write(_struct_I.pack(length)) 00458 pattern = '<%sf'%length 00459 buff.write(self.right_turn.roll_velocity.tostring()) 00460 buff.write(_struct_B.pack(self.timeout)) 00461 except struct.error as se: self._check_types(se) 00462 except TypeError as te: self._check_types(te) 00463 00464 def deserialize_numpy(self, str, numpy): 00465 """ 00466 unpack serialized message in str into this message instance using numpy for array types 00467 @param str: byte array of serialized message 00468 @type str: str 00469 @param numpy: numpy python module 00470 @type numpy: module 00471 """ 00472 try: 00473 if self.left_turn is None: 00474 self.left_turn = joint_qualification_controllers.msg.WristRollTurn() 00475 if self.right_turn is None: 00476 self.right_turn = joint_qualification_controllers.msg.WristRollTurn() 00477 end = 0 00478 start = end 00479 end += 4 00480 (length,) = _struct_I.unpack(str[start:end]) 00481 start = end 00482 end += length 00483 self.flex_joint = str[start:end] 00484 start = end 00485 end += 4 00486 (length,) = _struct_I.unpack(str[start:end]) 00487 start = end 00488 end += length 00489 self.roll_joint = str[start:end] 00490 start = end 00491 end += 4 00492 (length,) = _struct_I.unpack(str[start:end]) 00493 pattern = '<%sf'%length 00494 start = end 00495 end += struct.calcsize(pattern) 00496 self.flex_pid = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=length) 00497 start = end 00498 end += 4 00499 (length,) = _struct_I.unpack(str[start:end]) 00500 pattern = '<%sf'%length 00501 start = end 00502 end += struct.calcsize(pattern) 00503 self.roll_pid = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=length) 00504 start = end 00505 end += 4 00506 (length,) = _struct_I.unpack(str[start:end]) 00507 self.arg_name = [] 00508 for i in range(0, length): 00509 start = end 00510 end += 4 00511 (length,) = _struct_I.unpack(str[start:end]) 00512 start = end 00513 end += length 00514 val1 = str[start:end] 00515 self.arg_name.append(val1) 00516 start = end 00517 end += 4 00518 (length,) = _struct_I.unpack(str[start:end]) 00519 pattern = '<%sf'%length 00520 start = end 00521 end += struct.calcsize(pattern) 00522 self.arg_value = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=length) 00523 start = end 00524 end += 4 00525 (length,) = _struct_I.unpack(str[start:end]) 00526 pattern = '<%sf'%length 00527 start = end 00528 end += struct.calcsize(pattern) 00529 self.left_turn.time = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=length) 00530 start = end 00531 end += 4 00532 (length,) = _struct_I.unpack(str[start:end]) 00533 pattern = '<%sf'%length 00534 start = end 00535 end += struct.calcsize(pattern) 00536 self.left_turn.flex_position = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=length) 00537 start = end 00538 end += 4 00539 (length,) = _struct_I.unpack(str[start:end]) 00540 pattern = '<%sf'%length 00541 start = end 00542 end += struct.calcsize(pattern) 00543 self.left_turn.flex_effort = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=length) 00544 start = end 00545 end += 4 00546 (length,) = _struct_I.unpack(str[start:end]) 00547 pattern = '<%sf'%length 00548 start = end 00549 end += struct.calcsize(pattern) 00550 self.left_turn.flex_cmd = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=length) 00551 start = end 00552 end += 4 00553 (length,) = _struct_I.unpack(str[start:end]) 00554 pattern = '<%sf'%length 00555 start = end 00556 end += struct.calcsize(pattern) 00557 self.left_turn.roll_position = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=length) 00558 start = end 00559 end += 4 00560 (length,) = _struct_I.unpack(str[start:end]) 00561 pattern = '<%sf'%length 00562 start = end 00563 end += struct.calcsize(pattern) 00564 self.left_turn.roll_effort = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=length) 00565 start = end 00566 end += 4 00567 (length,) = _struct_I.unpack(str[start:end]) 00568 pattern = '<%sf'%length 00569 start = end 00570 end += struct.calcsize(pattern) 00571 self.left_turn.roll_cmd = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=length) 00572 start = end 00573 end += 4 00574 (length,) = _struct_I.unpack(str[start:end]) 00575 pattern = '<%sf'%length 00576 start = end 00577 end += struct.calcsize(pattern) 00578 self.left_turn.roll_velocity = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=length) 00579 start = end 00580 end += 4 00581 (length,) = _struct_I.unpack(str[start:end]) 00582 pattern = '<%sf'%length 00583 start = end 00584 end += struct.calcsize(pattern) 00585 self.right_turn.time = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=length) 00586 start = end 00587 end += 4 00588 (length,) = _struct_I.unpack(str[start:end]) 00589 pattern = '<%sf'%length 00590 start = end 00591 end += struct.calcsize(pattern) 00592 self.right_turn.flex_position = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=length) 00593 start = end 00594 end += 4 00595 (length,) = _struct_I.unpack(str[start:end]) 00596 pattern = '<%sf'%length 00597 start = end 00598 end += struct.calcsize(pattern) 00599 self.right_turn.flex_effort = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=length) 00600 start = end 00601 end += 4 00602 (length,) = _struct_I.unpack(str[start:end]) 00603 pattern = '<%sf'%length 00604 start = end 00605 end += struct.calcsize(pattern) 00606 self.right_turn.flex_cmd = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=length) 00607 start = end 00608 end += 4 00609 (length,) = _struct_I.unpack(str[start:end]) 00610 pattern = '<%sf'%length 00611 start = end 00612 end += struct.calcsize(pattern) 00613 self.right_turn.roll_position = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=length) 00614 start = end 00615 end += 4 00616 (length,) = _struct_I.unpack(str[start:end]) 00617 pattern = '<%sf'%length 00618 start = end 00619 end += struct.calcsize(pattern) 00620 self.right_turn.roll_effort = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=length) 00621 start = end 00622 end += 4 00623 (length,) = _struct_I.unpack(str[start:end]) 00624 pattern = '<%sf'%length 00625 start = end 00626 end += struct.calcsize(pattern) 00627 self.right_turn.roll_cmd = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=length) 00628 start = end 00629 end += 4 00630 (length,) = _struct_I.unpack(str[start:end]) 00631 pattern = '<%sf'%length 00632 start = end 00633 end += struct.calcsize(pattern) 00634 self.right_turn.roll_velocity = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=length) 00635 start = end 00636 end += 1 00637 (self.timeout,) = _struct_B.unpack(str[start:end]) 00638 self.timeout = bool(self.timeout) 00639 return self 00640 except struct.error as e: 00641 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00642 00643 _struct_I = roslib.message.struct_I 00644 _struct_B = struct.Struct("<B")