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