_GetPoseResult.py
Go to the documentation of this file.
00001 """autogenerated by genpy from pr2_object_manipulation_msgs/GetPoseResult.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 GetPoseResult(genpy.Message):
00011   _md5sum = "3f8930d968a3e84d471dff917bb1cdae"
00012   _type = "pr2_object_manipulation_msgs/GetPoseResult"
00013   _has_header = False #flag to mark the presence of a Header object
00014   _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00015 # the returned pose, assuming the user has clicked "accept"
00016 # if the user clicks "cancel" the action aborts
00017 geometry_msgs/PoseStamped pose
00018 
00019 
00020 ================================================================================
00021 MSG: geometry_msgs/PoseStamped
00022 # A Pose with reference coordinate frame and timestamp
00023 Header header
00024 Pose pose
00025 
00026 ================================================================================
00027 MSG: std_msgs/Header
00028 # Standard metadata for higher-level stamped data types.
00029 # This is generally used to communicate timestamped data 
00030 # in a particular coordinate frame.
00031 # 
00032 # sequence ID: consecutively increasing ID 
00033 uint32 seq
00034 #Two-integer timestamp that is expressed as:
00035 # * stamp.secs: seconds (stamp_secs) since epoch
00036 # * stamp.nsecs: nanoseconds since stamp_secs
00037 # time-handling sugar is provided by the client library
00038 time stamp
00039 #Frame this data is associated with
00040 # 0: no frame
00041 # 1: global frame
00042 string frame_id
00043 
00044 ================================================================================
00045 MSG: geometry_msgs/Pose
00046 # A representation of pose in free space, composed of postion and orientation. 
00047 Point position
00048 Quaternion orientation
00049 
00050 ================================================================================
00051 MSG: geometry_msgs/Point
00052 # This contains the position of a point in free space
00053 float64 x
00054 float64 y
00055 float64 z
00056 
00057 ================================================================================
00058 MSG: geometry_msgs/Quaternion
00059 # This represents an orientation in free space in quaternion form.
00060 
00061 float64 x
00062 float64 y
00063 float64 z
00064 float64 w
00065 
00066 """
00067   __slots__ = ['pose']
00068   _slot_types = ['geometry_msgs/PoseStamped']
00069 
00070   def __init__(self, *args, **kwds):
00071     """
00072     Constructor. Any message fields that are implicitly/explicitly
00073     set to None will be assigned a default value. The recommend
00074     use is keyword arguments as this is more robust to future message
00075     changes.  You cannot mix in-order arguments and keyword arguments.
00076 
00077     The available fields are:
00078        pose
00079 
00080     :param args: complete set of field values, in .msg order
00081     :param kwds: use keyword arguments corresponding to message field names
00082     to set specific fields.
00083     """
00084     if args or kwds:
00085       super(GetPoseResult, self).__init__(*args, **kwds)
00086       #message fields cannot be None, assign default values for those that are
00087       if self.pose is None:
00088         self.pose = geometry_msgs.msg.PoseStamped()
00089     else:
00090       self.pose = geometry_msgs.msg.PoseStamped()
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       _x = self
00105       buff.write(_struct_3I.pack(_x.pose.header.seq, _x.pose.header.stamp.secs, _x.pose.header.stamp.nsecs))
00106       _x = self.pose.header.frame_id
00107       length = len(_x)
00108       if python3 or type(_x) == unicode:
00109         _x = _x.encode('utf-8')
00110         length = len(_x)
00111       buff.write(struct.pack('<I%ss'%length, length, _x))
00112       _x = self
00113       buff.write(_struct_7d.pack(_x.pose.pose.position.x, _x.pose.pose.position.y, _x.pose.pose.position.z, _x.pose.pose.orientation.x, _x.pose.pose.orientation.y, _x.pose.pose.orientation.z, _x.pose.pose.orientation.w))
00114     except struct.error as se: self._check_types(se)
00115     except TypeError as te: self._check_types(te)
00116 
00117   def deserialize(self, str):
00118     """
00119     unpack serialized message in str into this message instance
00120     :param str: byte array of serialized message, ``str``
00121     """
00122     try:
00123       if self.pose is None:
00124         self.pose = geometry_msgs.msg.PoseStamped()
00125       end = 0
00126       _x = self
00127       start = end
00128       end += 12
00129       (_x.pose.header.seq, _x.pose.header.stamp.secs, _x.pose.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00130       start = end
00131       end += 4
00132       (length,) = _struct_I.unpack(str[start:end])
00133       start = end
00134       end += length
00135       if python3:
00136         self.pose.header.frame_id = str[start:end].decode('utf-8')
00137       else:
00138         self.pose.header.frame_id = str[start:end]
00139       _x = self
00140       start = end
00141       end += 56
00142       (_x.pose.pose.position.x, _x.pose.pose.position.y, _x.pose.pose.position.z, _x.pose.pose.orientation.x, _x.pose.pose.orientation.y, _x.pose.pose.orientation.z, _x.pose.pose.orientation.w,) = _struct_7d.unpack(str[start:end])
00143       return self
00144     except struct.error as e:
00145       raise genpy.DeserializationError(e) #most likely buffer underfill
00146 
00147 
00148   def serialize_numpy(self, buff, numpy):
00149     """
00150     serialize message with numpy array types into buffer
00151     :param buff: buffer, ``StringIO``
00152     :param numpy: numpy python module
00153     """
00154     try:
00155       _x = self
00156       buff.write(_struct_3I.pack(_x.pose.header.seq, _x.pose.header.stamp.secs, _x.pose.header.stamp.nsecs))
00157       _x = self.pose.header.frame_id
00158       length = len(_x)
00159       if python3 or type(_x) == unicode:
00160         _x = _x.encode('utf-8')
00161         length = len(_x)
00162       buff.write(struct.pack('<I%ss'%length, length, _x))
00163       _x = self
00164       buff.write(_struct_7d.pack(_x.pose.pose.position.x, _x.pose.pose.position.y, _x.pose.pose.position.z, _x.pose.pose.orientation.x, _x.pose.pose.orientation.y, _x.pose.pose.orientation.z, _x.pose.pose.orientation.w))
00165     except struct.error as se: self._check_types(se)
00166     except TypeError as te: self._check_types(te)
00167 
00168   def deserialize_numpy(self, str, numpy):
00169     """
00170     unpack serialized message in str into this message instance using numpy for array types
00171     :param str: byte array of serialized message, ``str``
00172     :param numpy: numpy python module
00173     """
00174     try:
00175       if self.pose is None:
00176         self.pose = geometry_msgs.msg.PoseStamped()
00177       end = 0
00178       _x = self
00179       start = end
00180       end += 12
00181       (_x.pose.header.seq, _x.pose.header.stamp.secs, _x.pose.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00182       start = end
00183       end += 4
00184       (length,) = _struct_I.unpack(str[start:end])
00185       start = end
00186       end += length
00187       if python3:
00188         self.pose.header.frame_id = str[start:end].decode('utf-8')
00189       else:
00190         self.pose.header.frame_id = str[start:end]
00191       _x = self
00192       start = end
00193       end += 56
00194       (_x.pose.pose.position.x, _x.pose.pose.position.y, _x.pose.pose.position.z, _x.pose.pose.orientation.x, _x.pose.pose.orientation.y, _x.pose.pose.orientation.z, _x.pose.pose.orientation.w,) = _struct_7d.unpack(str[start:end])
00195       return self
00196     except struct.error as e:
00197       raise genpy.DeserializationError(e) #most likely buffer underfill
00198 
00199 _struct_I = genpy.struct_I
00200 _struct_3I = struct.Struct("<3I")
00201 _struct_7d = struct.Struct("<7d")


pr2_object_manipulation_msgs
Author(s): Matei Ciocarlie
autogenerated on Fri Jan 3 2014 11:59:13