$search
00001 """autogenerated by genmsg_py from GetTrajectoryValidityRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import geometry_msgs.msg 00006 import simple_arm_server.msg 00007 import roslib.rostime 00008 import std_msgs.msg 00009 00010 class GetTrajectoryValidityRequest(roslib.message.Message): 00011 _md5sum = "ac68653317d50968c1043cdf98e3aea9" 00012 _type = "simple_arm_server/GetTrajectoryValidityRequest" 00013 _has_header = False #flag to mark the presence of a Header object 00014 _full_text = """std_msgs/Header header 00015 ArmAction[] motions 00016 00017 ================================================================================ 00018 MSG: std_msgs/Header 00019 # Standard metadata for higher-level stamped data types. 00020 # This is generally used to communicate timestamped data 00021 # in a particular coordinate frame. 00022 # 00023 # sequence ID: consecutively increasing ID 00024 uint32 seq 00025 #Two-integer timestamp that is expressed as: 00026 # * stamp.secs: seconds (stamp_secs) since epoch 00027 # * stamp.nsecs: nanoseconds since stamp_secs 00028 # time-handling sugar is provided by the client library 00029 time stamp 00030 #Frame this data is associated with 00031 # 0: no frame 00032 # 1: global frame 00033 string frame_id 00034 00035 ================================================================================ 00036 MSG: simple_arm_server/ArmAction 00037 # 00038 # Move arm or adjust gripper 00039 # 00040 00041 byte MOVE_ARM=0 00042 byte MOVE_GRIPPER=1 00043 00044 byte type # move the arm or the gripper? 00045 00046 geometry_msgs/Pose goal # goal for arm 00047 float64 command # width to open gripper 00048 00049 duration move_time 00050 00051 ================================================================================ 00052 MSG: geometry_msgs/Pose 00053 # A representation of pose in free space, composed of postion and orientation. 00054 Point position 00055 Quaternion orientation 00056 00057 ================================================================================ 00058 MSG: geometry_msgs/Point 00059 # This contains the position of a point in free space 00060 float64 x 00061 float64 y 00062 float64 z 00063 00064 ================================================================================ 00065 MSG: geometry_msgs/Quaternion 00066 # This represents an orientation in free space in quaternion form. 00067 00068 float64 x 00069 float64 y 00070 float64 z 00071 float64 w 00072 00073 """ 00074 __slots__ = ['header','motions'] 00075 _slot_types = ['std_msgs/Header','simple_arm_server/ArmAction[]'] 00076 00077 def __init__(self, *args, **kwds): 00078 """ 00079 Constructor. Any message fields that are implicitly/explicitly 00080 set to None will be assigned a default value. The recommend 00081 use is keyword arguments as this is more robust to future message 00082 changes. You cannot mix in-order arguments and keyword arguments. 00083 00084 The available fields are: 00085 header,motions 00086 00087 @param args: complete set of field values, in .msg order 00088 @param kwds: use keyword arguments corresponding to message field names 00089 to set specific fields. 00090 """ 00091 if args or kwds: 00092 super(GetTrajectoryValidityRequest, self).__init__(*args, **kwds) 00093 #message fields cannot be None, assign default values for those that are 00094 if self.header is None: 00095 self.header = std_msgs.msg.Header() 00096 if self.motions is None: 00097 self.motions = [] 00098 else: 00099 self.header = std_msgs.msg.Header() 00100 self.motions = [] 00101 00102 def _get_types(self): 00103 """ 00104 internal API method 00105 """ 00106 return self._slot_types 00107 00108 def serialize(self, buff): 00109 """ 00110 serialize message into buffer 00111 @param buff: buffer 00112 @type buff: StringIO 00113 """ 00114 try: 00115 _x = self 00116 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00117 _x = self.header.frame_id 00118 length = len(_x) 00119 buff.write(struct.pack('<I%ss'%length, length, _x)) 00120 length = len(self.motions) 00121 buff.write(_struct_I.pack(length)) 00122 for val1 in self.motions: 00123 buff.write(_struct_b.pack(val1.type)) 00124 _v1 = val1.goal 00125 _v2 = _v1.position 00126 _x = _v2 00127 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00128 _v3 = _v1.orientation 00129 _x = _v3 00130 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00131 buff.write(_struct_d.pack(val1.command)) 00132 _v4 = val1.move_time 00133 _x = _v4 00134 buff.write(_struct_2i.pack(_x.secs, _x.nsecs)) 00135 except struct.error as se: self._check_types(se) 00136 except TypeError as te: self._check_types(te) 00137 00138 def deserialize(self, str): 00139 """ 00140 unpack serialized message in str into this message instance 00141 @param str: byte array of serialized message 00142 @type str: str 00143 """ 00144 try: 00145 if self.header is None: 00146 self.header = std_msgs.msg.Header() 00147 end = 0 00148 _x = self 00149 start = end 00150 end += 12 00151 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00152 start = end 00153 end += 4 00154 (length,) = _struct_I.unpack(str[start:end]) 00155 start = end 00156 end += length 00157 self.header.frame_id = str[start:end] 00158 start = end 00159 end += 4 00160 (length,) = _struct_I.unpack(str[start:end]) 00161 self.motions = [] 00162 for i in range(0, length): 00163 val1 = simple_arm_server.msg.ArmAction() 00164 start = end 00165 end += 1 00166 (val1.type,) = _struct_b.unpack(str[start:end]) 00167 _v5 = val1.goal 00168 _v6 = _v5.position 00169 _x = _v6 00170 start = end 00171 end += 24 00172 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00173 _v7 = _v5.orientation 00174 _x = _v7 00175 start = end 00176 end += 32 00177 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00178 start = end 00179 end += 8 00180 (val1.command,) = _struct_d.unpack(str[start:end]) 00181 _v8 = val1.move_time 00182 _x = _v8 00183 start = end 00184 end += 8 00185 (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end]) 00186 self.motions.append(val1) 00187 return self 00188 except struct.error as e: 00189 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00190 00191 00192 def serialize_numpy(self, buff, numpy): 00193 """ 00194 serialize message with numpy array types into buffer 00195 @param buff: buffer 00196 @type buff: StringIO 00197 @param numpy: numpy python module 00198 @type numpy module 00199 """ 00200 try: 00201 _x = self 00202 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00203 _x = self.header.frame_id 00204 length = len(_x) 00205 buff.write(struct.pack('<I%ss'%length, length, _x)) 00206 length = len(self.motions) 00207 buff.write(_struct_I.pack(length)) 00208 for val1 in self.motions: 00209 buff.write(_struct_b.pack(val1.type)) 00210 _v9 = val1.goal 00211 _v10 = _v9.position 00212 _x = _v10 00213 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00214 _v11 = _v9.orientation 00215 _x = _v11 00216 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00217 buff.write(_struct_d.pack(val1.command)) 00218 _v12 = val1.move_time 00219 _x = _v12 00220 buff.write(_struct_2i.pack(_x.secs, _x.nsecs)) 00221 except struct.error as se: self._check_types(se) 00222 except TypeError as te: self._check_types(te) 00223 00224 def deserialize_numpy(self, str, numpy): 00225 """ 00226 unpack serialized message in str into this message instance using numpy for array types 00227 @param str: byte array of serialized message 00228 @type str: str 00229 @param numpy: numpy python module 00230 @type numpy: module 00231 """ 00232 try: 00233 if self.header is None: 00234 self.header = std_msgs.msg.Header() 00235 end = 0 00236 _x = self 00237 start = end 00238 end += 12 00239 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00240 start = end 00241 end += 4 00242 (length,) = _struct_I.unpack(str[start:end]) 00243 start = end 00244 end += length 00245 self.header.frame_id = str[start:end] 00246 start = end 00247 end += 4 00248 (length,) = _struct_I.unpack(str[start:end]) 00249 self.motions = [] 00250 for i in range(0, length): 00251 val1 = simple_arm_server.msg.ArmAction() 00252 start = end 00253 end += 1 00254 (val1.type,) = _struct_b.unpack(str[start:end]) 00255 _v13 = val1.goal 00256 _v14 = _v13.position 00257 _x = _v14 00258 start = end 00259 end += 24 00260 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00261 _v15 = _v13.orientation 00262 _x = _v15 00263 start = end 00264 end += 32 00265 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00266 start = end 00267 end += 8 00268 (val1.command,) = _struct_d.unpack(str[start:end]) 00269 _v16 = val1.move_time 00270 _x = _v16 00271 start = end 00272 end += 8 00273 (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end]) 00274 self.motions.append(val1) 00275 return self 00276 except struct.error as e: 00277 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00278 00279 _struct_I = roslib.message.struct_I 00280 _struct_b = struct.Struct("<b") 00281 _struct_d = struct.Struct("<d") 00282 _struct_3I = struct.Struct("<3I") 00283 _struct_4d = struct.Struct("<4d") 00284 _struct_2i = struct.Struct("<2i") 00285 _struct_3d = struct.Struct("<3d") 00286 """autogenerated by genmsg_py from GetTrajectoryValidityResponse.msg. Do not edit.""" 00287 import roslib.message 00288 import struct 00289 00290 00291 class GetTrajectoryValidityResponse(roslib.message.Message): 00292 _md5sum = "358e233cde0c8a8bcfea4ce193f8fc15" 00293 _type = "simple_arm_server/GetTrajectoryValidityResponse" 00294 _has_header = False #flag to mark the presence of a Header object 00295 _full_text = """bool success 00296 00297 00298 """ 00299 __slots__ = ['success'] 00300 _slot_types = ['bool'] 00301 00302 def __init__(self, *args, **kwds): 00303 """ 00304 Constructor. Any message fields that are implicitly/explicitly 00305 set to None will be assigned a default value. The recommend 00306 use is keyword arguments as this is more robust to future message 00307 changes. You cannot mix in-order arguments and keyword arguments. 00308 00309 The available fields are: 00310 success 00311 00312 @param args: complete set of field values, in .msg order 00313 @param kwds: use keyword arguments corresponding to message field names 00314 to set specific fields. 00315 """ 00316 if args or kwds: 00317 super(GetTrajectoryValidityResponse, self).__init__(*args, **kwds) 00318 #message fields cannot be None, assign default values for those that are 00319 if self.success is None: 00320 self.success = False 00321 else: 00322 self.success = False 00323 00324 def _get_types(self): 00325 """ 00326 internal API method 00327 """ 00328 return self._slot_types 00329 00330 def serialize(self, buff): 00331 """ 00332 serialize message into buffer 00333 @param buff: buffer 00334 @type buff: StringIO 00335 """ 00336 try: 00337 buff.write(_struct_B.pack(self.success)) 00338 except struct.error as se: self._check_types(se) 00339 except TypeError as te: self._check_types(te) 00340 00341 def deserialize(self, str): 00342 """ 00343 unpack serialized message in str into this message instance 00344 @param str: byte array of serialized message 00345 @type str: str 00346 """ 00347 try: 00348 end = 0 00349 start = end 00350 end += 1 00351 (self.success,) = _struct_B.unpack(str[start:end]) 00352 self.success = bool(self.success) 00353 return self 00354 except struct.error as e: 00355 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00356 00357 00358 def serialize_numpy(self, buff, numpy): 00359 """ 00360 serialize message with numpy array types into buffer 00361 @param buff: buffer 00362 @type buff: StringIO 00363 @param numpy: numpy python module 00364 @type numpy module 00365 """ 00366 try: 00367 buff.write(_struct_B.pack(self.success)) 00368 except struct.error as se: self._check_types(se) 00369 except TypeError as te: self._check_types(te) 00370 00371 def deserialize_numpy(self, str, numpy): 00372 """ 00373 unpack serialized message in str into this message instance using numpy for array types 00374 @param str: byte array of serialized message 00375 @type str: str 00376 @param numpy: numpy python module 00377 @type numpy: module 00378 """ 00379 try: 00380 end = 0 00381 start = end 00382 end += 1 00383 (self.success,) = _struct_B.unpack(str[start:end]) 00384 self.success = bool(self.success) 00385 return self 00386 except struct.error as e: 00387 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00388 00389 _struct_I = roslib.message.struct_I 00390 _struct_B = struct.Struct("<B") 00391 class GetTrajectoryValidity(roslib.message.ServiceDefinition): 00392 _type = 'simple_arm_server/GetTrajectoryValidity' 00393 _md5sum = '12941ae14efdf67a2accd5922da026b4' 00394 _request_class = GetTrajectoryValidityRequest 00395 _response_class = GetTrajectoryValidityResponse