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


iri_wam_arm_navigation
Author(s): IRI Robotics Lab, Ivan Rojas (ivan.rojas.j@gmail.com)
autogenerated on Fri Dec 6 2013 22:32:00