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