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


wviz_scene_manager
Author(s): Benjamin Pitzer
autogenerated on Fri Jan 3 2014 11:11:50