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