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


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