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