$search
00001 """autogenerated by genmsg_py from PointHeadFeedback.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class PointHeadFeedback(roslib.message.Message): 00007 _md5sum = "cce80d27fd763682da8805a73316cab4" 00008 _type = "pr2_controllers_msgs/PointHeadFeedback" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00011 float64 pointing_angle_error 00012 00013 """ 00014 __slots__ = ['pointing_angle_error'] 00015 _slot_types = ['float64'] 00016 00017 def __init__(self, *args, **kwds): 00018 """ 00019 Constructor. Any message fields that are implicitly/explicitly 00020 set to None will be assigned a default value. The recommend 00021 use is keyword arguments as this is more robust to future message 00022 changes. You cannot mix in-order arguments and keyword arguments. 00023 00024 The available fields are: 00025 pointing_angle_error 00026 00027 @param args: complete set of field values, in .msg order 00028 @param kwds: use keyword arguments corresponding to message field names 00029 to set specific fields. 00030 """ 00031 if args or kwds: 00032 super(PointHeadFeedback, self).__init__(*args, **kwds) 00033 #message fields cannot be None, assign default values for those that are 00034 if self.pointing_angle_error is None: 00035 self.pointing_angle_error = 0. 00036 else: 00037 self.pointing_angle_error = 0. 00038 00039 def _get_types(self): 00040 """ 00041 internal API method 00042 """ 00043 return self._slot_types 00044 00045 def serialize(self, buff): 00046 """ 00047 serialize message into buffer 00048 @param buff: buffer 00049 @type buff: StringIO 00050 """ 00051 try: 00052 buff.write(_struct_d.pack(self.pointing_angle_error)) 00053 except struct.error as se: self._check_types(se) 00054 except TypeError as te: self._check_types(te) 00055 00056 def deserialize(self, str): 00057 """ 00058 unpack serialized message in str into this message instance 00059 @param str: byte array of serialized message 00060 @type str: str 00061 """ 00062 try: 00063 end = 0 00064 start = end 00065 end += 8 00066 (self.pointing_angle_error,) = _struct_d.unpack(str[start:end]) 00067 return self 00068 except struct.error as e: 00069 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00070 00071 00072 def serialize_numpy(self, buff, numpy): 00073 """ 00074 serialize message with numpy array types into buffer 00075 @param buff: buffer 00076 @type buff: StringIO 00077 @param numpy: numpy python module 00078 @type numpy module 00079 """ 00080 try: 00081 buff.write(_struct_d.pack(self.pointing_angle_error)) 00082 except struct.error as se: self._check_types(se) 00083 except TypeError as te: self._check_types(te) 00084 00085 def deserialize_numpy(self, str, numpy): 00086 """ 00087 unpack serialized message in str into this message instance using numpy for array types 00088 @param str: byte array of serialized message 00089 @type str: str 00090 @param numpy: numpy python module 00091 @type numpy: module 00092 """ 00093 try: 00094 end = 0 00095 start = end 00096 end += 8 00097 (self.pointing_angle_error,) = _struct_d.unpack(str[start:end]) 00098 return self 00099 except struct.error as e: 00100 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00101 00102 _struct_I = roslib.message.struct_I 00103 _struct_d = struct.Struct("<d")