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


hrl_clickable_world
Author(s): Kelsey Hawkins, Advisor: Prof. Charlie Kemp (Healthcare Robotics Lab at Georgia Tech)
autogenerated on Wed Nov 27 2013 11:54:28