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