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


pr2_controllers_msgs
Author(s): Stuart Glaser
autogenerated on Fri Jan 3 2014 11:41:02