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