00001 """autogenerated by genpy from srs_assisted_grasping_msgs/ReactiveGraspingActionResult.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006
00007 import srs_assisted_grasping_msgs.msg
00008 import genpy
00009 import actionlib_msgs.msg
00010 import std_msgs.msg
00011
00012 class ReactiveGraspingActionResult(genpy.Message):
00013 _md5sum = "904345a1eac041c82dedd76b996213ed"
00014 _type = "srs_assisted_grasping_msgs/ReactiveGraspingActionResult"
00015 _has_header = True
00016 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00017
00018 Header header
00019 actionlib_msgs/GoalStatus status
00020 ReactiveGraspingResult result
00021
00022 ================================================================================
00023 MSG: std_msgs/Header
00024 # Standard metadata for higher-level stamped data types.
00025 # This is generally used to communicate timestamped data
00026 # in a particular coordinate frame.
00027 #
00028 # sequence ID: consecutively increasing ID
00029 uint32 seq
00030 #Two-integer timestamp that is expressed as:
00031 # * stamp.secs: seconds (stamp_secs) since epoch
00032 # * stamp.nsecs: nanoseconds since stamp_secs
00033 # time-handling sugar is provided by the client library
00034 time stamp
00035 #Frame this data is associated with
00036 # 0: no frame
00037 # 1: global frame
00038 string frame_id
00039
00040 ================================================================================
00041 MSG: actionlib_msgs/GoalStatus
00042 GoalID goal_id
00043 uint8 status
00044 uint8 PENDING = 0 # The goal has yet to be processed by the action server
00045 uint8 ACTIVE = 1 # The goal is currently being processed by the action server
00046 uint8 PREEMPTED = 2 # The goal received a cancel request after it started executing
00047 # and has since completed its execution (Terminal State)
00048 uint8 SUCCEEDED = 3 # The goal was achieved successfully by the action server (Terminal State)
00049 uint8 ABORTED = 4 # The goal was aborted during execution by the action server due
00050 # to some failure (Terminal State)
00051 uint8 REJECTED = 5 # The goal was rejected by the action server without being processed,
00052 # because the goal was unattainable or invalid (Terminal State)
00053 uint8 PREEMPTING = 6 # The goal received a cancel request after it started executing
00054 # and has not yet completed execution
00055 uint8 RECALLING = 7 # The goal received a cancel request before it started executing,
00056 # but the action server has not yet confirmed that the goal is canceled
00057 uint8 RECALLED = 8 # The goal received a cancel request before it started executing
00058 # and was successfully cancelled (Terminal State)
00059 uint8 LOST = 9 # An action client can determine that a goal is LOST. This should not be
00060 # sent over the wire by an action server
00061
00062 #Allow for the user to associate a string with GoalStatus for debugging
00063 string text
00064
00065
00066 ================================================================================
00067 MSG: actionlib_msgs/GoalID
00068 # The stamp should store the time at which this goal was requested.
00069 # It is used by an action server when it tries to preempt all
00070 # goals that were requested before a certain time
00071 time stamp
00072
00073 # The id provides a way to associate feedback and
00074 # result message with specific goal requests. The id
00075 # specified must be unique.
00076 string id
00077
00078
00079 ================================================================================
00080 MSG: srs_assisted_grasping_msgs/ReactiveGraspingResult
00081 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00082 # RESULT
00083 std_msgs/Float32MultiArray actual_joint_values # n
00084 std_msgs/Int16MultiArray actual_forces # m
00085 std_msgs/Float32MultiArray time_to_stop # n
00086
00087 ================================================================================
00088 MSG: std_msgs/Float32MultiArray
00089 # Please look at the MultiArrayLayout message definition for
00090 # documentation on all multiarrays.
00091
00092 MultiArrayLayout layout # specification of data layout
00093 float32[] data # array of data
00094
00095
00096 ================================================================================
00097 MSG: std_msgs/MultiArrayLayout
00098 # The multiarray declares a generic multi-dimensional array of a
00099 # particular data type. Dimensions are ordered from outer most
00100 # to inner most.
00101
00102 MultiArrayDimension[] dim # Array of dimension properties
00103 uint32 data_offset # padding bytes at front of data
00104
00105 # Accessors should ALWAYS be written in terms of dimension stride
00106 # and specified outer-most dimension first.
00107 #
00108 # multiarray(i,j,k) = data[data_offset + dim_stride[1]*i + dim_stride[2]*j + k]
00109 #
00110 # A standard, 3-channel 640x480 image with interleaved color channels
00111 # would be specified as:
00112 #
00113 # dim[0].label = "height"
00114 # dim[0].size = 480
00115 # dim[0].stride = 3*640*480 = 921600 (note dim[0] stride is just size of image)
00116 # dim[1].label = "width"
00117 # dim[1].size = 640
00118 # dim[1].stride = 3*640 = 1920
00119 # dim[2].label = "channel"
00120 # dim[2].size = 3
00121 # dim[2].stride = 3
00122 #
00123 # multiarray(i,j,k) refers to the ith row, jth column, and kth channel.
00124 ================================================================================
00125 MSG: std_msgs/MultiArrayDimension
00126 string label # label of given dimension
00127 uint32 size # size of given dimension (in type units)
00128 uint32 stride # stride of given dimension
00129 ================================================================================
00130 MSG: std_msgs/Int16MultiArray
00131 # Please look at the MultiArrayLayout message definition for
00132 # documentation on all multiarrays.
00133
00134 MultiArrayLayout layout # specification of data layout
00135 int16[] data # array of data
00136
00137
00138 """
00139 __slots__ = ['header','status','result']
00140 _slot_types = ['std_msgs/Header','actionlib_msgs/GoalStatus','srs_assisted_grasping_msgs/ReactiveGraspingResult']
00141
00142 def __init__(self, *args, **kwds):
00143 """
00144 Constructor. Any message fields that are implicitly/explicitly
00145 set to None will be assigned a default value. The recommend
00146 use is keyword arguments as this is more robust to future message
00147 changes. You cannot mix in-order arguments and keyword arguments.
00148
00149 The available fields are:
00150 header,status,result
00151
00152 :param args: complete set of field values, in .msg order
00153 :param kwds: use keyword arguments corresponding to message field names
00154 to set specific fields.
00155 """
00156 if args or kwds:
00157 super(ReactiveGraspingActionResult, self).__init__(*args, **kwds)
00158
00159 if self.header is None:
00160 self.header = std_msgs.msg.Header()
00161 if self.status is None:
00162 self.status = actionlib_msgs.msg.GoalStatus()
00163 if self.result is None:
00164 self.result = srs_assisted_grasping_msgs.msg.ReactiveGraspingResult()
00165 else:
00166 self.header = std_msgs.msg.Header()
00167 self.status = actionlib_msgs.msg.GoalStatus()
00168 self.result = srs_assisted_grasping_msgs.msg.ReactiveGraspingResult()
00169
00170 def _get_types(self):
00171 """
00172 internal API method
00173 """
00174 return self._slot_types
00175
00176 def serialize(self, buff):
00177 """
00178 serialize message into buffer
00179 :param buff: buffer, ``StringIO``
00180 """
00181 try:
00182 _x = self
00183 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00184 _x = self.header.frame_id
00185 length = len(_x)
00186 if python3 or type(_x) == unicode:
00187 _x = _x.encode('utf-8')
00188 length = len(_x)
00189 buff.write(struct.pack('<I%ss'%length, length, _x))
00190 _x = self
00191 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs))
00192 _x = self.status.goal_id.id
00193 length = len(_x)
00194 if python3 or type(_x) == unicode:
00195 _x = _x.encode('utf-8')
00196 length = len(_x)
00197 buff.write(struct.pack('<I%ss'%length, length, _x))
00198 buff.write(_struct_B.pack(self.status.status))
00199 _x = self.status.text
00200 length = len(_x)
00201 if python3 or type(_x) == unicode:
00202 _x = _x.encode('utf-8')
00203 length = len(_x)
00204 buff.write(struct.pack('<I%ss'%length, length, _x))
00205 length = len(self.result.actual_joint_values.layout.dim)
00206 buff.write(_struct_I.pack(length))
00207 for val1 in self.result.actual_joint_values.layout.dim:
00208 _x = val1.label
00209 length = len(_x)
00210 if python3 or type(_x) == unicode:
00211 _x = _x.encode('utf-8')
00212 length = len(_x)
00213 buff.write(struct.pack('<I%ss'%length, length, _x))
00214 _x = val1
00215 buff.write(_struct_2I.pack(_x.size, _x.stride))
00216 buff.write(_struct_I.pack(self.result.actual_joint_values.layout.data_offset))
00217 length = len(self.result.actual_joint_values.data)
00218 buff.write(_struct_I.pack(length))
00219 pattern = '<%sf'%length
00220 buff.write(struct.pack(pattern, *self.result.actual_joint_values.data))
00221 length = len(self.result.actual_forces.layout.dim)
00222 buff.write(_struct_I.pack(length))
00223 for val1 in self.result.actual_forces.layout.dim:
00224 _x = val1.label
00225 length = len(_x)
00226 if python3 or type(_x) == unicode:
00227 _x = _x.encode('utf-8')
00228 length = len(_x)
00229 buff.write(struct.pack('<I%ss'%length, length, _x))
00230 _x = val1
00231 buff.write(_struct_2I.pack(_x.size, _x.stride))
00232 buff.write(_struct_I.pack(self.result.actual_forces.layout.data_offset))
00233 length = len(self.result.actual_forces.data)
00234 buff.write(_struct_I.pack(length))
00235 pattern = '<%sh'%length
00236 buff.write(struct.pack(pattern, *self.result.actual_forces.data))
00237 length = len(self.result.time_to_stop.layout.dim)
00238 buff.write(_struct_I.pack(length))
00239 for val1 in self.result.time_to_stop.layout.dim:
00240 _x = val1.label
00241 length = len(_x)
00242 if python3 or type(_x) == unicode:
00243 _x = _x.encode('utf-8')
00244 length = len(_x)
00245 buff.write(struct.pack('<I%ss'%length, length, _x))
00246 _x = val1
00247 buff.write(_struct_2I.pack(_x.size, _x.stride))
00248 buff.write(_struct_I.pack(self.result.time_to_stop.layout.data_offset))
00249 length = len(self.result.time_to_stop.data)
00250 buff.write(_struct_I.pack(length))
00251 pattern = '<%sf'%length
00252 buff.write(struct.pack(pattern, *self.result.time_to_stop.data))
00253 except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00254 except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00255
00256 def deserialize(self, str):
00257 """
00258 unpack serialized message in str into this message instance
00259 :param str: byte array of serialized message, ``str``
00260 """
00261 try:
00262 if self.header is None:
00263 self.header = std_msgs.msg.Header()
00264 if self.status is None:
00265 self.status = actionlib_msgs.msg.GoalStatus()
00266 if self.result is None:
00267 self.result = srs_assisted_grasping_msgs.msg.ReactiveGraspingResult()
00268 end = 0
00269 _x = self
00270 start = end
00271 end += 12
00272 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00273 start = end
00274 end += 4
00275 (length,) = _struct_I.unpack(str[start:end])
00276 start = end
00277 end += length
00278 if python3:
00279 self.header.frame_id = str[start:end].decode('utf-8')
00280 else:
00281 self.header.frame_id = str[start:end]
00282 _x = self
00283 start = end
00284 end += 8
00285 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00286 start = end
00287 end += 4
00288 (length,) = _struct_I.unpack(str[start:end])
00289 start = end
00290 end += length
00291 if python3:
00292 self.status.goal_id.id = str[start:end].decode('utf-8')
00293 else:
00294 self.status.goal_id.id = str[start:end]
00295 start = end
00296 end += 1
00297 (self.status.status,) = _struct_B.unpack(str[start:end])
00298 start = end
00299 end += 4
00300 (length,) = _struct_I.unpack(str[start:end])
00301 start = end
00302 end += length
00303 if python3:
00304 self.status.text = str[start:end].decode('utf-8')
00305 else:
00306 self.status.text = str[start:end]
00307 start = end
00308 end += 4
00309 (length,) = _struct_I.unpack(str[start:end])
00310 self.result.actual_joint_values.layout.dim = []
00311 for i in range(0, length):
00312 val1 = std_msgs.msg.MultiArrayDimension()
00313 start = end
00314 end += 4
00315 (length,) = _struct_I.unpack(str[start:end])
00316 start = end
00317 end += length
00318 if python3:
00319 val1.label = str[start:end].decode('utf-8')
00320 else:
00321 val1.label = str[start:end]
00322 _x = val1
00323 start = end
00324 end += 8
00325 (_x.size, _x.stride,) = _struct_2I.unpack(str[start:end])
00326 self.result.actual_joint_values.layout.dim.append(val1)
00327 start = end
00328 end += 4
00329 (self.result.actual_joint_values.layout.data_offset,) = _struct_I.unpack(str[start:end])
00330 start = end
00331 end += 4
00332 (length,) = _struct_I.unpack(str[start:end])
00333 pattern = '<%sf'%length
00334 start = end
00335 end += struct.calcsize(pattern)
00336 self.result.actual_joint_values.data = struct.unpack(pattern, str[start:end])
00337 start = end
00338 end += 4
00339 (length,) = _struct_I.unpack(str[start:end])
00340 self.result.actual_forces.layout.dim = []
00341 for i in range(0, length):
00342 val1 = std_msgs.msg.MultiArrayDimension()
00343 start = end
00344 end += 4
00345 (length,) = _struct_I.unpack(str[start:end])
00346 start = end
00347 end += length
00348 if python3:
00349 val1.label = str[start:end].decode('utf-8')
00350 else:
00351 val1.label = str[start:end]
00352 _x = val1
00353 start = end
00354 end += 8
00355 (_x.size, _x.stride,) = _struct_2I.unpack(str[start:end])
00356 self.result.actual_forces.layout.dim.append(val1)
00357 start = end
00358 end += 4
00359 (self.result.actual_forces.layout.data_offset,) = _struct_I.unpack(str[start:end])
00360 start = end
00361 end += 4
00362 (length,) = _struct_I.unpack(str[start:end])
00363 pattern = '<%sh'%length
00364 start = end
00365 end += struct.calcsize(pattern)
00366 self.result.actual_forces.data = struct.unpack(pattern, str[start:end])
00367 start = end
00368 end += 4
00369 (length,) = _struct_I.unpack(str[start:end])
00370 self.result.time_to_stop.layout.dim = []
00371 for i in range(0, length):
00372 val1 = std_msgs.msg.MultiArrayDimension()
00373 start = end
00374 end += 4
00375 (length,) = _struct_I.unpack(str[start:end])
00376 start = end
00377 end += length
00378 if python3:
00379 val1.label = str[start:end].decode('utf-8')
00380 else:
00381 val1.label = str[start:end]
00382 _x = val1
00383 start = end
00384 end += 8
00385 (_x.size, _x.stride,) = _struct_2I.unpack(str[start:end])
00386 self.result.time_to_stop.layout.dim.append(val1)
00387 start = end
00388 end += 4
00389 (self.result.time_to_stop.layout.data_offset,) = _struct_I.unpack(str[start:end])
00390 start = end
00391 end += 4
00392 (length,) = _struct_I.unpack(str[start:end])
00393 pattern = '<%sf'%length
00394 start = end
00395 end += struct.calcsize(pattern)
00396 self.result.time_to_stop.data = struct.unpack(pattern, str[start:end])
00397 return self
00398 except struct.error as e:
00399 raise genpy.DeserializationError(e)
00400
00401
00402 def serialize_numpy(self, buff, numpy):
00403 """
00404 serialize message with numpy array types into buffer
00405 :param buff: buffer, ``StringIO``
00406 :param numpy: numpy python module
00407 """
00408 try:
00409 _x = self
00410 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00411 _x = self.header.frame_id
00412 length = len(_x)
00413 if python3 or type(_x) == unicode:
00414 _x = _x.encode('utf-8')
00415 length = len(_x)
00416 buff.write(struct.pack('<I%ss'%length, length, _x))
00417 _x = self
00418 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs))
00419 _x = self.status.goal_id.id
00420 length = len(_x)
00421 if python3 or type(_x) == unicode:
00422 _x = _x.encode('utf-8')
00423 length = len(_x)
00424 buff.write(struct.pack('<I%ss'%length, length, _x))
00425 buff.write(_struct_B.pack(self.status.status))
00426 _x = self.status.text
00427 length = len(_x)
00428 if python3 or type(_x) == unicode:
00429 _x = _x.encode('utf-8')
00430 length = len(_x)
00431 buff.write(struct.pack('<I%ss'%length, length, _x))
00432 length = len(self.result.actual_joint_values.layout.dim)
00433 buff.write(_struct_I.pack(length))
00434 for val1 in self.result.actual_joint_values.layout.dim:
00435 _x = val1.label
00436 length = len(_x)
00437 if python3 or type(_x) == unicode:
00438 _x = _x.encode('utf-8')
00439 length = len(_x)
00440 buff.write(struct.pack('<I%ss'%length, length, _x))
00441 _x = val1
00442 buff.write(_struct_2I.pack(_x.size, _x.stride))
00443 buff.write(_struct_I.pack(self.result.actual_joint_values.layout.data_offset))
00444 length = len(self.result.actual_joint_values.data)
00445 buff.write(_struct_I.pack(length))
00446 pattern = '<%sf'%length
00447 buff.write(self.result.actual_joint_values.data.tostring())
00448 length = len(self.result.actual_forces.layout.dim)
00449 buff.write(_struct_I.pack(length))
00450 for val1 in self.result.actual_forces.layout.dim:
00451 _x = val1.label
00452 length = len(_x)
00453 if python3 or type(_x) == unicode:
00454 _x = _x.encode('utf-8')
00455 length = len(_x)
00456 buff.write(struct.pack('<I%ss'%length, length, _x))
00457 _x = val1
00458 buff.write(_struct_2I.pack(_x.size, _x.stride))
00459 buff.write(_struct_I.pack(self.result.actual_forces.layout.data_offset))
00460 length = len(self.result.actual_forces.data)
00461 buff.write(_struct_I.pack(length))
00462 pattern = '<%sh'%length
00463 buff.write(self.result.actual_forces.data.tostring())
00464 length = len(self.result.time_to_stop.layout.dim)
00465 buff.write(_struct_I.pack(length))
00466 for val1 in self.result.time_to_stop.layout.dim:
00467 _x = val1.label
00468 length = len(_x)
00469 if python3 or type(_x) == unicode:
00470 _x = _x.encode('utf-8')
00471 length = len(_x)
00472 buff.write(struct.pack('<I%ss'%length, length, _x))
00473 _x = val1
00474 buff.write(_struct_2I.pack(_x.size, _x.stride))
00475 buff.write(_struct_I.pack(self.result.time_to_stop.layout.data_offset))
00476 length = len(self.result.time_to_stop.data)
00477 buff.write(_struct_I.pack(length))
00478 pattern = '<%sf'%length
00479 buff.write(self.result.time_to_stop.data.tostring())
00480 except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00481 except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00482
00483 def deserialize_numpy(self, str, numpy):
00484 """
00485 unpack serialized message in str into this message instance using numpy for array types
00486 :param str: byte array of serialized message, ``str``
00487 :param numpy: numpy python module
00488 """
00489 try:
00490 if self.header is None:
00491 self.header = std_msgs.msg.Header()
00492 if self.status is None:
00493 self.status = actionlib_msgs.msg.GoalStatus()
00494 if self.result is None:
00495 self.result = srs_assisted_grasping_msgs.msg.ReactiveGraspingResult()
00496 end = 0
00497 _x = self
00498 start = end
00499 end += 12
00500 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00501 start = end
00502 end += 4
00503 (length,) = _struct_I.unpack(str[start:end])
00504 start = end
00505 end += length
00506 if python3:
00507 self.header.frame_id = str[start:end].decode('utf-8')
00508 else:
00509 self.header.frame_id = str[start:end]
00510 _x = self
00511 start = end
00512 end += 8
00513 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00514 start = end
00515 end += 4
00516 (length,) = _struct_I.unpack(str[start:end])
00517 start = end
00518 end += length
00519 if python3:
00520 self.status.goal_id.id = str[start:end].decode('utf-8')
00521 else:
00522 self.status.goal_id.id = str[start:end]
00523 start = end
00524 end += 1
00525 (self.status.status,) = _struct_B.unpack(str[start:end])
00526 start = end
00527 end += 4
00528 (length,) = _struct_I.unpack(str[start:end])
00529 start = end
00530 end += length
00531 if python3:
00532 self.status.text = str[start:end].decode('utf-8')
00533 else:
00534 self.status.text = str[start:end]
00535 start = end
00536 end += 4
00537 (length,) = _struct_I.unpack(str[start:end])
00538 self.result.actual_joint_values.layout.dim = []
00539 for i in range(0, length):
00540 val1 = std_msgs.msg.MultiArrayDimension()
00541 start = end
00542 end += 4
00543 (length,) = _struct_I.unpack(str[start:end])
00544 start = end
00545 end += length
00546 if python3:
00547 val1.label = str[start:end].decode('utf-8')
00548 else:
00549 val1.label = str[start:end]
00550 _x = val1
00551 start = end
00552 end += 8
00553 (_x.size, _x.stride,) = _struct_2I.unpack(str[start:end])
00554 self.result.actual_joint_values.layout.dim.append(val1)
00555 start = end
00556 end += 4
00557 (self.result.actual_joint_values.layout.data_offset,) = _struct_I.unpack(str[start:end])
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.result.actual_joint_values.data = 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 self.result.actual_forces.layout.dim = []
00569 for i in range(0, length):
00570 val1 = std_msgs.msg.MultiArrayDimension()
00571 start = end
00572 end += 4
00573 (length,) = _struct_I.unpack(str[start:end])
00574 start = end
00575 end += length
00576 if python3:
00577 val1.label = str[start:end].decode('utf-8')
00578 else:
00579 val1.label = str[start:end]
00580 _x = val1
00581 start = end
00582 end += 8
00583 (_x.size, _x.stride,) = _struct_2I.unpack(str[start:end])
00584 self.result.actual_forces.layout.dim.append(val1)
00585 start = end
00586 end += 4
00587 (self.result.actual_forces.layout.data_offset,) = _struct_I.unpack(str[start:end])
00588 start = end
00589 end += 4
00590 (length,) = _struct_I.unpack(str[start:end])
00591 pattern = '<%sh'%length
00592 start = end
00593 end += struct.calcsize(pattern)
00594 self.result.actual_forces.data = numpy.frombuffer(str[start:end], dtype=numpy.int16, count=length)
00595 start = end
00596 end += 4
00597 (length,) = _struct_I.unpack(str[start:end])
00598 self.result.time_to_stop.layout.dim = []
00599 for i in range(0, length):
00600 val1 = std_msgs.msg.MultiArrayDimension()
00601 start = end
00602 end += 4
00603 (length,) = _struct_I.unpack(str[start:end])
00604 start = end
00605 end += length
00606 if python3:
00607 val1.label = str[start:end].decode('utf-8')
00608 else:
00609 val1.label = str[start:end]
00610 _x = val1
00611 start = end
00612 end += 8
00613 (_x.size, _x.stride,) = _struct_2I.unpack(str[start:end])
00614 self.result.time_to_stop.layout.dim.append(val1)
00615 start = end
00616 end += 4
00617 (self.result.time_to_stop.layout.data_offset,) = _struct_I.unpack(str[start:end])
00618 start = end
00619 end += 4
00620 (length,) = _struct_I.unpack(str[start:end])
00621 pattern = '<%sf'%length
00622 start = end
00623 end += struct.calcsize(pattern)
00624 self.result.time_to_stop.data = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=length)
00625 return self
00626 except struct.error as e:
00627 raise genpy.DeserializationError(e)
00628
00629 _struct_I = genpy.struct_I
00630 _struct_3I = struct.Struct("<3I")
00631 _struct_B = struct.Struct("<B")
00632 _struct_2I = struct.Struct("<2I")