$search
00001 """autogenerated by genmsg_py from SetProfileRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class SetProfileRequest(roslib.message.Message): 00007 _md5sum = "309001fc196b0094f23b1ae2bd672fb2" 00008 _type = "pr2_mechanism_controllers/SetProfileRequest" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """float64 UpperTurnaround 00011 float64 LowerTurnaround 00012 float64 upperDecelBuffer 00013 float64 lowerDecelBuffer 00014 float64 profile 00015 float64 period 00016 float64 amplitude 00017 float64 offset 00018 00019 """ 00020 __slots__ = ['UpperTurnaround','LowerTurnaround','upperDecelBuffer','lowerDecelBuffer','profile','period','amplitude','offset'] 00021 _slot_types = ['float64','float64','float64','float64','float64','float64','float64','float64'] 00022 00023 def __init__(self, *args, **kwds): 00024 """ 00025 Constructor. Any message fields that are implicitly/explicitly 00026 set to None will be assigned a default value. The recommend 00027 use is keyword arguments as this is more robust to future message 00028 changes. You cannot mix in-order arguments and keyword arguments. 00029 00030 The available fields are: 00031 UpperTurnaround,LowerTurnaround,upperDecelBuffer,lowerDecelBuffer,profile,period,amplitude,offset 00032 00033 @param args: complete set of field values, in .msg order 00034 @param kwds: use keyword arguments corresponding to message field names 00035 to set specific fields. 00036 """ 00037 if args or kwds: 00038 super(SetProfileRequest, self).__init__(*args, **kwds) 00039 #message fields cannot be None, assign default values for those that are 00040 if self.UpperTurnaround is None: 00041 self.UpperTurnaround = 0. 00042 if self.LowerTurnaround is None: 00043 self.LowerTurnaround = 0. 00044 if self.upperDecelBuffer is None: 00045 self.upperDecelBuffer = 0. 00046 if self.lowerDecelBuffer is None: 00047 self.lowerDecelBuffer = 0. 00048 if self.profile is None: 00049 self.profile = 0. 00050 if self.period is None: 00051 self.period = 0. 00052 if self.amplitude is None: 00053 self.amplitude = 0. 00054 if self.offset is None: 00055 self.offset = 0. 00056 else: 00057 self.UpperTurnaround = 0. 00058 self.LowerTurnaround = 0. 00059 self.upperDecelBuffer = 0. 00060 self.lowerDecelBuffer = 0. 00061 self.profile = 0. 00062 self.period = 0. 00063 self.amplitude = 0. 00064 self.offset = 0. 00065 00066 def _get_types(self): 00067 """ 00068 internal API method 00069 """ 00070 return self._slot_types 00071 00072 def serialize(self, buff): 00073 """ 00074 serialize message into buffer 00075 @param buff: buffer 00076 @type buff: StringIO 00077 """ 00078 try: 00079 _x = self 00080 buff.write(_struct_8d.pack(_x.UpperTurnaround, _x.LowerTurnaround, _x.upperDecelBuffer, _x.lowerDecelBuffer, _x.profile, _x.period, _x.amplitude, _x.offset)) 00081 except struct.error as se: self._check_types(se) 00082 except TypeError as te: self._check_types(te) 00083 00084 def deserialize(self, str): 00085 """ 00086 unpack serialized message in str into this message instance 00087 @param str: byte array of serialized message 00088 @type str: str 00089 """ 00090 try: 00091 end = 0 00092 _x = self 00093 start = end 00094 end += 64 00095 (_x.UpperTurnaround, _x.LowerTurnaround, _x.upperDecelBuffer, _x.lowerDecelBuffer, _x.profile, _x.period, _x.amplitude, _x.offset,) = _struct_8d.unpack(str[start:end]) 00096 return self 00097 except struct.error as e: 00098 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00099 00100 00101 def serialize_numpy(self, buff, numpy): 00102 """ 00103 serialize message with numpy array types into buffer 00104 @param buff: buffer 00105 @type buff: StringIO 00106 @param numpy: numpy python module 00107 @type numpy module 00108 """ 00109 try: 00110 _x = self 00111 buff.write(_struct_8d.pack(_x.UpperTurnaround, _x.LowerTurnaround, _x.upperDecelBuffer, _x.lowerDecelBuffer, _x.profile, _x.period, _x.amplitude, _x.offset)) 00112 except struct.error as se: self._check_types(se) 00113 except TypeError as te: self._check_types(te) 00114 00115 def deserialize_numpy(self, str, numpy): 00116 """ 00117 unpack serialized message in str into this message instance using numpy for array types 00118 @param str: byte array of serialized message 00119 @type str: str 00120 @param numpy: numpy python module 00121 @type numpy: module 00122 """ 00123 try: 00124 end = 0 00125 _x = self 00126 start = end 00127 end += 64 00128 (_x.UpperTurnaround, _x.LowerTurnaround, _x.upperDecelBuffer, _x.lowerDecelBuffer, _x.profile, _x.period, _x.amplitude, _x.offset,) = _struct_8d.unpack(str[start:end]) 00129 return self 00130 except struct.error as e: 00131 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00132 00133 _struct_I = roslib.message.struct_I 00134 _struct_8d = struct.Struct("<8d") 00135 """autogenerated by genmsg_py from SetProfileResponse.msg. Do not edit.""" 00136 import roslib.message 00137 import struct 00138 00139 00140 class SetProfileResponse(roslib.message.Message): 00141 _md5sum = "be5310e7aa4c90cdee120add91648cee" 00142 _type = "pr2_mechanism_controllers/SetProfileResponse" 00143 _has_header = False #flag to mark the presence of a Header object 00144 _full_text = """float64 time 00145 00146 00147 00148 """ 00149 __slots__ = ['time'] 00150 _slot_types = ['float64'] 00151 00152 def __init__(self, *args, **kwds): 00153 """ 00154 Constructor. Any message fields that are implicitly/explicitly 00155 set to None will be assigned a default value. The recommend 00156 use is keyword arguments as this is more robust to future message 00157 changes. You cannot mix in-order arguments and keyword arguments. 00158 00159 The available fields are: 00160 time 00161 00162 @param args: complete set of field values, in .msg order 00163 @param kwds: use keyword arguments corresponding to message field names 00164 to set specific fields. 00165 """ 00166 if args or kwds: 00167 super(SetProfileResponse, self).__init__(*args, **kwds) 00168 #message fields cannot be None, assign default values for those that are 00169 if self.time is None: 00170 self.time = 0. 00171 else: 00172 self.time = 0. 00173 00174 def _get_types(self): 00175 """ 00176 internal API method 00177 """ 00178 return self._slot_types 00179 00180 def serialize(self, buff): 00181 """ 00182 serialize message into buffer 00183 @param buff: buffer 00184 @type buff: StringIO 00185 """ 00186 try: 00187 buff.write(_struct_d.pack(self.time)) 00188 except struct.error as se: self._check_types(se) 00189 except TypeError as te: self._check_types(te) 00190 00191 def deserialize(self, str): 00192 """ 00193 unpack serialized message in str into this message instance 00194 @param str: byte array of serialized message 00195 @type str: str 00196 """ 00197 try: 00198 end = 0 00199 start = end 00200 end += 8 00201 (self.time,) = _struct_d.unpack(str[start:end]) 00202 return self 00203 except struct.error as e: 00204 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00205 00206 00207 def serialize_numpy(self, buff, numpy): 00208 """ 00209 serialize message with numpy array types into buffer 00210 @param buff: buffer 00211 @type buff: StringIO 00212 @param numpy: numpy python module 00213 @type numpy module 00214 """ 00215 try: 00216 buff.write(_struct_d.pack(self.time)) 00217 except struct.error as se: self._check_types(se) 00218 except TypeError as te: self._check_types(te) 00219 00220 def deserialize_numpy(self, str, numpy): 00221 """ 00222 unpack serialized message in str into this message instance using numpy for array types 00223 @param str: byte array of serialized message 00224 @type str: str 00225 @param numpy: numpy python module 00226 @type numpy: module 00227 """ 00228 try: 00229 end = 0 00230 start = end 00231 end += 8 00232 (self.time,) = _struct_d.unpack(str[start:end]) 00233 return self 00234 except struct.error as e: 00235 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00236 00237 _struct_I = roslib.message.struct_I 00238 _struct_d = struct.Struct("<d") 00239 class SetProfile(roslib.message.ServiceDefinition): 00240 _type = 'pr2_mechanism_controllers/SetProfile' 00241 _md5sum = '2c429583cad60964651aba828d788a9a' 00242 _request_class = SetProfileRequest 00243 _response_class = SetProfileResponse