_GetData.py
Go to the documentation of this file.
00001 """autogenerated by genpy from srs_object_database_msgs/GetDataRequest.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 GetDataRequest(genpy.Message):
00009   _md5sum = "e322fea33bcf470d266fe9ce0878bcf2"
00010   _type = "srs_object_database_msgs/GetDataRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """
00013 
00014 
00015 
00016 
00017 
00018 int32[] model_ids
00019 string description
00020 
00021 
00022 
00023 bool mesh
00024 bool pcl
00025 bool surf
00026 bool image
00027 bool grasp
00028 bool urdf
00029 
00030 
00031 
00032 """
00033   __slots__ = ['model_ids','description','mesh','pcl','surf','image','grasp','urdf']
00034   _slot_types = ['int32[]','string','bool','bool','bool','bool','bool','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        model_ids,description,mesh,pcl,surf,image,grasp,urdf
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(GetDataRequest, self).__init__(*args, **kwds)
00052       #message fields cannot be None, assign default values for those that are
00053       if self.model_ids is None:
00054         self.model_ids = []
00055       if self.description is None:
00056         self.description = ''
00057       if self.mesh is None:
00058         self.mesh = False
00059       if self.pcl is None:
00060         self.pcl = False
00061       if self.surf is None:
00062         self.surf = False
00063       if self.image is None:
00064         self.image = False
00065       if self.grasp is None:
00066         self.grasp = False
00067       if self.urdf is None:
00068         self.urdf = False
00069     else:
00070       self.model_ids = []
00071       self.description = ''
00072       self.mesh = False
00073       self.pcl = False
00074       self.surf = False
00075       self.image = False
00076       self.grasp = False
00077       self.urdf = False
00078 
00079   def _get_types(self):
00080     """
00081     internal API method
00082     """
00083     return self._slot_types
00084 
00085   def serialize(self, buff):
00086     """
00087     serialize message into buffer
00088     :param buff: buffer, ``StringIO``
00089     """
00090     try:
00091       length = len(self.model_ids)
00092       buff.write(_struct_I.pack(length))
00093       pattern = '<%si'%length
00094       buff.write(struct.pack(pattern, *self.model_ids))
00095       _x = self.description
00096       length = len(_x)
00097       if python3 or type(_x) == unicode:
00098         _x = _x.encode('utf-8')
00099         length = len(_x)
00100       buff.write(struct.pack('<I%ss'%length, length, _x))
00101       _x = self
00102       buff.write(_struct_6B.pack(_x.mesh, _x.pcl, _x.surf, _x.image, _x.grasp, _x.urdf))
00103     except struct.error as se: self._check_types(se)
00104     except TypeError as te: self._check_types(te)
00105 
00106   def deserialize(self, str):
00107     """
00108     unpack serialized message in str into this message instance
00109     :param str: byte array of serialized message, ``str``
00110     """
00111     try:
00112       end = 0
00113       start = end
00114       end += 4
00115       (length,) = _struct_I.unpack(str[start:end])
00116       pattern = '<%si'%length
00117       start = end
00118       end += struct.calcsize(pattern)
00119       self.model_ids = struct.unpack(pattern, str[start:end])
00120       start = end
00121       end += 4
00122       (length,) = _struct_I.unpack(str[start:end])
00123       start = end
00124       end += length
00125       if python3:
00126         self.description = str[start:end].decode('utf-8')
00127       else:
00128         self.description = str[start:end]
00129       _x = self
00130       start = end
00131       end += 6
00132       (_x.mesh, _x.pcl, _x.surf, _x.image, _x.grasp, _x.urdf,) = _struct_6B.unpack(str[start:end])
00133       self.mesh = bool(self.mesh)
00134       self.pcl = bool(self.pcl)
00135       self.surf = bool(self.surf)
00136       self.image = bool(self.image)
00137       self.grasp = bool(self.grasp)
00138       self.urdf = bool(self.urdf)
00139       return self
00140     except struct.error as e:
00141       raise genpy.DeserializationError(e) #most likely buffer underfill
00142 
00143 
00144   def serialize_numpy(self, buff, numpy):
00145     """
00146     serialize message with numpy array types into buffer
00147     :param buff: buffer, ``StringIO``
00148     :param numpy: numpy python module
00149     """
00150     try:
00151       length = len(self.model_ids)
00152       buff.write(_struct_I.pack(length))
00153       pattern = '<%si'%length
00154       buff.write(self.model_ids.tostring())
00155       _x = self.description
00156       length = len(_x)
00157       if python3 or type(_x) == unicode:
00158         _x = _x.encode('utf-8')
00159         length = len(_x)
00160       buff.write(struct.pack('<I%ss'%length, length, _x))
00161       _x = self
00162       buff.write(_struct_6B.pack(_x.mesh, _x.pcl, _x.surf, _x.image, _x.grasp, _x.urdf))
00163     except struct.error as se: self._check_types(se)
00164     except TypeError as te: self._check_types(te)
00165 
00166   def deserialize_numpy(self, str, numpy):
00167     """
00168     unpack serialized message in str into this message instance using numpy for array types
00169     :param str: byte array of serialized message, ``str``
00170     :param numpy: numpy python module
00171     """
00172     try:
00173       end = 0
00174       start = end
00175       end += 4
00176       (length,) = _struct_I.unpack(str[start:end])
00177       pattern = '<%si'%length
00178       start = end
00179       end += struct.calcsize(pattern)
00180       self.model_ids = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length)
00181       start = end
00182       end += 4
00183       (length,) = _struct_I.unpack(str[start:end])
00184       start = end
00185       end += length
00186       if python3:
00187         self.description = str[start:end].decode('utf-8')
00188       else:
00189         self.description = str[start:end]
00190       _x = self
00191       start = end
00192       end += 6
00193       (_x.mesh, _x.pcl, _x.surf, _x.image, _x.grasp, _x.urdf,) = _struct_6B.unpack(str[start:end])
00194       self.mesh = bool(self.mesh)
00195       self.pcl = bool(self.pcl)
00196       self.surf = bool(self.surf)
00197       self.image = bool(self.image)
00198       self.grasp = bool(self.grasp)
00199       self.urdf = bool(self.urdf)
00200       return self
00201     except struct.error as e:
00202       raise genpy.DeserializationError(e) #most likely buffer underfill
00203 
00204 _struct_I = genpy.struct_I
00205 _struct_6B = struct.Struct("<6B")
00206 """autogenerated by genpy from srs_object_database_msgs/GetDataResponse.msg. Do not edit."""
00207 import sys
00208 python3 = True if sys.hexversion > 0x03000000 else False
00209 import genpy
00210 import struct
00211 
00212 import arm_navigation_msgs.msg
00213 import visualization_msgs.msg
00214 import geometry_msgs.msg
00215 import sensor_msgs.msg
00216 import srs_object_database_msgs.msg
00217 import genpy
00218 import std_msgs.msg
00219 
00220 class GetDataResponse(genpy.Message):
00221   _md5sum = "8c029ab6bbdfbdc8ed9c7e395d73a54f"
00222   _type = "srs_object_database_msgs/GetDataResponse"
00223   _has_header = False #flag to mark the presence of a Header object
00224   _full_text = """
00225 
00226 string return_response
00227 
00228 srs_object_database_msgs/img[] img
00229 srs_object_database_msgs/mesh[] mesh
00230 srs_object_database_msgs/pcl[] pcl
00231 srs_object_database_msgs/surf[] surf
00232 srs_object_database_msgs/grasp[] grasp
00233 srs_object_database_msgs/urdf[] urdf
00234 
00235 
00236 ================================================================================
00237 MSG: srs_object_database_msgs/img
00238 int32 objectId
00239 string description
00240 sensor_msgs/Image image
00241 ================================================================================
00242 MSG: sensor_msgs/Image
00243 # This message contains an uncompressed image
00244 # (0, 0) is at top-left corner of image
00245 #
00246 
00247 Header header        # Header timestamp should be acquisition time of image
00248                      # Header frame_id should be optical frame of camera
00249                      # origin of frame should be optical center of cameara
00250                      # +x should point to the right in the image
00251                      # +y should point down in the image
00252                      # +z should point into to plane of the image
00253                      # If the frame_id here and the frame_id of the CameraInfo
00254                      # message associated with the image conflict
00255                      # the behavior is undefined
00256 
00257 uint32 height         # image height, that is, number of rows
00258 uint32 width          # image width, that is, number of columns
00259 
00260 # The legal values for encoding are in file src/image_encodings.cpp
00261 # If you want to standardize a new string format, join
00262 # ros-users@lists.sourceforge.net and send an email proposing a new encoding.
00263 
00264 string encoding       # Encoding of pixels -- channel meaning, ordering, size
00265                       # taken from the list of strings in include/sensor_msgs/image_encodings.h
00266 
00267 uint8 is_bigendian    # is this data bigendian?
00268 uint32 step           # Full row length in bytes
00269 uint8[] data          # actual matrix data, size is (step * rows)
00270 
00271 ================================================================================
00272 MSG: std_msgs/Header
00273 # Standard metadata for higher-level stamped data types.
00274 # This is generally used to communicate timestamped data 
00275 # in a particular coordinate frame.
00276 # 
00277 # sequence ID: consecutively increasing ID 
00278 uint32 seq
00279 #Two-integer timestamp that is expressed as:
00280 # * stamp.secs: seconds (stamp_secs) since epoch
00281 # * stamp.nsecs: nanoseconds since stamp_secs
00282 # time-handling sugar is provided by the client library
00283 time stamp
00284 #Frame this data is associated with
00285 # 0: no frame
00286 # 1: global frame
00287 string frame_id
00288 
00289 ================================================================================
00290 MSG: srs_object_database_msgs/mesh
00291 int32 objectId
00292 arm_navigation_msgs/Shape mesh
00293 string type
00294 uint8[] data
00295 ================================================================================
00296 MSG: arm_navigation_msgs/Shape
00297 byte SPHERE=0
00298 byte BOX=1
00299 byte CYLINDER=2
00300 byte MESH=3
00301 
00302 byte type
00303 
00304 
00305 #### define sphere, box, cylinder ####
00306 # the origin of each shape is considered at the shape's center
00307 
00308 # for sphere
00309 # radius := dimensions[0]
00310 
00311 # for cylinder
00312 # radius := dimensions[0]
00313 # length := dimensions[1]
00314 # the length is along the Z axis
00315 
00316 # for box
00317 # size_x := dimensions[0]
00318 # size_y := dimensions[1]
00319 # size_z := dimensions[2]
00320 float64[] dimensions
00321 
00322 
00323 #### define mesh ####
00324 
00325 # list of triangles; triangle k is defined by tre vertices located
00326 # at indices triangles[3k], triangles[3k+1], triangles[3k+2]
00327 int32[] triangles
00328 geometry_msgs/Point[] vertices
00329 
00330 ================================================================================
00331 MSG: geometry_msgs/Point
00332 # This contains the position of a point in free space
00333 float64 x
00334 float64 y
00335 float64 z
00336 
00337 ================================================================================
00338 MSG: srs_object_database_msgs/pcl
00339 int32 objectId
00340 sensor_msgs/PointCloud2 pcl
00341 
00342 ================================================================================
00343 MSG: sensor_msgs/PointCloud2
00344 # This message holds a collection of N-dimensional points, which may
00345 # contain additional information such as normals, intensity, etc. The
00346 # point data is stored as a binary blob, its layout described by the
00347 # contents of the "fields" array.
00348 
00349 # The point cloud data may be organized 2d (image-like) or 1d
00350 # (unordered). Point clouds organized as 2d images may be produced by
00351 # camera depth sensors such as stereo or time-of-flight.
00352 
00353 # Time of sensor data acquisition, and the coordinate frame ID (for 3d
00354 # points).
00355 Header header
00356 
00357 # 2D structure of the point cloud. If the cloud is unordered, height is
00358 # 1 and width is the length of the point cloud.
00359 uint32 height
00360 uint32 width
00361 
00362 # Describes the channels and their layout in the binary data blob.
00363 PointField[] fields
00364 
00365 bool    is_bigendian # Is this data bigendian?
00366 uint32  point_step   # Length of a point in bytes
00367 uint32  row_step     # Length of a row in bytes
00368 uint8[] data         # Actual point data, size is (row_step*height)
00369 
00370 bool is_dense        # True if there are no invalid points
00371 
00372 ================================================================================
00373 MSG: sensor_msgs/PointField
00374 # This message holds the description of one point entry in the
00375 # PointCloud2 message format.
00376 uint8 INT8    = 1
00377 uint8 UINT8   = 2
00378 uint8 INT16   = 3
00379 uint8 UINT16  = 4
00380 uint8 INT32   = 5
00381 uint8 UINT32  = 6
00382 uint8 FLOAT32 = 7
00383 uint8 FLOAT64 = 8
00384 
00385 string name      # Name of field
00386 uint32 offset    # Offset from start of point struct
00387 uint8  datatype  # Datatype enumeration, see above
00388 uint32 count     # How many elements in the field
00389 
00390 ================================================================================
00391 MSG: srs_object_database_msgs/surf
00392 int32 objectId
00393 sensor_msgs/PointCloud2 surf
00394 sensor_msgs/PointCloud2 bounding_box
00395 geometry_msgs/Pose coord_frame
00396 
00397 ================================================================================
00398 MSG: geometry_msgs/Pose
00399 # A representation of pose in free space, composed of postion and orientation. 
00400 Point position
00401 Quaternion orientation
00402 
00403 ================================================================================
00404 MSG: geometry_msgs/Quaternion
00405 # This represents an orientation in free space in quaternion form.
00406 
00407 float64 x
00408 float64 y
00409 float64 z
00410 float64 w
00411 
00412 ================================================================================
00413 MSG: srs_object_database_msgs/grasp
00414 int32 objectId
00415 string Objecttype
00416 string pose
00417 string fileDescription
00418 uint8[] bs
00419 int32 size
00420 
00421 ================================================================================
00422 MSG: srs_object_database_msgs/urdf
00423 int32 objectId
00424 visualization_msgs/Marker[] markers
00425 ================================================================================
00426 MSG: visualization_msgs/Marker
00427 # See http://www.ros.org/wiki/rviz/DisplayTypes/Marker and http://www.ros.org/wiki/rviz/Tutorials/Markers%3A%20Basic%20Shapes for more information on using this message with rviz
00428 
00429 uint8 ARROW=0
00430 uint8 CUBE=1
00431 uint8 SPHERE=2
00432 uint8 CYLINDER=3
00433 uint8 LINE_STRIP=4
00434 uint8 LINE_LIST=5
00435 uint8 CUBE_LIST=6
00436 uint8 SPHERE_LIST=7
00437 uint8 POINTS=8
00438 uint8 TEXT_VIEW_FACING=9
00439 uint8 MESH_RESOURCE=10
00440 uint8 TRIANGLE_LIST=11
00441 
00442 uint8 ADD=0
00443 uint8 MODIFY=0
00444 uint8 DELETE=2
00445 
00446 Header header                        # header for time/frame information
00447 string ns                            # Namespace to place this object in... used in conjunction with id to create a unique name for the object
00448 int32 id                                         # object ID useful in conjunction with the namespace for manipulating and deleting the object later
00449 int32 type                                     # Type of object
00450 int32 action                           # 0 add/modify an object, 1 (deprecated), 2 deletes an object
00451 geometry_msgs/Pose pose                 # Pose of the object
00452 geometry_msgs/Vector3 scale             # Scale of the object 1,1,1 means default (usually 1 meter square)
00453 std_msgs/ColorRGBA color             # Color [0.0-1.0]
00454 duration lifetime                    # How long the object should last before being automatically deleted.  0 means forever
00455 bool frame_locked                    # If this marker should be frame-locked, i.e. retransformed into its frame every timestep
00456 
00457 #Only used if the type specified has some use for them (eg. POINTS, LINE_STRIP, ...)
00458 geometry_msgs/Point[] points
00459 #Only used if the type specified has some use for them (eg. POINTS, LINE_STRIP, ...)
00460 #number of colors must either be 0 or equal to the number of points
00461 #NOTE: alpha is not yet used
00462 std_msgs/ColorRGBA[] colors
00463 
00464 # NOTE: only used for text markers
00465 string text
00466 
00467 # NOTE: only used for MESH_RESOURCE markers
00468 string mesh_resource
00469 bool mesh_use_embedded_materials
00470 
00471 ================================================================================
00472 MSG: geometry_msgs/Vector3
00473 # This represents a vector in free space. 
00474 
00475 float64 x
00476 float64 y
00477 float64 z
00478 ================================================================================
00479 MSG: std_msgs/ColorRGBA
00480 float32 r
00481 float32 g
00482 float32 b
00483 float32 a
00484 
00485 """
00486   __slots__ = ['return_response','img','mesh','pcl','surf','grasp','urdf']
00487   _slot_types = ['string','srs_object_database_msgs/img[]','srs_object_database_msgs/mesh[]','srs_object_database_msgs/pcl[]','srs_object_database_msgs/surf[]','srs_object_database_msgs/grasp[]','srs_object_database_msgs/urdf[]']
00488 
00489   def __init__(self, *args, **kwds):
00490     """
00491     Constructor. Any message fields that are implicitly/explicitly
00492     set to None will be assigned a default value. The recommend
00493     use is keyword arguments as this is more robust to future message
00494     changes.  You cannot mix in-order arguments and keyword arguments.
00495 
00496     The available fields are:
00497        return_response,img,mesh,pcl,surf,grasp,urdf
00498 
00499     :param args: complete set of field values, in .msg order
00500     :param kwds: use keyword arguments corresponding to message field names
00501     to set specific fields.
00502     """
00503     if args or kwds:
00504       super(GetDataResponse, self).__init__(*args, **kwds)
00505       #message fields cannot be None, assign default values for those that are
00506       if self.return_response is None:
00507         self.return_response = ''
00508       if self.img is None:
00509         self.img = []
00510       if self.mesh is None:
00511         self.mesh = []
00512       if self.pcl is None:
00513         self.pcl = []
00514       if self.surf is None:
00515         self.surf = []
00516       if self.grasp is None:
00517         self.grasp = []
00518       if self.urdf is None:
00519         self.urdf = []
00520     else:
00521       self.return_response = ''
00522       self.img = []
00523       self.mesh = []
00524       self.pcl = []
00525       self.surf = []
00526       self.grasp = []
00527       self.urdf = []
00528 
00529   def _get_types(self):
00530     """
00531     internal API method
00532     """
00533     return self._slot_types
00534 
00535   def serialize(self, buff):
00536     """
00537     serialize message into buffer
00538     :param buff: buffer, ``StringIO``
00539     """
00540     try:
00541       _x = self.return_response
00542       length = len(_x)
00543       if python3 or type(_x) == unicode:
00544         _x = _x.encode('utf-8')
00545         length = len(_x)
00546       buff.write(struct.pack('<I%ss'%length, length, _x))
00547       length = len(self.img)
00548       buff.write(_struct_I.pack(length))
00549       for val1 in self.img:
00550         buff.write(_struct_i.pack(val1.objectId))
00551         _x = val1.description
00552         length = len(_x)
00553         if python3 or type(_x) == unicode:
00554           _x = _x.encode('utf-8')
00555           length = len(_x)
00556         buff.write(struct.pack('<I%ss'%length, length, _x))
00557         _v1 = val1.image
00558         _v2 = _v1.header
00559         buff.write(_struct_I.pack(_v2.seq))
00560         _v3 = _v2.stamp
00561         _x = _v3
00562         buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00563         _x = _v2.frame_id
00564         length = len(_x)
00565         if python3 or type(_x) == unicode:
00566           _x = _x.encode('utf-8')
00567           length = len(_x)
00568         buff.write(struct.pack('<I%ss'%length, length, _x))
00569         _x = _v1
00570         buff.write(_struct_2I.pack(_x.height, _x.width))
00571         _x = _v1.encoding
00572         length = len(_x)
00573         if python3 or type(_x) == unicode:
00574           _x = _x.encode('utf-8')
00575           length = len(_x)
00576         buff.write(struct.pack('<I%ss'%length, length, _x))
00577         _x = _v1
00578         buff.write(_struct_BI.pack(_x.is_bigendian, _x.step))
00579         _x = _v1.data
00580         length = len(_x)
00581         # - if encoded as a list instead, serialize as bytes instead of string
00582         if type(_x) in [list, tuple]:
00583           buff.write(struct.pack('<I%sB'%length, length, *_x))
00584         else:
00585           buff.write(struct.pack('<I%ss'%length, length, _x))
00586       length = len(self.mesh)
00587       buff.write(_struct_I.pack(length))
00588       for val1 in self.mesh:
00589         buff.write(_struct_i.pack(val1.objectId))
00590         _v4 = val1.mesh
00591         buff.write(_struct_b.pack(_v4.type))
00592         length = len(_v4.dimensions)
00593         buff.write(_struct_I.pack(length))
00594         pattern = '<%sd'%length
00595         buff.write(struct.pack(pattern, *_v4.dimensions))
00596         length = len(_v4.triangles)
00597         buff.write(_struct_I.pack(length))
00598         pattern = '<%si'%length
00599         buff.write(struct.pack(pattern, *_v4.triangles))
00600         length = len(_v4.vertices)
00601         buff.write(_struct_I.pack(length))
00602         for val3 in _v4.vertices:
00603           _x = val3
00604           buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00605         _x = val1.type
00606         length = len(_x)
00607         if python3 or type(_x) == unicode:
00608           _x = _x.encode('utf-8')
00609           length = len(_x)
00610         buff.write(struct.pack('<I%ss'%length, length, _x))
00611         _x = val1.data
00612         length = len(_x)
00613         # - if encoded as a list instead, serialize as bytes instead of string
00614         if type(_x) in [list, tuple]:
00615           buff.write(struct.pack('<I%sB'%length, length, *_x))
00616         else:
00617           buff.write(struct.pack('<I%ss'%length, length, _x))
00618       length = len(self.pcl)
00619       buff.write(_struct_I.pack(length))
00620       for val1 in self.pcl:
00621         buff.write(_struct_i.pack(val1.objectId))
00622         _v5 = val1.pcl
00623         _v6 = _v5.header
00624         buff.write(_struct_I.pack(_v6.seq))
00625         _v7 = _v6.stamp
00626         _x = _v7
00627         buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00628         _x = _v6.frame_id
00629         length = len(_x)
00630         if python3 or type(_x) == unicode:
00631           _x = _x.encode('utf-8')
00632           length = len(_x)
00633         buff.write(struct.pack('<I%ss'%length, length, _x))
00634         _x = _v5
00635         buff.write(_struct_2I.pack(_x.height, _x.width))
00636         length = len(_v5.fields)
00637         buff.write(_struct_I.pack(length))
00638         for val3 in _v5.fields:
00639           _x = val3.name
00640           length = len(_x)
00641           if python3 or type(_x) == unicode:
00642             _x = _x.encode('utf-8')
00643             length = len(_x)
00644           buff.write(struct.pack('<I%ss'%length, length, _x))
00645           _x = val3
00646           buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00647         _x = _v5
00648         buff.write(_struct_B2I.pack(_x.is_bigendian, _x.point_step, _x.row_step))
00649         _x = _v5.data
00650         length = len(_x)
00651         # - if encoded as a list instead, serialize as bytes instead of string
00652         if type(_x) in [list, tuple]:
00653           buff.write(struct.pack('<I%sB'%length, length, *_x))
00654         else:
00655           buff.write(struct.pack('<I%ss'%length, length, _x))
00656         buff.write(_struct_B.pack(_v5.is_dense))
00657       length = len(self.surf)
00658       buff.write(_struct_I.pack(length))
00659       for val1 in self.surf:
00660         buff.write(_struct_i.pack(val1.objectId))
00661         _v8 = val1.surf
00662         _v9 = _v8.header
00663         buff.write(_struct_I.pack(_v9.seq))
00664         _v10 = _v9.stamp
00665         _x = _v10
00666         buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00667         _x = _v9.frame_id
00668         length = len(_x)
00669         if python3 or type(_x) == unicode:
00670           _x = _x.encode('utf-8')
00671           length = len(_x)
00672         buff.write(struct.pack('<I%ss'%length, length, _x))
00673         _x = _v8
00674         buff.write(_struct_2I.pack(_x.height, _x.width))
00675         length = len(_v8.fields)
00676         buff.write(_struct_I.pack(length))
00677         for val3 in _v8.fields:
00678           _x = val3.name
00679           length = len(_x)
00680           if python3 or type(_x) == unicode:
00681             _x = _x.encode('utf-8')
00682             length = len(_x)
00683           buff.write(struct.pack('<I%ss'%length, length, _x))
00684           _x = val3
00685           buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00686         _x = _v8
00687         buff.write(_struct_B2I.pack(_x.is_bigendian, _x.point_step, _x.row_step))
00688         _x = _v8.data
00689         length = len(_x)
00690         # - if encoded as a list instead, serialize as bytes instead of string
00691         if type(_x) in [list, tuple]:
00692           buff.write(struct.pack('<I%sB'%length, length, *_x))
00693         else:
00694           buff.write(struct.pack('<I%ss'%length, length, _x))
00695         buff.write(_struct_B.pack(_v8.is_dense))
00696         _v11 = val1.bounding_box
00697         _v12 = _v11.header
00698         buff.write(_struct_I.pack(_v12.seq))
00699         _v13 = _v12.stamp
00700         _x = _v13
00701         buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00702         _x = _v12.frame_id
00703         length = len(_x)
00704         if python3 or type(_x) == unicode:
00705           _x = _x.encode('utf-8')
00706           length = len(_x)
00707         buff.write(struct.pack('<I%ss'%length, length, _x))
00708         _x = _v11
00709         buff.write(_struct_2I.pack(_x.height, _x.width))
00710         length = len(_v11.fields)
00711         buff.write(_struct_I.pack(length))
00712         for val3 in _v11.fields:
00713           _x = val3.name
00714           length = len(_x)
00715           if python3 or type(_x) == unicode:
00716             _x = _x.encode('utf-8')
00717             length = len(_x)
00718           buff.write(struct.pack('<I%ss'%length, length, _x))
00719           _x = val3
00720           buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00721         _x = _v11
00722         buff.write(_struct_B2I.pack(_x.is_bigendian, _x.point_step, _x.row_step))
00723         _x = _v11.data
00724         length = len(_x)
00725         # - if encoded as a list instead, serialize as bytes instead of string
00726         if type(_x) in [list, tuple]:
00727           buff.write(struct.pack('<I%sB'%length, length, *_x))
00728         else:
00729           buff.write(struct.pack('<I%ss'%length, length, _x))
00730         buff.write(_struct_B.pack(_v11.is_dense))
00731         _v14 = val1.coord_frame
00732         _v15 = _v14.position
00733         _x = _v15
00734         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00735         _v16 = _v14.orientation
00736         _x = _v16
00737         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00738       length = len(self.grasp)
00739       buff.write(_struct_I.pack(length))
00740       for val1 in self.grasp:
00741         buff.write(_struct_i.pack(val1.objectId))
00742         _x = val1.Objecttype
00743         length = len(_x)
00744         if python3 or type(_x) == unicode:
00745           _x = _x.encode('utf-8')
00746           length = len(_x)
00747         buff.write(struct.pack('<I%ss'%length, length, _x))
00748         _x = val1.pose
00749         length = len(_x)
00750         if python3 or type(_x) == unicode:
00751           _x = _x.encode('utf-8')
00752           length = len(_x)
00753         buff.write(struct.pack('<I%ss'%length, length, _x))
00754         _x = val1.fileDescription
00755         length = len(_x)
00756         if python3 or type(_x) == unicode:
00757           _x = _x.encode('utf-8')
00758           length = len(_x)
00759         buff.write(struct.pack('<I%ss'%length, length, _x))
00760         _x = val1.bs
00761         length = len(_x)
00762         # - if encoded as a list instead, serialize as bytes instead of string
00763         if type(_x) in [list, tuple]:
00764           buff.write(struct.pack('<I%sB'%length, length, *_x))
00765         else:
00766           buff.write(struct.pack('<I%ss'%length, length, _x))
00767         buff.write(_struct_i.pack(val1.size))
00768       length = len(self.urdf)
00769       buff.write(_struct_I.pack(length))
00770       for val1 in self.urdf:
00771         buff.write(_struct_i.pack(val1.objectId))
00772         length = len(val1.markers)
00773         buff.write(_struct_I.pack(length))
00774         for val2 in val1.markers:
00775           _v17 = val2.header
00776           buff.write(_struct_I.pack(_v17.seq))
00777           _v18 = _v17.stamp
00778           _x = _v18
00779           buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00780           _x = _v17.frame_id
00781           length = len(_x)
00782           if python3 or type(_x) == unicode:
00783             _x = _x.encode('utf-8')
00784             length = len(_x)
00785           buff.write(struct.pack('<I%ss'%length, length, _x))
00786           _x = val2.ns
00787           length = len(_x)
00788           if python3 or type(_x) == unicode:
00789             _x = _x.encode('utf-8')
00790             length = len(_x)
00791           buff.write(struct.pack('<I%ss'%length, length, _x))
00792           _x = val2
00793           buff.write(_struct_3i.pack(_x.id, _x.type, _x.action))
00794           _v19 = val2.pose
00795           _v20 = _v19.position
00796           _x = _v20
00797           buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00798           _v21 = _v19.orientation
00799           _x = _v21
00800           buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00801           _v22 = val2.scale
00802           _x = _v22
00803           buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00804           _v23 = val2.color
00805           _x = _v23
00806           buff.write(_struct_4f.pack(_x.r, _x.g, _x.b, _x.a))
00807           _v24 = val2.lifetime
00808           _x = _v24
00809           buff.write(_struct_2i.pack(_x.secs, _x.nsecs))
00810           buff.write(_struct_B.pack(val2.frame_locked))
00811           length = len(val2.points)
00812           buff.write(_struct_I.pack(length))
00813           for val3 in val2.points:
00814             _x = val3
00815             buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00816           length = len(val2.colors)
00817           buff.write(_struct_I.pack(length))
00818           for val3 in val2.colors:
00819             _x = val3
00820             buff.write(_struct_4f.pack(_x.r, _x.g, _x.b, _x.a))
00821           _x = val2.text
00822           length = len(_x)
00823           if python3 or type(_x) == unicode:
00824             _x = _x.encode('utf-8')
00825             length = len(_x)
00826           buff.write(struct.pack('<I%ss'%length, length, _x))
00827           _x = val2.mesh_resource
00828           length = len(_x)
00829           if python3 or type(_x) == unicode:
00830             _x = _x.encode('utf-8')
00831             length = len(_x)
00832           buff.write(struct.pack('<I%ss'%length, length, _x))
00833           buff.write(_struct_B.pack(val2.mesh_use_embedded_materials))
00834     except struct.error as se: self._check_types(se)
00835     except TypeError as te: self._check_types(te)
00836 
00837   def deserialize(self, str):
00838     """
00839     unpack serialized message in str into this message instance
00840     :param str: byte array of serialized message, ``str``
00841     """
00842     try:
00843       if self.img is None:
00844         self.img = None
00845       if self.mesh is None:
00846         self.mesh = None
00847       if self.pcl is None:
00848         self.pcl = None
00849       if self.surf is None:
00850         self.surf = None
00851       if self.grasp is None:
00852         self.grasp = None
00853       if self.urdf is None:
00854         self.urdf = None
00855       end = 0
00856       start = end
00857       end += 4
00858       (length,) = _struct_I.unpack(str[start:end])
00859       start = end
00860       end += length
00861       if python3:
00862         self.return_response = str[start:end].decode('utf-8')
00863       else:
00864         self.return_response = str[start:end]
00865       start = end
00866       end += 4
00867       (length,) = _struct_I.unpack(str[start:end])
00868       self.img = []
00869       for i in range(0, length):
00870         val1 = srs_object_database_msgs.msg.img()
00871         start = end
00872         end += 4
00873         (val1.objectId,) = _struct_i.unpack(str[start:end])
00874         start = end
00875         end += 4
00876         (length,) = _struct_I.unpack(str[start:end])
00877         start = end
00878         end += length
00879         if python3:
00880           val1.description = str[start:end].decode('utf-8')
00881         else:
00882           val1.description = str[start:end]
00883         _v25 = val1.image
00884         _v26 = _v25.header
00885         start = end
00886         end += 4
00887         (_v26.seq,) = _struct_I.unpack(str[start:end])
00888         _v27 = _v26.stamp
00889         _x = _v27
00890         start = end
00891         end += 8
00892         (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00893         start = end
00894         end += 4
00895         (length,) = _struct_I.unpack(str[start:end])
00896         start = end
00897         end += length
00898         if python3:
00899           _v26.frame_id = str[start:end].decode('utf-8')
00900         else:
00901           _v26.frame_id = str[start:end]
00902         _x = _v25
00903         start = end
00904         end += 8
00905         (_x.height, _x.width,) = _struct_2I.unpack(str[start:end])
00906         start = end
00907         end += 4
00908         (length,) = _struct_I.unpack(str[start:end])
00909         start = end
00910         end += length
00911         if python3:
00912           _v25.encoding = str[start:end].decode('utf-8')
00913         else:
00914           _v25.encoding = str[start:end]
00915         _x = _v25
00916         start = end
00917         end += 5
00918         (_x.is_bigendian, _x.step,) = _struct_BI.unpack(str[start:end])
00919         start = end
00920         end += 4
00921         (length,) = _struct_I.unpack(str[start:end])
00922         start = end
00923         end += length
00924         _v25.data = str[start:end]
00925         self.img.append(val1)
00926       start = end
00927       end += 4
00928       (length,) = _struct_I.unpack(str[start:end])
00929       self.mesh = []
00930       for i in range(0, length):
00931         val1 = srs_object_database_msgs.msg.mesh()
00932         start = end
00933         end += 4
00934         (val1.objectId,) = _struct_i.unpack(str[start:end])
00935         _v28 = val1.mesh
00936         start = end
00937         end += 1
00938         (_v28.type,) = _struct_b.unpack(str[start:end])
00939         start = end
00940         end += 4
00941         (length,) = _struct_I.unpack(str[start:end])
00942         pattern = '<%sd'%length
00943         start = end
00944         end += struct.calcsize(pattern)
00945         _v28.dimensions = struct.unpack(pattern, str[start:end])
00946         start = end
00947         end += 4
00948         (length,) = _struct_I.unpack(str[start:end])
00949         pattern = '<%si'%length
00950         start = end
00951         end += struct.calcsize(pattern)
00952         _v28.triangles = struct.unpack(pattern, str[start:end])
00953         start = end
00954         end += 4
00955         (length,) = _struct_I.unpack(str[start:end])
00956         _v28.vertices = []
00957         for i in range(0, length):
00958           val3 = geometry_msgs.msg.Point()
00959           _x = val3
00960           start = end
00961           end += 24
00962           (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00963           _v28.vertices.append(val3)
00964         start = end
00965         end += 4
00966         (length,) = _struct_I.unpack(str[start:end])
00967         start = end
00968         end += length
00969         if python3:
00970           val1.type = str[start:end].decode('utf-8')
00971         else:
00972           val1.type = str[start:end]
00973         start = end
00974         end += 4
00975         (length,) = _struct_I.unpack(str[start:end])
00976         start = end
00977         end += length
00978         val1.data = str[start:end]
00979         self.mesh.append(val1)
00980       start = end
00981       end += 4
00982       (length,) = _struct_I.unpack(str[start:end])
00983       self.pcl = []
00984       for i in range(0, length):
00985         val1 = srs_object_database_msgs.msg.pcl()
00986         start = end
00987         end += 4
00988         (val1.objectId,) = _struct_i.unpack(str[start:end])
00989         _v29 = val1.pcl
00990         _v30 = _v29.header
00991         start = end
00992         end += 4
00993         (_v30.seq,) = _struct_I.unpack(str[start:end])
00994         _v31 = _v30.stamp
00995         _x = _v31
00996         start = end
00997         end += 8
00998         (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00999         start = end
01000         end += 4
01001         (length,) = _struct_I.unpack(str[start:end])
01002         start = end
01003         end += length
01004         if python3:
01005           _v30.frame_id = str[start:end].decode('utf-8')
01006         else:
01007           _v30.frame_id = str[start:end]
01008         _x = _v29
01009         start = end
01010         end += 8
01011         (_x.height, _x.width,) = _struct_2I.unpack(str[start:end])
01012         start = end
01013         end += 4
01014         (length,) = _struct_I.unpack(str[start:end])
01015         _v29.fields = []
01016         for i in range(0, length):
01017           val3 = sensor_msgs.msg.PointField()
01018           start = end
01019           end += 4
01020           (length,) = _struct_I.unpack(str[start:end])
01021           start = end
01022           end += length
01023           if python3:
01024             val3.name = str[start:end].decode('utf-8')
01025           else:
01026             val3.name = str[start:end]
01027           _x = val3
01028           start = end
01029           end += 9
01030           (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
01031           _v29.fields.append(val3)
01032         _x = _v29
01033         start = end
01034         end += 9
01035         (_x.is_bigendian, _x.point_step, _x.row_step,) = _struct_B2I.unpack(str[start:end])
01036         _v29.is_bigendian = bool(_v29.is_bigendian)
01037         start = end
01038         end += 4
01039         (length,) = _struct_I.unpack(str[start:end])
01040         start = end
01041         end += length
01042         _v29.data = str[start:end]
01043         start = end
01044         end += 1
01045         (_v29.is_dense,) = _struct_B.unpack(str[start:end])
01046         _v29.is_dense = bool(_v29.is_dense)
01047         self.pcl.append(val1)
01048       start = end
01049       end += 4
01050       (length,) = _struct_I.unpack(str[start:end])
01051       self.surf = []
01052       for i in range(0, length):
01053         val1 = srs_object_database_msgs.msg.surf()
01054         start = end
01055         end += 4
01056         (val1.objectId,) = _struct_i.unpack(str[start:end])
01057         _v32 = val1.surf
01058         _v33 = _v32.header
01059         start = end
01060         end += 4
01061         (_v33.seq,) = _struct_I.unpack(str[start:end])
01062         _v34 = _v33.stamp
01063         _x = _v34
01064         start = end
01065         end += 8
01066         (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
01067         start = end
01068         end += 4
01069         (length,) = _struct_I.unpack(str[start:end])
01070         start = end
01071         end += length
01072         if python3:
01073           _v33.frame_id = str[start:end].decode('utf-8')
01074         else:
01075           _v33.frame_id = str[start:end]
01076         _x = _v32
01077         start = end
01078         end += 8
01079         (_x.height, _x.width,) = _struct_2I.unpack(str[start:end])
01080         start = end
01081         end += 4
01082         (length,) = _struct_I.unpack(str[start:end])
01083         _v32.fields = []
01084         for i in range(0, length):
01085           val3 = sensor_msgs.msg.PointField()
01086           start = end
01087           end += 4
01088           (length,) = _struct_I.unpack(str[start:end])
01089           start = end
01090           end += length
01091           if python3:
01092             val3.name = str[start:end].decode('utf-8')
01093           else:
01094             val3.name = str[start:end]
01095           _x = val3
01096           start = end
01097           end += 9
01098           (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
01099           _v32.fields.append(val3)
01100         _x = _v32
01101         start = end
01102         end += 9
01103         (_x.is_bigendian, _x.point_step, _x.row_step,) = _struct_B2I.unpack(str[start:end])
01104         _v32.is_bigendian = bool(_v32.is_bigendian)
01105         start = end
01106         end += 4
01107         (length,) = _struct_I.unpack(str[start:end])
01108         start = end
01109         end += length
01110         _v32.data = str[start:end]
01111         start = end
01112         end += 1
01113         (_v32.is_dense,) = _struct_B.unpack(str[start:end])
01114         _v32.is_dense = bool(_v32.is_dense)
01115         _v35 = val1.bounding_box
01116         _v36 = _v35.header
01117         start = end
01118         end += 4
01119         (_v36.seq,) = _struct_I.unpack(str[start:end])
01120         _v37 = _v36.stamp
01121         _x = _v37
01122         start = end
01123         end += 8
01124         (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
01125         start = end
01126         end += 4
01127         (length,) = _struct_I.unpack(str[start:end])
01128         start = end
01129         end += length
01130         if python3:
01131           _v36.frame_id = str[start:end].decode('utf-8')
01132         else:
01133           _v36.frame_id = str[start:end]
01134         _x = _v35
01135         start = end
01136         end += 8
01137         (_x.height, _x.width,) = _struct_2I.unpack(str[start:end])
01138         start = end
01139         end += 4
01140         (length,) = _struct_I.unpack(str[start:end])
01141         _v35.fields = []
01142         for i in range(0, length):
01143           val3 = sensor_msgs.msg.PointField()
01144           start = end
01145           end += 4
01146           (length,) = _struct_I.unpack(str[start:end])
01147           start = end
01148           end += length
01149           if python3:
01150             val3.name = str[start:end].decode('utf-8')
01151           else:
01152             val3.name = str[start:end]
01153           _x = val3
01154           start = end
01155           end += 9
01156           (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
01157           _v35.fields.append(val3)
01158         _x = _v35
01159         start = end
01160         end += 9
01161         (_x.is_bigendian, _x.point_step, _x.row_step,) = _struct_B2I.unpack(str[start:end])
01162         _v35.is_bigendian = bool(_v35.is_bigendian)
01163         start = end
01164         end += 4
01165         (length,) = _struct_I.unpack(str[start:end])
01166         start = end
01167         end += length
01168         _v35.data = str[start:end]
01169         start = end
01170         end += 1
01171         (_v35.is_dense,) = _struct_B.unpack(str[start:end])
01172         _v35.is_dense = bool(_v35.is_dense)
01173         _v38 = val1.coord_frame
01174         _v39 = _v38.position
01175         _x = _v39
01176         start = end
01177         end += 24
01178         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
01179         _v40 = _v38.orientation
01180         _x = _v40
01181         start = end
01182         end += 32
01183         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
01184         self.surf.append(val1)
01185       start = end
01186       end += 4
01187       (length,) = _struct_I.unpack(str[start:end])
01188       self.grasp = []
01189       for i in range(0, length):
01190         val1 = srs_object_database_msgs.msg.grasp()
01191         start = end
01192         end += 4
01193         (val1.objectId,) = _struct_i.unpack(str[start:end])
01194         start = end
01195         end += 4
01196         (length,) = _struct_I.unpack(str[start:end])
01197         start = end
01198         end += length
01199         if python3:
01200           val1.Objecttype = str[start:end].decode('utf-8')
01201         else:
01202           val1.Objecttype = str[start:end]
01203         start = end
01204         end += 4
01205         (length,) = _struct_I.unpack(str[start:end])
01206         start = end
01207         end += length
01208         if python3:
01209           val1.pose = str[start:end].decode('utf-8')
01210         else:
01211           val1.pose = str[start:end]
01212         start = end
01213         end += 4
01214         (length,) = _struct_I.unpack(str[start:end])
01215         start = end
01216         end += length
01217         if python3:
01218           val1.fileDescription = str[start:end].decode('utf-8')
01219         else:
01220           val1.fileDescription = str[start:end]
01221         start = end
01222         end += 4
01223         (length,) = _struct_I.unpack(str[start:end])
01224         start = end
01225         end += length
01226         val1.bs = str[start:end]
01227         start = end
01228         end += 4
01229         (val1.size,) = _struct_i.unpack(str[start:end])
01230         self.grasp.append(val1)
01231       start = end
01232       end += 4
01233       (length,) = _struct_I.unpack(str[start:end])
01234       self.urdf = []
01235       for i in range(0, length):
01236         val1 = srs_object_database_msgs.msg.urdf()
01237         start = end
01238         end += 4
01239         (val1.objectId,) = _struct_i.unpack(str[start:end])
01240         start = end
01241         end += 4
01242         (length,) = _struct_I.unpack(str[start:end])
01243         val1.markers = []
01244         for i in range(0, length):
01245           val2 = visualization_msgs.msg.Marker()
01246           _v41 = val2.header
01247           start = end
01248           end += 4
01249           (_v41.seq,) = _struct_I.unpack(str[start:end])
01250           _v42 = _v41.stamp
01251           _x = _v42
01252           start = end
01253           end += 8
01254           (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
01255           start = end
01256           end += 4
01257           (length,) = _struct_I.unpack(str[start:end])
01258           start = end
01259           end += length
01260           if python3:
01261             _v41.frame_id = str[start:end].decode('utf-8')
01262           else:
01263             _v41.frame_id = str[start:end]
01264           start = end
01265           end += 4
01266           (length,) = _struct_I.unpack(str[start:end])
01267           start = end
01268           end += length
01269           if python3:
01270             val2.ns = str[start:end].decode('utf-8')
01271           else:
01272             val2.ns = str[start:end]
01273           _x = val2
01274           start = end
01275           end += 12
01276           (_x.id, _x.type, _x.action,) = _struct_3i.unpack(str[start:end])
01277           _v43 = val2.pose
01278           _v44 = _v43.position
01279           _x = _v44
01280           start = end
01281           end += 24
01282           (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
01283           _v45 = _v43.orientation
01284           _x = _v45
01285           start = end
01286           end += 32
01287           (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
01288           _v46 = val2.scale
01289           _x = _v46
01290           start = end
01291           end += 24
01292           (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
01293           _v47 = val2.color
01294           _x = _v47
01295           start = end
01296           end += 16
01297           (_x.r, _x.g, _x.b, _x.a,) = _struct_4f.unpack(str[start:end])
01298           _v48 = val2.lifetime
01299           _x = _v48
01300           start = end
01301           end += 8
01302           (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end])
01303           start = end
01304           end += 1
01305           (val2.frame_locked,) = _struct_B.unpack(str[start:end])
01306           val2.frame_locked = bool(val2.frame_locked)
01307           start = end
01308           end += 4
01309           (length,) = _struct_I.unpack(str[start:end])
01310           val2.points = []
01311           for i in range(0, length):
01312             val3 = geometry_msgs.msg.Point()
01313             _x = val3
01314             start = end
01315             end += 24
01316             (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
01317             val2.points.append(val3)
01318           start = end
01319           end += 4
01320           (length,) = _struct_I.unpack(str[start:end])
01321           val2.colors = []
01322           for i in range(0, length):
01323             val3 = std_msgs.msg.ColorRGBA()
01324             _x = val3
01325             start = end
01326             end += 16
01327             (_x.r, _x.g, _x.b, _x.a,) = _struct_4f.unpack(str[start:end])
01328             val2.colors.append(val3)
01329           start = end
01330           end += 4
01331           (length,) = _struct_I.unpack(str[start:end])
01332           start = end
01333           end += length
01334           if python3:
01335             val2.text = str[start:end].decode('utf-8')
01336           else:
01337             val2.text = str[start:end]
01338           start = end
01339           end += 4
01340           (length,) = _struct_I.unpack(str[start:end])
01341           start = end
01342           end += length
01343           if python3:
01344             val2.mesh_resource = str[start:end].decode('utf-8')
01345           else:
01346             val2.mesh_resource = str[start:end]
01347           start = end
01348           end += 1
01349           (val2.mesh_use_embedded_materials,) = _struct_B.unpack(str[start:end])
01350           val2.mesh_use_embedded_materials = bool(val2.mesh_use_embedded_materials)
01351           val1.markers.append(val2)
01352         self.urdf.append(val1)
01353       return self
01354     except struct.error as e:
01355       raise genpy.DeserializationError(e) #most likely buffer underfill
01356 
01357 
01358   def serialize_numpy(self, buff, numpy):
01359     """
01360     serialize message with numpy array types into buffer
01361     :param buff: buffer, ``StringIO``
01362     :param numpy: numpy python module
01363     """
01364     try:
01365       _x = self.return_response
01366       length = len(_x)
01367       if python3 or type(_x) == unicode:
01368         _x = _x.encode('utf-8')
01369         length = len(_x)
01370       buff.write(struct.pack('<I%ss'%length, length, _x))
01371       length = len(self.img)
01372       buff.write(_struct_I.pack(length))
01373       for val1 in self.img:
01374         buff.write(_struct_i.pack(val1.objectId))
01375         _x = val1.description
01376         length = len(_x)
01377         if python3 or type(_x) == unicode:
01378           _x = _x.encode('utf-8')
01379           length = len(_x)
01380         buff.write(struct.pack('<I%ss'%length, length, _x))
01381         _v49 = val1.image
01382         _v50 = _v49.header
01383         buff.write(_struct_I.pack(_v50.seq))
01384         _v51 = _v50.stamp
01385         _x = _v51
01386         buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
01387         _x = _v50.frame_id
01388         length = len(_x)
01389         if python3 or type(_x) == unicode:
01390           _x = _x.encode('utf-8')
01391           length = len(_x)
01392         buff.write(struct.pack('<I%ss'%length, length, _x))
01393         _x = _v49
01394         buff.write(_struct_2I.pack(_x.height, _x.width))
01395         _x = _v49.encoding
01396         length = len(_x)
01397         if python3 or type(_x) == unicode:
01398           _x = _x.encode('utf-8')
01399           length = len(_x)
01400         buff.write(struct.pack('<I%ss'%length, length, _x))
01401         _x = _v49
01402         buff.write(_struct_BI.pack(_x.is_bigendian, _x.step))
01403         _x = _v49.data
01404         length = len(_x)
01405         # - if encoded as a list instead, serialize as bytes instead of string
01406         if type(_x) in [list, tuple]:
01407           buff.write(struct.pack('<I%sB'%length, length, *_x))
01408         else:
01409           buff.write(struct.pack('<I%ss'%length, length, _x))
01410       length = len(self.mesh)
01411       buff.write(_struct_I.pack(length))
01412       for val1 in self.mesh:
01413         buff.write(_struct_i.pack(val1.objectId))
01414         _v52 = val1.mesh
01415         buff.write(_struct_b.pack(_v52.type))
01416         length = len(_v52.dimensions)
01417         buff.write(_struct_I.pack(length))
01418         pattern = '<%sd'%length
01419         buff.write(_v52.dimensions.tostring())
01420         length = len(_v52.triangles)
01421         buff.write(_struct_I.pack(length))
01422         pattern = '<%si'%length
01423         buff.write(_v52.triangles.tostring())
01424         length = len(_v52.vertices)
01425         buff.write(_struct_I.pack(length))
01426         for val3 in _v52.vertices:
01427           _x = val3
01428           buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
01429         _x = val1.type
01430         length = len(_x)
01431         if python3 or type(_x) == unicode:
01432           _x = _x.encode('utf-8')
01433           length = len(_x)
01434         buff.write(struct.pack('<I%ss'%length, length, _x))
01435         _x = val1.data
01436         length = len(_x)
01437         # - if encoded as a list instead, serialize as bytes instead of string
01438         if type(_x) in [list, tuple]:
01439           buff.write(struct.pack('<I%sB'%length, length, *_x))
01440         else:
01441           buff.write(struct.pack('<I%ss'%length, length, _x))
01442       length = len(self.pcl)
01443       buff.write(_struct_I.pack(length))
01444       for val1 in self.pcl:
01445         buff.write(_struct_i.pack(val1.objectId))
01446         _v53 = val1.pcl
01447         _v54 = _v53.header
01448         buff.write(_struct_I.pack(_v54.seq))
01449         _v55 = _v54.stamp
01450         _x = _v55
01451         buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
01452         _x = _v54.frame_id
01453         length = len(_x)
01454         if python3 or type(_x) == unicode:
01455           _x = _x.encode('utf-8')
01456           length = len(_x)
01457         buff.write(struct.pack('<I%ss'%length, length, _x))
01458         _x = _v53
01459         buff.write(_struct_2I.pack(_x.height, _x.width))
01460         length = len(_v53.fields)
01461         buff.write(_struct_I.pack(length))
01462         for val3 in _v53.fields:
01463           _x = val3.name
01464           length = len(_x)
01465           if python3 or type(_x) == unicode:
01466             _x = _x.encode('utf-8')
01467             length = len(_x)
01468           buff.write(struct.pack('<I%ss'%length, length, _x))
01469           _x = val3
01470           buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
01471         _x = _v53
01472         buff.write(_struct_B2I.pack(_x.is_bigendian, _x.point_step, _x.row_step))
01473         _x = _v53.data
01474         length = len(_x)
01475         # - if encoded as a list instead, serialize as bytes instead of string
01476         if type(_x) in [list, tuple]:
01477           buff.write(struct.pack('<I%sB'%length, length, *_x))
01478         else:
01479           buff.write(struct.pack('<I%ss'%length, length, _x))
01480         buff.write(_struct_B.pack(_v53.is_dense))
01481       length = len(self.surf)
01482       buff.write(_struct_I.pack(length))
01483       for val1 in self.surf:
01484         buff.write(_struct_i.pack(val1.objectId))
01485         _v56 = val1.surf
01486         _v57 = _v56.header
01487         buff.write(_struct_I.pack(_v57.seq))
01488         _v58 = _v57.stamp
01489         _x = _v58
01490         buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
01491         _x = _v57.frame_id
01492         length = len(_x)
01493         if python3 or type(_x) == unicode:
01494           _x = _x.encode('utf-8')
01495           length = len(_x)
01496         buff.write(struct.pack('<I%ss'%length, length, _x))
01497         _x = _v56
01498         buff.write(_struct_2I.pack(_x.height, _x.width))
01499         length = len(_v56.fields)
01500         buff.write(_struct_I.pack(length))
01501         for val3 in _v56.fields:
01502           _x = val3.name
01503           length = len(_x)
01504           if python3 or type(_x) == unicode:
01505             _x = _x.encode('utf-8')
01506             length = len(_x)
01507           buff.write(struct.pack('<I%ss'%length, length, _x))
01508           _x = val3
01509           buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
01510         _x = _v56
01511         buff.write(_struct_B2I.pack(_x.is_bigendian, _x.point_step, _x.row_step))
01512         _x = _v56.data
01513         length = len(_x)
01514         # - if encoded as a list instead, serialize as bytes instead of string
01515         if type(_x) in [list, tuple]:
01516           buff.write(struct.pack('<I%sB'%length, length, *_x))
01517         else:
01518           buff.write(struct.pack('<I%ss'%length, length, _x))
01519         buff.write(_struct_B.pack(_v56.is_dense))
01520         _v59 = val1.bounding_box
01521         _v60 = _v59.header
01522         buff.write(_struct_I.pack(_v60.seq))
01523         _v61 = _v60.stamp
01524         _x = _v61
01525         buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
01526         _x = _v60.frame_id
01527         length = len(_x)
01528         if python3 or type(_x) == unicode:
01529           _x = _x.encode('utf-8')
01530           length = len(_x)
01531         buff.write(struct.pack('<I%ss'%length, length, _x))
01532         _x = _v59
01533         buff.write(_struct_2I.pack(_x.height, _x.width))
01534         length = len(_v59.fields)
01535         buff.write(_struct_I.pack(length))
01536         for val3 in _v59.fields:
01537           _x = val3.name
01538           length = len(_x)
01539           if python3 or type(_x) == unicode:
01540             _x = _x.encode('utf-8')
01541             length = len(_x)
01542           buff.write(struct.pack('<I%ss'%length, length, _x))
01543           _x = val3
01544           buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
01545         _x = _v59
01546         buff.write(_struct_B2I.pack(_x.is_bigendian, _x.point_step, _x.row_step))
01547         _x = _v59.data
01548         length = len(_x)
01549         # - if encoded as a list instead, serialize as bytes instead of string
01550         if type(_x) in [list, tuple]:
01551           buff.write(struct.pack('<I%sB'%length, length, *_x))
01552         else:
01553           buff.write(struct.pack('<I%ss'%length, length, _x))
01554         buff.write(_struct_B.pack(_v59.is_dense))
01555         _v62 = val1.coord_frame
01556         _v63 = _v62.position
01557         _x = _v63
01558         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
01559         _v64 = _v62.orientation
01560         _x = _v64
01561         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
01562       length = len(self.grasp)
01563       buff.write(_struct_I.pack(length))
01564       for val1 in self.grasp:
01565         buff.write(_struct_i.pack(val1.objectId))
01566         _x = val1.Objecttype
01567         length = len(_x)
01568         if python3 or type(_x) == unicode:
01569           _x = _x.encode('utf-8')
01570           length = len(_x)
01571         buff.write(struct.pack('<I%ss'%length, length, _x))
01572         _x = val1.pose
01573         length = len(_x)
01574         if python3 or type(_x) == unicode:
01575           _x = _x.encode('utf-8')
01576           length = len(_x)
01577         buff.write(struct.pack('<I%ss'%length, length, _x))
01578         _x = val1.fileDescription
01579         length = len(_x)
01580         if python3 or type(_x) == unicode:
01581           _x = _x.encode('utf-8')
01582           length = len(_x)
01583         buff.write(struct.pack('<I%ss'%length, length, _x))
01584         _x = val1.bs
01585         length = len(_x)
01586         # - if encoded as a list instead, serialize as bytes instead of string
01587         if type(_x) in [list, tuple]:
01588           buff.write(struct.pack('<I%sB'%length, length, *_x))
01589         else:
01590           buff.write(struct.pack('<I%ss'%length, length, _x))
01591         buff.write(_struct_i.pack(val1.size))
01592       length = len(self.urdf)
01593       buff.write(_struct_I.pack(length))
01594       for val1 in self.urdf:
01595         buff.write(_struct_i.pack(val1.objectId))
01596         length = len(val1.markers)
01597         buff.write(_struct_I.pack(length))
01598         for val2 in val1.markers:
01599           _v65 = val2.header
01600           buff.write(_struct_I.pack(_v65.seq))
01601           _v66 = _v65.stamp
01602           _x = _v66
01603           buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
01604           _x = _v65.frame_id
01605           length = len(_x)
01606           if python3 or type(_x) == unicode:
01607             _x = _x.encode('utf-8')
01608             length = len(_x)
01609           buff.write(struct.pack('<I%ss'%length, length, _x))
01610           _x = val2.ns
01611           length = len(_x)
01612           if python3 or type(_x) == unicode:
01613             _x = _x.encode('utf-8')
01614             length = len(_x)
01615           buff.write(struct.pack('<I%ss'%length, length, _x))
01616           _x = val2
01617           buff.write(_struct_3i.pack(_x.id, _x.type, _x.action))
01618           _v67 = val2.pose
01619           _v68 = _v67.position
01620           _x = _v68
01621           buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
01622           _v69 = _v67.orientation
01623           _x = _v69
01624           buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
01625           _v70 = val2.scale
01626           _x = _v70
01627           buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
01628           _v71 = val2.color
01629           _x = _v71
01630           buff.write(_struct_4f.pack(_x.r, _x.g, _x.b, _x.a))
01631           _v72 = val2.lifetime
01632           _x = _v72
01633           buff.write(_struct_2i.pack(_x.secs, _x.nsecs))
01634           buff.write(_struct_B.pack(val2.frame_locked))
01635           length = len(val2.points)
01636           buff.write(_struct_I.pack(length))
01637           for val3 in val2.points:
01638             _x = val3
01639             buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
01640           length = len(val2.colors)
01641           buff.write(_struct_I.pack(length))
01642           for val3 in val2.colors:
01643             _x = val3
01644             buff.write(_struct_4f.pack(_x.r, _x.g, _x.b, _x.a))
01645           _x = val2.text
01646           length = len(_x)
01647           if python3 or type(_x) == unicode:
01648             _x = _x.encode('utf-8')
01649             length = len(_x)
01650           buff.write(struct.pack('<I%ss'%length, length, _x))
01651           _x = val2.mesh_resource
01652           length = len(_x)
01653           if python3 or type(_x) == unicode:
01654             _x = _x.encode('utf-8')
01655             length = len(_x)
01656           buff.write(struct.pack('<I%ss'%length, length, _x))
01657           buff.write(_struct_B.pack(val2.mesh_use_embedded_materials))
01658     except struct.error as se: self._check_types(se)
01659     except TypeError as te: self._check_types(te)
01660 
01661   def deserialize_numpy(self, str, numpy):
01662     """
01663     unpack serialized message in str into this message instance using numpy for array types
01664     :param str: byte array of serialized message, ``str``
01665     :param numpy: numpy python module
01666     """
01667     try:
01668       if self.img is None:
01669         self.img = None
01670       if self.mesh is None:
01671         self.mesh = None
01672       if self.pcl is None:
01673         self.pcl = None
01674       if self.surf is None:
01675         self.surf = None
01676       if self.grasp is None:
01677         self.grasp = None
01678       if self.urdf is None:
01679         self.urdf = None
01680       end = 0
01681       start = end
01682       end += 4
01683       (length,) = _struct_I.unpack(str[start:end])
01684       start = end
01685       end += length
01686       if python3:
01687         self.return_response = str[start:end].decode('utf-8')
01688       else:
01689         self.return_response = str[start:end]
01690       start = end
01691       end += 4
01692       (length,) = _struct_I.unpack(str[start:end])
01693       self.img = []
01694       for i in range(0, length):
01695         val1 = srs_object_database_msgs.msg.img()
01696         start = end
01697         end += 4
01698         (val1.objectId,) = _struct_i.unpack(str[start:end])
01699         start = end
01700         end += 4
01701         (length,) = _struct_I.unpack(str[start:end])
01702         start = end
01703         end += length
01704         if python3:
01705           val1.description = str[start:end].decode('utf-8')
01706         else:
01707           val1.description = str[start:end]
01708         _v73 = val1.image
01709         _v74 = _v73.header
01710         start = end
01711         end += 4
01712         (_v74.seq,) = _struct_I.unpack(str[start:end])
01713         _v75 = _v74.stamp
01714         _x = _v75
01715         start = end
01716         end += 8
01717         (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
01718         start = end
01719         end += 4
01720         (length,) = _struct_I.unpack(str[start:end])
01721         start = end
01722         end += length
01723         if python3:
01724           _v74.frame_id = str[start:end].decode('utf-8')
01725         else:
01726           _v74.frame_id = str[start:end]
01727         _x = _v73
01728         start = end
01729         end += 8
01730         (_x.height, _x.width,) = _struct_2I.unpack(str[start:end])
01731         start = end
01732         end += 4
01733         (length,) = _struct_I.unpack(str[start:end])
01734         start = end
01735         end += length
01736         if python3:
01737           _v73.encoding = str[start:end].decode('utf-8')
01738         else:
01739           _v73.encoding = str[start:end]
01740         _x = _v73
01741         start = end
01742         end += 5
01743         (_x.is_bigendian, _x.step,) = _struct_BI.unpack(str[start:end])
01744         start = end
01745         end += 4
01746         (length,) = _struct_I.unpack(str[start:end])
01747         start = end
01748         end += length
01749         _v73.data = str[start:end]
01750         self.img.append(val1)
01751       start = end
01752       end += 4
01753       (length,) = _struct_I.unpack(str[start:end])
01754       self.mesh = []
01755       for i in range(0, length):
01756         val1 = srs_object_database_msgs.msg.mesh()
01757         start = end
01758         end += 4
01759         (val1.objectId,) = _struct_i.unpack(str[start:end])
01760         _v76 = val1.mesh
01761         start = end
01762         end += 1
01763         (_v76.type,) = _struct_b.unpack(str[start:end])
01764         start = end
01765         end += 4
01766         (length,) = _struct_I.unpack(str[start:end])
01767         pattern = '<%sd'%length
01768         start = end
01769         end += struct.calcsize(pattern)
01770         _v76.dimensions = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
01771         start = end
01772         end += 4
01773         (length,) = _struct_I.unpack(str[start:end])
01774         pattern = '<%si'%length
01775         start = end
01776         end += struct.calcsize(pattern)
01777         _v76.triangles = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length)
01778         start = end
01779         end += 4
01780         (length,) = _struct_I.unpack(str[start:end])
01781         _v76.vertices = []
01782         for i in range(0, length):
01783           val3 = geometry_msgs.msg.Point()
01784           _x = val3
01785           start = end
01786           end += 24
01787           (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
01788           _v76.vertices.append(val3)
01789         start = end
01790         end += 4
01791         (length,) = _struct_I.unpack(str[start:end])
01792         start = end
01793         end += length
01794         if python3:
01795           val1.type = str[start:end].decode('utf-8')
01796         else:
01797           val1.type = str[start:end]
01798         start = end
01799         end += 4
01800         (length,) = _struct_I.unpack(str[start:end])
01801         start = end
01802         end += length
01803         val1.data = str[start:end]
01804         self.mesh.append(val1)
01805       start = end
01806       end += 4
01807       (length,) = _struct_I.unpack(str[start:end])
01808       self.pcl = []
01809       for i in range(0, length):
01810         val1 = srs_object_database_msgs.msg.pcl()
01811         start = end
01812         end += 4
01813         (val1.objectId,) = _struct_i.unpack(str[start:end])
01814         _v77 = val1.pcl
01815         _v78 = _v77.header
01816         start = end
01817         end += 4
01818         (_v78.seq,) = _struct_I.unpack(str[start:end])
01819         _v79 = _v78.stamp
01820         _x = _v79
01821         start = end
01822         end += 8
01823         (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
01824         start = end
01825         end += 4
01826         (length,) = _struct_I.unpack(str[start:end])
01827         start = end
01828         end += length
01829         if python3:
01830           _v78.frame_id = str[start:end].decode('utf-8')
01831         else:
01832           _v78.frame_id = str[start:end]
01833         _x = _v77
01834         start = end
01835         end += 8
01836         (_x.height, _x.width,) = _struct_2I.unpack(str[start:end])
01837         start = end
01838         end += 4
01839         (length,) = _struct_I.unpack(str[start:end])
01840         _v77.fields = []
01841         for i in range(0, length):
01842           val3 = sensor_msgs.msg.PointField()
01843           start = end
01844           end += 4
01845           (length,) = _struct_I.unpack(str[start:end])
01846           start = end
01847           end += length
01848           if python3:
01849             val3.name = str[start:end].decode('utf-8')
01850           else:
01851             val3.name = str[start:end]
01852           _x = val3
01853           start = end
01854           end += 9
01855           (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
01856           _v77.fields.append(val3)
01857         _x = _v77
01858         start = end
01859         end += 9
01860         (_x.is_bigendian, _x.point_step, _x.row_step,) = _struct_B2I.unpack(str[start:end])
01861         _v77.is_bigendian = bool(_v77.is_bigendian)
01862         start = end
01863         end += 4
01864         (length,) = _struct_I.unpack(str[start:end])
01865         start = end
01866         end += length
01867         _v77.data = str[start:end]
01868         start = end
01869         end += 1
01870         (_v77.is_dense,) = _struct_B.unpack(str[start:end])
01871         _v77.is_dense = bool(_v77.is_dense)
01872         self.pcl.append(val1)
01873       start = end
01874       end += 4
01875       (length,) = _struct_I.unpack(str[start:end])
01876       self.surf = []
01877       for i in range(0, length):
01878         val1 = srs_object_database_msgs.msg.surf()
01879         start = end
01880         end += 4
01881         (val1.objectId,) = _struct_i.unpack(str[start:end])
01882         _v80 = val1.surf
01883         _v81 = _v80.header
01884         start = end
01885         end += 4
01886         (_v81.seq,) = _struct_I.unpack(str[start:end])
01887         _v82 = _v81.stamp
01888         _x = _v82
01889         start = end
01890         end += 8
01891         (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
01892         start = end
01893         end += 4
01894         (length,) = _struct_I.unpack(str[start:end])
01895         start = end
01896         end += length
01897         if python3:
01898           _v81.frame_id = str[start:end].decode('utf-8')
01899         else:
01900           _v81.frame_id = str[start:end]
01901         _x = _v80
01902         start = end
01903         end += 8
01904         (_x.height, _x.width,) = _struct_2I.unpack(str[start:end])
01905         start = end
01906         end += 4
01907         (length,) = _struct_I.unpack(str[start:end])
01908         _v80.fields = []
01909         for i in range(0, length):
01910           val3 = sensor_msgs.msg.PointField()
01911           start = end
01912           end += 4
01913           (length,) = _struct_I.unpack(str[start:end])
01914           start = end
01915           end += length
01916           if python3:
01917             val3.name = str[start:end].decode('utf-8')
01918           else:
01919             val3.name = str[start:end]
01920           _x = val3
01921           start = end
01922           end += 9
01923           (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
01924           _v80.fields.append(val3)
01925         _x = _v80
01926         start = end
01927         end += 9
01928         (_x.is_bigendian, _x.point_step, _x.row_step,) = _struct_B2I.unpack(str[start:end])
01929         _v80.is_bigendian = bool(_v80.is_bigendian)
01930         start = end
01931         end += 4
01932         (length,) = _struct_I.unpack(str[start:end])
01933         start = end
01934         end += length
01935         _v80.data = str[start:end]
01936         start = end
01937         end += 1
01938         (_v80.is_dense,) = _struct_B.unpack(str[start:end])
01939         _v80.is_dense = bool(_v80.is_dense)
01940         _v83 = val1.bounding_box
01941         _v84 = _v83.header
01942         start = end
01943         end += 4
01944         (_v84.seq,) = _struct_I.unpack(str[start:end])
01945         _v85 = _v84.stamp
01946         _x = _v85
01947         start = end
01948         end += 8
01949         (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
01950         start = end
01951         end += 4
01952         (length,) = _struct_I.unpack(str[start:end])
01953         start = end
01954         end += length
01955         if python3:
01956           _v84.frame_id = str[start:end].decode('utf-8')
01957         else:
01958           _v84.frame_id = str[start:end]
01959         _x = _v83
01960         start = end
01961         end += 8
01962         (_x.height, _x.width,) = _struct_2I.unpack(str[start:end])
01963         start = end
01964         end += 4
01965         (length,) = _struct_I.unpack(str[start:end])
01966         _v83.fields = []
01967         for i in range(0, length):
01968           val3 = sensor_msgs.msg.PointField()
01969           start = end
01970           end += 4
01971           (length,) = _struct_I.unpack(str[start:end])
01972           start = end
01973           end += length
01974           if python3:
01975             val3.name = str[start:end].decode('utf-8')
01976           else:
01977             val3.name = str[start:end]
01978           _x = val3
01979           start = end
01980           end += 9
01981           (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
01982           _v83.fields.append(val3)
01983         _x = _v83
01984         start = end
01985         end += 9
01986         (_x.is_bigendian, _x.point_step, _x.row_step,) = _struct_B2I.unpack(str[start:end])
01987         _v83.is_bigendian = bool(_v83.is_bigendian)
01988         start = end
01989         end += 4
01990         (length,) = _struct_I.unpack(str[start:end])
01991         start = end
01992         end += length
01993         _v83.data = str[start:end]
01994         start = end
01995         end += 1
01996         (_v83.is_dense,) = _struct_B.unpack(str[start:end])
01997         _v83.is_dense = bool(_v83.is_dense)
01998         _v86 = val1.coord_frame
01999         _v87 = _v86.position
02000         _x = _v87
02001         start = end
02002         end += 24
02003         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
02004         _v88 = _v86.orientation
02005         _x = _v88
02006         start = end
02007         end += 32
02008         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
02009         self.surf.append(val1)
02010       start = end
02011       end += 4
02012       (length,) = _struct_I.unpack(str[start:end])
02013       self.grasp = []
02014       for i in range(0, length):
02015         val1 = srs_object_database_msgs.msg.grasp()
02016         start = end
02017         end += 4
02018         (val1.objectId,) = _struct_i.unpack(str[start:end])
02019         start = end
02020         end += 4
02021         (length,) = _struct_I.unpack(str[start:end])
02022         start = end
02023         end += length
02024         if python3:
02025           val1.Objecttype = str[start:end].decode('utf-8')
02026         else:
02027           val1.Objecttype = str[start:end]
02028         start = end
02029         end += 4
02030         (length,) = _struct_I.unpack(str[start:end])
02031         start = end
02032         end += length
02033         if python3:
02034           val1.pose = str[start:end].decode('utf-8')
02035         else:
02036           val1.pose = str[start:end]
02037         start = end
02038         end += 4
02039         (length,) = _struct_I.unpack(str[start:end])
02040         start = end
02041         end += length
02042         if python3:
02043           val1.fileDescription = str[start:end].decode('utf-8')
02044         else:
02045           val1.fileDescription = str[start:end]
02046         start = end
02047         end += 4
02048         (length,) = _struct_I.unpack(str[start:end])
02049         start = end
02050         end += length
02051         val1.bs = str[start:end]
02052         start = end
02053         end += 4
02054         (val1.size,) = _struct_i.unpack(str[start:end])
02055         self.grasp.append(val1)
02056       start = end
02057       end += 4
02058       (length,) = _struct_I.unpack(str[start:end])
02059       self.urdf = []
02060       for i in range(0, length):
02061         val1 = srs_object_database_msgs.msg.urdf()
02062         start = end
02063         end += 4
02064         (val1.objectId,) = _struct_i.unpack(str[start:end])
02065         start = end
02066         end += 4
02067         (length,) = _struct_I.unpack(str[start:end])
02068         val1.markers = []
02069         for i in range(0, length):
02070           val2 = visualization_msgs.msg.Marker()
02071           _v89 = val2.header
02072           start = end
02073           end += 4
02074           (_v89.seq,) = _struct_I.unpack(str[start:end])
02075           _v90 = _v89.stamp
02076           _x = _v90
02077           start = end
02078           end += 8
02079           (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
02080           start = end
02081           end += 4
02082           (length,) = _struct_I.unpack(str[start:end])
02083           start = end
02084           end += length
02085           if python3:
02086             _v89.frame_id = str[start:end].decode('utf-8')
02087           else:
02088             _v89.frame_id = str[start:end]
02089           start = end
02090           end += 4
02091           (length,) = _struct_I.unpack(str[start:end])
02092           start = end
02093           end += length
02094           if python3:
02095             val2.ns = str[start:end].decode('utf-8')
02096           else:
02097             val2.ns = str[start:end]
02098           _x = val2
02099           start = end
02100           end += 12
02101           (_x.id, _x.type, _x.action,) = _struct_3i.unpack(str[start:end])
02102           _v91 = val2.pose
02103           _v92 = _v91.position
02104           _x = _v92
02105           start = end
02106           end += 24
02107           (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
02108           _v93 = _v91.orientation
02109           _x = _v93
02110           start = end
02111           end += 32
02112           (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
02113           _v94 = val2.scale
02114           _x = _v94
02115           start = end
02116           end += 24
02117           (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
02118           _v95 = val2.color
02119           _x = _v95
02120           start = end
02121           end += 16
02122           (_x.r, _x.g, _x.b, _x.a,) = _struct_4f.unpack(str[start:end])
02123           _v96 = val2.lifetime
02124           _x = _v96
02125           start = end
02126           end += 8
02127           (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end])
02128           start = end
02129           end += 1
02130           (val2.frame_locked,) = _struct_B.unpack(str[start:end])
02131           val2.frame_locked = bool(val2.frame_locked)
02132           start = end
02133           end += 4
02134           (length,) = _struct_I.unpack(str[start:end])
02135           val2.points = []
02136           for i in range(0, length):
02137             val3 = geometry_msgs.msg.Point()
02138             _x = val3
02139             start = end
02140             end += 24
02141             (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
02142             val2.points.append(val3)
02143           start = end
02144           end += 4
02145           (length,) = _struct_I.unpack(str[start:end])
02146           val2.colors = []
02147           for i in range(0, length):
02148             val3 = std_msgs.msg.ColorRGBA()
02149             _x = val3
02150             start = end
02151             end += 16
02152             (_x.r, _x.g, _x.b, _x.a,) = _struct_4f.unpack(str[start:end])
02153             val2.colors.append(val3)
02154           start = end
02155           end += 4
02156           (length,) = _struct_I.unpack(str[start:end])
02157           start = end
02158           end += length
02159           if python3:
02160             val2.text = str[start:end].decode('utf-8')
02161           else:
02162             val2.text = str[start:end]
02163           start = end
02164           end += 4
02165           (length,) = _struct_I.unpack(str[start:end])
02166           start = end
02167           end += length
02168           if python3:
02169             val2.mesh_resource = str[start:end].decode('utf-8')
02170           else:
02171             val2.mesh_resource = str[start:end]
02172           start = end
02173           end += 1
02174           (val2.mesh_use_embedded_materials,) = _struct_B.unpack(str[start:end])
02175           val2.mesh_use_embedded_materials = bool(val2.mesh_use_embedded_materials)
02176           val1.markers.append(val2)
02177         self.urdf.append(val1)
02178       return self
02179     except struct.error as e:
02180       raise genpy.DeserializationError(e) #most likely buffer underfill
02181 
02182 _struct_I = genpy.struct_I
02183 _struct_IBI = struct.Struct("<IBI")
02184 _struct_b = struct.Struct("<b")
02185 _struct_i = struct.Struct("<i")
02186 _struct_BI = struct.Struct("<BI")
02187 _struct_2i = struct.Struct("<2i")
02188 _struct_3i = struct.Struct("<3i")
02189 _struct_B = struct.Struct("<B")
02190 _struct_B2I = struct.Struct("<B2I")
02191 _struct_4f = struct.Struct("<4f")
02192 _struct_4d = struct.Struct("<4d")
02193 _struct_2I = struct.Struct("<2I")
02194 _struct_3d = struct.Struct("<3d")
02195 class GetData(object):
02196   _type          = 'srs_object_database_msgs/GetData'
02197   _md5sum = '0fb0cdcd6e164bc63c7643c4232719fe'
02198   _request_class  = GetDataRequest
02199   _response_class = GetDataResponse


srs_object_database_msgs
Author(s): Georg Arbeiter
autogenerated on Wed Nov 27 2013 14:14:38