_GetPoseGoal.py
Go to the documentation of this file.
00001 """autogenerated by genpy from pr2_object_manipulation_msgs/GetPoseGoal.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 GetPoseGoal(genpy.Message):
00011   _md5sum = "4d7999216d003b51bbc100bf357c806e"
00012   _type = "pr2_object_manipulation_msgs/GetPoseGoal"
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 
00016 # a seed position for the pose marker. If empty (quaternion of norm 0)
00017 # the marker will be initialized at the current pose of the header frame.
00018 geometry_msgs/PoseStamped starting_pose
00019 
00020 
00021 ================================================================================
00022 MSG: geometry_msgs/PoseStamped
00023 # A Pose with reference coordinate frame and timestamp
00024 Header header
00025 Pose pose
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/Pose
00047 # A representation of pose in free space, composed of postion and orientation. 
00048 Point position
00049 Quaternion orientation
00050 
00051 ================================================================================
00052 MSG: geometry_msgs/Point
00053 # This contains the position of a point in free space
00054 float64 x
00055 float64 y
00056 float64 z
00057 
00058 ================================================================================
00059 MSG: geometry_msgs/Quaternion
00060 # This represents an orientation in free space in quaternion form.
00061 
00062 float64 x
00063 float64 y
00064 float64 z
00065 float64 w
00066 
00067 """
00068   __slots__ = ['starting_pose']
00069   _slot_types = ['geometry_msgs/PoseStamped']
00070 
00071   def __init__(self, *args, **kwds):
00072     """
00073     Constructor. Any message fields that are implicitly/explicitly
00074     set to None will be assigned a default value. The recommend
00075     use is keyword arguments as this is more robust to future message
00076     changes.  You cannot mix in-order arguments and keyword arguments.
00077 
00078     The available fields are:
00079        starting_pose
00080 
00081     :param args: complete set of field values, in .msg order
00082     :param kwds: use keyword arguments corresponding to message field names
00083     to set specific fields.
00084     """
00085     if args or kwds:
00086       super(GetPoseGoal, self).__init__(*args, **kwds)
00087       #message fields cannot be None, assign default values for those that are
00088       if self.starting_pose is None:
00089         self.starting_pose = geometry_msgs.msg.PoseStamped()
00090     else:
00091       self.starting_pose = geometry_msgs.msg.PoseStamped()
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_3I.pack(_x.starting_pose.header.seq, _x.starting_pose.header.stamp.secs, _x.starting_pose.header.stamp.nsecs))
00107       _x = self.starting_pose.header.frame_id
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       _x = self
00114       buff.write(_struct_7d.pack(_x.starting_pose.pose.position.x, _x.starting_pose.pose.position.y, _x.starting_pose.pose.position.z, _x.starting_pose.pose.orientation.x, _x.starting_pose.pose.orientation.y, _x.starting_pose.pose.orientation.z, _x.starting_pose.pose.orientation.w))
00115     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00116     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00117 
00118   def deserialize(self, str):
00119     """
00120     unpack serialized message in str into this message instance
00121     :param str: byte array of serialized message, ``str``
00122     """
00123     try:
00124       if self.starting_pose is None:
00125         self.starting_pose = geometry_msgs.msg.PoseStamped()
00126       end = 0
00127       _x = self
00128       start = end
00129       end += 12
00130       (_x.starting_pose.header.seq, _x.starting_pose.header.stamp.secs, _x.starting_pose.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00131       start = end
00132       end += 4
00133       (length,) = _struct_I.unpack(str[start:end])
00134       start = end
00135       end += length
00136       if python3:
00137         self.starting_pose.header.frame_id = str[start:end].decode('utf-8')
00138       else:
00139         self.starting_pose.header.frame_id = str[start:end]
00140       _x = self
00141       start = end
00142       end += 56
00143       (_x.starting_pose.pose.position.x, _x.starting_pose.pose.position.y, _x.starting_pose.pose.position.z, _x.starting_pose.pose.orientation.x, _x.starting_pose.pose.orientation.y, _x.starting_pose.pose.orientation.z, _x.starting_pose.pose.orientation.w,) = _struct_7d.unpack(str[start:end])
00144       return self
00145     except struct.error as e:
00146       raise genpy.DeserializationError(e) #most likely buffer underfill
00147 
00148 
00149   def serialize_numpy(self, buff, numpy):
00150     """
00151     serialize message with numpy array types into buffer
00152     :param buff: buffer, ``StringIO``
00153     :param numpy: numpy python module
00154     """
00155     try:
00156       _x = self
00157       buff.write(_struct_3I.pack(_x.starting_pose.header.seq, _x.starting_pose.header.stamp.secs, _x.starting_pose.header.stamp.nsecs))
00158       _x = self.starting_pose.header.frame_id
00159       length = len(_x)
00160       if python3 or type(_x) == unicode:
00161         _x = _x.encode('utf-8')
00162         length = len(_x)
00163       buff.write(struct.pack('<I%ss'%length, length, _x))
00164       _x = self
00165       buff.write(_struct_7d.pack(_x.starting_pose.pose.position.x, _x.starting_pose.pose.position.y, _x.starting_pose.pose.position.z, _x.starting_pose.pose.orientation.x, _x.starting_pose.pose.orientation.y, _x.starting_pose.pose.orientation.z, _x.starting_pose.pose.orientation.w))
00166     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00167     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00168 
00169   def deserialize_numpy(self, str, numpy):
00170     """
00171     unpack serialized message in str into this message instance using numpy for array types
00172     :param str: byte array of serialized message, ``str``
00173     :param numpy: numpy python module
00174     """
00175     try:
00176       if self.starting_pose is None:
00177         self.starting_pose = geometry_msgs.msg.PoseStamped()
00178       end = 0
00179       _x = self
00180       start = end
00181       end += 12
00182       (_x.starting_pose.header.seq, _x.starting_pose.header.stamp.secs, _x.starting_pose.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00183       start = end
00184       end += 4
00185       (length,) = _struct_I.unpack(str[start:end])
00186       start = end
00187       end += length
00188       if python3:
00189         self.starting_pose.header.frame_id = str[start:end].decode('utf-8')
00190       else:
00191         self.starting_pose.header.frame_id = str[start:end]
00192       _x = self
00193       start = end
00194       end += 56
00195       (_x.starting_pose.pose.position.x, _x.starting_pose.pose.position.y, _x.starting_pose.pose.position.z, _x.starting_pose.pose.orientation.x, _x.starting_pose.pose.orientation.y, _x.starting_pose.pose.orientation.z, _x.starting_pose.pose.orientation.w,) = _struct_7d.unpack(str[start:end])
00196       return self
00197     except struct.error as e:
00198       raise genpy.DeserializationError(e) #most likely buffer underfill
00199 
00200 _struct_I = genpy.struct_I
00201 _struct_3I = struct.Struct("<3I")
00202 _struct_7d = struct.Struct("<7d")


pr2_object_manipulation_msgs
Author(s): Matei Ciocarlie
autogenerated on Mon Oct 6 2014 11:55:20