_urdf.py
Go to the documentation of this file.
00001 """autogenerated by genpy from srs_object_database_msgs/urdf.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006 
00007 import genpy
00008 import geometry_msgs.msg
00009 import visualization_msgs.msg
00010 import std_msgs.msg
00011 
00012 class urdf(genpy.Message):
00013   _md5sum = "5e0ef6153464ee9ec35b3eb8f82bc8a1"
00014   _type = "srs_object_database_msgs/urdf"
00015   _has_header = False #flag to mark the presence of a Header object
00016   _full_text = """int32 objectId
00017 visualization_msgs/Marker[] markers
00018 ================================================================================
00019 MSG: visualization_msgs/Marker
00020 # 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
00021 
00022 uint8 ARROW=0
00023 uint8 CUBE=1
00024 uint8 SPHERE=2
00025 uint8 CYLINDER=3
00026 uint8 LINE_STRIP=4
00027 uint8 LINE_LIST=5
00028 uint8 CUBE_LIST=6
00029 uint8 SPHERE_LIST=7
00030 uint8 POINTS=8
00031 uint8 TEXT_VIEW_FACING=9
00032 uint8 MESH_RESOURCE=10
00033 uint8 TRIANGLE_LIST=11
00034 
00035 uint8 ADD=0
00036 uint8 MODIFY=0
00037 uint8 DELETE=2
00038 
00039 Header header                        # header for time/frame information
00040 string ns                            # Namespace to place this object in... used in conjunction with id to create a unique name for the object
00041 int32 id                                         # object ID useful in conjunction with the namespace for manipulating and deleting the object later
00042 int32 type                                     # Type of object
00043 int32 action                           # 0 add/modify an object, 1 (deprecated), 2 deletes an object
00044 geometry_msgs/Pose pose                 # Pose of the object
00045 geometry_msgs/Vector3 scale             # Scale of the object 1,1,1 means default (usually 1 meter square)
00046 std_msgs/ColorRGBA color             # Color [0.0-1.0]
00047 duration lifetime                    # How long the object should last before being automatically deleted.  0 means forever
00048 bool frame_locked                    # If this marker should be frame-locked, i.e. retransformed into its frame every timestep
00049 
00050 #Only used if the type specified has some use for them (eg. POINTS, LINE_STRIP, ...)
00051 geometry_msgs/Point[] points
00052 #Only used if the type specified has some use for them (eg. POINTS, LINE_STRIP, ...)
00053 #number of colors must either be 0 or equal to the number of points
00054 #NOTE: alpha is not yet used
00055 std_msgs/ColorRGBA[] colors
00056 
00057 # NOTE: only used for text markers
00058 string text
00059 
00060 # NOTE: only used for MESH_RESOURCE markers
00061 string mesh_resource
00062 bool mesh_use_embedded_materials
00063 
00064 ================================================================================
00065 MSG: std_msgs/Header
00066 # Standard metadata for higher-level stamped data types.
00067 # This is generally used to communicate timestamped data 
00068 # in a particular coordinate frame.
00069 # 
00070 # sequence ID: consecutively increasing ID 
00071 uint32 seq
00072 #Two-integer timestamp that is expressed as:
00073 # * stamp.secs: seconds (stamp_secs) since epoch
00074 # * stamp.nsecs: nanoseconds since stamp_secs
00075 # time-handling sugar is provided by the client library
00076 time stamp
00077 #Frame this data is associated with
00078 # 0: no frame
00079 # 1: global frame
00080 string frame_id
00081 
00082 ================================================================================
00083 MSG: geometry_msgs/Pose
00084 # A representation of pose in free space, composed of postion and orientation. 
00085 Point position
00086 Quaternion orientation
00087 
00088 ================================================================================
00089 MSG: geometry_msgs/Point
00090 # This contains the position of a point in free space
00091 float64 x
00092 float64 y
00093 float64 z
00094 
00095 ================================================================================
00096 MSG: geometry_msgs/Quaternion
00097 # This represents an orientation in free space in quaternion form.
00098 
00099 float64 x
00100 float64 y
00101 float64 z
00102 float64 w
00103 
00104 ================================================================================
00105 MSG: geometry_msgs/Vector3
00106 # This represents a vector in free space. 
00107 
00108 float64 x
00109 float64 y
00110 float64 z
00111 ================================================================================
00112 MSG: std_msgs/ColorRGBA
00113 float32 r
00114 float32 g
00115 float32 b
00116 float32 a
00117 
00118 """
00119   __slots__ = ['objectId','markers']
00120   _slot_types = ['int32','visualization_msgs/Marker[]']
00121 
00122   def __init__(self, *args, **kwds):
00123     """
00124     Constructor. Any message fields that are implicitly/explicitly
00125     set to None will be assigned a default value. The recommend
00126     use is keyword arguments as this is more robust to future message
00127     changes.  You cannot mix in-order arguments and keyword arguments.
00128 
00129     The available fields are:
00130        objectId,markers
00131 
00132     :param args: complete set of field values, in .msg order
00133     :param kwds: use keyword arguments corresponding to message field names
00134     to set specific fields.
00135     """
00136     if args or kwds:
00137       super(urdf, self).__init__(*args, **kwds)
00138       #message fields cannot be None, assign default values for those that are
00139       if self.objectId is None:
00140         self.objectId = 0
00141       if self.markers is None:
00142         self.markers = []
00143     else:
00144       self.objectId = 0
00145       self.markers = []
00146 
00147   def _get_types(self):
00148     """
00149     internal API method
00150     """
00151     return self._slot_types
00152 
00153   def serialize(self, buff):
00154     """
00155     serialize message into buffer
00156     :param buff: buffer, ``StringIO``
00157     """
00158     try:
00159       buff.write(_struct_i.pack(self.objectId))
00160       length = len(self.markers)
00161       buff.write(_struct_I.pack(length))
00162       for val1 in self.markers:
00163         _v1 = val1.header
00164         buff.write(_struct_I.pack(_v1.seq))
00165         _v2 = _v1.stamp
00166         _x = _v2
00167         buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00168         _x = _v1.frame_id
00169         length = len(_x)
00170         if python3 or type(_x) == unicode:
00171           _x = _x.encode('utf-8')
00172           length = len(_x)
00173         buff.write(struct.pack('<I%ss'%length, length, _x))
00174         _x = val1.ns
00175         length = len(_x)
00176         if python3 or type(_x) == unicode:
00177           _x = _x.encode('utf-8')
00178           length = len(_x)
00179         buff.write(struct.pack('<I%ss'%length, length, _x))
00180         _x = val1
00181         buff.write(_struct_3i.pack(_x.id, _x.type, _x.action))
00182         _v3 = val1.pose
00183         _v4 = _v3.position
00184         _x = _v4
00185         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00186         _v5 = _v3.orientation
00187         _x = _v5
00188         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00189         _v6 = val1.scale
00190         _x = _v6
00191         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00192         _v7 = val1.color
00193         _x = _v7
00194         buff.write(_struct_4f.pack(_x.r, _x.g, _x.b, _x.a))
00195         _v8 = val1.lifetime
00196         _x = _v8
00197         buff.write(_struct_2i.pack(_x.secs, _x.nsecs))
00198         buff.write(_struct_B.pack(val1.frame_locked))
00199         length = len(val1.points)
00200         buff.write(_struct_I.pack(length))
00201         for val2 in val1.points:
00202           _x = val2
00203           buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00204         length = len(val1.colors)
00205         buff.write(_struct_I.pack(length))
00206         for val2 in val1.colors:
00207           _x = val2
00208           buff.write(_struct_4f.pack(_x.r, _x.g, _x.b, _x.a))
00209         _x = val1.text
00210         length = len(_x)
00211         if python3 or type(_x) == unicode:
00212           _x = _x.encode('utf-8')
00213           length = len(_x)
00214         buff.write(struct.pack('<I%ss'%length, length, _x))
00215         _x = val1.mesh_resource
00216         length = len(_x)
00217         if python3 or type(_x) == unicode:
00218           _x = _x.encode('utf-8')
00219           length = len(_x)
00220         buff.write(struct.pack('<I%ss'%length, length, _x))
00221         buff.write(_struct_B.pack(val1.mesh_use_embedded_materials))
00222     except struct.error as se: self._check_types(se)
00223     except TypeError as te: self._check_types(te)
00224 
00225   def deserialize(self, str):
00226     """
00227     unpack serialized message in str into this message instance
00228     :param str: byte array of serialized message, ``str``
00229     """
00230     try:
00231       if self.markers is None:
00232         self.markers = None
00233       end = 0
00234       start = end
00235       end += 4
00236       (self.objectId,) = _struct_i.unpack(str[start:end])
00237       start = end
00238       end += 4
00239       (length,) = _struct_I.unpack(str[start:end])
00240       self.markers = []
00241       for i in range(0, length):
00242         val1 = visualization_msgs.msg.Marker()
00243         _v9 = val1.header
00244         start = end
00245         end += 4
00246         (_v9.seq,) = _struct_I.unpack(str[start:end])
00247         _v10 = _v9.stamp
00248         _x = _v10
00249         start = end
00250         end += 8
00251         (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00252         start = end
00253         end += 4
00254         (length,) = _struct_I.unpack(str[start:end])
00255         start = end
00256         end += length
00257         if python3:
00258           _v9.frame_id = str[start:end].decode('utf-8')
00259         else:
00260           _v9.frame_id = str[start:end]
00261         start = end
00262         end += 4
00263         (length,) = _struct_I.unpack(str[start:end])
00264         start = end
00265         end += length
00266         if python3:
00267           val1.ns = str[start:end].decode('utf-8')
00268         else:
00269           val1.ns = str[start:end]
00270         _x = val1
00271         start = end
00272         end += 12
00273         (_x.id, _x.type, _x.action,) = _struct_3i.unpack(str[start:end])
00274         _v11 = val1.pose
00275         _v12 = _v11.position
00276         _x = _v12
00277         start = end
00278         end += 24
00279         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00280         _v13 = _v11.orientation
00281         _x = _v13
00282         start = end
00283         end += 32
00284         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00285         _v14 = val1.scale
00286         _x = _v14
00287         start = end
00288         end += 24
00289         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00290         _v15 = val1.color
00291         _x = _v15
00292         start = end
00293         end += 16
00294         (_x.r, _x.g, _x.b, _x.a,) = _struct_4f.unpack(str[start:end])
00295         _v16 = val1.lifetime
00296         _x = _v16
00297         start = end
00298         end += 8
00299         (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end])
00300         start = end
00301         end += 1
00302         (val1.frame_locked,) = _struct_B.unpack(str[start:end])
00303         val1.frame_locked = bool(val1.frame_locked)
00304         start = end
00305         end += 4
00306         (length,) = _struct_I.unpack(str[start:end])
00307         val1.points = []
00308         for i in range(0, length):
00309           val2 = geometry_msgs.msg.Point()
00310           _x = val2
00311           start = end
00312           end += 24
00313           (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00314           val1.points.append(val2)
00315         start = end
00316         end += 4
00317         (length,) = _struct_I.unpack(str[start:end])
00318         val1.colors = []
00319         for i in range(0, length):
00320           val2 = std_msgs.msg.ColorRGBA()
00321           _x = val2
00322           start = end
00323           end += 16
00324           (_x.r, _x.g, _x.b, _x.a,) = _struct_4f.unpack(str[start:end])
00325           val1.colors.append(val2)
00326         start = end
00327         end += 4
00328         (length,) = _struct_I.unpack(str[start:end])
00329         start = end
00330         end += length
00331         if python3:
00332           val1.text = str[start:end].decode('utf-8')
00333         else:
00334           val1.text = str[start:end]
00335         start = end
00336         end += 4
00337         (length,) = _struct_I.unpack(str[start:end])
00338         start = end
00339         end += length
00340         if python3:
00341           val1.mesh_resource = str[start:end].decode('utf-8')
00342         else:
00343           val1.mesh_resource = str[start:end]
00344         start = end
00345         end += 1
00346         (val1.mesh_use_embedded_materials,) = _struct_B.unpack(str[start:end])
00347         val1.mesh_use_embedded_materials = bool(val1.mesh_use_embedded_materials)
00348         self.markers.append(val1)
00349       return self
00350     except struct.error as e:
00351       raise genpy.DeserializationError(e) #most likely buffer underfill
00352 
00353 
00354   def serialize_numpy(self, buff, numpy):
00355     """
00356     serialize message with numpy array types into buffer
00357     :param buff: buffer, ``StringIO``
00358     :param numpy: numpy python module
00359     """
00360     try:
00361       buff.write(_struct_i.pack(self.objectId))
00362       length = len(self.markers)
00363       buff.write(_struct_I.pack(length))
00364       for val1 in self.markers:
00365         _v17 = val1.header
00366         buff.write(_struct_I.pack(_v17.seq))
00367         _v18 = _v17.stamp
00368         _x = _v18
00369         buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00370         _x = _v17.frame_id
00371         length = len(_x)
00372         if python3 or type(_x) == unicode:
00373           _x = _x.encode('utf-8')
00374           length = len(_x)
00375         buff.write(struct.pack('<I%ss'%length, length, _x))
00376         _x = val1.ns
00377         length = len(_x)
00378         if python3 or type(_x) == unicode:
00379           _x = _x.encode('utf-8')
00380           length = len(_x)
00381         buff.write(struct.pack('<I%ss'%length, length, _x))
00382         _x = val1
00383         buff.write(_struct_3i.pack(_x.id, _x.type, _x.action))
00384         _v19 = val1.pose
00385         _v20 = _v19.position
00386         _x = _v20
00387         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00388         _v21 = _v19.orientation
00389         _x = _v21
00390         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00391         _v22 = val1.scale
00392         _x = _v22
00393         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00394         _v23 = val1.color
00395         _x = _v23
00396         buff.write(_struct_4f.pack(_x.r, _x.g, _x.b, _x.a))
00397         _v24 = val1.lifetime
00398         _x = _v24
00399         buff.write(_struct_2i.pack(_x.secs, _x.nsecs))
00400         buff.write(_struct_B.pack(val1.frame_locked))
00401         length = len(val1.points)
00402         buff.write(_struct_I.pack(length))
00403         for val2 in val1.points:
00404           _x = val2
00405           buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00406         length = len(val1.colors)
00407         buff.write(_struct_I.pack(length))
00408         for val2 in val1.colors:
00409           _x = val2
00410           buff.write(_struct_4f.pack(_x.r, _x.g, _x.b, _x.a))
00411         _x = val1.text
00412         length = len(_x)
00413         if python3 or type(_x) == unicode:
00414           _x = _x.encode('utf-8')
00415           length = len(_x)
00416         buff.write(struct.pack('<I%ss'%length, length, _x))
00417         _x = val1.mesh_resource
00418         length = len(_x)
00419         if python3 or type(_x) == unicode:
00420           _x = _x.encode('utf-8')
00421           length = len(_x)
00422         buff.write(struct.pack('<I%ss'%length, length, _x))
00423         buff.write(_struct_B.pack(val1.mesh_use_embedded_materials))
00424     except struct.error as se: self._check_types(se)
00425     except TypeError as te: self._check_types(te)
00426 
00427   def deserialize_numpy(self, str, numpy):
00428     """
00429     unpack serialized message in str into this message instance using numpy for array types
00430     :param str: byte array of serialized message, ``str``
00431     :param numpy: numpy python module
00432     """
00433     try:
00434       if self.markers is None:
00435         self.markers = None
00436       end = 0
00437       start = end
00438       end += 4
00439       (self.objectId,) = _struct_i.unpack(str[start:end])
00440       start = end
00441       end += 4
00442       (length,) = _struct_I.unpack(str[start:end])
00443       self.markers = []
00444       for i in range(0, length):
00445         val1 = visualization_msgs.msg.Marker()
00446         _v25 = val1.header
00447         start = end
00448         end += 4
00449         (_v25.seq,) = _struct_I.unpack(str[start:end])
00450         _v26 = _v25.stamp
00451         _x = _v26
00452         start = end
00453         end += 8
00454         (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00455         start = end
00456         end += 4
00457         (length,) = _struct_I.unpack(str[start:end])
00458         start = end
00459         end += length
00460         if python3:
00461           _v25.frame_id = str[start:end].decode('utf-8')
00462         else:
00463           _v25.frame_id = 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.ns = str[start:end].decode('utf-8')
00471         else:
00472           val1.ns = str[start:end]
00473         _x = val1
00474         start = end
00475         end += 12
00476         (_x.id, _x.type, _x.action,) = _struct_3i.unpack(str[start:end])
00477         _v27 = val1.pose
00478         _v28 = _v27.position
00479         _x = _v28
00480         start = end
00481         end += 24
00482         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00483         _v29 = _v27.orientation
00484         _x = _v29
00485         start = end
00486         end += 32
00487         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00488         _v30 = val1.scale
00489         _x = _v30
00490         start = end
00491         end += 24
00492         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00493         _v31 = val1.color
00494         _x = _v31
00495         start = end
00496         end += 16
00497         (_x.r, _x.g, _x.b, _x.a,) = _struct_4f.unpack(str[start:end])
00498         _v32 = val1.lifetime
00499         _x = _v32
00500         start = end
00501         end += 8
00502         (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end])
00503         start = end
00504         end += 1
00505         (val1.frame_locked,) = _struct_B.unpack(str[start:end])
00506         val1.frame_locked = bool(val1.frame_locked)
00507         start = end
00508         end += 4
00509         (length,) = _struct_I.unpack(str[start:end])
00510         val1.points = []
00511         for i in range(0, length):
00512           val2 = geometry_msgs.msg.Point()
00513           _x = val2
00514           start = end
00515           end += 24
00516           (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00517           val1.points.append(val2)
00518         start = end
00519         end += 4
00520         (length,) = _struct_I.unpack(str[start:end])
00521         val1.colors = []
00522         for i in range(0, length):
00523           val2 = std_msgs.msg.ColorRGBA()
00524           _x = val2
00525           start = end
00526           end += 16
00527           (_x.r, _x.g, _x.b, _x.a,) = _struct_4f.unpack(str[start:end])
00528           val1.colors.append(val2)
00529         start = end
00530         end += 4
00531         (length,) = _struct_I.unpack(str[start:end])
00532         start = end
00533         end += length
00534         if python3:
00535           val1.text = str[start:end].decode('utf-8')
00536         else:
00537           val1.text = str[start:end]
00538         start = end
00539         end += 4
00540         (length,) = _struct_I.unpack(str[start:end])
00541         start = end
00542         end += length
00543         if python3:
00544           val1.mesh_resource = str[start:end].decode('utf-8')
00545         else:
00546           val1.mesh_resource = str[start:end]
00547         start = end
00548         end += 1
00549         (val1.mesh_use_embedded_materials,) = _struct_B.unpack(str[start:end])
00550         val1.mesh_use_embedded_materials = bool(val1.mesh_use_embedded_materials)
00551         self.markers.append(val1)
00552       return self
00553     except struct.error as e:
00554       raise genpy.DeserializationError(e) #most likely buffer underfill
00555 
00556 _struct_I = genpy.struct_I
00557 _struct_B = struct.Struct("<B")
00558 _struct_i = struct.Struct("<i")
00559 _struct_2i = struct.Struct("<2i")
00560 _struct_3i = struct.Struct("<3i")
00561 _struct_4f = struct.Struct("<4f")
00562 _struct_4d = struct.Struct("<4d")
00563 _struct_2I = struct.Struct("<2I")
00564 _struct_3d = struct.Struct("<3d")


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