_ButtonAction.py
Go to the documentation of this file.
00001 """autogenerated by genpy from hrl_clickable_world/ButtonActionRequest.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 geometry_msgs.msg
00008 import std_msgs.msg
00009 
00010 class ButtonActionRequest(genpy.Message):
00011   _md5sum = "a8c0927f3216b0c74079386e4a99613b"
00012   _type = "hrl_clickable_world/ButtonActionRequest"
00013   _has_header = False #flag to mark the presence of a Header object
00014   _full_text = """int32 pixel_x
00015 int32 pixel_y
00016 string camera_frame
00017 int32 button_id
00018 string button_type
00019 geometry_msgs/PointStamped pixel3d
00020 
00021 ================================================================================
00022 MSG: geometry_msgs/PointStamped
00023 # This represents a Point with reference coordinate frame and timestamp
00024 Header header
00025 Point point
00026 
00027 ================================================================================
00028 MSG: std_msgs/Header
00029 # Standard metadata for higher-level stamped data types.
00030 # This is generally used to communicate timestamped data 
00031 # in a particular coordinate frame.
00032 # 
00033 # sequence ID: consecutively increasing ID 
00034 uint32 seq
00035 #Two-integer timestamp that is expressed as:
00036 # * stamp.secs: seconds (stamp_secs) since epoch
00037 # * stamp.nsecs: nanoseconds since stamp_secs
00038 # time-handling sugar is provided by the client library
00039 time stamp
00040 #Frame this data is associated with
00041 # 0: no frame
00042 # 1: global frame
00043 string frame_id
00044 
00045 ================================================================================
00046 MSG: geometry_msgs/Point
00047 # This contains the position of a point in free space
00048 float64 x
00049 float64 y
00050 float64 z
00051 
00052 """
00053   __slots__ = ['pixel_x','pixel_y','camera_frame','button_id','button_type','pixel3d']
00054   _slot_types = ['int32','int32','string','int32','string','geometry_msgs/PointStamped']
00055 
00056   def __init__(self, *args, **kwds):
00057     """
00058     Constructor. Any message fields that are implicitly/explicitly
00059     set to None will be assigned a default value. The recommend
00060     use is keyword arguments as this is more robust to future message
00061     changes.  You cannot mix in-order arguments and keyword arguments.
00062 
00063     The available fields are:
00064        pixel_x,pixel_y,camera_frame,button_id,button_type,pixel3d
00065 
00066     :param args: complete set of field values, in .msg order
00067     :param kwds: use keyword arguments corresponding to message field names
00068     to set specific fields.
00069     """
00070     if args or kwds:
00071       super(ButtonActionRequest, self).__init__(*args, **kwds)
00072       #message fields cannot be None, assign default values for those that are
00073       if self.pixel_x is None:
00074         self.pixel_x = 0
00075       if self.pixel_y is None:
00076         self.pixel_y = 0
00077       if self.camera_frame is None:
00078         self.camera_frame = ''
00079       if self.button_id is None:
00080         self.button_id = 0
00081       if self.button_type is None:
00082         self.button_type = ''
00083       if self.pixel3d is None:
00084         self.pixel3d = geometry_msgs.msg.PointStamped()
00085     else:
00086       self.pixel_x = 0
00087       self.pixel_y = 0
00088       self.camera_frame = ''
00089       self.button_id = 0
00090       self.button_type = ''
00091       self.pixel3d = geometry_msgs.msg.PointStamped()
00092 
00093   def _get_types(self):
00094     """
00095     internal API method
00096     """
00097     return self._slot_types
00098 
00099   def serialize(self, buff):
00100     """
00101     serialize message into buffer
00102     :param buff: buffer, ``StringIO``
00103     """
00104     try:
00105       _x = self
00106       buff.write(_struct_2i.pack(_x.pixel_x, _x.pixel_y))
00107       _x = self.camera_frame
00108       length = len(_x)
00109       if python3 or type(_x) == unicode:
00110         _x = _x.encode('utf-8')
00111         length = len(_x)
00112       buff.write(struct.pack('<I%ss'%length, length, _x))
00113       buff.write(_struct_i.pack(self.button_id))
00114       _x = self.button_type
00115       length = len(_x)
00116       if python3 or type(_x) == unicode:
00117         _x = _x.encode('utf-8')
00118         length = len(_x)
00119       buff.write(struct.pack('<I%ss'%length, length, _x))
00120       _x = self
00121       buff.write(_struct_3I.pack(_x.pixel3d.header.seq, _x.pixel3d.header.stamp.secs, _x.pixel3d.header.stamp.nsecs))
00122       _x = self.pixel3d.header.frame_id
00123       length = len(_x)
00124       if python3 or type(_x) == unicode:
00125         _x = _x.encode('utf-8')
00126         length = len(_x)
00127       buff.write(struct.pack('<I%ss'%length, length, _x))
00128       _x = self
00129       buff.write(_struct_3d.pack(_x.pixel3d.point.x, _x.pixel3d.point.y, _x.pixel3d.point.z))
00130     except struct.error as se: self._check_types(se)
00131     except TypeError as te: self._check_types(te)
00132 
00133   def deserialize(self, str):
00134     """
00135     unpack serialized message in str into this message instance
00136     :param str: byte array of serialized message, ``str``
00137     """
00138     try:
00139       if self.pixel3d is None:
00140         self.pixel3d = geometry_msgs.msg.PointStamped()
00141       end = 0
00142       _x = self
00143       start = end
00144       end += 8
00145       (_x.pixel_x, _x.pixel_y,) = _struct_2i.unpack(str[start:end])
00146       start = end
00147       end += 4
00148       (length,) = _struct_I.unpack(str[start:end])
00149       start = end
00150       end += length
00151       if python3:
00152         self.camera_frame = str[start:end].decode('utf-8')
00153       else:
00154         self.camera_frame = str[start:end]
00155       start = end
00156       end += 4
00157       (self.button_id,) = _struct_i.unpack(str[start:end])
00158       start = end
00159       end += 4
00160       (length,) = _struct_I.unpack(str[start:end])
00161       start = end
00162       end += length
00163       if python3:
00164         self.button_type = str[start:end].decode('utf-8')
00165       else:
00166         self.button_type = str[start:end]
00167       _x = self
00168       start = end
00169       end += 12
00170       (_x.pixel3d.header.seq, _x.pixel3d.header.stamp.secs, _x.pixel3d.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00171       start = end
00172       end += 4
00173       (length,) = _struct_I.unpack(str[start:end])
00174       start = end
00175       end += length
00176       if python3:
00177         self.pixel3d.header.frame_id = str[start:end].decode('utf-8')
00178       else:
00179         self.pixel3d.header.frame_id = str[start:end]
00180       _x = self
00181       start = end
00182       end += 24
00183       (_x.pixel3d.point.x, _x.pixel3d.point.y, _x.pixel3d.point.z,) = _struct_3d.unpack(str[start:end])
00184       return self
00185     except struct.error as e:
00186       raise genpy.DeserializationError(e) #most likely buffer underfill
00187 
00188 
00189   def serialize_numpy(self, buff, numpy):
00190     """
00191     serialize message with numpy array types into buffer
00192     :param buff: buffer, ``StringIO``
00193     :param numpy: numpy python module
00194     """
00195     try:
00196       _x = self
00197       buff.write(_struct_2i.pack(_x.pixel_x, _x.pixel_y))
00198       _x = self.camera_frame
00199       length = len(_x)
00200       if python3 or type(_x) == unicode:
00201         _x = _x.encode('utf-8')
00202         length = len(_x)
00203       buff.write(struct.pack('<I%ss'%length, length, _x))
00204       buff.write(_struct_i.pack(self.button_id))
00205       _x = self.button_type
00206       length = len(_x)
00207       if python3 or type(_x) == unicode:
00208         _x = _x.encode('utf-8')
00209         length = len(_x)
00210       buff.write(struct.pack('<I%ss'%length, length, _x))
00211       _x = self
00212       buff.write(_struct_3I.pack(_x.pixel3d.header.seq, _x.pixel3d.header.stamp.secs, _x.pixel3d.header.stamp.nsecs))
00213       _x = self.pixel3d.header.frame_id
00214       length = len(_x)
00215       if python3 or type(_x) == unicode:
00216         _x = _x.encode('utf-8')
00217         length = len(_x)
00218       buff.write(struct.pack('<I%ss'%length, length, _x))
00219       _x = self
00220       buff.write(_struct_3d.pack(_x.pixel3d.point.x, _x.pixel3d.point.y, _x.pixel3d.point.z))
00221     except struct.error as se: self._check_types(se)
00222     except TypeError as te: self._check_types(te)
00223 
00224   def deserialize_numpy(self, str, numpy):
00225     """
00226     unpack serialized message in str into this message instance using numpy for array types
00227     :param str: byte array of serialized message, ``str``
00228     :param numpy: numpy python module
00229     """
00230     try:
00231       if self.pixel3d is None:
00232         self.pixel3d = geometry_msgs.msg.PointStamped()
00233       end = 0
00234       _x = self
00235       start = end
00236       end += 8
00237       (_x.pixel_x, _x.pixel_y,) = _struct_2i.unpack(str[start:end])
00238       start = end
00239       end += 4
00240       (length,) = _struct_I.unpack(str[start:end])
00241       start = end
00242       end += length
00243       if python3:
00244         self.camera_frame = str[start:end].decode('utf-8')
00245       else:
00246         self.camera_frame = str[start:end]
00247       start = end
00248       end += 4
00249       (self.button_id,) = _struct_i.unpack(str[start:end])
00250       start = end
00251       end += 4
00252       (length,) = _struct_I.unpack(str[start:end])
00253       start = end
00254       end += length
00255       if python3:
00256         self.button_type = str[start:end].decode('utf-8')
00257       else:
00258         self.button_type = str[start:end]
00259       _x = self
00260       start = end
00261       end += 12
00262       (_x.pixel3d.header.seq, _x.pixel3d.header.stamp.secs, _x.pixel3d.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00263       start = end
00264       end += 4
00265       (length,) = _struct_I.unpack(str[start:end])
00266       start = end
00267       end += length
00268       if python3:
00269         self.pixel3d.header.frame_id = str[start:end].decode('utf-8')
00270       else:
00271         self.pixel3d.header.frame_id = str[start:end]
00272       _x = self
00273       start = end
00274       end += 24
00275       (_x.pixel3d.point.x, _x.pixel3d.point.y, _x.pixel3d.point.z,) = _struct_3d.unpack(str[start:end])
00276       return self
00277     except struct.error as e:
00278       raise genpy.DeserializationError(e) #most likely buffer underfill
00279 
00280 _struct_I = genpy.struct_I
00281 _struct_i = struct.Struct("<i")
00282 _struct_3I = struct.Struct("<3I")
00283 _struct_2i = struct.Struct("<2i")
00284 _struct_3d = struct.Struct("<3d")
00285 """autogenerated by genpy from hrl_clickable_world/ButtonActionResponse.msg. Do not edit."""
00286 import sys
00287 python3 = True if sys.hexversion > 0x03000000 else False
00288 import genpy
00289 import struct
00290 
00291 
00292 class ButtonActionResponse(genpy.Message):
00293   _md5sum = "d41d8cd98f00b204e9800998ecf8427e"
00294   _type = "hrl_clickable_world/ButtonActionResponse"
00295   _has_header = False #flag to mark the presence of a Header object
00296   _full_text = """
00297 
00298 """
00299   __slots__ = []
00300   _slot_types = []
00301 
00302   def __init__(self, *args, **kwds):
00303     """
00304     Constructor. Any message fields that are implicitly/explicitly
00305     set to None will be assigned a default value. The recommend
00306     use is keyword arguments as this is more robust to future message
00307     changes.  You cannot mix in-order arguments and keyword arguments.
00308 
00309     The available fields are:
00310        
00311 
00312     :param args: complete set of field values, in .msg order
00313     :param kwds: use keyword arguments corresponding to message field names
00314     to set specific fields.
00315     """
00316     if args or kwds:
00317       super(ButtonActionResponse, self).__init__(*args, **kwds)
00318 
00319   def _get_types(self):
00320     """
00321     internal API method
00322     """
00323     return self._slot_types
00324 
00325   def serialize(self, buff):
00326     """
00327     serialize message into buffer
00328     :param buff: buffer, ``StringIO``
00329     """
00330     try:
00331       pass
00332     except struct.error as se: self._check_types(se)
00333     except TypeError as te: self._check_types(te)
00334 
00335   def deserialize(self, str):
00336     """
00337     unpack serialized message in str into this message instance
00338     :param str: byte array of serialized message, ``str``
00339     """
00340     try:
00341       end = 0
00342       return self
00343     except struct.error as e:
00344       raise genpy.DeserializationError(e) #most likely buffer underfill
00345 
00346 
00347   def serialize_numpy(self, buff, numpy):
00348     """
00349     serialize message with numpy array types into buffer
00350     :param buff: buffer, ``StringIO``
00351     :param numpy: numpy python module
00352     """
00353     try:
00354       pass
00355     except struct.error as se: self._check_types(se)
00356     except TypeError as te: self._check_types(te)
00357 
00358   def deserialize_numpy(self, str, numpy):
00359     """
00360     unpack serialized message in str into this message instance using numpy for array types
00361     :param str: byte array of serialized message, ``str``
00362     :param numpy: numpy python module
00363     """
00364     try:
00365       end = 0
00366       return self
00367     except struct.error as e:
00368       raise genpy.DeserializationError(e) #most likely buffer underfill
00369 
00370 _struct_I = genpy.struct_I
00371 class ButtonAction(object):
00372   _type          = 'hrl_clickable_world/ButtonAction'
00373   _md5sum = 'a8c0927f3216b0c74079386e4a99613b'
00374   _request_class  = ButtonActionRequest
00375   _response_class = ButtonActionResponse


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