00001 """autogenerated by genpy from articulation_msgs/GetModelPriorSrvRequest.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006
00007
00008 class GetModelPriorSrvRequest(genpy.Message):
00009 _md5sum = "d41d8cd98f00b204e9800998ecf8427e"
00010 _type = "articulation_msgs/GetModelPriorSrvRequest"
00011 _has_header = False
00012 _full_text = """
00013
00014
00015
00016
00017
00018
00019 """
00020 __slots__ = []
00021 _slot_types = []
00022
00023 def __init__(self, *args, **kwds):
00024 """
00025 Constructor. Any message fields that are implicitly/explicitly
00026 set to None will be assigned a default value. The recommend
00027 use is keyword arguments as this is more robust to future message
00028 changes. You cannot mix in-order arguments and keyword arguments.
00029
00030 The available fields are:
00031
00032
00033 :param args: complete set of field values, in .msg order
00034 :param kwds: use keyword arguments corresponding to message field names
00035 to set specific fields.
00036 """
00037 if args or kwds:
00038 super(GetModelPriorSrvRequest, self).__init__(*args, **kwds)
00039
00040 def _get_types(self):
00041 """
00042 internal API method
00043 """
00044 return self._slot_types
00045
00046 def serialize(self, buff):
00047 """
00048 serialize message into buffer
00049 :param buff: buffer, ``StringIO``
00050 """
00051 try:
00052 pass
00053 except struct.error as se: self._check_types(se)
00054 except TypeError as te: self._check_types(te)
00055
00056 def deserialize(self, str):
00057 """
00058 unpack serialized message in str into this message instance
00059 :param str: byte array of serialized message, ``str``
00060 """
00061 try:
00062 end = 0
00063 return self
00064 except struct.error as e:
00065 raise genpy.DeserializationError(e)
00066
00067
00068 def serialize_numpy(self, buff, numpy):
00069 """
00070 serialize message with numpy array types into buffer
00071 :param buff: buffer, ``StringIO``
00072 :param numpy: numpy python module
00073 """
00074 try:
00075 pass
00076 except struct.error as se: self._check_types(se)
00077 except TypeError as te: self._check_types(te)
00078
00079 def deserialize_numpy(self, str, numpy):
00080 """
00081 unpack serialized message in str into this message instance using numpy for array types
00082 :param str: byte array of serialized message, ``str``
00083 :param numpy: numpy python module
00084 """
00085 try:
00086 end = 0
00087 return self
00088 except struct.error as e:
00089 raise genpy.DeserializationError(e)
00090
00091 _struct_I = genpy.struct_I
00092 """autogenerated by genpy from articulation_msgs/GetModelPriorSrvResponse.msg. Do not edit."""
00093 import sys
00094 python3 = True if sys.hexversion > 0x03000000 else False
00095 import genpy
00096 import struct
00097
00098 import sensor_msgs.msg
00099 import geometry_msgs.msg
00100 import articulation_msgs.msg
00101 import std_msgs.msg
00102
00103 class GetModelPriorSrvResponse(genpy.Message):
00104 _md5sum = "492b025b4d335f83e3fab65eb3211a27"
00105 _type = "articulation_msgs/GetModelPriorSrvResponse"
00106 _has_header = False
00107 _full_text = """articulation_msgs/ModelMsg[] model
00108
00109
00110 ================================================================================
00111 MSG: articulation_msgs/ModelMsg
00112 # Single kinematic model
00113 #
00114 # A kinematic model is defined by its model class name, and a set of parameters.
00115 # The client may additionally specify a model id, that can be used to colorize the
00116 # model when visualized using the RVIZ model display.
00117 #
00118 # For a list of currently implemented models, see the documetation at
00119 # http://www.ros.org/wiki/articulation_models
00120 #
00121 #
00122
00123 std_msgs/Header header # frame and timestamp
00124
00125 int32 id # user specified model id
00126 string name # name of the model family (e.g. "rotational",
00127 # "prismatic", "pca-gp", "rigid")
00128 articulation_msgs/ParamMsg[] params # model parameters
00129 articulation_msgs/TrackMsg track # trajectory from which the model is estimated, or
00130 # that is evaluated using the model
00131
00132 ================================================================================
00133 MSG: std_msgs/Header
00134 # Standard metadata for higher-level stamped data types.
00135 # This is generally used to communicate timestamped data
00136 # in a particular coordinate frame.
00137 #
00138 # sequence ID: consecutively increasing ID
00139 uint32 seq
00140 #Two-integer timestamp that is expressed as:
00141 # * stamp.secs: seconds (stamp_secs) since epoch
00142 # * stamp.nsecs: nanoseconds since stamp_secs
00143 # time-handling sugar is provided by the client library
00144 time stamp
00145 #Frame this data is associated with
00146 # 0: no frame
00147 # 1: global frame
00148 string frame_id
00149
00150 ================================================================================
00151 MSG: articulation_msgs/ParamMsg
00152 # Single parameter passed to or from model fitting
00153 #
00154 # This mechanism allows to flexibly pass parameters to
00155 # model fitting (and vice versa). Note that these parameters
00156 # are model-specific: A client may supply additional
00157 # parameters to the model estimator, and, similarly, a estimator
00158 # may add the estimated model parameters to the model message.
00159 # When the model is then evaluated, for example to make predictions
00160 # or to compute the likelihood, the model class can then use
00161 # these parameters.
00162 #
00163 # A parameter has a name, a value, and a type. The type globally
00164 # indicates whether it is a prior parameter (prior to model fitting),
00165 # or a model parameter (found during model fitting, using a maximum-
00166 # likelihood estimator), or a cached evaluation (e.g., the likelihood
00167 # or the BIC are a typical "side"-product of model estimation, and
00168 # can therefore already be cached).
00169 #
00170 # For a list of currently used parameters, see the documentation at
00171 # http://www.ros.org/wiki/articulation_models
00172 #
00173
00174 uint8 PRIOR=0 # indicates a prior model parameter
00175 # (e.g., "sigma_position")
00176 uint8 PARAM=1 # indicates a estimated model parameter
00177 # (e.g., "rot_radius", the estimated radius)
00178 uint8 EVAL=2 # indicates a cached evaluation of the model, given
00179 # the current trajectory
00180 # (e.g., "loglikelihood", the log likelihood of the
00181 # data, given the model and its parameters)
00182
00183 string name # name of the parameter
00184 float64 value # value of the parameter
00185 uint8 type # type of the parameter (PRIOR, PARAM, EVAL)
00186
00187
00188 ================================================================================
00189 MSG: articulation_msgs/TrackMsg
00190 # Single kinematic trajectory
00191 #
00192 # This message contains a kinematic trajectory. The trajectory is specified
00193 # as a vector of 6D poses. An additional flag, track_type, indicates whether
00194 # the track is valid, and whether it includes orientation. The track id
00195 # can be used for automatic coloring in the RVIZ track plugin, and can be
00196 # freely chosen by the client.
00197 #
00198 # A model is fitting only from the trajectory stored in the pose[]-vector.
00199 # Additional information may be associated to each pose using the channels
00200 # vector, with arbitrary # fields (e.g., to include applied/measured forces).
00201 #
00202 # After model evaluation,
00203 # also the associated configurations of the object are stored in the channels,
00204 # named "q[0]".."q[DOF-1]", where DOF is the number of degrees of freedom.
00205 # Model evaluation also projects the poses in the pose vector onto the model,
00206 # and stores these ideal poses in the vector pose_projected. Further, during model
00207 # evaluation, a new set of (uniform) configurations over the valid configuration
00208 # range is sampled, and the result is stored in pose_resampled.
00209 # The vector pose_flags contains additional display flags for the poses in the
00210 # pose vector, for example, whether a pose is visible and/or
00211 # the end of a trajectory segment. At the moment, this is only used by the
00212 # prior_model_learner.
00213 #
00214
00215 std_msgs/Header header # frame and timestamp
00216 int32 id # used-specified track id
00217
00218 geometry_msgs/Pose[] pose # sequence of poses, defining the observed trajectory
00219 std_msgs/Header[] pose_headers # Timestamp and frame for each pose (and pose_projected)
00220 geometry_msgs/Pose[] pose_projected # sequence of poses, projected to the model
00221 # (after model evaluation)
00222 geometry_msgs/Pose[] pose_resampled # sequence of poses, re-sampled from the model in
00223 # the valid configuration range
00224 uint32[] pose_flags # bit-wise combination of POSE_VISIBLE and POSE_END_OF_SEGMENT
00225
00226 uint32 POSE_VISIBLE=1
00227 uint32 POSE_END_OF_SEGMENT=2
00228
00229 # Each channel should have the same number of elements as pose array,
00230 # and the data in each channel should correspond 1:1 with each pose
00231 # possible channels: "width", "height", "rgb", ...
00232 sensor_msgs/ChannelFloat32[] channels
00233
00234
00235
00236 ================================================================================
00237 MSG: geometry_msgs/Pose
00238 # A representation of pose in free space, composed of postion and orientation.
00239 Point position
00240 Quaternion orientation
00241
00242 ================================================================================
00243 MSG: geometry_msgs/Point
00244 # This contains the position of a point in free space
00245 float64 x
00246 float64 y
00247 float64 z
00248
00249 ================================================================================
00250 MSG: geometry_msgs/Quaternion
00251 # This represents an orientation in free space in quaternion form.
00252
00253 float64 x
00254 float64 y
00255 float64 z
00256 float64 w
00257
00258 ================================================================================
00259 MSG: sensor_msgs/ChannelFloat32
00260 # This message is used by the PointCloud message to hold optional data
00261 # associated with each point in the cloud. The length of the values
00262 # array should be the same as the length of the points array in the
00263 # PointCloud, and each value should be associated with the corresponding
00264 # point.
00265
00266 # Channel names in existing practice include:
00267 # "u", "v" - row and column (respectively) in the left stereo image.
00268 # This is opposite to usual conventions but remains for
00269 # historical reasons. The newer PointCloud2 message has no
00270 # such problem.
00271 # "rgb" - For point clouds produced by color stereo cameras. uint8
00272 # (R,G,B) values packed into the least significant 24 bits,
00273 # in order.
00274 # "intensity" - laser or pixel intensity.
00275 # "distance"
00276
00277 # The channel name should give semantics of the channel (e.g.
00278 # "intensity" instead of "value").
00279 string name
00280
00281 # The values array should be 1-1 with the elements of the associated
00282 # PointCloud.
00283 float32[] values
00284
00285 """
00286 __slots__ = ['model']
00287 _slot_types = ['articulation_msgs/ModelMsg[]']
00288
00289 def __init__(self, *args, **kwds):
00290 """
00291 Constructor. Any message fields that are implicitly/explicitly
00292 set to None will be assigned a default value. The recommend
00293 use is keyword arguments as this is more robust to future message
00294 changes. You cannot mix in-order arguments and keyword arguments.
00295
00296 The available fields are:
00297 model
00298
00299 :param args: complete set of field values, in .msg order
00300 :param kwds: use keyword arguments corresponding to message field names
00301 to set specific fields.
00302 """
00303 if args or kwds:
00304 super(GetModelPriorSrvResponse, self).__init__(*args, **kwds)
00305 #message fields cannot be None, assign default values for those that are
00306 if self.model is None:
00307 self.model = []
00308 else:
00309 self.model = []
00310
00311 def _get_types(self):
00312 """
00313 internal API method
00314 """
00315 return self._slot_types
00316
00317 def serialize(self, buff):
00318 """
00319 serialize message into buffer
00320 :param buff: buffer, ``StringIO``
00321 """
00322 try:
00323 length = len(self.model)
00324 buff.write(_struct_I.pack(length))
00325 for val1 in self.model:
00326 _v1 = val1.header
00327 buff.write(_struct_I.pack(_v1.seq))
00328 _v2 = _v1.stamp
00329 _x = _v2
00330 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00331 _x = _v1.frame_id
00332 length = len(_x)
00333 if python3 or type(_x) == unicode:
00334 _x = _x.encode('utf-8')
00335 length = len(_x)
00336 buff.write(struct.pack('<I%ss'%length, length, _x))
00337 buff.write(_struct_i.pack(val1.id))
00338 _x = val1.name
00339 length = len(_x)
00340 if python3 or type(_x) == unicode:
00341 _x = _x.encode('utf-8')
00342 length = len(_x)
00343 buff.write(struct.pack('<I%ss'%length, length, _x))
00344 length = len(val1.params)
00345 buff.write(_struct_I.pack(length))
00346 for val2 in val1.params:
00347 _x = val2.name
00348 length = len(_x)
00349 if python3 or type(_x) == unicode:
00350 _x = _x.encode('utf-8')
00351 length = len(_x)
00352 buff.write(struct.pack('<I%ss'%length, length, _x))
00353 _x = val2
00354 buff.write(_struct_dB.pack(_x.value, _x.type))
00355 _v3 = val1.track
00356 _v4 = _v3.header
00357 buff.write(_struct_I.pack(_v4.seq))
00358 _v5 = _v4.stamp
00359 _x = _v5
00360 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00361 _x = _v4.frame_id
00362 length = len(_x)
00363 if python3 or type(_x) == unicode:
00364 _x = _x.encode('utf-8')
00365 length = len(_x)
00366 buff.write(struct.pack('<I%ss'%length, length, _x))
00367 buff.write(_struct_i.pack(_v3.id))
00368 length = len(_v3.pose)
00369 buff.write(_struct_I.pack(length))
00370 for val3 in _v3.pose:
00371 _v6 = val3.position
00372 _x = _v6
00373 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00374 _v7 = val3.orientation
00375 _x = _v7
00376 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00377 length = len(_v3.pose_headers)
00378 buff.write(_struct_I.pack(length))
00379 for val3 in _v3.pose_headers:
00380 buff.write(_struct_I.pack(val3.seq))
00381 _v8 = val3.stamp
00382 _x = _v8
00383 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00384 _x = val3.frame_id
00385 length = len(_x)
00386 if python3 or type(_x) == unicode:
00387 _x = _x.encode('utf-8')
00388 length = len(_x)
00389 buff.write(struct.pack('<I%ss'%length, length, _x))
00390 length = len(_v3.pose_projected)
00391 buff.write(_struct_I.pack(length))
00392 for val3 in _v3.pose_projected:
00393 _v9 = val3.position
00394 _x = _v9
00395 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00396 _v10 = val3.orientation
00397 _x = _v10
00398 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00399 length = len(_v3.pose_resampled)
00400 buff.write(_struct_I.pack(length))
00401 for val3 in _v3.pose_resampled:
00402 _v11 = val3.position
00403 _x = _v11
00404 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00405 _v12 = val3.orientation
00406 _x = _v12
00407 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00408 length = len(_v3.pose_flags)
00409 buff.write(_struct_I.pack(length))
00410 pattern = '<%sI'%length
00411 buff.write(struct.pack(pattern, *_v3.pose_flags))
00412 length = len(_v3.channels)
00413 buff.write(_struct_I.pack(length))
00414 for val3 in _v3.channels:
00415 _x = val3.name
00416 length = len(_x)
00417 if python3 or type(_x) == unicode:
00418 _x = _x.encode('utf-8')
00419 length = len(_x)
00420 buff.write(struct.pack('<I%ss'%length, length, _x))
00421 length = len(val3.values)
00422 buff.write(_struct_I.pack(length))
00423 pattern = '<%sf'%length
00424 buff.write(struct.pack(pattern, *val3.values))
00425 except struct.error as se: self._check_types(se)
00426 except TypeError as te: self._check_types(te)
00427
00428 def deserialize(self, str):
00429 """
00430 unpack serialized message in str into this message instance
00431 :param str: byte array of serialized message, ``str``
00432 """
00433 try:
00434 if self.model is None:
00435 self.model = None
00436 end = 0
00437 start = end
00438 end += 4
00439 (length,) = _struct_I.unpack(str[start:end])
00440 self.model = []
00441 for i in range(0, length):
00442 val1 = articulation_msgs.msg.ModelMsg()
00443 _v13 = val1.header
00444 start = end
00445 end += 4
00446 (_v13.seq,) = _struct_I.unpack(str[start:end])
00447 _v14 = _v13.stamp
00448 _x = _v14
00449 start = end
00450 end += 8
00451 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00452 start = end
00453 end += 4
00454 (length,) = _struct_I.unpack(str[start:end])
00455 start = end
00456 end += length
00457 if python3:
00458 _v13.frame_id = str[start:end].decode('utf-8')
00459 else:
00460 _v13.frame_id = str[start:end]
00461 start = end
00462 end += 4
00463 (val1.id,) = _struct_i.unpack(str[start:end])
00464 start = end
00465 end += 4
00466 (length,) = _struct_I.unpack(str[start:end])
00467 start = end
00468 end += length
00469 if python3:
00470 val1.name = str[start:end].decode('utf-8')
00471 else:
00472 val1.name = str[start:end]
00473 start = end
00474 end += 4
00475 (length,) = _struct_I.unpack(str[start:end])
00476 val1.params = []
00477 for i in range(0, length):
00478 val2 = articulation_msgs.msg.ParamMsg()
00479 start = end
00480 end += 4
00481 (length,) = _struct_I.unpack(str[start:end])
00482 start = end
00483 end += length
00484 if python3:
00485 val2.name = str[start:end].decode('utf-8')
00486 else:
00487 val2.name = str[start:end]
00488 _x = val2
00489 start = end
00490 end += 9
00491 (_x.value, _x.type,) = _struct_dB.unpack(str[start:end])
00492 val1.params.append(val2)
00493 _v15 = val1.track
00494 _v16 = _v15.header
00495 start = end
00496 end += 4
00497 (_v16.seq,) = _struct_I.unpack(str[start:end])
00498 _v17 = _v16.stamp
00499 _x = _v17
00500 start = end
00501 end += 8
00502 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00503 start = end
00504 end += 4
00505 (length,) = _struct_I.unpack(str[start:end])
00506 start = end
00507 end += length
00508 if python3:
00509 _v16.frame_id = str[start:end].decode('utf-8')
00510 else:
00511 _v16.frame_id = str[start:end]
00512 start = end
00513 end += 4
00514 (_v15.id,) = _struct_i.unpack(str[start:end])
00515 start = end
00516 end += 4
00517 (length,) = _struct_I.unpack(str[start:end])
00518 _v15.pose = []
00519 for i in range(0, length):
00520 val3 = geometry_msgs.msg.Pose()
00521 _v18 = val3.position
00522 _x = _v18
00523 start = end
00524 end += 24
00525 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00526 _v19 = val3.orientation
00527 _x = _v19
00528 start = end
00529 end += 32
00530 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00531 _v15.pose.append(val3)
00532 start = end
00533 end += 4
00534 (length,) = _struct_I.unpack(str[start:end])
00535 _v15.pose_headers = []
00536 for i in range(0, length):
00537 val3 = std_msgs.msg.Header()
00538 start = end
00539 end += 4
00540 (val3.seq,) = _struct_I.unpack(str[start:end])
00541 _v20 = val3.stamp
00542 _x = _v20
00543 start = end
00544 end += 8
00545 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00546 start = end
00547 end += 4
00548 (length,) = _struct_I.unpack(str[start:end])
00549 start = end
00550 end += length
00551 if python3:
00552 val3.frame_id = str[start:end].decode('utf-8')
00553 else:
00554 val3.frame_id = str[start:end]
00555 _v15.pose_headers.append(val3)
00556 start = end
00557 end += 4
00558 (length,) = _struct_I.unpack(str[start:end])
00559 _v15.pose_projected = []
00560 for i in range(0, length):
00561 val3 = geometry_msgs.msg.Pose()
00562 _v21 = val3.position
00563 _x = _v21
00564 start = end
00565 end += 24
00566 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00567 _v22 = val3.orientation
00568 _x = _v22
00569 start = end
00570 end += 32
00571 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00572 _v15.pose_projected.append(val3)
00573 start = end
00574 end += 4
00575 (length,) = _struct_I.unpack(str[start:end])
00576 _v15.pose_resampled = []
00577 for i in range(0, length):
00578 val3 = geometry_msgs.msg.Pose()
00579 _v23 = val3.position
00580 _x = _v23
00581 start = end
00582 end += 24
00583 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00584 _v24 = val3.orientation
00585 _x = _v24
00586 start = end
00587 end += 32
00588 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00589 _v15.pose_resampled.append(val3)
00590 start = end
00591 end += 4
00592 (length,) = _struct_I.unpack(str[start:end])
00593 pattern = '<%sI'%length
00594 start = end
00595 end += struct.calcsize(pattern)
00596 _v15.pose_flags = struct.unpack(pattern, str[start:end])
00597 start = end
00598 end += 4
00599 (length,) = _struct_I.unpack(str[start:end])
00600 _v15.channels = []
00601 for i in range(0, length):
00602 val3 = sensor_msgs.msg.ChannelFloat32()
00603 start = end
00604 end += 4
00605 (length,) = _struct_I.unpack(str[start:end])
00606 start = end
00607 end += length
00608 if python3:
00609 val3.name = str[start:end].decode('utf-8')
00610 else:
00611 val3.name = str[start:end]
00612 start = end
00613 end += 4
00614 (length,) = _struct_I.unpack(str[start:end])
00615 pattern = '<%sf'%length
00616 start = end
00617 end += struct.calcsize(pattern)
00618 val3.values = struct.unpack(pattern, str[start:end])
00619 _v15.channels.append(val3)
00620 self.model.append(val1)
00621 return self
00622 except struct.error as e:
00623 raise genpy.DeserializationError(e) #most likely buffer underfill
00624
00625
00626 def serialize_numpy(self, buff, numpy):
00627 """
00628 serialize message with numpy array types into buffer
00629 :param buff: buffer, ``StringIO``
00630 :param numpy: numpy python module
00631 """
00632 try:
00633 length = len(self.model)
00634 buff.write(_struct_I.pack(length))
00635 for val1 in self.model:
00636 _v25 = val1.header
00637 buff.write(_struct_I.pack(_v25.seq))
00638 _v26 = _v25.stamp
00639 _x = _v26
00640 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00641 _x = _v25.frame_id
00642 length = len(_x)
00643 if python3 or type(_x) == unicode:
00644 _x = _x.encode('utf-8')
00645 length = len(_x)
00646 buff.write(struct.pack('<I%ss'%length, length, _x))
00647 buff.write(_struct_i.pack(val1.id))
00648 _x = val1.name
00649 length = len(_x)
00650 if python3 or type(_x) == unicode:
00651 _x = _x.encode('utf-8')
00652 length = len(_x)
00653 buff.write(struct.pack('<I%ss'%length, length, _x))
00654 length = len(val1.params)
00655 buff.write(_struct_I.pack(length))
00656 for val2 in val1.params:
00657 _x = val2.name
00658 length = len(_x)
00659 if python3 or type(_x) == unicode:
00660 _x = _x.encode('utf-8')
00661 length = len(_x)
00662 buff.write(struct.pack('<I%ss'%length, length, _x))
00663 _x = val2
00664 buff.write(_struct_dB.pack(_x.value, _x.type))
00665 _v27 = val1.track
00666 _v28 = _v27.header
00667 buff.write(_struct_I.pack(_v28.seq))
00668 _v29 = _v28.stamp
00669 _x = _v29
00670 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00671 _x = _v28.frame_id
00672 length = len(_x)
00673 if python3 or type(_x) == unicode:
00674 _x = _x.encode('utf-8')
00675 length = len(_x)
00676 buff.write(struct.pack('<I%ss'%length, length, _x))
00677 buff.write(_struct_i.pack(_v27.id))
00678 length = len(_v27.pose)
00679 buff.write(_struct_I.pack(length))
00680 for val3 in _v27.pose:
00681 _v30 = val3.position
00682 _x = _v30
00683 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00684 _v31 = val3.orientation
00685 _x = _v31
00686 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00687 length = len(_v27.pose_headers)
00688 buff.write(_struct_I.pack(length))
00689 for val3 in _v27.pose_headers:
00690 buff.write(_struct_I.pack(val3.seq))
00691 _v32 = val3.stamp
00692 _x = _v32
00693 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00694 _x = val3.frame_id
00695 length = len(_x)
00696 if python3 or type(_x) == unicode:
00697 _x = _x.encode('utf-8')
00698 length = len(_x)
00699 buff.write(struct.pack('<I%ss'%length, length, _x))
00700 length = len(_v27.pose_projected)
00701 buff.write(_struct_I.pack(length))
00702 for val3 in _v27.pose_projected:
00703 _v33 = val3.position
00704 _x = _v33
00705 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00706 _v34 = val3.orientation
00707 _x = _v34
00708 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00709 length = len(_v27.pose_resampled)
00710 buff.write(_struct_I.pack(length))
00711 for val3 in _v27.pose_resampled:
00712 _v35 = val3.position
00713 _x = _v35
00714 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00715 _v36 = val3.orientation
00716 _x = _v36
00717 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00718 length = len(_v27.pose_flags)
00719 buff.write(_struct_I.pack(length))
00720 pattern = '<%sI'%length
00721 buff.write(_v27.pose_flags.tostring())
00722 length = len(_v27.channels)
00723 buff.write(_struct_I.pack(length))
00724 for val3 in _v27.channels:
00725 _x = val3.name
00726 length = len(_x)
00727 if python3 or type(_x) == unicode:
00728 _x = _x.encode('utf-8')
00729 length = len(_x)
00730 buff.write(struct.pack('<I%ss'%length, length, _x))
00731 length = len(val3.values)
00732 buff.write(_struct_I.pack(length))
00733 pattern = '<%sf'%length
00734 buff.write(val3.values.tostring())
00735 except struct.error as se: self._check_types(se)
00736 except TypeError as te: self._check_types(te)
00737
00738 def deserialize_numpy(self, str, numpy):
00739 """
00740 unpack serialized message in str into this message instance using numpy for array types
00741 :param str: byte array of serialized message, ``str``
00742 :param numpy: numpy python module
00743 """
00744 try:
00745 if self.model is None:
00746 self.model = None
00747 end = 0
00748 start = end
00749 end += 4
00750 (length,) = _struct_I.unpack(str[start:end])
00751 self.model = []
00752 for i in range(0, length):
00753 val1 = articulation_msgs.msg.ModelMsg()
00754 _v37 = val1.header
00755 start = end
00756 end += 4
00757 (_v37.seq,) = _struct_I.unpack(str[start:end])
00758 _v38 = _v37.stamp
00759 _x = _v38
00760 start = end
00761 end += 8
00762 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00763 start = end
00764 end += 4
00765 (length,) = _struct_I.unpack(str[start:end])
00766 start = end
00767 end += length
00768 if python3:
00769 _v37.frame_id = str[start:end].decode('utf-8')
00770 else:
00771 _v37.frame_id = str[start:end]
00772 start = end
00773 end += 4
00774 (val1.id,) = _struct_i.unpack(str[start:end])
00775 start = end
00776 end += 4
00777 (length,) = _struct_I.unpack(str[start:end])
00778 start = end
00779 end += length
00780 if python3:
00781 val1.name = str[start:end].decode('utf-8')
00782 else:
00783 val1.name = str[start:end]
00784 start = end
00785 end += 4
00786 (length,) = _struct_I.unpack(str[start:end])
00787 val1.params = []
00788 for i in range(0, length):
00789 val2 = articulation_msgs.msg.ParamMsg()
00790 start = end
00791 end += 4
00792 (length,) = _struct_I.unpack(str[start:end])
00793 start = end
00794 end += length
00795 if python3:
00796 val2.name = str[start:end].decode('utf-8')
00797 else:
00798 val2.name = str[start:end]
00799 _x = val2
00800 start = end
00801 end += 9
00802 (_x.value, _x.type,) = _struct_dB.unpack(str[start:end])
00803 val1.params.append(val2)
00804 _v39 = val1.track
00805 _v40 = _v39.header
00806 start = end
00807 end += 4
00808 (_v40.seq,) = _struct_I.unpack(str[start:end])
00809 _v41 = _v40.stamp
00810 _x = _v41
00811 start = end
00812 end += 8
00813 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00814 start = end
00815 end += 4
00816 (length,) = _struct_I.unpack(str[start:end])
00817 start = end
00818 end += length
00819 if python3:
00820 _v40.frame_id = str[start:end].decode('utf-8')
00821 else:
00822 _v40.frame_id = str[start:end]
00823 start = end
00824 end += 4
00825 (_v39.id,) = _struct_i.unpack(str[start:end])
00826 start = end
00827 end += 4
00828 (length,) = _struct_I.unpack(str[start:end])
00829 _v39.pose = []
00830 for i in range(0, length):
00831 val3 = geometry_msgs.msg.Pose()
00832 _v42 = val3.position
00833 _x = _v42
00834 start = end
00835 end += 24
00836 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00837 _v43 = val3.orientation
00838 _x = _v43
00839 start = end
00840 end += 32
00841 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00842 _v39.pose.append(val3)
00843 start = end
00844 end += 4
00845 (length,) = _struct_I.unpack(str[start:end])
00846 _v39.pose_headers = []
00847 for i in range(0, length):
00848 val3 = std_msgs.msg.Header()
00849 start = end
00850 end += 4
00851 (val3.seq,) = _struct_I.unpack(str[start:end])
00852 _v44 = val3.stamp
00853 _x = _v44
00854 start = end
00855 end += 8
00856 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00857 start = end
00858 end += 4
00859 (length,) = _struct_I.unpack(str[start:end])
00860 start = end
00861 end += length
00862 if python3:
00863 val3.frame_id = str[start:end].decode('utf-8')
00864 else:
00865 val3.frame_id = str[start:end]
00866 _v39.pose_headers.append(val3)
00867 start = end
00868 end += 4
00869 (length,) = _struct_I.unpack(str[start:end])
00870 _v39.pose_projected = []
00871 for i in range(0, length):
00872 val3 = geometry_msgs.msg.Pose()
00873 _v45 = val3.position
00874 _x = _v45
00875 start = end
00876 end += 24
00877 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00878 _v46 = val3.orientation
00879 _x = _v46
00880 start = end
00881 end += 32
00882 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00883 _v39.pose_projected.append(val3)
00884 start = end
00885 end += 4
00886 (length,) = _struct_I.unpack(str[start:end])
00887 _v39.pose_resampled = []
00888 for i in range(0, length):
00889 val3 = geometry_msgs.msg.Pose()
00890 _v47 = val3.position
00891 _x = _v47
00892 start = end
00893 end += 24
00894 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00895 _v48 = val3.orientation
00896 _x = _v48
00897 start = end
00898 end += 32
00899 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00900 _v39.pose_resampled.append(val3)
00901 start = end
00902 end += 4
00903 (length,) = _struct_I.unpack(str[start:end])
00904 pattern = '<%sI'%length
00905 start = end
00906 end += struct.calcsize(pattern)
00907 _v39.pose_flags = numpy.frombuffer(str[start:end], dtype=numpy.uint32, count=length)
00908 start = end
00909 end += 4
00910 (length,) = _struct_I.unpack(str[start:end])
00911 _v39.channels = []
00912 for i in range(0, length):
00913 val3 = sensor_msgs.msg.ChannelFloat32()
00914 start = end
00915 end += 4
00916 (length,) = _struct_I.unpack(str[start:end])
00917 start = end
00918 end += length
00919 if python3:
00920 val3.name = str[start:end].decode('utf-8')
00921 else:
00922 val3.name = str[start:end]
00923 start = end
00924 end += 4
00925 (length,) = _struct_I.unpack(str[start:end])
00926 pattern = '<%sf'%length
00927 start = end
00928 end += struct.calcsize(pattern)
00929 val3.values = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=length)
00930 _v39.channels.append(val3)
00931 self.model.append(val1)
00932 return self
00933 except struct.error as e:
00934 raise genpy.DeserializationError(e) #most likely buffer underfill
00935
00936 _struct_I = genpy.struct_I
00937 _struct_dB = struct.Struct("<dB")
00938 _struct_i = struct.Struct("<i")
00939 _struct_4d = struct.Struct("<4d")
00940 _struct_2I = struct.Struct("<2I")
00941 _struct_3d = struct.Struct("<3d")
00942 class GetModelPriorSrv(object):
00943 _type = 'articulation_msgs/GetModelPriorSrv'
00944 _md5sum = '492b025b4d335f83e3fab65eb3211a27'
00945 _request_class = GetModelPriorSrvRequest
00946 _response_class = GetModelPriorSrvResponse