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