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