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