_GetGripperPoseFeedback.py
Go to the documentation of this file.
00001 """autogenerated by genpy from pr2_object_manipulation_msgs/GetGripperPoseFeedback.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 GetGripperPoseFeedback(genpy.Message):
00011   _md5sum = "376ba9325430425e1115a2f7597dc0e7"
00012   _type = "pr2_object_manipulation_msgs/GetGripperPoseFeedback"
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 # the feedback gripper pose, which is basically raw and unfiltered but may be useful
00017 geometry_msgs/PoseStamped gripper_pose
00018 float32 gripper_opening
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__ = ['gripper_pose','gripper_opening']
00069   _slot_types = ['geometry_msgs/PoseStamped','float32']
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        gripper_pose,gripper_opening
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(GetGripperPoseFeedback, self).__init__(*args, **kwds)
00087       #message fields cannot be None, assign default values for those that are
00088       if self.gripper_pose is None:
00089         self.gripper_pose = geometry_msgs.msg.PoseStamped()
00090       if self.gripper_opening is None:
00091         self.gripper_opening = 0.
00092     else:
00093       self.gripper_pose = geometry_msgs.msg.PoseStamped()
00094       self.gripper_opening = 0.
00095 
00096   def _get_types(self):
00097     """
00098     internal API method
00099     """
00100     return self._slot_types
00101 
00102   def serialize(self, buff):
00103     """
00104     serialize message into buffer
00105     :param buff: buffer, ``StringIO``
00106     """
00107     try:
00108       _x = self
00109       buff.write(_struct_3I.pack(_x.gripper_pose.header.seq, _x.gripper_pose.header.stamp.secs, _x.gripper_pose.header.stamp.nsecs))
00110       _x = self.gripper_pose.header.frame_id
00111       length = len(_x)
00112       if python3 or type(_x) == unicode:
00113         _x = _x.encode('utf-8')
00114         length = len(_x)
00115       buff.write(struct.pack('<I%ss'%length, length, _x))
00116       _x = self
00117       buff.write(_struct_7df.pack(_x.gripper_pose.pose.position.x, _x.gripper_pose.pose.position.y, _x.gripper_pose.pose.position.z, _x.gripper_pose.pose.orientation.x, _x.gripper_pose.pose.orientation.y, _x.gripper_pose.pose.orientation.z, _x.gripper_pose.pose.orientation.w, _x.gripper_opening))
00118     except struct.error as se: self._check_types(se)
00119     except TypeError as te: self._check_types(te)
00120 
00121   def deserialize(self, str):
00122     """
00123     unpack serialized message in str into this message instance
00124     :param str: byte array of serialized message, ``str``
00125     """
00126     try:
00127       if self.gripper_pose is None:
00128         self.gripper_pose = geometry_msgs.msg.PoseStamped()
00129       end = 0
00130       _x = self
00131       start = end
00132       end += 12
00133       (_x.gripper_pose.header.seq, _x.gripper_pose.header.stamp.secs, _x.gripper_pose.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00134       start = end
00135       end += 4
00136       (length,) = _struct_I.unpack(str[start:end])
00137       start = end
00138       end += length
00139       if python3:
00140         self.gripper_pose.header.frame_id = str[start:end].decode('utf-8')
00141       else:
00142         self.gripper_pose.header.frame_id = str[start:end]
00143       _x = self
00144       start = end
00145       end += 60
00146       (_x.gripper_pose.pose.position.x, _x.gripper_pose.pose.position.y, _x.gripper_pose.pose.position.z, _x.gripper_pose.pose.orientation.x, _x.gripper_pose.pose.orientation.y, _x.gripper_pose.pose.orientation.z, _x.gripper_pose.pose.orientation.w, _x.gripper_opening,) = _struct_7df.unpack(str[start:end])
00147       return self
00148     except struct.error as e:
00149       raise genpy.DeserializationError(e) #most likely buffer underfill
00150 
00151 
00152   def serialize_numpy(self, buff, numpy):
00153     """
00154     serialize message with numpy array types into buffer
00155     :param buff: buffer, ``StringIO``
00156     :param numpy: numpy python module
00157     """
00158     try:
00159       _x = self
00160       buff.write(_struct_3I.pack(_x.gripper_pose.header.seq, _x.gripper_pose.header.stamp.secs, _x.gripper_pose.header.stamp.nsecs))
00161       _x = self.gripper_pose.header.frame_id
00162       length = len(_x)
00163       if python3 or type(_x) == unicode:
00164         _x = _x.encode('utf-8')
00165         length = len(_x)
00166       buff.write(struct.pack('<I%ss'%length, length, _x))
00167       _x = self
00168       buff.write(_struct_7df.pack(_x.gripper_pose.pose.position.x, _x.gripper_pose.pose.position.y, _x.gripper_pose.pose.position.z, _x.gripper_pose.pose.orientation.x, _x.gripper_pose.pose.orientation.y, _x.gripper_pose.pose.orientation.z, _x.gripper_pose.pose.orientation.w, _x.gripper_opening))
00169     except struct.error as se: self._check_types(se)
00170     except TypeError as te: self._check_types(te)
00171 
00172   def deserialize_numpy(self, str, numpy):
00173     """
00174     unpack serialized message in str into this message instance using numpy for array types
00175     :param str: byte array of serialized message, ``str``
00176     :param numpy: numpy python module
00177     """
00178     try:
00179       if self.gripper_pose is None:
00180         self.gripper_pose = geometry_msgs.msg.PoseStamped()
00181       end = 0
00182       _x = self
00183       start = end
00184       end += 12
00185       (_x.gripper_pose.header.seq, _x.gripper_pose.header.stamp.secs, _x.gripper_pose.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00186       start = end
00187       end += 4
00188       (length,) = _struct_I.unpack(str[start:end])
00189       start = end
00190       end += length
00191       if python3:
00192         self.gripper_pose.header.frame_id = str[start:end].decode('utf-8')
00193       else:
00194         self.gripper_pose.header.frame_id = str[start:end]
00195       _x = self
00196       start = end
00197       end += 60
00198       (_x.gripper_pose.pose.position.x, _x.gripper_pose.pose.position.y, _x.gripper_pose.pose.position.z, _x.gripper_pose.pose.orientation.x, _x.gripper_pose.pose.orientation.y, _x.gripper_pose.pose.orientation.z, _x.gripper_pose.pose.orientation.w, _x.gripper_opening,) = _struct_7df.unpack(str[start:end])
00199       return self
00200     except struct.error as e:
00201       raise genpy.DeserializationError(e) #most likely buffer underfill
00202 
00203 _struct_I = genpy.struct_I
00204 _struct_3I = struct.Struct("<3I")
00205 _struct_7df = struct.Struct("<7df")


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