_ArrowOverlayCmd.py
Go to the documentation of this file.
00001 """autogenerated by genpy from hrl_clickable_display/ArrowOverlayCmd.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 ArrowOverlayCmd(genpy.Message):
00011   _md5sum = "cbca68f34fd1fd1b5535a9d01e0910d3"
00012   _type = "hrl_clickable_display/ArrowOverlayCmd"
00013   _has_header = False #flag to mark the presence of a Header object
00014   _full_text = """bool clear_arrows
00015 geometry_msgs/PoseStamped[] arrows
00016 
00017 ================================================================================
00018 MSG: geometry_msgs/PoseStamped
00019 # A Pose with reference coordinate frame and timestamp
00020 Header header
00021 Pose pose
00022 
00023 ================================================================================
00024 MSG: std_msgs/Header
00025 # Standard metadata for higher-level stamped data types.
00026 # This is generally used to communicate timestamped data 
00027 # in a particular coordinate frame.
00028 # 
00029 # sequence ID: consecutively increasing ID 
00030 uint32 seq
00031 #Two-integer timestamp that is expressed as:
00032 # * stamp.secs: seconds (stamp_secs) since epoch
00033 # * stamp.nsecs: nanoseconds since stamp_secs
00034 # time-handling sugar is provided by the client library
00035 time stamp
00036 #Frame this data is associated with
00037 # 0: no frame
00038 # 1: global frame
00039 string frame_id
00040 
00041 ================================================================================
00042 MSG: geometry_msgs/Pose
00043 # A representation of pose in free space, composed of postion and orientation. 
00044 Point position
00045 Quaternion orientation
00046 
00047 ================================================================================
00048 MSG: geometry_msgs/Point
00049 # This contains the position of a point in free space
00050 float64 x
00051 float64 y
00052 float64 z
00053 
00054 ================================================================================
00055 MSG: geometry_msgs/Quaternion
00056 # This represents an orientation in free space in quaternion form.
00057 
00058 float64 x
00059 float64 y
00060 float64 z
00061 float64 w
00062 
00063 """
00064   __slots__ = ['clear_arrows','arrows']
00065   _slot_types = ['bool','geometry_msgs/PoseStamped[]']
00066 
00067   def __init__(self, *args, **kwds):
00068     """
00069     Constructor. Any message fields that are implicitly/explicitly
00070     set to None will be assigned a default value. The recommend
00071     use is keyword arguments as this is more robust to future message
00072     changes.  You cannot mix in-order arguments and keyword arguments.
00073 
00074     The available fields are:
00075        clear_arrows,arrows
00076 
00077     :param args: complete set of field values, in .msg order
00078     :param kwds: use keyword arguments corresponding to message field names
00079     to set specific fields.
00080     """
00081     if args or kwds:
00082       super(ArrowOverlayCmd, self).__init__(*args, **kwds)
00083       #message fields cannot be None, assign default values for those that are
00084       if self.clear_arrows is None:
00085         self.clear_arrows = False
00086       if self.arrows is None:
00087         self.arrows = []
00088     else:
00089       self.clear_arrows = False
00090       self.arrows = []
00091 
00092   def _get_types(self):
00093     """
00094     internal API method
00095     """
00096     return self._slot_types
00097 
00098   def serialize(self, buff):
00099     """
00100     serialize message into buffer
00101     :param buff: buffer, ``StringIO``
00102     """
00103     try:
00104       buff.write(_struct_B.pack(self.clear_arrows))
00105       length = len(self.arrows)
00106       buff.write(_struct_I.pack(length))
00107       for val1 in self.arrows:
00108         _v1 = val1.header
00109         buff.write(_struct_I.pack(_v1.seq))
00110         _v2 = _v1.stamp
00111         _x = _v2
00112         buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00113         _x = _v1.frame_id
00114         length = len(_x)
00115         if python3 or type(_x) == unicode:
00116           _x = _x.encode('utf-8')
00117           length = len(_x)
00118         buff.write(struct.pack('<I%ss'%length, length, _x))
00119         _v3 = val1.pose
00120         _v4 = _v3.position
00121         _x = _v4
00122         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00123         _v5 = _v3.orientation
00124         _x = _v5
00125         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00126     except struct.error as se: self._check_types(se)
00127     except TypeError as te: self._check_types(te)
00128 
00129   def deserialize(self, str):
00130     """
00131     unpack serialized message in str into this message instance
00132     :param str: byte array of serialized message, ``str``
00133     """
00134     try:
00135       if self.arrows is None:
00136         self.arrows = None
00137       end = 0
00138       start = end
00139       end += 1
00140       (self.clear_arrows,) = _struct_B.unpack(str[start:end])
00141       self.clear_arrows = bool(self.clear_arrows)
00142       start = end
00143       end += 4
00144       (length,) = _struct_I.unpack(str[start:end])
00145       self.arrows = []
00146       for i in range(0, length):
00147         val1 = geometry_msgs.msg.PoseStamped()
00148         _v6 = val1.header
00149         start = end
00150         end += 4
00151         (_v6.seq,) = _struct_I.unpack(str[start:end])
00152         _v7 = _v6.stamp
00153         _x = _v7
00154         start = end
00155         end += 8
00156         (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00157         start = end
00158         end += 4
00159         (length,) = _struct_I.unpack(str[start:end])
00160         start = end
00161         end += length
00162         if python3:
00163           _v6.frame_id = str[start:end].decode('utf-8')
00164         else:
00165           _v6.frame_id = str[start:end]
00166         _v8 = val1.pose
00167         _v9 = _v8.position
00168         _x = _v9
00169         start = end
00170         end += 24
00171         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00172         _v10 = _v8.orientation
00173         _x = _v10
00174         start = end
00175         end += 32
00176         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00177         self.arrows.append(val1)
00178       return self
00179     except struct.error as e:
00180       raise genpy.DeserializationError(e) #most likely buffer underfill
00181 
00182 
00183   def serialize_numpy(self, buff, numpy):
00184     """
00185     serialize message with numpy array types into buffer
00186     :param buff: buffer, ``StringIO``
00187     :param numpy: numpy python module
00188     """
00189     try:
00190       buff.write(_struct_B.pack(self.clear_arrows))
00191       length = len(self.arrows)
00192       buff.write(_struct_I.pack(length))
00193       for val1 in self.arrows:
00194         _v11 = val1.header
00195         buff.write(_struct_I.pack(_v11.seq))
00196         _v12 = _v11.stamp
00197         _x = _v12
00198         buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00199         _x = _v11.frame_id
00200         length = len(_x)
00201         if python3 or type(_x) == unicode:
00202           _x = _x.encode('utf-8')
00203           length = len(_x)
00204         buff.write(struct.pack('<I%ss'%length, length, _x))
00205         _v13 = val1.pose
00206         _v14 = _v13.position
00207         _x = _v14
00208         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00209         _v15 = _v13.orientation
00210         _x = _v15
00211         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00212     except struct.error as se: self._check_types(se)
00213     except TypeError as te: self._check_types(te)
00214 
00215   def deserialize_numpy(self, str, numpy):
00216     """
00217     unpack serialized message in str into this message instance using numpy for array types
00218     :param str: byte array of serialized message, ``str``
00219     :param numpy: numpy python module
00220     """
00221     try:
00222       if self.arrows is None:
00223         self.arrows = None
00224       end = 0
00225       start = end
00226       end += 1
00227       (self.clear_arrows,) = _struct_B.unpack(str[start:end])
00228       self.clear_arrows = bool(self.clear_arrows)
00229       start = end
00230       end += 4
00231       (length,) = _struct_I.unpack(str[start:end])
00232       self.arrows = []
00233       for i in range(0, length):
00234         val1 = geometry_msgs.msg.PoseStamped()
00235         _v16 = val1.header
00236         start = end
00237         end += 4
00238         (_v16.seq,) = _struct_I.unpack(str[start:end])
00239         _v17 = _v16.stamp
00240         _x = _v17
00241         start = end
00242         end += 8
00243         (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00244         start = end
00245         end += 4
00246         (length,) = _struct_I.unpack(str[start:end])
00247         start = end
00248         end += length
00249         if python3:
00250           _v16.frame_id = str[start:end].decode('utf-8')
00251         else:
00252           _v16.frame_id = str[start:end]
00253         _v18 = val1.pose
00254         _v19 = _v18.position
00255         _x = _v19
00256         start = end
00257         end += 24
00258         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00259         _v20 = _v18.orientation
00260         _x = _v20
00261         start = end
00262         end += 32
00263         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00264         self.arrows.append(val1)
00265       return self
00266     except struct.error as e:
00267       raise genpy.DeserializationError(e) #most likely buffer underfill
00268 
00269 _struct_I = genpy.struct_I
00270 _struct_4d = struct.Struct("<4d")
00271 _struct_B = struct.Struct("<B")
00272 _struct_2I = struct.Struct("<2I")
00273 _struct_3d = struct.Struct("<3d")


hrl_clickable_display
Author(s): Author: Kelsey Hawkins, Advisor: Prof. Charlie Kemp (Healthcare Robotics Lab at Georgia Tech)
autogenerated on Wed Nov 27 2013 12:07:49