query
stringlengths
9
3.4k
document
stringlengths
9
87.4k
metadata
dict
negatives
listlengths
4
101
negative_scores
listlengths
4
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Attach disk to VM by reconfiguration.
def attach_disk_to_vm(self, vm_ref, instance_name, adapter_type, disk_type, vmdk_path=None, disk_size=None, linked_clone=False, controller_key=None, unit_number=None, device_name=None): client_factory = self._session._get_vim().client.factory vmdk_attach_config_spec = vm_util.get_vmdk_attach_config_spec( client_factory, adapter_type, disk_type, vmdk_path, disk_size, linked_clone, controller_key, unit_number, device_name) LOG.debug(_("Reconfiguring VM instance %(instance_name)s to attach " "disk %(vmdk_path)s or device %(device_name)s with type " "%(disk_type)s") % locals()) reconfig_task = self._session._call_method( self._session._get_vim(), "ReconfigVM_Task", vm_ref, spec=vmdk_attach_config_spec) self._session._wait_for_task(instance_name, reconfig_task) LOG.debug(_("Reconfigured VM instance %(instance_name)s to attach " "disk %(vmdk_path)s or device %(device_name)s with type " "%(disk_type)s") % locals())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def AttachDisk(self, disk: 'AZComputeDisk') -> None:\n vm = self.compute_client.virtual_machines.get(\n self.resource_group_name, self.name)\n data_disks = vm.storage_profile.data_disks\n # ID to assign to the data disk to attach\n lun = 0 if len(data_disks) == 0 else len(data_disks) + 1\n\n ...
[ "0.73531574", "0.68157685", "0.67563796", "0.66293067", "0.64325035", "0.6426697", "0.63882655", "0.6334873", "0.623497", "0.6223832", "0.62092334", "0.6202001", "0.6195019", "0.61449945", "0.6086266", "0.6073298", "0.6072383", "0.6067116", "0.6057906", "0.59617317", "0.58979...
0.7390084
0
Detach disk from VM by reconfiguration.
def detach_disk_from_vm(self, vm_ref, instance_name, device): client_factory = self._session._get_vim().client.factory vmdk_detach_config_spec = vm_util.get_vmdk_detach_config_spec( client_factory, device) disk_key = device.key LOG.debug(_("Reconfiguring VM instance %(instance_name)s to detach " "disk %(disk_key)s") % locals()) reconfig_task = self._session._call_method( self._session._get_vim(), "ReconfigVM_Task", vm_ref, spec=vmdk_detach_config_spec) self._session._wait_for_task(instance_name, reconfig_task) LOG.debug(_("Reconfigured VM instance %(instance_name)s to detach " "disk %(disk_key)s") % locals())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def disk_detach(vmdk_path, vm):\n\n device = findDeviceByPath(vmdk_path, vm)\n\n if not device:\n # Could happen if the disk attached to a different VM - attach fails\n # and docker will insist to sending \"unmount/detach\" which also fails.\n msg = \"*** Detach failed: disk={0} not foun...
[ "0.765152", "0.71042055", "0.710292", "0.7051662", "0.6706635", "0.66381764", "0.65310085", "0.63526535", "0.62885463", "0.62843525", "0.6217464", "0.62058824", "0.6176701", "0.61576825", "0.6140649", "0.6140027", "0.6105745", "0.6038374", "0.6036814", "0.5985441", "0.5894797...
0.74518675
1
Return volume connector information.
def get_volume_connector(self, instance): iqn = volume_util.get_host_iqn(self._session, self._cluster) return { 'ip': CONF.vmwareapi_host_ip, 'initiator': iqn, 'host': CONF.vmwareapi_host_ip }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def initialize_connection(self, volume, connector):\n export = '%s/%s' % (volume['provider_location'], volume['name'])\n data = {'export': export, 'name': 'volume'}\n if volume['provider_location'] in self.shares:\n data['options'] = self.shares[volume['provider_location']]\n ...
[ "0.6858231", "0.6418148", "0.62130344", "0.60607785", "0.6042523", "0.58188075", "0.5792801", "0.5697431", "0.55846596", "0.55579096", "0.5506042", "0.5469819", "0.5426191", "0.5425665", "0.54218316", "0.5421626", "0.54012877", "0.53762865", "0.53762865", "0.5360571", "0.5350...
0.7179875
0
Attach volume storage to VM instance.
def attach_volume(self, connection_info, instance, mountpoint): instance_name = instance['name'] vm_ref = vm_util.get_vm_ref_from_name(self._session, instance_name) if vm_ref is None: raise exception.InstanceNotFound(instance_id=instance_name) # Attach Volume to VM LOG.debug(_("Attach_volume: %(connection_info)s, %(instance_name)s, " "%(mountpoint)s") % locals()) driver_type = connection_info['driver_volume_type'] if driver_type not in ['iscsi']: raise exception.VolumeDriverNotFound(driver_type=driver_type) data = connection_info['data'] mount_unit = volume_util.mountpoint_to_number(mountpoint) # Discover iSCSI Target device_name, uuid = self.discover_st(data) if device_name is None: raise volume_util.StorageError(_("Unable to find iSCSI Target")) # Get the vmdk file name that the VM is pointing to hardware_devices = self._session._call_method(vim_util, "get_dynamic_property", vm_ref, "VirtualMachine", "config.hardware.device") vmdk_file_path, controller_key, adapter_type, disk_type, unit_number \ = vm_util.get_vmdk_path_and_adapter_type(hardware_devices) # Figure out the correct unit number if unit_number < mount_unit: unit_number = mount_unit else: unit_number = unit_number + 1 self.attach_disk_to_vm(vm_ref, instance_name, adapter_type, disk_type="rdmp", controller_key=controller_key, unit_number=unit_number, device_name=device_name) LOG.info(_("Mountpoint %(mountpoint)s attached to " "instance %(instance_name)s") % locals())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def attach_volume(self, context, connection_info, instance, mountpoint,\n disk_bus=None, device_type=None, encryption=None):", "def attach_volume(self):\n\n # Choose volume\n volume_id = self._choose_among_available_volumes()\n\n # Cancel\n if not volume_id:\n ...
[ "0.81846446", "0.7974021", "0.79596764", "0.7858076", "0.7515268", "0.74380124", "0.74260545", "0.7417238", "0.72209245", "0.71213835", "0.7119569", "0.7005731", "0.6974186", "0.6920998", "0.68285924", "0.68272907", "0.6788624", "0.67863244", "0.67736286", "0.6771072", "0.672...
0.7598646
4
Detach volume storage to VM instance.
def detach_volume(self, connection_info, instance, mountpoint): instance_name = instance['name'] vm_ref = vm_util.get_vm_ref_from_name(self._session, instance_name) if vm_ref is None: raise exception.InstanceNotFound(instance_id=instance_name) # Detach Volume from VM LOG.debug(_("Detach_volume: %(instance_name)s, %(mountpoint)s") % locals()) driver_type = connection_info['driver_volume_type'] if driver_type not in ['iscsi']: raise exception.VolumeDriverNotFound(driver_type=driver_type) data = connection_info['data'] # Discover iSCSI Target device_name, uuid = volume_util.find_st(self._session, data, self._cluster) if device_name is None: raise volume_util.StorageError(_("Unable to find iSCSI Target")) # Get the vmdk file name that the VM is pointing to hardware_devices = self._session._call_method(vim_util, "get_dynamic_property", vm_ref, "VirtualMachine", "config.hardware.device") device = vm_util.get_rdm_disk(hardware_devices, uuid) if device is None: raise volume_util.StorageError(_("Unable to find volume")) self.detach_disk_from_vm(vm_ref, instance_name, device) LOG.info(_("Mountpoint %(mountpoint)s detached from " "instance %(instance_name)s") % locals())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def detach_volume(self, connection_info, instance, mountpoint,\n encryption=None):", "def detach_volume(self):\n\n # Choose the volume\n volume_id = self._choose_among_used_volumes()\n\n # Cancel\n if not volume_id:\n print 'Operation cancelled'\n ...
[ "0.8114062", "0.80263144", "0.7928212", "0.77187544", "0.76588297", "0.7626845", "0.7559527", "0.7490584", "0.74343324", "0.73547065", "0.73352516", "0.73352516", "0.732464", "0.7162539", "0.70716673", "0.7023439", "0.69156", "0.69056416", "0.67387044", "0.6652363", "0.664442...
0.74771315
8
This modules creates a bash file to connect connect the to UCF clusters
def connect(directory_1, directory_2, key_address, user, server): import os # Creates a list of files in the working directory files = os.listdir() # If the bash file already exists, it deletes the bash file before making progress if 'connect.sh' in files: os.remove('connect.sh') else: pass with open('connect.sh', 'w') as f: f.write('#!/bin/bash\n') f.write('ssh -Y -i ' + str(key_address) + ' ' + str(user) + \ '@' + str(server))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def main():\n mvip, user, user_pass, mvip_node = get_inputs()\n headers, url = build_auth(mvip, user, user_pass, mvip_node)\n payload = build_payload()\n response_json = connect_cluster(headers, url, payload)\n account_table = create_table(response_json)\n print(account_table)", "def main():\n\...
[ "0.65127397", "0.62745446", "0.59723467", "0.5956529", "0.59374183", "0.58881605", "0.5853393", "0.5802111", "0.57484627", "0.5721694", "0.5707348", "0.5700164", "0.5663848", "0.56471217", "0.56392187", "0.5619558", "0.55862945", "0.5568309", "0.5539452", "0.55311024", "0.553...
0.58358824
7
This module creates a bash script to compressed desired files and folders and copies them to the UCF Clusters. For security purposes, this module does not save passwords or passphrases
def sync(directory_1, directory_2, key_address, user, server): import os # Creates a list of files in the working directory files = os.listdir() # If the bash file already exists, it deletes the bash file before making progress if 'sync.sh' in files: os.remove('sync.sh') else: pass with open('sync.sh', 'w') as f: f.write('#!/bin/bash\n') f.write('zip -r my_files.zip ' + str(directory_1) + '\n') f.write('scp -i ' + str(key_address) + ' my_files.zip ' + str(user) + \ '@' + str(server) + ':' + str(directory_2))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pack():\n clean_local()\n build()\n copy_json()\n optimize()\n tarball()", "def copy_scfu_folder(chem_form):\n\n src = calc_root + \"/\" + chem_form + \"/first_scfu/tmp\"\n dest = calc_root + \"/\" + chem_form + \"/hp/tmp\"\n\n f = open(\"rysnc.sh\",'w')\n f.write(\"\"\"\n #...
[ "0.6320039", "0.6044907", "0.6033638", "0.6010432", "0.5978256", "0.5924643", "0.5897727", "0.5866136", "0.5854039", "0.58496296", "0.5825296", "0.5823549", "0.58181125", "0.57648784", "0.5761756", "0.5755998", "0.57477236", "0.5711603", "0.5669225", "0.5627048", "0.5583162",...
0.5492905
36
Do not return anything, modify nums inplace instead.
def wiggleSort(self, nums: List[int]) -> None: def quickselect(low, hight, k, arr): pivot = random.randint(low, hight) arr[pivot], arr[hight] = arr[hight], arr[pivot] pivot = low for i in range(low, hight): if arr[i] < arr[hight]: arr[i], arr[pivot] = arr[pivot], arr[i] pivot += 1 arr[pivot], arr[hight]= arr[hight], arr[pivot] if k < pivot: quickselect(low, pivot - 1, k, arr) elif k > pivot: quickselect(pivot + 1, hight, k, arr) else: return arr[k] median = quickselect(0, len(nums) - 1, len(nums) // 2, nums) mid = len(nums) // 2 vi = lambda x: 2 * x + 1 if x < mid else (x - mid) * 2 i, j, k = 0, 0, len(nums) - 1 while j <= k: if nums[vi(j)] < median: nums[vi[j]], nums[vi[k]] = nums[vi[k]], nums[vi[j]] k -= 1 elif nums[vi(j)] > median: nums[vi(i)], nums[vi(j)] = nums[vi(j)], nums[vi(i)] i += 1 j += 1 else: j += 1
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fn(i):\n if i == len(nums): ans.append(nums.copy())\n for j in range(i, len(nums)): \n nums[i], nums[j] = nums[j], nums[i]\n fn(i+1)\n nums[i], nums[j] = nums[j], nums[i]", "def double_nums(num_list):", "def remove_dups(nums):\r\n nums[:...
[ "0.70469916", "0.67161703", "0.66934896", "0.6586775", "0.6501143", "0.6482345", "0.6442288", "0.6407945", "0.6376896", "0.6372343", "0.63671577", "0.6365932", "0.63512594", "0.6328759", "0.6298402", "0.62855035", "0.62671727", "0.62472045", "0.62221444", "0.6193869", "0.6188...
0.0
-1
check that columns_lst is tbset of self.df.columns.names
def validate_col_lst(self, df, columns_lst): if columns_lst == []: raise ValueError("column_lst is empty") col_set = set(columns_lst) df_col_set = set(list(df)) if col_set - df_col_set != set(): msg = "col_lst has columns name that does not exists in the DataFrame columns:{}".format( str(col_set - df_col_set)) print(msg) raise ValueError(msg) return True
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def verify_columns_in_dataframe(df, columns):\n\n if not isinstance(columns, list):\n columns = [columns]\n return set(columns).issubset(df.columns)", "def _check_columns(df: pd.DataFrame, names: typing.Sequence[str]) -> None:\n for expected in names:\n if expected not in df.columns:\n ...
[ "0.7229939", "0.69595104", "0.6792466", "0.6648041", "0.66035503", "0.65919405", "0.65672946", "0.6438893", "0.64331186", "0.6377156", "0.6362247", "0.63079476", "0.62102634", "0.61988276", "0.6196506", "0.61454993", "0.61221856", "0.61137414", "0.61022323", "0.6095521", "0.6...
0.83148104
0
Function for parsing the recipient folder for FACS data files.
def parse_facs_files(): #Load parser settings parser_settings = getattr(settings,'FACS_PARSER_SETTINGS') files_to_parse = [parser_settings['facs_source_directory']+f for f in os.listdir(parser_settings['facs_source_directory']) if '.exp' in f] for filename in files_to_parse: #Compute MD5 hash facs_file = file(filename,'rbU') md5hash = hashlib.md5(facs_file.read()).hexdigest() facs_file.close() #Skip file if previously parsed. if FacsFile.objects.filter(original_filename=filename,md5hash=md5hash): print 'Skipping ', filename continue #Open file, remove null bytes and prepare csv reader facs_file = file(filename, 'rU') csv_reader = csv.reader((x.replace('\0', '') for x in facs_file),dialect=csv.excel_tab) #Reader header csv_header = csv_reader.next() facs_file_results = [] #Parse the file for csv_row in csv_reader: if csv_row[0]: facs_file_results.append(dict(zip(csv_header,csv_row))) #Close the file facs_file.close() #Save the information to database and archive file random_ints = ''.join([str(random.randint(0,9)) for n in range(10)]) archive_filename = parser_settings['facs_archive_directory'] + filename.split('/')[-1][:-4].split('_')[0] + '_' + random_ints + '.exp' shutil.move(filename, archive_filename) facs_file = FacsFile( original_filename = filename, md5hash = md5hash, archive_filename = archive_filename, ) facs_file.save() #Remove empty elements for result in facs_file_results: for key, data in result.items(): if data == '.' or not(data): del result[key] #Cache test code and interface mappings test_codes = [] for testcode_mapping in TestCodeMapping.objects.filter(interface_name=parser_settings['testcode_interface_name']): test_code = testcode_mapping.code code = test_code.code code_mapping = testcode_mapping.code_mapping test_codes.append((code, code_mapping, test_code)) #Add results to database for result in facs_file_results: #Parse result date result_date = dateutil.parser.parse(result[parser_settings['result_datetime']]) result_error_code = getattr(result, parser_settings['error_codes'], '') result_identifier = result[parser_settings['sample_identifier']] result_cytometer = result[parser_settings['cytometer_serial']] #Create the dictionnary of result items. new_result_item_dict = {} for test_code, facs_file_column, test_code_object in test_codes: new_result_item_dict[test_code] = ResultItem( test_code = test_code_object, result_item_value = result[facs_file_column], error_code = result_error_code, result_item_datetime = result_date, ) #Search for possible duplicate result is_duplicate = False for possible_duplicate in FacsResult.objects.filter(result_identifier=result_identifier): if possible_duplicate.get_resultitem_dict() == new_result_item_dict: is_duplicate = True break #Save result and result item to data if it is not a duplicate if not is_duplicate: new_result = FacsResult( result_identifier=result_identifier, result_datetime=result_date, origin_facs_file=facs_file, cytometer_serial_number=result_cytometer, ) new_result.save() #Add the reference to the result for each item and save it to database. for item in new_result_item_dict.values(): item.result = new_result item.save() new_result.link_to_requisition()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def main(pst_file):\n opst = pypff.open(pst_file)\n root = opst.get_root_folder()\n\n message_data = folder_traverse(root, [], **{'pst_name': pst_file, 'folder_name': 'root'})\n\n header = ['pst_name', 'folder_name', 'creation_time', 'submit_time', 'delivery_time',\n 'sender', 'subject', '...
[ "0.61010617", "0.5539876", "0.5464439", "0.5427242", "0.53528404", "0.5294358", "0.5280345", "0.52603656", "0.5202298", "0.52001935", "0.51878786", "0.5151942", "0.50964266", "0.5094671", "0.49855223", "0.49736506", "0.49720562", "0.4927294", "0.4900818", "0.48834655", "0.487...
0.44602105
76
given an OU, find all the OUs within that OU...
def get_child_ous(logger, org_client, org_unit): logger.debug("Getting OUs for: %s", org_unit) result = [org_unit] # for this OU, get all the children... args = dict(ParentId=org_unit["Id"]) children = utils.generic_paginator(logger, org_client.list_organizational_units_for_parent, "OrganizationalUnits", **args) # update child paths and then call ourselves recursively to find all children for child in children: child["Path"] = "{}/{}".format(org_unit["Path"], child["Name"]).replace("//", "/") result.extend(get_child_ous(logger, org_client, child)) return result
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_accounts_for_ou(logger, options, org_client, path):\n logger.debug(\"Getting accounts for OU: %s\", path)\n org_unit = get_ou_from_path(logger, org_client, path)\n ous = []\n if options.no_recursive:\n ous.append(org_unit)\n else:\n ous.extend(get_child_ous(logger, org_client, ...
[ "0.6812674", "0.67796934", "0.61813617", "0.5930881", "0.58512056", "0.54681545", "0.54233587", "0.53596294", "0.52998245", "0.52364296", "0.51616734", "0.51128006", "0.50904953", "0.50900835", "0.5064042", "0.50519156", "0.50236064", "0.5009377", "0.4984651", "0.49781162", "...
0.6912658
0
given a path, traverse Organizations OUs to locate the required OU...
def get_ou_from_path(logger, org_client, path): logger.debug("Getting OU from path: %s", path) current_ou = org_client.list_roots()["Roots"][0]["Id"] if path == "/": return {"Id":current_ou, "Path":path} for dir_name in path.split("/")[1:]: logger.debug("Getting OU from path: %s, looking for: %s", path, dir_name) found = False args = dict(ParentId=current_ou) children = utils.generic_paginator(logger, org_client.list_organizational_units_for_parent, "OrganizationalUnits", **args) for org_unit in children: if org_unit["Name"] == dir_name: current_ou = org_unit["Id"] found = True break if not found: raise ValueError("OU path not found") return {"Id":current_ou, "Path":path}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_accounts_for_ou(logger, options, org_client, path):\n logger.debug(\"Getting accounts for OU: %s\", path)\n org_unit = get_ou_from_path(logger, org_client, path)\n ous = []\n if options.no_recursive:\n ous.append(org_unit)\n else:\n ous.extend(get_child_ous(logger, org_client, ...
[ "0.5943409", "0.5662944", "0.5541912", "0.5307396", "0.52833915", "0.52833915", "0.51416296", "0.51335", "0.5058733", "0.5023612", "0.50106674", "0.4983386", "0.49637613", "0.49609458", "0.49326625", "0.49166146", "0.49147454", "0.49008152", "0.4848601", "0.48095214", "0.4798...
0.7749507
0
given a path, get all the AWS accounts within that part of an Organization...
def get_accounts_for_ou(logger, options, org_client, path): logger.debug("Getting accounts for OU: %s", path) org_unit = get_ou_from_path(logger, org_client, path) ous = [] if options.no_recursive: ous.append(org_unit) else: ous.extend(get_child_ous(logger, org_client, org_unit)) result = [] for org_unit in ous: args = {"ParentId":org_unit["Id"]} accounts = utils.generic_paginator(logger, org_client.list_accounts_for_parent, "Accounts", **args) for acc in accounts: acc["Path"] = org_unit["Path"] if 'Status' in acc: if acc['Status'] != 'SUSPENDED': result.append(acc) else: logger.info("found suspended account %s, ignoring it." % acc) return result
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def organizations(self):\n return self.get('{}/orgs'.format(ApiVersion.A1.value))", "def ls():\n return dynamodb.ls(OrganizationModel)", "async def get_organizations(request: Request):\n redis = request.app.state.redis\n organizations_obj = orjson.loads(await redis.get_key(\"influxdb_organizations\...
[ "0.5892514", "0.5680063", "0.5646794", "0.5550604", "0.5464335", "0.5430682", "0.5372216", "0.5369034", "0.53668135", "0.53542835", "0.5335564", "0.5326624", "0.53066283", "0.5276022", "0.5273535", "0.52497715", "0.5233608", "0.5233608", "0.5214551", "0.5214118", "0.52107763"...
0.63345224
0
Checks globals() and builtins for the existence of the object name (used for StuWareSoftSystems' bootstrap)
def checkObjectInNameSpace(objectName): if objectName is None or not isinstance(objectName, basestring) or objectName == u"": return False if objectName in globals(): return True return objectName in dir(builtins)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def isbuiltin(object):\n if inspect.isbuiltin(object):\n return True\n\n return getattr(object, '__module__', None) == 'builtins'", "def is_builtin_name(name):\r\n if name.startswith('__') and name.endswith('__'):\r\n return ALL_LOWER_CASE_RE.match(name[2:-2]) is not None\r\n return False", "...
[ "0.6845686", "0.64684844", "0.64186686", "0.63405824", "0.6296543", "0.6213715", "0.60902375", "0.60629964", "0.60133064", "0.5856874", "0.5762603", "0.57043445", "0.56223327", "0.56172764", "0.55805594", "0.5576068", "0.5568513", "0.5556084", "0.55383843", "0.5527319", "0.55...
0.7423229
0
Pass a string in the format 'x.x.x'. Will check that this MacOSX version is at least that version. The 3rd micro number is optional
def isOSXVersionAtLeast(compareVersion): # type: (basestring) -> bool try: if not Platform.isOSX(): return False def convertVersion(convertString): _os_major = _os_minor = _os_micro = 0 _versionNumbers = [] for versionPart in StringUtils.splitIntoList(convertString, '.'): strippedPart = StringUtils.stripNonNumbers(versionPart, '.') if (StringUtils.isInteger(strippedPart)): _versionNumbers.append(Integer.valueOf(Integer.parseInt(strippedPart))) else: _versionNumbers.append(0) if len(_versionNumbers) >= 1: _os_major = max(0, _versionNumbers[0]) if len(_versionNumbers) >= 2: _os_minor = max(0, _versionNumbers[1]) if len(_versionNumbers) >= 3: _os_micro = max(0, _versionNumbers[2]) return _os_major, _os_minor, _os_micro os_major, os_minor, os_micro = convertVersion(System.getProperty("os.version", "0.0.0")) myPrint("DB", "MacOS Version number(s): %s.%s.%s" %(os_major, os_minor, os_micro)) if not isinstance(compareVersion, basestring) or len(compareVersion) < 1: myPrint("B", "ERROR: Invalid compareVersion of '%s' passed - returning False" %(compareVersion)) return False chk_os_major, chk_os_minor, chk_os_micro = convertVersion(compareVersion) myPrint("DB", "Comparing against Version(s): %s.%s.%s" %(chk_os_major, chk_os_minor, chk_os_micro)) if os_major < chk_os_major: return False if os_major > chk_os_major: return True if os_minor < chk_os_minor: return False if os_minor > chk_os_minor: return True if os_micro < chk_os_micro: return False return True except: myPrint("B", "ERROR: isOSXVersionAtLeast() failed - returning False") dump_sys_error_to_md_console_and_errorlog() return False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def check_from_version(version: str) -> str:\n version_int = [int(v) for v in version.split(\".\")]\n if version_int[0] not in PipetteModelMajorVersion:\n raise ValueError(f\"Major version {version_int[0]} is not supported.\")\n if version_int[1] not in PipetteModelMinorVersion:\n raise Valu...
[ "0.6574004", "0.6253473", "0.6247122", "0.6238033", "0.6165214", "0.6156912", "0.612077", "0.60846204", "0.60516804", "0.6008613", "0.5996625", "0.5967177", "0.59521145", "0.59322596", "0.5885311", "0.5882469", "0.58820486", "0.5845207", "0.5835244", "0.5812287", "0.580141", ...
0.62811625
1
Detect Intel x86 32bit system
def isIntelX86_32bit(): return String(System.getProperty("os.arch", "null").strip()).toLowerCase(Locale.ROOT) == "x86"
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_32bit(self):\n return self.machine in ['i386', 'i586', 'i686']", "def osarch_is_32_bit():\n return osarch_match(\"32-bit\")", "def osarch_is_ia32():\n return osarch_match(\"ia32\")", "def host_arch_win():\n\n arch = os.environ.get('PROCESSOR_ARCHITECTURE', 'x86')\n\n matchup = {\n 'AMD64...
[ "0.81732696", "0.80353045", "0.7400126", "0.6873196", "0.6867948", "0.6770266", "0.6644437", "0.6488959", "0.6488959", "0.6432496", "0.6342804", "0.63230413", "0.6291553", "0.62735385", "0.6245272", "0.615874", "0.6148934", "0.6148358", "0.613531", "0.5986601", "0.5973497", ...
0.8507626
0
Grabs the MD defaultText font, reduces default size down to below 18, sets UIManager defaults (if runtime extension, will probably error, so I catch and skip)
def setDefaultFonts(): if MD_REF_UI is None: return # If a runtime extension, then this may fail, depending on timing... Just ignore and return... try: myFont = MD_REF.getUI().getFonts().defaultText except: myPrint("B","ERROR trying to call .getUI().getFonts().defaultText - skipping setDefaultFonts()") return if myFont is None: myPrint("B","WARNING: In setDefaultFonts(): calling .getUI().getFonts().defaultText has returned None (but moneydance_ui was set) - skipping setDefaultFonts()") return if myFont.getSize()>18: try: myFont = myFont.deriveFont(16.0) myPrint("B", "I have reduced the font size down to point-size 16 - Default Fonts are now set to: %s" %(myFont)) except: myPrint("B","ERROR - failed to override font point size down to 16.... will ignore and continue. Font set to: %s" %(myFont)) else: myPrint("DB", "Attempting to set default font to %s" %myFont) try: UIManager.getLookAndFeelDefaults().put("defaultFont", myFont ) # https://thebadprogrammer.com/swing-uimanager-keys/ UIManager.put("CheckBoxMenuItem.acceleratorFont", myFont) UIManager.put("Button.font", myFont) UIManager.put("ToggleButton.font", myFont) UIManager.put("RadioButton.font", myFont) UIManager.put("CheckBox.font", myFont) UIManager.put("ColorChooser.font", myFont) UIManager.put("ComboBox.font", myFont) UIManager.put("Label.font", myFont) UIManager.put("List.font", myFont) UIManager.put("MenuBar.font", myFont) UIManager.put("Menu.acceleratorFont", myFont) UIManager.put("RadioButtonMenuItem.acceleratorFont", myFont) UIManager.put("MenuItem.acceleratorFont", myFont) UIManager.put("MenuItem.font", myFont) UIManager.put("RadioButtonMenuItem.font", myFont) UIManager.put("CheckBoxMenuItem.font", myFont) UIManager.put("OptionPane.buttonFont", myFont) UIManager.put("OptionPane.messageFont", myFont) UIManager.put("Menu.font", myFont) UIManager.put("PopupMenu.font", myFont) UIManager.put("OptionPane.font", myFont) UIManager.put("Panel.font", myFont) UIManager.put("ProgressBar.font", myFont) UIManager.put("ScrollPane.font", myFont) UIManager.put("Viewport.font", myFont) UIManager.put("TabbedPane.font", myFont) UIManager.put("Slider.font", myFont) UIManager.put("Table.font", myFont) UIManager.put("TableHeader.font", myFont) UIManager.put("TextField.font", myFont) UIManager.put("Spinner.font", myFont) UIManager.put("PasswordField.font", myFont) UIManager.put("TextArea.font", myFont) UIManager.put("TextPane.font", myFont) UIManager.put("EditorPane.font", myFont) UIManager.put("TabbedPane.smallFont", myFont) UIManager.put("TitledBorder.font", myFont) UIManager.put("ToolBar.font", myFont) UIManager.put("ToolTip.font", myFont) UIManager.put("Tree.font", myFont) UIManager.put("FormattedTextField.font", myFont) UIManager.put("IconButton.font", myFont) UIManager.put("InternalFrame.optionDialogTitleFont", myFont) UIManager.put("InternalFrame.paletteTitleFont", myFont) UIManager.put("InternalFrame.titleFont", myFont) except: myPrint("B","Failed to set Swing default fonts to use Moneydance defaults... sorry") myPrint("DB",".setDefaultFonts() successfully executed...") return
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_default_font(cls):\n if platform.system() == \"Linux\":\n for family in (\"DejaVu Sans\", \"Noto Sans\", \"Nimbus Sans\"):\n if family in tk.font.families():\n logger.debug(\"Setting default font to: '%s'\", family)\n tk.font.nametofon...
[ "0.68280387", "0.6737032", "0.6695929", "0.6610507", "0.64827216", "0.6389932", "0.6196747", "0.6126894", "0.60420203", "0.60152656", "0.59716773", "0.596298", "0.593417", "0.5910025", "0.5883346", "0.58664095", "0.58539915", "0.5838941", "0.58219564", "0.58039767", "0.578717...
0.829493
0
sets up Client Properties for JFileChooser() to behave as required >> Mac only
def setJFileChooserParameters(_jf, lReportOnly=False, lDefaults=False, lPackagesT=None, lApplicationsT=None, lOptionsButton=None, lNewFolderButton=None): myPrint("D", "In ", inspect.currentframe().f_code.co_name, "()") if not Platform.isOSX(): return if not isinstance(_jf, JFileChooser): return _PKG = "JFileChooser.packageIsTraversable" _APP = "JFileChooser.appBundleIsTraversable" _OPTIONS = "JFileChooser.optionsPanelEnabled" _NEWFOLDER = "JFileChooser.canCreateDirectories" # JFileChooser defaults: https://violetlib.org/vaqua/filechooser.html # "JFileChooser.packageIsTraversable" default False >> set "true" to allow Packages to be traversed # "JFileChooser.appBundleIsTraversable" default False >> set "true" to allow App Bundles to be traversed # "JFileChooser.optionsPanelEnabled" default False >> set "true" to allow Options button # "JFileChooser.canCreateDirectories" default False >> set "true" to allow New Folder button if debug or lReportOnly: myPrint("B", "Parameters set: ReportOnly: %s, Defaults:%s, PackagesT: %s, ApplicationsT:%s, OptionButton:%s, NewFolderButton: %s" %(lReportOnly, lDefaults, lPackagesT, lApplicationsT, lOptionsButton, lNewFolderButton)) txt = ("Before setting" if not lReportOnly else "Reporting only") for setting in [_PKG, _APP, _OPTIONS, _NEWFOLDER]: myPrint("DB", "%s: '%s': '%s'" %(pad(txt,14), pad(setting,50), _jf.getClientProperty(setting))) if lReportOnly: return if lDefaults: _jf.putClientProperty(_PKG, None) _jf.putClientProperty(_APP, None) _jf.putClientProperty(_OPTIONS, None) _jf.putClientProperty(_NEWFOLDER, None) else: if lPackagesT is not None: _jf.putClientProperty(_PKG, lPackagesT) if lApplicationsT is not None: _jf.putClientProperty(_APP, lApplicationsT) if lOptionsButton is not None: _jf.putClientProperty(_OPTIONS, lOptionsButton) if lNewFolderButton is not None: _jf.putClientProperty(_NEWFOLDER, lNewFolderButton) for setting in [_PKG, _APP, _OPTIONS, _NEWFOLDER]: myPrint("DB", "%s: '%s': '%s'" %(pad("After setting",14), pad(setting,50), _jf.getClientProperty(setting))) return
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setFileDialogParameters(lReportOnly=False, lDefaults=False, lSelectDirectories=None, lPackagesT=None):\n\n myPrint(\"D\", \"In \", inspect.currentframe().f_code.co_name, \"()\")\n\n if not Platform.isOSX(): return\n\n _TRUE = \"true\"\n _FALSE = \"false\"\n\n _DIRS_FD = \"app...
[ "0.59659076", "0.52273905", "0.52243555", "0.5196339", "0.51798254", "0.51786554", "0.51282394", "0.5127446", "0.51222116", "0.51085234", "0.5083295", "0.50667393", "0.5033301", "0.5033301", "0.5033301", "0.5008447", "0.5006361", "0.4993501", "0.49912578", "0.49555835", "0.49...
0.60916245
0
sets up System Properties for FileDialog() to behave as required >> Mac only
def setFileDialogParameters(lReportOnly=False, lDefaults=False, lSelectDirectories=None, lPackagesT=None): myPrint("D", "In ", inspect.currentframe().f_code.co_name, "()") if not Platform.isOSX(): return _TRUE = "true" _FALSE = "false" _DIRS_FD = "apple.awt.fileDialogForDirectories" # When True you can select a Folder (rather than a file) _PKGS_FD = "apple.awt.use-file-dialog-packages" # When True allows you to select a 'bundle' as a file; False means navigate inside the bundle # "com.apple.macos.use-file-dialog-packages" # DEPRECATED since Monterrey - discovered this about MD2022.5(4090) - refer: java.desktop/sun/lwawt/macosx/CFileDialog.java # FileDialog defaults # "apple.awt.fileDialogForDirectories" default "false" >> set "true" to allow Directories to be selected # "apple.awt.use-file-dialog-packages" default "true" >> set "false" to allow access to Mac 'packages' if debug or lReportOnly: myPrint("B", "Parameters set: ReportOnly: %s, Defaults:%s, SelectDirectories:%s, PackagesT:%s" % (lReportOnly, lDefaults, lSelectDirectories, lPackagesT)) txt = ("Before setting" if not lReportOnly else "Reporting only") for setting in [_DIRS_FD, _PKGS_FD]: myPrint("DB", "%s: '%s': '%s'" %(pad(txt,14), pad(setting,50), System.getProperty(setting))) if lReportOnly: return if lDefaults: System.setProperty(_DIRS_FD,_FALSE) System.setProperty(_PKGS_FD,_TRUE) else: if lSelectDirectories is not None: System.setProperty(_DIRS_FD, (_TRUE if lSelectDirectories else _FALSE)) if lPackagesT is not None: System.setProperty(_PKGS_FD, (_TRUE if lPackagesT else _FALSE)) for setting in [_DIRS_FD, _PKGS_FD]: myPrint("DB", "After setting: '%s': '%s'" %(pad(setting,50), System.getProperty(setting))) return
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _startup_system(self):\n\n self._config_path.set(filedialog.asksaveasfilename())\n self._system = System(self._config_path.get())\n\n self._start_frame.pack_forget()\n self._main_frame.pack()", "def pkg_app_file_chooser(self):\n filename = tk.filedialog.askopenfilename()\n ...
[ "0.6109975", "0.5899527", "0.5769735", "0.55686957", "0.55619633", "0.5373799", "0.5356747", "0.5335496", "0.53288305", "0.5298387", "0.5294953", "0.52298236", "0.5206536", "0.51610196", "0.514091", "0.50889593", "0.5086334", "0.5081264", "0.5057602", "0.50511295", "0.5033079...
0.61366576
0
Returns a Python strftime format string in accordance with MD Preferences for Date Format
def convertMDShortDateFormat_strftimeFormat(lIncludeTime=False, lForceYYMMDDHMS=False): # https://strftime.org _MDFormat = MD_REF.getPreferences().getShortDateFormat() rtnFormat = "%Y-%m-%d" if lForceYYMMDDHMS: lIncludeTime = True else: if _MDFormat == "MM/dd/yyyy": rtnFormat = "%m/%d/%Y" elif _MDFormat == "MM.dd.yyyy": rtnFormat = "%m.%d.%Y" elif _MDFormat == "yyyy/MM/dd": rtnFormat = "%Y/%m/%d" elif _MDFormat == "yyyy.MM.dd": rtnFormat = "%Y.%m.%d" elif _MDFormat == "dd/MM/yyyy": rtnFormat = "%d/%m/%Y" elif _MDFormat == "dd.MM.yyyy": rtnFormat = "%d.%m.%Y" if lIncludeTime: rtnFormat += " %H:%M:%S" return rtnFormat
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def strftime(self, format):\n return \"\"", "def strftime(self, format):\n return \"\"", "def strftime(self, format):\n return \"\"", "def strftime(dt):\n return f\"{dt:%b %d,%Y %-H:%M:%S%z}\"", "def get_strftime(date_obj: dt.datetime) -> str:\n return date_obj.strftime(get_setti...
[ "0.76526", "0.76526", "0.76526", "0.7622349", "0.74858314", "0.7395106", "0.7327035", "0.7324193", "0.7300734", "0.71893567", "0.7129464", "0.7052781", "0.7028228", "0.7019862", "0.70110154", "0.693482", "0.692643", "0.683672", "0.6810442", "0.6744643", "0.67248136", "0.668...
0.742588
5
This triggers MD to firePreferencesUpdated().... Hopefully refreshing Home Screen Views too
def fireMDPreferencesUpdated(): myPrint("DB", "In ", inspect.currentframe().f_code.co_name, "()" ) class FPSRunnable(Runnable): def __init__(self): pass def run(self): myPrint("DB",".. Inside FPSRunnable() - calling firePreferencesUpdated()...") myPrint("B","Triggering an update to the Summary/Home Page View") MD_REF.getPreferences().firePreferencesUpdated() if not SwingUtilities.isEventDispatchThread(): myPrint("DB",".. Not running within the EDT so calling via FPSRunnable()...") SwingUtilities.invokeLater(FPSRunnable()) else: myPrint("DB",".. Already running within the EDT so calling FPSRunnable() naked...") FPSRunnable().run() return
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def refresh_screen(self):", "def preferencesChanged(self):\n # do nothing\n pass", "def on_refresh(self):\n pass", "def updateSettingsUI(self):\n\n pass", "def applyPrefs (self):\r\n self.storyPanel.eachWidget(lambda w: w.applyPrefs())\r\n self.storyPanel.Refresh()...
[ "0.70166314", "0.67420226", "0.67126137", "0.6558181", "0.6547368", "0.6456297", "0.62285334", "0.61892396", "0.6178164", "0.6083877", "0.59968984", "0.59863025", "0.5978254", "0.5940049", "0.5935096", "0.5920283", "0.59084743", "0.58467805", "0.58467805", "0.58374125", "0.58...
0.7383542
0
Searches Moneydance for a specific extension loaded
def find_feature_module(theModule): # type: (str) -> bool fms = MD_REF.getLoadedModules() for fm in fms: if fm.getIDStr().lower() == theModule: myPrint("DB", "Found extension: %s" %(theModule)) return fm return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_loaded_extensions():\n raise NotImplementedError()", "def load_extensions(self):\n extension_module_name = f\"{utils.get_project_name()}.cogs\"\n for extension in CONF.LOADED_EXTENSIONS:\n try:\n self.load_extension(extension_module_name + \".\" + extension)\n ...
[ "0.6085889", "0.60732716", "0.60676134", "0.6062981", "0.5867079", "0.5847451", "0.58071655", "0.57089275", "0.56770766", "0.5671906", "0.56402373", "0.5582146", "0.5570287", "0.5542473", "0.5539861", "0.5514397", "0.549309", "0.54413986", "0.5440934", "0.5427723", "0.5409136...
0.5237927
40
Will detect and then run the codeblock on the EDT
def genericSwingEDTRunner(ifOffEDTThenRunNowAndWait, ifOnEDTThenRunNowAndWait, codeblock, *args): isOnEDT = SwingUtilities.isEventDispatchThread() # myPrint("DB", "** In .genericSwingEDTRunner(), ifOffEDTThenRunNowAndWait: '%s', ifOnEDTThenRunNowAndWait: '%s', codeblock: '%s', args: '%s'" %(ifOffEDTThenRunNowAndWait, ifOnEDTThenRunNowAndWait, codeblock, args)) myPrint("DB", "** In .genericSwingEDTRunner(), ifOffEDTThenRunNowAndWait: '%s', ifOnEDTThenRunNowAndWait: '%s', codeblock: <codeblock>, args: <args>" %(ifOffEDTThenRunNowAndWait, ifOnEDTThenRunNowAndWait)) myPrint("DB", "** In .genericSwingEDTRunner(), isOnEDT:", isOnEDT) class GenericSwingEDTRunner(Runnable): def __init__(self, _codeblock, arguments): self.codeBlock = _codeblock self.params = arguments def run(self): myPrint("DB", "** In .genericSwingEDTRunner():: GenericSwingEDTRunner().run()... about to execute codeblock.... isOnEDT:", SwingUtilities.isEventDispatchThread()) self.codeBlock(*self.params) myPrint("DB", "** In .genericSwingEDTRunner():: GenericSwingEDTRunner().run()... finished executing codeblock....") _gser = GenericSwingEDTRunner(codeblock, args) if ((isOnEDT and not ifOnEDTThenRunNowAndWait) or (not isOnEDT and not ifOffEDTThenRunNowAndWait)): myPrint("DB", "... calling codeblock via .invokeLater()...") SwingUtilities.invokeLater(_gser) elif not isOnEDT: myPrint("DB", "... calling codeblock via .invokeAndWait()...") SwingUtilities.invokeAndWait(_gser) else: myPrint("DB", "... calling codeblock.run() naked...") _gser.run() myPrint("DB", "... finished calling the codeblock via method reported above...")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def run(self):\n self.window.mainloop()", "def takeControl(self):\n mainloop()", "def takeControl(self):\n mainloop()", "def exec(self):\n if self._root.master is None:\n self._root.mainloop()", "def run(self):\n self.ident = threading.current_thread().ident\n ...
[ "0.6536498", "0.64465624", "0.64465624", "0.6426398", "0.63144535", "0.61656505", "0.61306715", "0.60988885", "0.6066413", "0.6066413", "0.6001287", "0.59971917", "0.59842736", "0.5967664", "0.59582716", "0.5954346", "0.5944975", "0.59409404", "0.5900608", "0.58864576", "0.58...
0.6598361
0
Will run the codeblock on a new Thread
def genericThreadRunner(daemon, codeblock, *args): # myPrint("DB", "** In .genericThreadRunner(), codeblock: '%s', args: '%s'" %(codeblock, args)) myPrint("DB", "** In .genericThreadRunner(), codeblock: <codeblock>, args: <args>") class GenericThreadRunner(Runnable): def __init__(self, _codeblock, arguments): self.codeBlock = _codeblock self.params = arguments def run(self): myPrint("DB", "** In .genericThreadRunner():: GenericThreadRunner().run()... about to execute codeblock....") self.codeBlock(*self.params) myPrint("DB", "** In .genericThreadRunner():: GenericThreadRunner().run()... finished executing codeblock....") _gtr = GenericThreadRunner(codeblock, args) _t = Thread(_gtr, "NAB_GenericThreadRunner".lower()) _t.setDaemon(daemon) _t.start() myPrint("DB", "... finished calling the codeblock...")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Run(self):\n self.RunAsync().join()", "def run(self):\n self.ident = threading.current_thread().ident\n self.ready.set()\n self.exec_()", "def process_thread(self):", "def run(self):\n self.thread = threading.Thread(target=self._main)\n self.thread.start()\n s...
[ "0.6713125", "0.6663096", "0.6575492", "0.6550865", "0.654327", "0.64968747", "0.6474789", "0.6474789", "0.6473518", "0.64723456", "0.64446056", "0.6290869", "0.62402534", "0.62397003", "0.61925733", "0.6187641", "0.6182442", "0.6176061", "0.61667424", "0.6138981", "0.6132365...
0.6160486
19
read table data from csv file
def read_csv(filename, delimiter=','): data = [] try: with open(filename, 'r') as csvfile: reader = csv.DictReader(csvfile, delimiter=delimiter) try: keys = reader.fieldnames for row in reader: data.append(row) except csv.Error as e: sys.exit('file %s, line %d: %s' % (filename, reader.line_num, e)) except IOError as e: sys.exit('%s does not exist' % e) return data
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def read_csv():", "def loadCSV(input_file):", "def get_data(self, csv_file):\n pass", "def read_csv_file(self):\n pass", "def read_csv_as_table(csv_input_file_name, skip_first_line=False):\n output = []\n with open(csv_input_file_name, 'r') as fin:\n csv_content = csv.reader(fin,...
[ "0.8095777", "0.7471686", "0.7406693", "0.7337046", "0.7332259", "0.7143274", "0.69447905", "0.69225657", "0.68924946", "0.68774915", "0.6847433", "0.6822053", "0.6807061", "0.6763969", "0.6755038", "0.675341", "0.6733731", "0.67244375", "0.67158145", "0.67142403", "0.6712804...
0.0
-1
Generate a side by side plot of expected and predicted
def plotExpectedPredicted(input, output, expected, label, fig, axes): n_batches = len(input) for batch in range(0, n_batches): input_2d = np.clip(np.reshape(input[batch], (28, 28)), 0, 1)#.astype(np.uint8) expected_2d = np.clip(np.reshape(expected[batch], (28, 28)), 0, 1)#.astype(np.uint8) output_2d = np.clip(np.reshape(output[batch], (28, 28)), 0, 1)#.astype(np.uint8) axes[batch, 0].imshow(input_2d, interpolation='nearest', cmap='gray') axes[batch, 0].set_title('Digit Label: {}'.format(label)) axes[batch, 0].set_xbound([0,28]) axes[batch,1] .imshow(expected_2d, interpolation='nearest', cmap='gray') axes[batch,1] .set_title('Digit Label: {}'.format(label)) axes[batch,1] .set_xbound([0,28]) axes[batch,2] .imshow(output_2d, interpolation='nearest', cmap='gray') axes[batch,2] .set_title('Digit Label: {}'.format(label)) axes[batch,2] .set_xbound([0,28])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def plot_result(data, gt_y, pred_y):\n assert data.shape[0] == gt_y.shape[0]\n assert data.shape[0] == pred_y.shape[0]\n\n plt.figure()\n\n plt.subplot(1, 2, 1)\n plt.title('Ground Truth', fontsize=18)\n\n for idx in range(data.shape[0]):\n if gt_y[idx] == 0:\n ...
[ "0.7095982", "0.7095982", "0.6836742", "0.6829876", "0.6635602", "0.6579234", "0.6553575", "0.65293133", "0.6511318", "0.64920896", "0.6491192", "0.6463729", "0.6444954", "0.64443487", "0.6430439", "0.6392063", "0.6367903", "0.635039", "0.6348396", "0.63420445", "0.6334286", ...
0.6863375
2
Missing associated documentation comment in .proto file.
def Profile(self, request, context): context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def init_doc(self):\n raise NotImplementedError()", "def inherits_doc():\n pass", "def documentation_only():\n pass", "def DocString():\n return", "def test_module_doc(self):\n self.assertTrue(len(base.__doc__) > 0)", "def pythondoc(self, irc, msg, args, num, req):\n ...
[ "0.6347405", "0.62316597", "0.62253404", "0.6107218", "0.60712713", "0.6055634", "0.60191995", "0.5996731", "0.597168", "0.59466904", "0.59434444", "0.59335643", "0.5919223", "0.5902901", "0.58987755", "0.5864407", "0.5856765", "0.5836615", "0.57913834", "0.57687634", "0.5763...
0.0
-1
Missing associated documentation comment in .proto file.
def Binary(self, request, context): context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def init_doc(self):\n raise NotImplementedError()", "def inherits_doc():\n pass", "def documentation_only():\n pass", "def DocString():\n return", "def test_module_doc(self):\n self.assertTrue(len(base.__doc__) > 0)", "def pythondoc(self, irc, msg, args, num, req):\n ...
[ "0.6348721", "0.6232983", "0.6227791", "0.6107919", "0.6073252", "0.6056996", "0.60199225", "0.5997295", "0.5973073", "0.59475285", "0.59426475", "0.59348774", "0.59195995", "0.59041727", "0.5899058", "0.5865414", "0.5857725", "0.5836395", "0.57917976", "0.57693964", "0.57656...
0.0
-1
Missing associated documentation comment in .proto file.
def Dump(self, request, context): context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def init_doc(self):\n raise NotImplementedError()", "def inherits_doc():\n pass", "def documentation_only():\n pass", "def DocString():\n return", "def test_module_doc(self):\n self.assertTrue(len(base.__doc__) > 0)", "def pythondoc(self, irc, msg, args, num, req):\n ...
[ "0.6347405", "0.62316597", "0.62253404", "0.6107218", "0.60712713", "0.6055634", "0.60191995", "0.5996731", "0.597168", "0.59466904", "0.59434444", "0.59335643", "0.5919223", "0.5902901", "0.58987755", "0.5864407", "0.5856765", "0.5836615", "0.57913834", "0.57687634", "0.5763...
0.0
-1
Missing associated documentation comment in .proto file.
def SetLogLevel(self, request, context): context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def init_doc(self):\n raise NotImplementedError()", "def inherits_doc():\n pass", "def documentation_only():\n pass", "def DocString():\n return", "def test_module_doc(self):\n self.assertTrue(len(base.__doc__) > 0)", "def pythondoc(self, irc, msg, args, num, req):\n ...
[ "0.6348721", "0.6232983", "0.6227791", "0.6107919", "0.6073252", "0.6056996", "0.60199225", "0.5997295", "0.5973073", "0.59475285", "0.59426475", "0.59348774", "0.59195995", "0.59041727", "0.5899058", "0.5865414", "0.5857725", "0.5836395", "0.57917976", "0.57693964", "0.57656...
0.0
-1
Missing associated documentation comment in .proto file.
def GetDumpV2Template(self, request, context): context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def init_doc(self):\n raise NotImplementedError()", "def inherits_doc():\n pass", "def documentation_only():\n pass", "def DocString():\n return", "def test_module_doc(self):\n self.assertTrue(len(base.__doc__) > 0)", "def pythondoc(self, irc, msg, args, num, req):\n ...
[ "0.6347405", "0.62316597", "0.62253404", "0.6107218", "0.60712713", "0.6055634", "0.60191995", "0.5996731", "0.597168", "0.59466904", "0.59434444", "0.59335643", "0.5919223", "0.5902901", "0.58987755", "0.5864407", "0.5856765", "0.5836615", "0.57913834", "0.57687634", "0.5763...
0.0
-1
Missing associated documentation comment in .proto file.
def DumpV2(self, request, context): context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def init_doc(self):\n raise NotImplementedError()", "def inherits_doc():\n pass", "def documentation_only():\n pass", "def DocString():\n return", "def test_module_doc(self):\n self.assertTrue(len(base.__doc__) > 0)", "def pythondoc(self, irc, msg, args, num, req):\n ...
[ "0.6348721", "0.6232983", "0.6227791", "0.6107919", "0.6073252", "0.6056996", "0.60199225", "0.5997295", "0.5973073", "0.59475285", "0.59426475", "0.59348774", "0.59195995", "0.59041727", "0.5899058", "0.5865414", "0.5857725", "0.5836395", "0.57917976", "0.57693964", "0.57656...
0.0
-1
depthfirst search, mark visited in place O(n), O(1)
def maxAreaOfIsland(self, grid): def helper(x, y): if x < 0 or x >= len(grid) or y < 0 or y >= len(grid[0]) or grid[x][y] == 'X': return 0 if grid[x][y] == 1: grid[x][y] = 'X' return 1 + helper(x - 1, y) + helper(x + 1, y) + helper(x, y + 1) + helper(x, y - 1) else: grid[x][y] = 'X' return 0 max_area = 0 for i in range(len(grid)): for j in range(len(grid[0])): max_area = max(max_area, helper(i, j)) return max_area """ - depth-first search, recursive, mark visited in a set - O(n), O(n) """ visited = set() # can use global variable instead of passing into stack def helper(x, y): if x < 0 or x >= len(grid) or y < 0 or y >= len(grid[0]) or (x, y) in visited: return 0 visited.add((x, y)) if grid[x][y] == 1: return 1 + helper(x - 1, y) + helper(x + 1, y) + helper(x, y + 1) + helper(x, y - 1) else: return 0 max_area = 0 for i in range(len(grid)): for j in range(len(grid[0])): max_area = max(max_area, helper(i, j)) return max_area """ - depth-first search, iterative, mark visited in a set - O(n), O(n) """ max_area = 0 visited = set() row, col = len(grid), len(grid[0]) for i in range(row): for j in range(col): area = 0 n = grid[i][j] stack = [(i, j)] # use stack to track all neighbors (all need to be searched) while stack: x, y = stack.pop() if 0 <= x < row and 0 <= y < col and (x, y) not in visited: visited.add((x, y)) if grid[x][y] == 1: area += 1 stack += [(x + 1, y), (x - 1, y), (x, y + 1), (x, y - 1)] max_area = max(max_area, area) return max_area
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def depth_first_search(problem):\r\n \"*** YOUR CODE HERE ***\"\r\n fringe = []\r\n path = set()\r\n final = []\r\n acts = dict()\r\n state = problem.get_start_state()\r\n fringe.append(state)\r\n\r\n while(len(fringe) > 0):\r\n state = fringe.pop()\r\n path.add(state)\r\n ...
[ "0.7023242", "0.69994956", "0.6996934", "0.69497895", "0.687699", "0.68541056", "0.6832711", "0.6771857", "0.67687964", "0.67646325", "0.6733643", "0.6710491", "0.66814333", "0.6609042", "0.6607835", "0.6601756", "0.658722", "0.656834", "0.65571326", "0.6551692", "0.65476173"...
0.0
-1
Initializes hidden state vector
def init_hidden(self, batch_size): weight = next(self.parameters()).data if self.train_on_gpu: if self.rnn_type == 'LSTM': hidden = (weight.new(self.n_layers, batch_size, self.hidden_dim).zero_().cuda(), weight.new(self.n_layers, batch_size, self.hidden_dim).zero_().cuda()) else: hidden = (weight.new(self.n_layers, batch_size, self.hidden_dim).zero_().cuda()) else: if self.rnn_type == 'LSTM': hidden = (weight.new(self.n_layers, batch_size, self.hidden_dim).zero_(), weight.new(self.n_layers, batch_size, self.hidden_dim).zero_()) else: hidden = (weight.new(self.n_layers, batch_size, self.hidden_dim).zero_()) return hidden
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def initialize_hidden_state(self):\n initializer = tf.keras.initializers.Zeros()\n rnnten = initializer(shape=(self.batch, self.units))\n return rnnten", "def initialize_hidden_state(self):\n return tf.zeros(shape=(self.batch_size, self.enc_units))", "def init_state(self) -> None:\n...
[ "0.78422564", "0.76011795", "0.75708747", "0.7545913", "0.7402229", "0.7300602", "0.7254794", "0.69414794", "0.69414794", "0.69055253", "0.6872069", "0.68429536", "0.6835688", "0.67922854", "0.6773605", "0.6763473", "0.6744704", "0.67300737", "0.667231", "0.66509145", "0.6650...
0.0
-1
Prepares DataLoaders for 'rnn' generation method
def prepare_dataloaders(data, seq_len, batch_size=64, validation_set=False, validation_size=0.1, random_seed=42): vocab = set(data) token2id = {k: v for v, k in enumerate(vocab)} id2token = {k: v for v, k in token2id.items()} data_range = range(0, len(data) - seq_len, seq_len) data = [token2id[t] for t in data] data = np.array([data[i:i + seq_len] for i in data_range]) tensor_data = torch.from_numpy(data) if validation_set: np.random.seed(random_seed) idx = np.random.choice( range(len(tensor_data)), size=len(tensor_data), replace=False) split = int(len(idx) * (1 - validation_size)) train_idx = idx[:split] valid_idx = idx[split:] train_data = TensorDataset(torch.LongTensor(tensor_data[train_idx])) valid_data = TensorDataset(torch.LongTensor(tensor_data[valid_idx])) train_loader = DataLoader( train_data, shuffle=True, batch_size=batch_size) valid_loader = DataLoader( valid_data, shuffle=True, batch_size=batch_size) return train_loader, valid_loader, vocab, token2id, id2token else: train_data = TensorDataset(torch.LongTensor(tensor_data)) train_loader = DataLoader( train_data, shuffle=True, batch_size=batch_size) return train_loader, vocab, token2id, id2token
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_each_loader(data_path, batch_size, trn_negnum, shuffle=True, num_workers=0):\n \n dataset = ML_Dataset(data_path, trn_negnum)\n \n if data_path.endswith('trn') == True:\n collate = dataset.train_collate\n else:\n collate = test_collate\n\n data_loader = data.DataLoader(datas...
[ "0.68454164", "0.6782941", "0.67057943", "0.66403675", "0.65843046", "0.65607405", "0.65350705", "0.65200335", "0.6494558", "0.6458471", "0.6375916", "0.6352485", "0.63391966", "0.6334616", "0.6328361", "0.6314732", "0.6312712", "0.62332684", "0.62095624", "0.6204455", "0.620...
0.0
-1
Necessary initialisations for command line arguments
def initialise(): # Logfile for logging log_filename = alib.log_filename_init() if log_filename is None: print("\nError: Failed to initialise Log File Name. aborting\n") return alib.FAIL_GENERIC parser = argparse.ArgumentParser(description=""" Example command lines: -d DEBUG --ss c:/tmp/x.xlsx --ss "C:/work/sample doc/Out of Service Codes.xlsx" """, formatter_class=argparse.RawTextHelpFormatter) # --- DB parameters --- # def_dir = 'C:/work/stuff/' # m_def_dir = 'master_OneDrive_2017-04-07/Master Validated Templates by Club (Controlled)' # mc_def_dir = 'master_common_OneDrive_2017-04-07/Master Validated Common Data Templates (Controlled)' parser.add_argument('--club_dir', help='club files directory', default=None, required=False) parser.add_argument('--club_common_dir', help='club common files directory', default=None, required=False) parser.add_argument('--m_dir', help='master directory', default=None, required=False) parser.add_argument('--mc_dir', help='master common directory', default=None, required=False) parser.add_argument('--all_dir', help='directory containing all of the above', default=None, required=False) parser.add_argument('--quick_debug', help='only load cc and mc files, used for debugging only', default=None, action='store_true', required=False) # Add debug arguments parser.add_argument('-d', '--debug', help='Log messages verbosity: NONE (least), DEBUG (most)', choices=('NONE', 'CRITICAL', 'ERROR', 'WARNING', 'INFO', 'DEBUG'), default="INFO", required=False) # Sort though the arguments, ensure mandatory are populated args = alib.args_validate(parser, log_filename) return (args, log_filename)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def initialise(self, args, environ):", "def _setup_arguments(self):\n\n self._parser.add_argument(\"-a\", \"--area-interest\",\n help=\"Area of interest to process, \"\n \"shapefile path\", required=True)\n # FUTURE VERSIONS\n ...
[ "0.74415267", "0.7358454", "0.7253338", "0.72039276", "0.7177294", "0.71553427", "0.71082044", "0.70940363", "0.7049619", "0.6945425", "0.6943998", "0.69109726", "0.687143", "0.67964226", "0.6782141", "0.6766867", "0.67629826", "0.6739199", "0.67152214", "0.67124844", "0.6708...
0.6216561
89
This program tests that the classification document, the Sql Server DB and Redshift DB all agree with each other
def main(): args, dummy_l_log_filename_s = initialise() # -- Initialise if not alib.init_app(args): return alib.FAIL_GENERIC work_dir = alib.load_dir(args) print('Loading files from {}'.format(work_dir['l_c_dir'])) work_files = alib.load_files(work_dir, args['quick_debug']) # work_dict = alib.load_matching_masterfile(work_files) # alib.load_tags(work_dict) # alib.print_filenames(work_dict) validate_hidden(work_files) alib.p_i('Done...')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_snippet_1(self):\n\n text = \"Asimov also wrote mysteries and fantasy, as well as much nonfiction. Most of his popular science books explain concepts in a historical way, going as far back as possible to a time when the science in question was at its simplest stage. Examples include Guide to Scienc...
[ "0.61581814", "0.60022753", "0.5817165", "0.5571238", "0.55539113", "0.54944795", "0.54687375", "0.5454587", "0.5425017", "0.5419371", "0.54093176", "0.54064757", "0.53786546", "0.5376907", "0.5369085", "0.53491753", "0.53406453", "0.53396004", "0.5316651", "0.5315632", "0.52...
0.0
-1
Implement your canvas drawing logic here, returning False will stop the rendering, returning True will continue it
def draw(self, canvas) -> bool: return False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def draw (self, screen):\n drew = bool(self.draw_fn(self, screen, self.dirty))\n self.dirty = False\n return drew", "def on_draw(self, widget, cr):\n #print \"starting to draw\"\n if self.double_buffer is not None:\n self.draw_tiles()\n cr.set_source_surfa...
[ "0.7068976", "0.70053196", "0.6794968", "0.67545444", "0.66375184", "0.66362685", "0.65746", "0.6460818", "0.6460818", "0.6460818", "0.6460818", "0.64464664", "0.64366764", "0.6423051", "0.63904214", "0.6366687", "0.6364581", "0.63468754", "0.63468754", "0.63468754", "0.62978...
0.8466848
0
Implement your canvas animation drawing logic here, returning False will stop the rendering, returning True will continue it
def draw_animation(self, canvas, animation_tick) -> bool: return False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def draw(self, canvas) -> bool:\n return False", "def draw(self):\r\n if not self.stopped:\r\n super().draw()\r\n self.next_frame()", "def on_draw(self, widget, cr):\n #print \"starting to draw\"\n if self.double_buffer is not None:\n self.draw_tiles...
[ "0.78179634", "0.68488324", "0.6405945", "0.6315539", "0.6288791", "0.6209565", "0.6140665", "0.6124815", "0.6104606", "0.60049677", "0.5990784", "0.59893525", "0.5976392", "0.5976392", "0.5976392", "0.5976392", "0.59686214", "0.5960046", "0.5932858", "0.5920046", "0.59116364...
0.8034474
0
Implement your state changing logic here, for example, when a mode is changed
def refresh(self, new_content): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _on_mode_change(self, event):\n mode = event.mode\n if mode == Mode.PAN_ZOOM:\n self.panzoom_button.setChecked(True)\n elif mode == Mode.PICKER:\n self.pick_button.setChecked(True)\n elif mode == Mode.PAINT:\n self.paint_button.setChecked(True)\n ...
[ "0.73479813", "0.7155198", "0.7146986", "0.69878197", "0.696421", "0.6945815", "0.69330287", "0.6821973", "0.67742443", "0.6771602", "0.67632943", "0.6735988", "0.67205477", "0.67016745", "0.6662783", "0.66435605", "0.6638601", "0.6633751", "0.6633751", "0.66132015", "0.66063...
0.0
-1
Mouse move events will be sent here whenever they change to update the UI if neccesary
def mouse_move(self, pos): if (self.setup_type == "position"): x, y = pos self.canvas.move(x, y)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def on_mouse_move(self, event: PointEvent):\n self.x = event.x\n self.y = event.y\n self.handle_mouse(self.x, self.y)", "def mouse_move_callback(self, event):\n # TODO drag and drop figuriek\n print(\"moving at \", event.x + self.offset_x, event.y + self.offset_y)", "def _onm...
[ "0.7725639", "0.75353", "0.7477627", "0.7465811", "0.7323981", "0.72936875", "0.7253632", "0.725092", "0.71977973", "0.71450245", "0.71029884", "0.71029884", "0.70396215", "0.7001727", "0.6984642", "0.6945438", "0.69439787", "0.6930062", "0.69186425", "0.6899531", "0.6893881"...
0.6727378
30
Responds to click or dwell actions
def click(self, pos): # Confirm the setup if (self.setup_type != None): self.start_setup(None)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def click(self):\r\n pass", "def on_dclick ( self, object ):\n pass", "def on_click(self) -> None:\n pass", "def click(self):\n self.dispatch['elementClick'] = self.clickJsFnc", "def on_click ( self, object ):\n pass", "def interact(self):\r\n pass", "def _do_actio...
[ "0.7291359", "0.66233146", "0.660782", "0.65884537", "0.63273966", "0.62724835", "0.6255575", "0.6255575", "0.62212914", "0.61557615", "0.6118316", "0.61125875", "0.6065794", "0.6064975", "0.6038785", "0.599528", "0.59859943", "0.5957505", "0.59489393", "0.59387773", "0.59387...
0.0
-1
Respond to theme load ins here
def load_theme_values(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def on_load_theme (self):\n\n\t\tif self.has_started:\n\t\t\tself.init_buffers()\n\t\t\tself.redraw_background()\n\t\t\tself.redraw_foreground()", "def on_load(self):\n pass", "def on_load(self):\n pass", "def onStartup(event):\n\n plugins = getPlugins()\n\n for themeDirectory in iterDire...
[ "0.68556285", "0.66520184", "0.66520184", "0.6610389", "0.64057696", "0.62862283", "0.61794144", "0.6151126", "0.6137831", "0.59524107", "0.59130126", "0.59130126", "0.5907942", "0.58921796", "0.58286834", "0.58206403", "0.57867295", "0.5769557", "0.576859", "0.5764957", "0.5...
0.6718465
1
Starts a setup mode that is used for moving, resizing and other various changes that the user might setup
def start_setup(self, setup_type): # Persist the user preferences when we end our setup if (self.setup_type != "" and not setup_type): self.setup_type = setup_type rect = self.canvas.get_rect() self.x = int(rect.x) self.y = int(rect.y) self.width = int(rect.width) self.height = int(rect.height) self.preferences.persist_preferences({ self.id + '_x': self.x, self.id + '_y': self.y, self.id + '_width': self.width, self.id + '_height': self.height }) # Start the setup state elif self.setup_type != setup_type: self.setup_type = setup_type if (self.setup_type == "position"): x, y = ctrl.mouse_pos() self.canvas.move(x, y)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setup():\n setFormat()\n setFilename()\n setScreenMode()", "def setup_mode():\n status_label.color = WHITE\n status_label.text = \"-SET-\"\n\n ave_label.color = BLACK # Turn off average label and value display\n ave_value.color = BLACK\n\n max_value.text = str(MAX_RANGE_F) # Display...
[ "0.6800144", "0.6734263", "0.66898155", "0.66412646", "0.6498546", "0.633072", "0.62841946", "0.6278032", "0.6212285", "0.6206775", "0.62048006", "0.6197723", "0.61908454", "0.6190276", "0.6158729", "0.6156555", "0.61511356", "0.6121974", "0.6118286", "0.6098591", "0.6072834"...
0.7203417
0
Extract bbox info from file name.
def get_bbox(fname): fname = fname.split('_') # fname -> list i = fname.index('bbox') return map(float, fname[i+1:i+5]) # m
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_bbox(fname):\r\n fname = fname.split('_') # fname -> list\r\n i = fname.index('bbox')\r\n return list(map(float, fname[i+1:i+5])) # m\r", "def get_bbox(fname):\r\n\r\n fname = fname.split('_') # fname -> list\r\n i = fname.index('bbox')\r\n return list(map(float, fname[i+1:i+5])) # ...
[ "0.7414556", "0.73649496", "0.71413463", "0.6696102", "0.62867755", "0.6165321", "0.6104715", "0.59432495", "0.59432495", "0.59264004", "0.59072345", "0.59054977", "0.5792332", "0.5791462", "0.577605", "0.56787", "0.5672523", "0.5659785", "0.5647485", "0.56438744", "0.5634939...
0.7516535
0
Extract EPSG number from file name.
def get_proj(fname): fname = fname.split('_') # fname -> list i = fname.index('epsg') return fname[i+1]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_proj(fname):\r\n\r\n fname = fname.split('_') # fname -> list\r\n i = fname.index('epsg')\r\n return fname[i+1]", "def _epsg(self):\n info = self._info['coordinateSystem']['wkt'].rsplit('\"EPSG\",', 1)[-1]\n return int(re.findall(r\"\\d+\", info)[0])", "def get_version_filename(...
[ "0.63735604", "0.62062746", "0.6061637", "0.58868164", "0.5818382", "0.5740342", "0.5669474", "0.5658069", "0.5641101", "0.5620341", "0.5620254", "0.56191593", "0.56164837", "0.56108224", "0.5606117", "0.55956405", "0.5589816", "0.558568", "0.557769", "0.5521931", "0.55009794...
0.6381265
1
How many tiles per row and col > (ny,nx).
def get_num_tiles(grid_bbox, dxy): xmin, xmax, ymin, ymax = grid_bbox return (int(np.abs(ymax-ymin)/dxy), int(np.abs(xmax-xmin)/dxy))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def num_tiles(self):\n return self.num_row_tiles * self.num_col_tiles", "def get_num_tiles(rows, cols, row_tile_size, col_tile_size):\n num_row_tiles = math.ceil(rows / row_tile_size)\n num_col_tiles = math.ceil(cols / col_tile_size)\n return num_row_tiles, num_col_tiles", "def getNumTiles(self):\n ...
[ "0.83870953", "0.82873094", "0.8044176", "0.80318546", "0.7763642", "0.7731704", "0.75307924", "0.7150116", "0.70772505", "0.7041915", "0.6943248", "0.6927167", "0.6907514", "0.68812686", "0.6836811", "0.67657024", "0.6740372", "0.6629903", "0.6573289", "0.65704787", "0.65530...
0.77562994
5
Return all 2d '/variable' names in the HDF5.
def get_grid_names(fname): with h5py.File(fname, 'r') as f: vnames = [k for k in f.keys() if f[k].ndim == 2] return vnames
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def data_variable_names(self):\n data_names = []\n mesh = self.mesh_names()\n prefix = mesh[0]+'_'\n for vname in self.nc.variables.keys():\n if vname.startswith(prefix):\n if self.nc.dimensions.has_key(vname):\n continue\n if ...
[ "0.6690074", "0.62676114", "0.61328524", "0.60728717", "0.6032376", "0.5962701", "0.5961076", "0.5934028", "0.5920969", "0.5817062", "0.57885367", "0.57675433", "0.57535744", "0.5749644", "0.5723075", "0.57072866", "0.56532377", "0.56390136", "0.5622561", "0.56167597", "0.558...
0.6843741
0
busy wait for robot completion
def waitrobot(robot): while not robot.GetController().IsDone(): time.sleep(0.01)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def busyWait(self):\n time.sleep(0.0)", "def waitForCompletion(self):\n\n while(json.loads(self.robot.device())['state']!=0):\n time.sleep(0.1)\n continue\n\n return", "def wait(self):\n time.sleep(0.010)", "def wait(self):\n pass", "def wait(self):\...
[ "0.7729015", "0.7684526", "0.76390046", "0.7526746", "0.7526746", "0.7480899", "0.7480899", "0.7480899", "0.7480899", "0.7460632", "0.7429611", "0.7353933", "0.73518384", "0.7336683", "0.7308061", "0.7302214", "0.72688043", "0.7262008", "0.7262008", "0.72150105", "0.7173207",...
0.8239064
8
Test that initializing a Matern1/2 kernel with 0 lengthscale raises an exception
def test_matern_zero_lengthscale(matern): with pytest.raises(ValueError) as exp: matern(lengthscale=0.0, variance=1.0, output_dim=1) assert exp.value.args[0].find("lengthscale must be positive.") >= 0
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def testZeroInput(self):\n nb.rescale_length(2.0)\n nb.rescale_length(0)\n self.assertEqual(2.0, nb.rscale)", "def testZeroInput(self):\n self.assertRaises(TypeError, nb.rscale,)", "def testKernelsNotSpecified(self):\n with self.assertRaisesRegexp(ValueError, \"`kernel_shape` can...
[ "0.6572343", "0.6536193", "0.63661206", "0.6360225", "0.6295031", "0.6194598", "0.6051746", "0.5993452", "0.59858924", "0.59765357", "0.59129274", "0.5900474", "0.5889973", "0.58620816", "0.5820467", "0.58139074", "0.5799146", "0.5781969", "0.57249826", "0.57009274", "0.56885...
0.6592899
0
Test that initializing a Matern1/2 kernel with 0 variance raises an exception
def test_matern12_zero_variance(matern): with pytest.raises(ValueError) as exp: matern(lengthscale=1.0, variance=0.0, output_dim=1) assert exp.value.args[0].find("variance must be positive.") >= 0
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_gauss_kernel():\n\n gauss = gauss_kernel(2, 5)\n\n assert gauss.shape == (5, 5)\n assert gauss[2, 2] == 0.039788735772973836", "def test_nonpositive_nu_raises_exception(nu):\n with pytest.raises(ValueError):\n kernels.Matern(input_dim=1, nu=nu)", "def testKernelsNotSpecified(self):\...
[ "0.64694107", "0.64663404", "0.63284683", "0.6302467", "0.60142285", "0.59726274", "0.5947721", "0.589947", "0.5893144", "0.589087", "0.5890487", "0.581995", "0.5760517", "0.57496685", "0.57280266", "0.5705864", "0.56650275", "0.5636754", "0.56325996", "0.56217444", "0.560097...
0.6615188
0
Test that the assertion fires for a negative delta time
def test_to_delta_time_positive_difference(with_tf_random_seed, np_time_points): time_points = tf.constant(np_time_points, dtype=default_float()) with pytest.raises(InvalidArgumentError) as exp: to_delta_time(time_points) assert exp.value.message.find("Condition x >= y") >= 0
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_timeout_elapsed_no_exception(self):\n deadline = Deadline(-MS)\n timeout = deadline.timeout(raise_if_elapsed=False)\n self.assertGreater(timeout, -2 * MS)\n self.assertLess(timeout, -MS)", "def test_negative_timedelta(self):\n @converters.wrap\n def inner_test(p...
[ "0.7007831", "0.6637345", "0.6576894", "0.6474647", "0.64391077", "0.6374031", "0.6313927", "0.6297262", "0.62733597", "0.6259941", "0.62490773", "0.62064755", "0.62022203", "0.6191", "0.6171475", "0.61501443", "0.610897", "0.6103212", "0.6097491", "0.609512", "0.6081113", ...
0.6970346
1
Constructor. Any message fields that are implicitly/explicitly set to None will be assigned a default value. The recommend use is keyword arguments as this is more robust to future message changes. You cannot mix inorder arguments and keyword arguments.
def __init__(self, *args, **kwds): if args or kwds: super(MoveGroupActionGoal, self).__init__(*args, **kwds) #message fields cannot be None, assign default values for those that are if self.header is None: self.header = std_msgs.msg.Header() if self.goal_id is None: self.goal_id = actionlib_msgs.msg.GoalID() if self.goal is None: self.goal = moveit_msgs.msg.MoveGroupGoal() else: self.header = std_msgs.msg.Header() self.goal_id = actionlib_msgs.msg.GoalID() self.goal = moveit_msgs.msg.MoveGroupGoal()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, *args, **kwds):\n if args or kwds:\n super(KomodoSpeechRecCommand, self).__init__(*args, **kwds)\n #message fields cannot be None, assign default values for those that are\n if self.header is None:\n self.header = std_msgs.msg.Header()\n if self.cmd is None:\n ...
[ "0.77939296", "0.7720264", "0.7720264", "0.76866186", "0.7626193", "0.756387", "0.74395823", "0.7416946", "0.7308225", "0.72806025", "0.72379386", "0.72272825", "0.7224187", "0.7224187", "0.7218873", "0.7211484", "0.7211484", "0.7211484", "0.7211484", "0.7211484", "0.7211484"...
0.73519075
8
serialize message into buffer
def serialize(self, buff): try: _x = self buff.write(_get_struct_3I().pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) _x = self.header.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _x = self buff.write(_get_struct_2I().pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs)) _x = self.goal_id.id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _x = self buff.write(_get_struct_3I().pack(_x.goal.request.workspace_parameters.header.seq, _x.goal.request.workspace_parameters.header.stamp.secs, _x.goal.request.workspace_parameters.header.stamp.nsecs)) _x = self.goal.request.workspace_parameters.header.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _x = self buff.write(_get_struct_6d3I().pack(_x.goal.request.workspace_parameters.min_corner.x, _x.goal.request.workspace_parameters.min_corner.y, _x.goal.request.workspace_parameters.min_corner.z, _x.goal.request.workspace_parameters.max_corner.x, _x.goal.request.workspace_parameters.max_corner.y, _x.goal.request.workspace_parameters.max_corner.z, _x.goal.request.start_state.joint_state.header.seq, _x.goal.request.start_state.joint_state.header.stamp.secs, _x.goal.request.start_state.joint_state.header.stamp.nsecs)) _x = self.goal.request.start_state.joint_state.header.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) length = len(self.goal.request.start_state.joint_state.name) buff.write(_struct_I.pack(length)) for val1 in self.goal.request.start_state.joint_state.name: length = len(val1) if python3 or type(val1) == unicode: val1 = val1.encode('utf-8') length = len(val1) buff.write(struct.pack('<I%ss'%length, length, val1)) length = len(self.goal.request.start_state.joint_state.position) buff.write(_struct_I.pack(length)) pattern = '<%sd'%length buff.write(struct.pack(pattern, *self.goal.request.start_state.joint_state.position)) length = len(self.goal.request.start_state.joint_state.velocity) buff.write(_struct_I.pack(length)) pattern = '<%sd'%length buff.write(struct.pack(pattern, *self.goal.request.start_state.joint_state.velocity)) length = len(self.goal.request.start_state.joint_state.effort) buff.write(_struct_I.pack(length)) pattern = '<%sd'%length buff.write(struct.pack(pattern, *self.goal.request.start_state.joint_state.effort)) _x = self buff.write(_get_struct_3I().pack(_x.goal.request.start_state.multi_dof_joint_state.header.seq, _x.goal.request.start_state.multi_dof_joint_state.header.stamp.secs, _x.goal.request.start_state.multi_dof_joint_state.header.stamp.nsecs)) _x = self.goal.request.start_state.multi_dof_joint_state.header.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) length = len(self.goal.request.start_state.multi_dof_joint_state.joint_names) buff.write(_struct_I.pack(length)) for val1 in self.goal.request.start_state.multi_dof_joint_state.joint_names: length = len(val1) if python3 or type(val1) == unicode: val1 = val1.encode('utf-8') length = len(val1) buff.write(struct.pack('<I%ss'%length, length, val1)) length = len(self.goal.request.start_state.multi_dof_joint_state.transforms) buff.write(_struct_I.pack(length)) for val1 in self.goal.request.start_state.multi_dof_joint_state.transforms: _v1 = val1.translation _x = _v1 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v2 = val1.rotation _x = _v2 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) length = len(self.goal.request.start_state.multi_dof_joint_state.twist) buff.write(_struct_I.pack(length)) for val1 in self.goal.request.start_state.multi_dof_joint_state.twist: _v3 = val1.linear _x = _v3 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v4 = val1.angular _x = _v4 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) length = len(self.goal.request.start_state.multi_dof_joint_state.wrench) buff.write(_struct_I.pack(length)) for val1 in self.goal.request.start_state.multi_dof_joint_state.wrench: _v5 = val1.force _x = _v5 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v6 = val1.torque _x = _v6 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) length = len(self.goal.request.start_state.attached_collision_objects) buff.write(_struct_I.pack(length)) for val1 in self.goal.request.start_state.attached_collision_objects: _x = val1.link_name length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _v7 = val1.object _v8 = _v7.header buff.write(_get_struct_I().pack(_v8.seq)) _v9 = _v8.stamp _x = _v9 buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs)) _x = _v8.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _x = _v7.id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _v10 = _v7.type _x = _v10.key length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _x = _v10.db length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) length = len(_v7.primitives) buff.write(_struct_I.pack(length)) for val3 in _v7.primitives: buff.write(_get_struct_B().pack(val3.type)) length = len(val3.dimensions) buff.write(_struct_I.pack(length)) pattern = '<%sd'%length buff.write(struct.pack(pattern, *val3.dimensions)) length = len(_v7.primitive_poses) buff.write(_struct_I.pack(length)) for val3 in _v7.primitive_poses: _v11 = val3.position _x = _v11 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v12 = val3.orientation _x = _v12 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) length = len(_v7.meshes) buff.write(_struct_I.pack(length)) for val3 in _v7.meshes: length = len(val3.triangles) buff.write(_struct_I.pack(length)) for val4 in val3.triangles: buff.write(_get_struct_3I().pack(*val4.vertex_indices)) length = len(val3.vertices) buff.write(_struct_I.pack(length)) for val4 in val3.vertices: _x = val4 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) length = len(_v7.mesh_poses) buff.write(_struct_I.pack(length)) for val3 in _v7.mesh_poses: _v13 = val3.position _x = _v13 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v14 = val3.orientation _x = _v14 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) length = len(_v7.planes) buff.write(_struct_I.pack(length)) for val3 in _v7.planes: buff.write(_get_struct_4d().pack(*val3.coef)) length = len(_v7.plane_poses) buff.write(_struct_I.pack(length)) for val3 in _v7.plane_poses: _v15 = val3.position _x = _v15 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v16 = val3.orientation _x = _v16 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) length = len(_v7.subframe_names) buff.write(_struct_I.pack(length)) for val3 in _v7.subframe_names: length = len(val3) if python3 or type(val3) == unicode: val3 = val3.encode('utf-8') length = len(val3) buff.write(struct.pack('<I%ss'%length, length, val3)) length = len(_v7.subframe_poses) buff.write(_struct_I.pack(length)) for val3 in _v7.subframe_poses: _v17 = val3.position _x = _v17 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v18 = val3.orientation _x = _v18 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) buff.write(_get_struct_b().pack(_v7.operation)) length = len(val1.touch_links) buff.write(_struct_I.pack(length)) for val2 in val1.touch_links: length = len(val2) if python3 or type(val2) == unicode: val2 = val2.encode('utf-8') length = len(val2) buff.write(struct.pack('<I%ss'%length, length, val2)) _v19 = val1.detach_posture _v20 = _v19.header buff.write(_get_struct_I().pack(_v20.seq)) _v21 = _v20.stamp _x = _v21 buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs)) _x = _v20.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) length = len(_v19.joint_names) buff.write(_struct_I.pack(length)) for val3 in _v19.joint_names: length = len(val3) if python3 or type(val3) == unicode: val3 = val3.encode('utf-8') length = len(val3) buff.write(struct.pack('<I%ss'%length, length, val3)) length = len(_v19.points) buff.write(_struct_I.pack(length)) for val3 in _v19.points: length = len(val3.positions) buff.write(_struct_I.pack(length)) pattern = '<%sd'%length buff.write(struct.pack(pattern, *val3.positions)) length = len(val3.velocities) buff.write(_struct_I.pack(length)) pattern = '<%sd'%length buff.write(struct.pack(pattern, *val3.velocities)) length = len(val3.accelerations) buff.write(_struct_I.pack(length)) pattern = '<%sd'%length buff.write(struct.pack(pattern, *val3.accelerations)) length = len(val3.effort) buff.write(_struct_I.pack(length)) pattern = '<%sd'%length buff.write(struct.pack(pattern, *val3.effort)) _v22 = val3.time_from_start _x = _v22 buff.write(_get_struct_2i().pack(_x.secs, _x.nsecs)) buff.write(_get_struct_d().pack(val1.weight)) buff.write(_get_struct_B().pack(self.goal.request.start_state.is_diff)) length = len(self.goal.request.goal_constraints) buff.write(_struct_I.pack(length)) for val1 in self.goal.request.goal_constraints: _x = val1.name length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) length = len(val1.joint_constraints) buff.write(_struct_I.pack(length)) for val2 in val1.joint_constraints: _x = val2.joint_name length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _x = val2 buff.write(_get_struct_4d().pack(_x.position, _x.tolerance_above, _x.tolerance_below, _x.weight)) length = len(val1.position_constraints) buff.write(_struct_I.pack(length)) for val2 in val1.position_constraints: _v23 = val2.header buff.write(_get_struct_I().pack(_v23.seq)) _v24 = _v23.stamp _x = _v24 buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs)) _x = _v23.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _x = val2.link_name length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _v25 = val2.target_point_offset _x = _v25 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v26 = val2.constraint_region length = len(_v26.primitives) buff.write(_struct_I.pack(length)) for val4 in _v26.primitives: buff.write(_get_struct_B().pack(val4.type)) length = len(val4.dimensions) buff.write(_struct_I.pack(length)) pattern = '<%sd'%length buff.write(struct.pack(pattern, *val4.dimensions)) length = len(_v26.primitive_poses) buff.write(_struct_I.pack(length)) for val4 in _v26.primitive_poses: _v27 = val4.position _x = _v27 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v28 = val4.orientation _x = _v28 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) length = len(_v26.meshes) buff.write(_struct_I.pack(length)) for val4 in _v26.meshes: length = len(val4.triangles) buff.write(_struct_I.pack(length)) for val5 in val4.triangles: buff.write(_get_struct_3I().pack(*val5.vertex_indices)) length = len(val4.vertices) buff.write(_struct_I.pack(length)) for val5 in val4.vertices: _x = val5 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) length = len(_v26.mesh_poses) buff.write(_struct_I.pack(length)) for val4 in _v26.mesh_poses: _v29 = val4.position _x = _v29 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v30 = val4.orientation _x = _v30 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) buff.write(_get_struct_d().pack(val2.weight)) length = len(val1.orientation_constraints) buff.write(_struct_I.pack(length)) for val2 in val1.orientation_constraints: _v31 = val2.header buff.write(_get_struct_I().pack(_v31.seq)) _v32 = _v31.stamp _x = _v32 buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs)) _x = _v31.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _v33 = val2.orientation _x = _v33 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) _x = val2.link_name length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _x = val2 buff.write(_get_struct_4d().pack(_x.absolute_x_axis_tolerance, _x.absolute_y_axis_tolerance, _x.absolute_z_axis_tolerance, _x.weight)) length = len(val1.visibility_constraints) buff.write(_struct_I.pack(length)) for val2 in val1.visibility_constraints: buff.write(_get_struct_d().pack(val2.target_radius)) _v34 = val2.target_pose _v35 = _v34.header buff.write(_get_struct_I().pack(_v35.seq)) _v36 = _v35.stamp _x = _v36 buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs)) _x = _v35.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _v37 = _v34.pose _v38 = _v37.position _x = _v38 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v39 = _v37.orientation _x = _v39 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) buff.write(_get_struct_i().pack(val2.cone_sides)) _v40 = val2.sensor_pose _v41 = _v40.header buff.write(_get_struct_I().pack(_v41.seq)) _v42 = _v41.stamp _x = _v42 buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs)) _x = _v41.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _v43 = _v40.pose _v44 = _v43.position _x = _v44 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v45 = _v43.orientation _x = _v45 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) _x = val2 buff.write(_get_struct_2dBd().pack(_x.max_view_angle, _x.max_range_angle, _x.sensor_view_direction, _x.weight)) _x = self.goal.request.path_constraints.name length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) length = len(self.goal.request.path_constraints.joint_constraints) buff.write(_struct_I.pack(length)) for val1 in self.goal.request.path_constraints.joint_constraints: _x = val1.joint_name length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _x = val1 buff.write(_get_struct_4d().pack(_x.position, _x.tolerance_above, _x.tolerance_below, _x.weight)) length = len(self.goal.request.path_constraints.position_constraints) buff.write(_struct_I.pack(length)) for val1 in self.goal.request.path_constraints.position_constraints: _v46 = val1.header buff.write(_get_struct_I().pack(_v46.seq)) _v47 = _v46.stamp _x = _v47 buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs)) _x = _v46.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _x = val1.link_name length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _v48 = val1.target_point_offset _x = _v48 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v49 = val1.constraint_region length = len(_v49.primitives) buff.write(_struct_I.pack(length)) for val3 in _v49.primitives: buff.write(_get_struct_B().pack(val3.type)) length = len(val3.dimensions) buff.write(_struct_I.pack(length)) pattern = '<%sd'%length buff.write(struct.pack(pattern, *val3.dimensions)) length = len(_v49.primitive_poses) buff.write(_struct_I.pack(length)) for val3 in _v49.primitive_poses: _v50 = val3.position _x = _v50 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v51 = val3.orientation _x = _v51 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) length = len(_v49.meshes) buff.write(_struct_I.pack(length)) for val3 in _v49.meshes: length = len(val3.triangles) buff.write(_struct_I.pack(length)) for val4 in val3.triangles: buff.write(_get_struct_3I().pack(*val4.vertex_indices)) length = len(val3.vertices) buff.write(_struct_I.pack(length)) for val4 in val3.vertices: _x = val4 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) length = len(_v49.mesh_poses) buff.write(_struct_I.pack(length)) for val3 in _v49.mesh_poses: _v52 = val3.position _x = _v52 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v53 = val3.orientation _x = _v53 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) buff.write(_get_struct_d().pack(val1.weight)) length = len(self.goal.request.path_constraints.orientation_constraints) buff.write(_struct_I.pack(length)) for val1 in self.goal.request.path_constraints.orientation_constraints: _v54 = val1.header buff.write(_get_struct_I().pack(_v54.seq)) _v55 = _v54.stamp _x = _v55 buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs)) _x = _v54.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _v56 = val1.orientation _x = _v56 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) _x = val1.link_name length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _x = val1 buff.write(_get_struct_4d().pack(_x.absolute_x_axis_tolerance, _x.absolute_y_axis_tolerance, _x.absolute_z_axis_tolerance, _x.weight)) length = len(self.goal.request.path_constraints.visibility_constraints) buff.write(_struct_I.pack(length)) for val1 in self.goal.request.path_constraints.visibility_constraints: buff.write(_get_struct_d().pack(val1.target_radius)) _v57 = val1.target_pose _v58 = _v57.header buff.write(_get_struct_I().pack(_v58.seq)) _v59 = _v58.stamp _x = _v59 buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs)) _x = _v58.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _v60 = _v57.pose _v61 = _v60.position _x = _v61 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v62 = _v60.orientation _x = _v62 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) buff.write(_get_struct_i().pack(val1.cone_sides)) _v63 = val1.sensor_pose _v64 = _v63.header buff.write(_get_struct_I().pack(_v64.seq)) _v65 = _v64.stamp _x = _v65 buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs)) _x = _v64.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _v66 = _v63.pose _v67 = _v66.position _x = _v67 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v68 = _v66.orientation _x = _v68 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) _x = val1 buff.write(_get_struct_2dBd().pack(_x.max_view_angle, _x.max_range_angle, _x.sensor_view_direction, _x.weight)) length = len(self.goal.request.trajectory_constraints.constraints) buff.write(_struct_I.pack(length)) for val1 in self.goal.request.trajectory_constraints.constraints: _x = val1.name length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) length = len(val1.joint_constraints) buff.write(_struct_I.pack(length)) for val2 in val1.joint_constraints: _x = val2.joint_name length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _x = val2 buff.write(_get_struct_4d().pack(_x.position, _x.tolerance_above, _x.tolerance_below, _x.weight)) length = len(val1.position_constraints) buff.write(_struct_I.pack(length)) for val2 in val1.position_constraints: _v69 = val2.header buff.write(_get_struct_I().pack(_v69.seq)) _v70 = _v69.stamp _x = _v70 buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs)) _x = _v69.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _x = val2.link_name length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _v71 = val2.target_point_offset _x = _v71 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v72 = val2.constraint_region length = len(_v72.primitives) buff.write(_struct_I.pack(length)) for val4 in _v72.primitives: buff.write(_get_struct_B().pack(val4.type)) length = len(val4.dimensions) buff.write(_struct_I.pack(length)) pattern = '<%sd'%length buff.write(struct.pack(pattern, *val4.dimensions)) length = len(_v72.primitive_poses) buff.write(_struct_I.pack(length)) for val4 in _v72.primitive_poses: _v73 = val4.position _x = _v73 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v74 = val4.orientation _x = _v74 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) length = len(_v72.meshes) buff.write(_struct_I.pack(length)) for val4 in _v72.meshes: length = len(val4.triangles) buff.write(_struct_I.pack(length)) for val5 in val4.triangles: buff.write(_get_struct_3I().pack(*val5.vertex_indices)) length = len(val4.vertices) buff.write(_struct_I.pack(length)) for val5 in val4.vertices: _x = val5 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) length = len(_v72.mesh_poses) buff.write(_struct_I.pack(length)) for val4 in _v72.mesh_poses: _v75 = val4.position _x = _v75 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v76 = val4.orientation _x = _v76 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) buff.write(_get_struct_d().pack(val2.weight)) length = len(val1.orientation_constraints) buff.write(_struct_I.pack(length)) for val2 in val1.orientation_constraints: _v77 = val2.header buff.write(_get_struct_I().pack(_v77.seq)) _v78 = _v77.stamp _x = _v78 buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs)) _x = _v77.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _v79 = val2.orientation _x = _v79 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) _x = val2.link_name length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _x = val2 buff.write(_get_struct_4d().pack(_x.absolute_x_axis_tolerance, _x.absolute_y_axis_tolerance, _x.absolute_z_axis_tolerance, _x.weight)) length = len(val1.visibility_constraints) buff.write(_struct_I.pack(length)) for val2 in val1.visibility_constraints: buff.write(_get_struct_d().pack(val2.target_radius)) _v80 = val2.target_pose _v81 = _v80.header buff.write(_get_struct_I().pack(_v81.seq)) _v82 = _v81.stamp _x = _v82 buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs)) _x = _v81.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _v83 = _v80.pose _v84 = _v83.position _x = _v84 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v85 = _v83.orientation _x = _v85 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) buff.write(_get_struct_i().pack(val2.cone_sides)) _v86 = val2.sensor_pose _v87 = _v86.header buff.write(_get_struct_I().pack(_v87.seq)) _v88 = _v87.stamp _x = _v88 buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs)) _x = _v87.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _v89 = _v86.pose _v90 = _v89.position _x = _v90 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v91 = _v89.orientation _x = _v91 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) _x = val2 buff.write(_get_struct_2dBd().pack(_x.max_view_angle, _x.max_range_angle, _x.sensor_view_direction, _x.weight)) length = len(self.goal.request.reference_trajectories) buff.write(_struct_I.pack(length)) for val1 in self.goal.request.reference_trajectories: _v92 = val1.header buff.write(_get_struct_I().pack(_v92.seq)) _v93 = _v92.stamp _x = _v93 buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs)) _x = _v92.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) length = len(val1.joint_trajectory) buff.write(_struct_I.pack(length)) for val2 in val1.joint_trajectory: _v94 = val2.header buff.write(_get_struct_I().pack(_v94.seq)) _v95 = _v94.stamp _x = _v95 buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs)) _x = _v94.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) length = len(val2.joint_names) buff.write(_struct_I.pack(length)) for val3 in val2.joint_names: length = len(val3) if python3 or type(val3) == unicode: val3 = val3.encode('utf-8') length = len(val3) buff.write(struct.pack('<I%ss'%length, length, val3)) length = len(val2.points) buff.write(_struct_I.pack(length)) for val3 in val2.points: length = len(val3.positions) buff.write(_struct_I.pack(length)) pattern = '<%sd'%length buff.write(struct.pack(pattern, *val3.positions)) length = len(val3.velocities) buff.write(_struct_I.pack(length)) pattern = '<%sd'%length buff.write(struct.pack(pattern, *val3.velocities)) length = len(val3.accelerations) buff.write(_struct_I.pack(length)) pattern = '<%sd'%length buff.write(struct.pack(pattern, *val3.accelerations)) length = len(val3.effort) buff.write(_struct_I.pack(length)) pattern = '<%sd'%length buff.write(struct.pack(pattern, *val3.effort)) _v96 = val3.time_from_start _x = _v96 buff.write(_get_struct_2i().pack(_x.secs, _x.nsecs)) length = len(val1.cartesian_trajectory) buff.write(_struct_I.pack(length)) for val2 in val1.cartesian_trajectory: _v97 = val2.header buff.write(_get_struct_I().pack(_v97.seq)) _v98 = _v97.stamp _x = _v98 buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs)) _x = _v97.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _x = val2.tracked_frame length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) length = len(val2.points) buff.write(_struct_I.pack(length)) for val3 in val2.points: _v99 = val3.point _v100 = _v99.pose _v101 = _v100.position _x = _v101 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v102 = _v100.orientation _x = _v102 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) _v103 = _v99.velocity _v104 = _v103.linear _x = _v104 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v105 = _v103.angular _x = _v105 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v106 = _v99.acceleration _v107 = _v106.linear _x = _v107 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v108 = _v106.angular _x = _v108 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v109 = val3.time_from_start _x = _v109 buff.write(_get_struct_2i().pack(_x.secs, _x.nsecs)) _x = self.goal.request.planner_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _x = self.goal.request.group_name length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _x = self buff.write(_get_struct_i3d().pack(_x.goal.request.num_planning_attempts, _x.goal.request.allowed_planning_time, _x.goal.request.max_velocity_scaling_factor, _x.goal.request.max_acceleration_scaling_factor)) _x = self.goal.planning_options.planning_scene_diff.name length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _x = self buff.write(_get_struct_3I().pack(_x.goal.planning_options.planning_scene_diff.robot_state.joint_state.header.seq, _x.goal.planning_options.planning_scene_diff.robot_state.joint_state.header.stamp.secs, _x.goal.planning_options.planning_scene_diff.robot_state.joint_state.header.stamp.nsecs)) _x = self.goal.planning_options.planning_scene_diff.robot_state.joint_state.header.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) length = len(self.goal.planning_options.planning_scene_diff.robot_state.joint_state.name) buff.write(_struct_I.pack(length)) for val1 in self.goal.planning_options.planning_scene_diff.robot_state.joint_state.name: length = len(val1) if python3 or type(val1) == unicode: val1 = val1.encode('utf-8') length = len(val1) buff.write(struct.pack('<I%ss'%length, length, val1)) length = len(self.goal.planning_options.planning_scene_diff.robot_state.joint_state.position) buff.write(_struct_I.pack(length)) pattern = '<%sd'%length buff.write(struct.pack(pattern, *self.goal.planning_options.planning_scene_diff.robot_state.joint_state.position)) length = len(self.goal.planning_options.planning_scene_diff.robot_state.joint_state.velocity) buff.write(_struct_I.pack(length)) pattern = '<%sd'%length buff.write(struct.pack(pattern, *self.goal.planning_options.planning_scene_diff.robot_state.joint_state.velocity)) length = len(self.goal.planning_options.planning_scene_diff.robot_state.joint_state.effort) buff.write(_struct_I.pack(length)) pattern = '<%sd'%length buff.write(struct.pack(pattern, *self.goal.planning_options.planning_scene_diff.robot_state.joint_state.effort)) _x = self buff.write(_get_struct_3I().pack(_x.goal.planning_options.planning_scene_diff.robot_state.multi_dof_joint_state.header.seq, _x.goal.planning_options.planning_scene_diff.robot_state.multi_dof_joint_state.header.stamp.secs, _x.goal.planning_options.planning_scene_diff.robot_state.multi_dof_joint_state.header.stamp.nsecs)) _x = self.goal.planning_options.planning_scene_diff.robot_state.multi_dof_joint_state.header.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) length = len(self.goal.planning_options.planning_scene_diff.robot_state.multi_dof_joint_state.joint_names) buff.write(_struct_I.pack(length)) for val1 in self.goal.planning_options.planning_scene_diff.robot_state.multi_dof_joint_state.joint_names: length = len(val1) if python3 or type(val1) == unicode: val1 = val1.encode('utf-8') length = len(val1) buff.write(struct.pack('<I%ss'%length, length, val1)) length = len(self.goal.planning_options.planning_scene_diff.robot_state.multi_dof_joint_state.transforms) buff.write(_struct_I.pack(length)) for val1 in self.goal.planning_options.planning_scene_diff.robot_state.multi_dof_joint_state.transforms: _v110 = val1.translation _x = _v110 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v111 = val1.rotation _x = _v111 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) length = len(self.goal.planning_options.planning_scene_diff.robot_state.multi_dof_joint_state.twist) buff.write(_struct_I.pack(length)) for val1 in self.goal.planning_options.planning_scene_diff.robot_state.multi_dof_joint_state.twist: _v112 = val1.linear _x = _v112 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v113 = val1.angular _x = _v113 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) length = len(self.goal.planning_options.planning_scene_diff.robot_state.multi_dof_joint_state.wrench) buff.write(_struct_I.pack(length)) for val1 in self.goal.planning_options.planning_scene_diff.robot_state.multi_dof_joint_state.wrench: _v114 = val1.force _x = _v114 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v115 = val1.torque _x = _v115 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) length = len(self.goal.planning_options.planning_scene_diff.robot_state.attached_collision_objects) buff.write(_struct_I.pack(length)) for val1 in self.goal.planning_options.planning_scene_diff.robot_state.attached_collision_objects: _x = val1.link_name length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _v116 = val1.object _v117 = _v116.header buff.write(_get_struct_I().pack(_v117.seq)) _v118 = _v117.stamp _x = _v118 buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs)) _x = _v117.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _x = _v116.id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _v119 = _v116.type _x = _v119.key length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _x = _v119.db length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) length = len(_v116.primitives) buff.write(_struct_I.pack(length)) for val3 in _v116.primitives: buff.write(_get_struct_B().pack(val3.type)) length = len(val3.dimensions) buff.write(_struct_I.pack(length)) pattern = '<%sd'%length buff.write(struct.pack(pattern, *val3.dimensions)) length = len(_v116.primitive_poses) buff.write(_struct_I.pack(length)) for val3 in _v116.primitive_poses: _v120 = val3.position _x = _v120 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v121 = val3.orientation _x = _v121 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) length = len(_v116.meshes) buff.write(_struct_I.pack(length)) for val3 in _v116.meshes: length = len(val3.triangles) buff.write(_struct_I.pack(length)) for val4 in val3.triangles: buff.write(_get_struct_3I().pack(*val4.vertex_indices)) length = len(val3.vertices) buff.write(_struct_I.pack(length)) for val4 in val3.vertices: _x = val4 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) length = len(_v116.mesh_poses) buff.write(_struct_I.pack(length)) for val3 in _v116.mesh_poses: _v122 = val3.position _x = _v122 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v123 = val3.orientation _x = _v123 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) length = len(_v116.planes) buff.write(_struct_I.pack(length)) for val3 in _v116.planes: buff.write(_get_struct_4d().pack(*val3.coef)) length = len(_v116.plane_poses) buff.write(_struct_I.pack(length)) for val3 in _v116.plane_poses: _v124 = val3.position _x = _v124 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v125 = val3.orientation _x = _v125 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) length = len(_v116.subframe_names) buff.write(_struct_I.pack(length)) for val3 in _v116.subframe_names: length = len(val3) if python3 or type(val3) == unicode: val3 = val3.encode('utf-8') length = len(val3) buff.write(struct.pack('<I%ss'%length, length, val3)) length = len(_v116.subframe_poses) buff.write(_struct_I.pack(length)) for val3 in _v116.subframe_poses: _v126 = val3.position _x = _v126 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v127 = val3.orientation _x = _v127 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) buff.write(_get_struct_b().pack(_v116.operation)) length = len(val1.touch_links) buff.write(_struct_I.pack(length)) for val2 in val1.touch_links: length = len(val2) if python3 or type(val2) == unicode: val2 = val2.encode('utf-8') length = len(val2) buff.write(struct.pack('<I%ss'%length, length, val2)) _v128 = val1.detach_posture _v129 = _v128.header buff.write(_get_struct_I().pack(_v129.seq)) _v130 = _v129.stamp _x = _v130 buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs)) _x = _v129.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) length = len(_v128.joint_names) buff.write(_struct_I.pack(length)) for val3 in _v128.joint_names: length = len(val3) if python3 or type(val3) == unicode: val3 = val3.encode('utf-8') length = len(val3) buff.write(struct.pack('<I%ss'%length, length, val3)) length = len(_v128.points) buff.write(_struct_I.pack(length)) for val3 in _v128.points: length = len(val3.positions) buff.write(_struct_I.pack(length)) pattern = '<%sd'%length buff.write(struct.pack(pattern, *val3.positions)) length = len(val3.velocities) buff.write(_struct_I.pack(length)) pattern = '<%sd'%length buff.write(struct.pack(pattern, *val3.velocities)) length = len(val3.accelerations) buff.write(_struct_I.pack(length)) pattern = '<%sd'%length buff.write(struct.pack(pattern, *val3.accelerations)) length = len(val3.effort) buff.write(_struct_I.pack(length)) pattern = '<%sd'%length buff.write(struct.pack(pattern, *val3.effort)) _v131 = val3.time_from_start _x = _v131 buff.write(_get_struct_2i().pack(_x.secs, _x.nsecs)) buff.write(_get_struct_d().pack(val1.weight)) buff.write(_get_struct_B().pack(self.goal.planning_options.planning_scene_diff.robot_state.is_diff)) _x = self.goal.planning_options.planning_scene_diff.robot_model_name length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) length = len(self.goal.planning_options.planning_scene_diff.fixed_frame_transforms) buff.write(_struct_I.pack(length)) for val1 in self.goal.planning_options.planning_scene_diff.fixed_frame_transforms: _v132 = val1.header buff.write(_get_struct_I().pack(_v132.seq)) _v133 = _v132.stamp _x = _v133 buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs)) _x = _v132.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _x = val1.child_frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _v134 = val1.transform _v135 = _v134.translation _x = _v135 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v136 = _v134.rotation _x = _v136 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) length = len(self.goal.planning_options.planning_scene_diff.allowed_collision_matrix.entry_names) buff.write(_struct_I.pack(length)) for val1 in self.goal.planning_options.planning_scene_diff.allowed_collision_matrix.entry_names: length = len(val1) if python3 or type(val1) == unicode: val1 = val1.encode('utf-8') length = len(val1) buff.write(struct.pack('<I%ss'%length, length, val1)) length = len(self.goal.planning_options.planning_scene_diff.allowed_collision_matrix.entry_values) buff.write(_struct_I.pack(length)) for val1 in self.goal.planning_options.planning_scene_diff.allowed_collision_matrix.entry_values: length = len(val1.enabled) buff.write(_struct_I.pack(length)) pattern = '<%sB'%length buff.write(struct.pack(pattern, *val1.enabled)) length = len(self.goal.planning_options.planning_scene_diff.allowed_collision_matrix.default_entry_names) buff.write(_struct_I.pack(length)) for val1 in self.goal.planning_options.planning_scene_diff.allowed_collision_matrix.default_entry_names: length = len(val1) if python3 or type(val1) == unicode: val1 = val1.encode('utf-8') length = len(val1) buff.write(struct.pack('<I%ss'%length, length, val1)) length = len(self.goal.planning_options.planning_scene_diff.allowed_collision_matrix.default_entry_values) buff.write(_struct_I.pack(length)) pattern = '<%sB'%length buff.write(struct.pack(pattern, *self.goal.planning_options.planning_scene_diff.allowed_collision_matrix.default_entry_values)) length = len(self.goal.planning_options.planning_scene_diff.link_padding) buff.write(_struct_I.pack(length)) for val1 in self.goal.planning_options.planning_scene_diff.link_padding: _x = val1.link_name length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) buff.write(_get_struct_d().pack(val1.padding)) length = len(self.goal.planning_options.planning_scene_diff.link_scale) buff.write(_struct_I.pack(length)) for val1 in self.goal.planning_options.planning_scene_diff.link_scale: _x = val1.link_name length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) buff.write(_get_struct_d().pack(val1.scale)) length = len(self.goal.planning_options.planning_scene_diff.object_colors) buff.write(_struct_I.pack(length)) for val1 in self.goal.planning_options.planning_scene_diff.object_colors: _x = val1.id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _v137 = val1.color _x = _v137 buff.write(_get_struct_4f().pack(_x.r, _x.g, _x.b, _x.a)) length = len(self.goal.planning_options.planning_scene_diff.world.collision_objects) buff.write(_struct_I.pack(length)) for val1 in self.goal.planning_options.planning_scene_diff.world.collision_objects: _v138 = val1.header buff.write(_get_struct_I().pack(_v138.seq)) _v139 = _v138.stamp _x = _v139 buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs)) _x = _v138.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _x = val1.id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _v140 = val1.type _x = _v140.key length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _x = _v140.db length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) length = len(val1.primitives) buff.write(_struct_I.pack(length)) for val2 in val1.primitives: buff.write(_get_struct_B().pack(val2.type)) length = len(val2.dimensions) buff.write(_struct_I.pack(length)) pattern = '<%sd'%length buff.write(struct.pack(pattern, *val2.dimensions)) length = len(val1.primitive_poses) buff.write(_struct_I.pack(length)) for val2 in val1.primitive_poses: _v141 = val2.position _x = _v141 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v142 = val2.orientation _x = _v142 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) length = len(val1.meshes) buff.write(_struct_I.pack(length)) for val2 in val1.meshes: length = len(val2.triangles) buff.write(_struct_I.pack(length)) for val3 in val2.triangles: buff.write(_get_struct_3I().pack(*val3.vertex_indices)) length = len(val2.vertices) buff.write(_struct_I.pack(length)) for val3 in val2.vertices: _x = val3 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) length = len(val1.mesh_poses) buff.write(_struct_I.pack(length)) for val2 in val1.mesh_poses: _v143 = val2.position _x = _v143 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v144 = val2.orientation _x = _v144 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) length = len(val1.planes) buff.write(_struct_I.pack(length)) for val2 in val1.planes: buff.write(_get_struct_4d().pack(*val2.coef)) length = len(val1.plane_poses) buff.write(_struct_I.pack(length)) for val2 in val1.plane_poses: _v145 = val2.position _x = _v145 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v146 = val2.orientation _x = _v146 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) length = len(val1.subframe_names) buff.write(_struct_I.pack(length)) for val2 in val1.subframe_names: length = len(val2) if python3 or type(val2) == unicode: val2 = val2.encode('utf-8') length = len(val2) buff.write(struct.pack('<I%ss'%length, length, val2)) length = len(val1.subframe_poses) buff.write(_struct_I.pack(length)) for val2 in val1.subframe_poses: _v147 = val2.position _x = _v147 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v148 = val2.orientation _x = _v148 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) buff.write(_get_struct_b().pack(val1.operation)) _x = self buff.write(_get_struct_3I().pack(_x.goal.planning_options.planning_scene_diff.world.octomap.header.seq, _x.goal.planning_options.planning_scene_diff.world.octomap.header.stamp.secs, _x.goal.planning_options.planning_scene_diff.world.octomap.header.stamp.nsecs)) _x = self.goal.planning_options.planning_scene_diff.world.octomap.header.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _x = self buff.write(_get_struct_7d3I().pack(_x.goal.planning_options.planning_scene_diff.world.octomap.origin.position.x, _x.goal.planning_options.planning_scene_diff.world.octomap.origin.position.y, _x.goal.planning_options.planning_scene_diff.world.octomap.origin.position.z, _x.goal.planning_options.planning_scene_diff.world.octomap.origin.orientation.x, _x.goal.planning_options.planning_scene_diff.world.octomap.origin.orientation.y, _x.goal.planning_options.planning_scene_diff.world.octomap.origin.orientation.z, _x.goal.planning_options.planning_scene_diff.world.octomap.origin.orientation.w, _x.goal.planning_options.planning_scene_diff.world.octomap.octomap.header.seq, _x.goal.planning_options.planning_scene_diff.world.octomap.octomap.header.stamp.secs, _x.goal.planning_options.planning_scene_diff.world.octomap.octomap.header.stamp.nsecs)) _x = self.goal.planning_options.planning_scene_diff.world.octomap.octomap.header.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) buff.write(_get_struct_B().pack(self.goal.planning_options.planning_scene_diff.world.octomap.octomap.binary)) _x = self.goal.planning_options.planning_scene_diff.world.octomap.octomap.id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) buff.write(_get_struct_d().pack(self.goal.planning_options.planning_scene_diff.world.octomap.octomap.resolution)) length = len(self.goal.planning_options.planning_scene_diff.world.octomap.octomap.data) buff.write(_struct_I.pack(length)) pattern = '<%sb'%length buff.write(struct.pack(pattern, *self.goal.planning_options.planning_scene_diff.world.octomap.octomap.data)) _x = self buff.write(_get_struct_3BidBid().pack(_x.goal.planning_options.planning_scene_diff.is_diff, _x.goal.planning_options.plan_only, _x.goal.planning_options.look_around, _x.goal.planning_options.look_around_attempts, _x.goal.planning_options.max_safe_execution_cost, _x.goal.planning_options.replan, _x.goal.planning_options.replan_attempts, _x.goal.planning_options.replan_delay)) except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self))))) except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def serialize(self, buff):\n try:\n _x = self\n buff.write(_struct_2d2q14dq.pack(_x.tcp, _x.ori, _x.zone, _x.vacuum, _x.workx, _x.worky, _x.workz, _x.workq0, _x.workqx, _x.workqy, _x.workqz, _x.toolx, _x.tooly, _x.toolz, _x.toolq0, _x.toolqx, _x.toolqy, _x.toolqz, _x.ret))\n _x = self.msg\n ...
[ "0.6972838", "0.6802016", "0.6796291", "0.67317253", "0.66948694", "0.66847515", "0.6658851", "0.6626311", "0.66227144", "0.6618303", "0.6607444", "0.65361035", "0.6529462", "0.65220654", "0.64863104", "0.6467052", "0.64530367", "0.6438432", "0.6427743", "0.6426063", "0.63947...
0.0
-1
unpack serialized message in str into this message instance
def deserialize(self, str): try: if self.header is None: self.header = std_msgs.msg.Header() if self.goal_id is None: self.goal_id = actionlib_msgs.msg.GoalID() if self.goal is None: self.goal = moveit_msgs.msg.MoveGroupGoal() end = 0 _x = self start = end end += 12 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: self.header.frame_id = str[start:end].decode('utf-8') else: self.header.frame_id = str[start:end] _x = self start = end end += 8 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _get_struct_2I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: self.goal_id.id = str[start:end].decode('utf-8') else: self.goal_id.id = str[start:end] _x = self start = end end += 12 (_x.goal.request.workspace_parameters.header.seq, _x.goal.request.workspace_parameters.header.stamp.secs, _x.goal.request.workspace_parameters.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: self.goal.request.workspace_parameters.header.frame_id = str[start:end].decode('utf-8') else: self.goal.request.workspace_parameters.header.frame_id = str[start:end] _x = self start = end end += 60 (_x.goal.request.workspace_parameters.min_corner.x, _x.goal.request.workspace_parameters.min_corner.y, _x.goal.request.workspace_parameters.min_corner.z, _x.goal.request.workspace_parameters.max_corner.x, _x.goal.request.workspace_parameters.max_corner.y, _x.goal.request.workspace_parameters.max_corner.z, _x.goal.request.start_state.joint_state.header.seq, _x.goal.request.start_state.joint_state.header.stamp.secs, _x.goal.request.start_state.joint_state.header.stamp.nsecs,) = _get_struct_6d3I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: self.goal.request.start_state.joint_state.header.frame_id = str[start:end].decode('utf-8') else: self.goal.request.start_state.joint_state.header.frame_id = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.request.start_state.joint_state.name = [] for i in range(0, length): start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val1 = str[start:end].decode('utf-8') else: val1 = str[start:end] self.goal.request.start_state.joint_state.name.append(val1) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sd'%length start = end end += struct.calcsize(pattern) self.goal.request.start_state.joint_state.position = struct.unpack(pattern, str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sd'%length start = end end += struct.calcsize(pattern) self.goal.request.start_state.joint_state.velocity = struct.unpack(pattern, str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sd'%length start = end end += struct.calcsize(pattern) self.goal.request.start_state.joint_state.effort = struct.unpack(pattern, str[start:end]) _x = self start = end end += 12 (_x.goal.request.start_state.multi_dof_joint_state.header.seq, _x.goal.request.start_state.multi_dof_joint_state.header.stamp.secs, _x.goal.request.start_state.multi_dof_joint_state.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: self.goal.request.start_state.multi_dof_joint_state.header.frame_id = str[start:end].decode('utf-8') else: self.goal.request.start_state.multi_dof_joint_state.header.frame_id = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.request.start_state.multi_dof_joint_state.joint_names = [] for i in range(0, length): start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val1 = str[start:end].decode('utf-8') else: val1 = str[start:end] self.goal.request.start_state.multi_dof_joint_state.joint_names.append(val1) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.request.start_state.multi_dof_joint_state.transforms = [] for i in range(0, length): val1 = geometry_msgs.msg.Transform() _v149 = val1.translation _x = _v149 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v150 = val1.rotation _x = _v150 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) self.goal.request.start_state.multi_dof_joint_state.transforms.append(val1) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.request.start_state.multi_dof_joint_state.twist = [] for i in range(0, length): val1 = geometry_msgs.msg.Twist() _v151 = val1.linear _x = _v151 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v152 = val1.angular _x = _v152 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) self.goal.request.start_state.multi_dof_joint_state.twist.append(val1) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.request.start_state.multi_dof_joint_state.wrench = [] for i in range(0, length): val1 = geometry_msgs.msg.Wrench() _v153 = val1.force _x = _v153 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v154 = val1.torque _x = _v154 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) self.goal.request.start_state.multi_dof_joint_state.wrench.append(val1) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.request.start_state.attached_collision_objects = [] for i in range(0, length): val1 = moveit_msgs.msg.AttachedCollisionObject() start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val1.link_name = str[start:end].decode('utf-8') else: val1.link_name = str[start:end] _v155 = val1.object _v156 = _v155.header start = end end += 4 (_v156.seq,) = _get_struct_I().unpack(str[start:end]) _v157 = _v156.stamp _x = _v157 start = end end += 8 (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v156.frame_id = str[start:end].decode('utf-8') else: _v156.frame_id = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v155.id = str[start:end].decode('utf-8') else: _v155.id = str[start:end] _v158 = _v155.type start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v158.key = str[start:end].decode('utf-8') else: _v158.key = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v158.db = str[start:end].decode('utf-8') else: _v158.db = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v155.primitives = [] for i in range(0, length): val3 = shape_msgs.msg.SolidPrimitive() start = end end += 1 (val3.type,) = _get_struct_B().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sd'%length start = end end += struct.calcsize(pattern) val3.dimensions = struct.unpack(pattern, str[start:end]) _v155.primitives.append(val3) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v155.primitive_poses = [] for i in range(0, length): val3 = geometry_msgs.msg.Pose() _v159 = val3.position _x = _v159 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v160 = val3.orientation _x = _v160 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) _v155.primitive_poses.append(val3) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v155.meshes = [] for i in range(0, length): val3 = shape_msgs.msg.Mesh() start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val3.triangles = [] for i in range(0, length): val4 = shape_msgs.msg.MeshTriangle() start = end end += 12 val4.vertex_indices = _get_struct_3I().unpack(str[start:end]) val3.triangles.append(val4) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val3.vertices = [] for i in range(0, length): val4 = geometry_msgs.msg.Point() _x = val4 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) val3.vertices.append(val4) _v155.meshes.append(val3) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v155.mesh_poses = [] for i in range(0, length): val3 = geometry_msgs.msg.Pose() _v161 = val3.position _x = _v161 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v162 = val3.orientation _x = _v162 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) _v155.mesh_poses.append(val3) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v155.planes = [] for i in range(0, length): val3 = shape_msgs.msg.Plane() start = end end += 32 val3.coef = _get_struct_4d().unpack(str[start:end]) _v155.planes.append(val3) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v155.plane_poses = [] for i in range(0, length): val3 = geometry_msgs.msg.Pose() _v163 = val3.position _x = _v163 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v164 = val3.orientation _x = _v164 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) _v155.plane_poses.append(val3) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v155.subframe_names = [] for i in range(0, length): start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val3 = str[start:end].decode('utf-8') else: val3 = str[start:end] _v155.subframe_names.append(val3) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v155.subframe_poses = [] for i in range(0, length): val3 = geometry_msgs.msg.Pose() _v165 = val3.position _x = _v165 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v166 = val3.orientation _x = _v166 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) _v155.subframe_poses.append(val3) start = end end += 1 (_v155.operation,) = _get_struct_b().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val1.touch_links = [] for i in range(0, length): start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val2 = str[start:end].decode('utf-8') else: val2 = str[start:end] val1.touch_links.append(val2) _v167 = val1.detach_posture _v168 = _v167.header start = end end += 4 (_v168.seq,) = _get_struct_I().unpack(str[start:end]) _v169 = _v168.stamp _x = _v169 start = end end += 8 (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v168.frame_id = str[start:end].decode('utf-8') else: _v168.frame_id = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v167.joint_names = [] for i in range(0, length): start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val3 = str[start:end].decode('utf-8') else: val3 = str[start:end] _v167.joint_names.append(val3) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v167.points = [] for i in range(0, length): val3 = trajectory_msgs.msg.JointTrajectoryPoint() start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sd'%length start = end end += struct.calcsize(pattern) val3.positions = struct.unpack(pattern, str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sd'%length start = end end += struct.calcsize(pattern) val3.velocities = struct.unpack(pattern, str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sd'%length start = end end += struct.calcsize(pattern) val3.accelerations = struct.unpack(pattern, str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sd'%length start = end end += struct.calcsize(pattern) val3.effort = struct.unpack(pattern, str[start:end]) _v170 = val3.time_from_start _x = _v170 start = end end += 8 (_x.secs, _x.nsecs,) = _get_struct_2i().unpack(str[start:end]) _v167.points.append(val3) start = end end += 8 (val1.weight,) = _get_struct_d().unpack(str[start:end]) self.goal.request.start_state.attached_collision_objects.append(val1) start = end end += 1 (self.goal.request.start_state.is_diff,) = _get_struct_B().unpack(str[start:end]) self.goal.request.start_state.is_diff = bool(self.goal.request.start_state.is_diff) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.request.goal_constraints = [] for i in range(0, length): val1 = moveit_msgs.msg.Constraints() start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val1.name = str[start:end].decode('utf-8') else: val1.name = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val1.joint_constraints = [] for i in range(0, length): val2 = moveit_msgs.msg.JointConstraint() start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val2.joint_name = str[start:end].decode('utf-8') else: val2.joint_name = str[start:end] _x = val2 start = end end += 32 (_x.position, _x.tolerance_above, _x.tolerance_below, _x.weight,) = _get_struct_4d().unpack(str[start:end]) val1.joint_constraints.append(val2) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val1.position_constraints = [] for i in range(0, length): val2 = moveit_msgs.msg.PositionConstraint() _v171 = val2.header start = end end += 4 (_v171.seq,) = _get_struct_I().unpack(str[start:end]) _v172 = _v171.stamp _x = _v172 start = end end += 8 (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v171.frame_id = str[start:end].decode('utf-8') else: _v171.frame_id = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val2.link_name = str[start:end].decode('utf-8') else: val2.link_name = str[start:end] _v173 = val2.target_point_offset _x = _v173 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v174 = val2.constraint_region start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v174.primitives = [] for i in range(0, length): val4 = shape_msgs.msg.SolidPrimitive() start = end end += 1 (val4.type,) = _get_struct_B().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sd'%length start = end end += struct.calcsize(pattern) val4.dimensions = struct.unpack(pattern, str[start:end]) _v174.primitives.append(val4) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v174.primitive_poses = [] for i in range(0, length): val4 = geometry_msgs.msg.Pose() _v175 = val4.position _x = _v175 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v176 = val4.orientation _x = _v176 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) _v174.primitive_poses.append(val4) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v174.meshes = [] for i in range(0, length): val4 = shape_msgs.msg.Mesh() start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val4.triangles = [] for i in range(0, length): val5 = shape_msgs.msg.MeshTriangle() start = end end += 12 val5.vertex_indices = _get_struct_3I().unpack(str[start:end]) val4.triangles.append(val5) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val4.vertices = [] for i in range(0, length): val5 = geometry_msgs.msg.Point() _x = val5 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) val4.vertices.append(val5) _v174.meshes.append(val4) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v174.mesh_poses = [] for i in range(0, length): val4 = geometry_msgs.msg.Pose() _v177 = val4.position _x = _v177 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v178 = val4.orientation _x = _v178 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) _v174.mesh_poses.append(val4) start = end end += 8 (val2.weight,) = _get_struct_d().unpack(str[start:end]) val1.position_constraints.append(val2) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val1.orientation_constraints = [] for i in range(0, length): val2 = moveit_msgs.msg.OrientationConstraint() _v179 = val2.header start = end end += 4 (_v179.seq,) = _get_struct_I().unpack(str[start:end]) _v180 = _v179.stamp _x = _v180 start = end end += 8 (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v179.frame_id = str[start:end].decode('utf-8') else: _v179.frame_id = str[start:end] _v181 = val2.orientation _x = _v181 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val2.link_name = str[start:end].decode('utf-8') else: val2.link_name = str[start:end] _x = val2 start = end end += 32 (_x.absolute_x_axis_tolerance, _x.absolute_y_axis_tolerance, _x.absolute_z_axis_tolerance, _x.weight,) = _get_struct_4d().unpack(str[start:end]) val1.orientation_constraints.append(val2) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val1.visibility_constraints = [] for i in range(0, length): val2 = moveit_msgs.msg.VisibilityConstraint() start = end end += 8 (val2.target_radius,) = _get_struct_d().unpack(str[start:end]) _v182 = val2.target_pose _v183 = _v182.header start = end end += 4 (_v183.seq,) = _get_struct_I().unpack(str[start:end]) _v184 = _v183.stamp _x = _v184 start = end end += 8 (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v183.frame_id = str[start:end].decode('utf-8') else: _v183.frame_id = str[start:end] _v185 = _v182.pose _v186 = _v185.position _x = _v186 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v187 = _v185.orientation _x = _v187 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) start = end end += 4 (val2.cone_sides,) = _get_struct_i().unpack(str[start:end]) _v188 = val2.sensor_pose _v189 = _v188.header start = end end += 4 (_v189.seq,) = _get_struct_I().unpack(str[start:end]) _v190 = _v189.stamp _x = _v190 start = end end += 8 (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v189.frame_id = str[start:end].decode('utf-8') else: _v189.frame_id = str[start:end] _v191 = _v188.pose _v192 = _v191.position _x = _v192 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v193 = _v191.orientation _x = _v193 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) _x = val2 start = end end += 25 (_x.max_view_angle, _x.max_range_angle, _x.sensor_view_direction, _x.weight,) = _get_struct_2dBd().unpack(str[start:end]) val1.visibility_constraints.append(val2) self.goal.request.goal_constraints.append(val1) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: self.goal.request.path_constraints.name = str[start:end].decode('utf-8') else: self.goal.request.path_constraints.name = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.request.path_constraints.joint_constraints = [] for i in range(0, length): val1 = moveit_msgs.msg.JointConstraint() start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val1.joint_name = str[start:end].decode('utf-8') else: val1.joint_name = str[start:end] _x = val1 start = end end += 32 (_x.position, _x.tolerance_above, _x.tolerance_below, _x.weight,) = _get_struct_4d().unpack(str[start:end]) self.goal.request.path_constraints.joint_constraints.append(val1) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.request.path_constraints.position_constraints = [] for i in range(0, length): val1 = moveit_msgs.msg.PositionConstraint() _v194 = val1.header start = end end += 4 (_v194.seq,) = _get_struct_I().unpack(str[start:end]) _v195 = _v194.stamp _x = _v195 start = end end += 8 (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v194.frame_id = str[start:end].decode('utf-8') else: _v194.frame_id = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val1.link_name = str[start:end].decode('utf-8') else: val1.link_name = str[start:end] _v196 = val1.target_point_offset _x = _v196 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v197 = val1.constraint_region start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v197.primitives = [] for i in range(0, length): val3 = shape_msgs.msg.SolidPrimitive() start = end end += 1 (val3.type,) = _get_struct_B().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sd'%length start = end end += struct.calcsize(pattern) val3.dimensions = struct.unpack(pattern, str[start:end]) _v197.primitives.append(val3) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v197.primitive_poses = [] for i in range(0, length): val3 = geometry_msgs.msg.Pose() _v198 = val3.position _x = _v198 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v199 = val3.orientation _x = _v199 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) _v197.primitive_poses.append(val3) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v197.meshes = [] for i in range(0, length): val3 = shape_msgs.msg.Mesh() start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val3.triangles = [] for i in range(0, length): val4 = shape_msgs.msg.MeshTriangle() start = end end += 12 val4.vertex_indices = _get_struct_3I().unpack(str[start:end]) val3.triangles.append(val4) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val3.vertices = [] for i in range(0, length): val4 = geometry_msgs.msg.Point() _x = val4 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) val3.vertices.append(val4) _v197.meshes.append(val3) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v197.mesh_poses = [] for i in range(0, length): val3 = geometry_msgs.msg.Pose() _v200 = val3.position _x = _v200 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v201 = val3.orientation _x = _v201 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) _v197.mesh_poses.append(val3) start = end end += 8 (val1.weight,) = _get_struct_d().unpack(str[start:end]) self.goal.request.path_constraints.position_constraints.append(val1) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.request.path_constraints.orientation_constraints = [] for i in range(0, length): val1 = moveit_msgs.msg.OrientationConstraint() _v202 = val1.header start = end end += 4 (_v202.seq,) = _get_struct_I().unpack(str[start:end]) _v203 = _v202.stamp _x = _v203 start = end end += 8 (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v202.frame_id = str[start:end].decode('utf-8') else: _v202.frame_id = str[start:end] _v204 = val1.orientation _x = _v204 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val1.link_name = str[start:end].decode('utf-8') else: val1.link_name = str[start:end] _x = val1 start = end end += 32 (_x.absolute_x_axis_tolerance, _x.absolute_y_axis_tolerance, _x.absolute_z_axis_tolerance, _x.weight,) = _get_struct_4d().unpack(str[start:end]) self.goal.request.path_constraints.orientation_constraints.append(val1) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.request.path_constraints.visibility_constraints = [] for i in range(0, length): val1 = moveit_msgs.msg.VisibilityConstraint() start = end end += 8 (val1.target_radius,) = _get_struct_d().unpack(str[start:end]) _v205 = val1.target_pose _v206 = _v205.header start = end end += 4 (_v206.seq,) = _get_struct_I().unpack(str[start:end]) _v207 = _v206.stamp _x = _v207 start = end end += 8 (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v206.frame_id = str[start:end].decode('utf-8') else: _v206.frame_id = str[start:end] _v208 = _v205.pose _v209 = _v208.position _x = _v209 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v210 = _v208.orientation _x = _v210 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) start = end end += 4 (val1.cone_sides,) = _get_struct_i().unpack(str[start:end]) _v211 = val1.sensor_pose _v212 = _v211.header start = end end += 4 (_v212.seq,) = _get_struct_I().unpack(str[start:end]) _v213 = _v212.stamp _x = _v213 start = end end += 8 (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v212.frame_id = str[start:end].decode('utf-8') else: _v212.frame_id = str[start:end] _v214 = _v211.pose _v215 = _v214.position _x = _v215 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v216 = _v214.orientation _x = _v216 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) _x = val1 start = end end += 25 (_x.max_view_angle, _x.max_range_angle, _x.sensor_view_direction, _x.weight,) = _get_struct_2dBd().unpack(str[start:end]) self.goal.request.path_constraints.visibility_constraints.append(val1) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.request.trajectory_constraints.constraints = [] for i in range(0, length): val1 = moveit_msgs.msg.Constraints() start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val1.name = str[start:end].decode('utf-8') else: val1.name = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val1.joint_constraints = [] for i in range(0, length): val2 = moveit_msgs.msg.JointConstraint() start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val2.joint_name = str[start:end].decode('utf-8') else: val2.joint_name = str[start:end] _x = val2 start = end end += 32 (_x.position, _x.tolerance_above, _x.tolerance_below, _x.weight,) = _get_struct_4d().unpack(str[start:end]) val1.joint_constraints.append(val2) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val1.position_constraints = [] for i in range(0, length): val2 = moveit_msgs.msg.PositionConstraint() _v217 = val2.header start = end end += 4 (_v217.seq,) = _get_struct_I().unpack(str[start:end]) _v218 = _v217.stamp _x = _v218 start = end end += 8 (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v217.frame_id = str[start:end].decode('utf-8') else: _v217.frame_id = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val2.link_name = str[start:end].decode('utf-8') else: val2.link_name = str[start:end] _v219 = val2.target_point_offset _x = _v219 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v220 = val2.constraint_region start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v220.primitives = [] for i in range(0, length): val4 = shape_msgs.msg.SolidPrimitive() start = end end += 1 (val4.type,) = _get_struct_B().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sd'%length start = end end += struct.calcsize(pattern) val4.dimensions = struct.unpack(pattern, str[start:end]) _v220.primitives.append(val4) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v220.primitive_poses = [] for i in range(0, length): val4 = geometry_msgs.msg.Pose() _v221 = val4.position _x = _v221 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v222 = val4.orientation _x = _v222 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) _v220.primitive_poses.append(val4) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v220.meshes = [] for i in range(0, length): val4 = shape_msgs.msg.Mesh() start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val4.triangles = [] for i in range(0, length): val5 = shape_msgs.msg.MeshTriangle() start = end end += 12 val5.vertex_indices = _get_struct_3I().unpack(str[start:end]) val4.triangles.append(val5) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val4.vertices = [] for i in range(0, length): val5 = geometry_msgs.msg.Point() _x = val5 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) val4.vertices.append(val5) _v220.meshes.append(val4) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v220.mesh_poses = [] for i in range(0, length): val4 = geometry_msgs.msg.Pose() _v223 = val4.position _x = _v223 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v224 = val4.orientation _x = _v224 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) _v220.mesh_poses.append(val4) start = end end += 8 (val2.weight,) = _get_struct_d().unpack(str[start:end]) val1.position_constraints.append(val2) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val1.orientation_constraints = [] for i in range(0, length): val2 = moveit_msgs.msg.OrientationConstraint() _v225 = val2.header start = end end += 4 (_v225.seq,) = _get_struct_I().unpack(str[start:end]) _v226 = _v225.stamp _x = _v226 start = end end += 8 (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v225.frame_id = str[start:end].decode('utf-8') else: _v225.frame_id = str[start:end] _v227 = val2.orientation _x = _v227 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val2.link_name = str[start:end].decode('utf-8') else: val2.link_name = str[start:end] _x = val2 start = end end += 32 (_x.absolute_x_axis_tolerance, _x.absolute_y_axis_tolerance, _x.absolute_z_axis_tolerance, _x.weight,) = _get_struct_4d().unpack(str[start:end]) val1.orientation_constraints.append(val2) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val1.visibility_constraints = [] for i in range(0, length): val2 = moveit_msgs.msg.VisibilityConstraint() start = end end += 8 (val2.target_radius,) = _get_struct_d().unpack(str[start:end]) _v228 = val2.target_pose _v229 = _v228.header start = end end += 4 (_v229.seq,) = _get_struct_I().unpack(str[start:end]) _v230 = _v229.stamp _x = _v230 start = end end += 8 (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v229.frame_id = str[start:end].decode('utf-8') else: _v229.frame_id = str[start:end] _v231 = _v228.pose _v232 = _v231.position _x = _v232 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v233 = _v231.orientation _x = _v233 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) start = end end += 4 (val2.cone_sides,) = _get_struct_i().unpack(str[start:end]) _v234 = val2.sensor_pose _v235 = _v234.header start = end end += 4 (_v235.seq,) = _get_struct_I().unpack(str[start:end]) _v236 = _v235.stamp _x = _v236 start = end end += 8 (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v235.frame_id = str[start:end].decode('utf-8') else: _v235.frame_id = str[start:end] _v237 = _v234.pose _v238 = _v237.position _x = _v238 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v239 = _v237.orientation _x = _v239 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) _x = val2 start = end end += 25 (_x.max_view_angle, _x.max_range_angle, _x.sensor_view_direction, _x.weight,) = _get_struct_2dBd().unpack(str[start:end]) val1.visibility_constraints.append(val2) self.goal.request.trajectory_constraints.constraints.append(val1) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.request.reference_trajectories = [] for i in range(0, length): val1 = moveit_msgs.msg.GenericTrajectory() _v240 = val1.header start = end end += 4 (_v240.seq,) = _get_struct_I().unpack(str[start:end]) _v241 = _v240.stamp _x = _v241 start = end end += 8 (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v240.frame_id = str[start:end].decode('utf-8') else: _v240.frame_id = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val1.joint_trajectory = [] for i in range(0, length): val2 = trajectory_msgs.msg.JointTrajectory() _v242 = val2.header start = end end += 4 (_v242.seq,) = _get_struct_I().unpack(str[start:end]) _v243 = _v242.stamp _x = _v243 start = end end += 8 (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v242.frame_id = str[start:end].decode('utf-8') else: _v242.frame_id = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val2.joint_names = [] for i in range(0, length): start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val3 = str[start:end].decode('utf-8') else: val3 = str[start:end] val2.joint_names.append(val3) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val2.points = [] for i in range(0, length): val3 = trajectory_msgs.msg.JointTrajectoryPoint() start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sd'%length start = end end += struct.calcsize(pattern) val3.positions = struct.unpack(pattern, str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sd'%length start = end end += struct.calcsize(pattern) val3.velocities = struct.unpack(pattern, str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sd'%length start = end end += struct.calcsize(pattern) val3.accelerations = struct.unpack(pattern, str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sd'%length start = end end += struct.calcsize(pattern) val3.effort = struct.unpack(pattern, str[start:end]) _v244 = val3.time_from_start _x = _v244 start = end end += 8 (_x.secs, _x.nsecs,) = _get_struct_2i().unpack(str[start:end]) val2.points.append(val3) val1.joint_trajectory.append(val2) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val1.cartesian_trajectory = [] for i in range(0, length): val2 = moveit_msgs.msg.CartesianTrajectory() _v245 = val2.header start = end end += 4 (_v245.seq,) = _get_struct_I().unpack(str[start:end]) _v246 = _v245.stamp _x = _v246 start = end end += 8 (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v245.frame_id = str[start:end].decode('utf-8') else: _v245.frame_id = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val2.tracked_frame = str[start:end].decode('utf-8') else: val2.tracked_frame = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val2.points = [] for i in range(0, length): val3 = moveit_msgs.msg.CartesianTrajectoryPoint() _v247 = val3.point _v248 = _v247.pose _v249 = _v248.position _x = _v249 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v250 = _v248.orientation _x = _v250 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) _v251 = _v247.velocity _v252 = _v251.linear _x = _v252 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v253 = _v251.angular _x = _v253 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v254 = _v247.acceleration _v255 = _v254.linear _x = _v255 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v256 = _v254.angular _x = _v256 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v257 = val3.time_from_start _x = _v257 start = end end += 8 (_x.secs, _x.nsecs,) = _get_struct_2i().unpack(str[start:end]) val2.points.append(val3) val1.cartesian_trajectory.append(val2) self.goal.request.reference_trajectories.append(val1) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: self.goal.request.planner_id = str[start:end].decode('utf-8') else: self.goal.request.planner_id = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: self.goal.request.group_name = str[start:end].decode('utf-8') else: self.goal.request.group_name = str[start:end] _x = self start = end end += 28 (_x.goal.request.num_planning_attempts, _x.goal.request.allowed_planning_time, _x.goal.request.max_velocity_scaling_factor, _x.goal.request.max_acceleration_scaling_factor,) = _get_struct_i3d().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: self.goal.planning_options.planning_scene_diff.name = str[start:end].decode('utf-8') else: self.goal.planning_options.planning_scene_diff.name = str[start:end] _x = self start = end end += 12 (_x.goal.planning_options.planning_scene_diff.robot_state.joint_state.header.seq, _x.goal.planning_options.planning_scene_diff.robot_state.joint_state.header.stamp.secs, _x.goal.planning_options.planning_scene_diff.robot_state.joint_state.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: self.goal.planning_options.planning_scene_diff.robot_state.joint_state.header.frame_id = str[start:end].decode('utf-8') else: self.goal.planning_options.planning_scene_diff.robot_state.joint_state.header.frame_id = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.planning_options.planning_scene_diff.robot_state.joint_state.name = [] for i in range(0, length): start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val1 = str[start:end].decode('utf-8') else: val1 = str[start:end] self.goal.planning_options.planning_scene_diff.robot_state.joint_state.name.append(val1) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sd'%length start = end end += struct.calcsize(pattern) self.goal.planning_options.planning_scene_diff.robot_state.joint_state.position = struct.unpack(pattern, str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sd'%length start = end end += struct.calcsize(pattern) self.goal.planning_options.planning_scene_diff.robot_state.joint_state.velocity = struct.unpack(pattern, str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sd'%length start = end end += struct.calcsize(pattern) self.goal.planning_options.planning_scene_diff.robot_state.joint_state.effort = struct.unpack(pattern, str[start:end]) _x = self start = end end += 12 (_x.goal.planning_options.planning_scene_diff.robot_state.multi_dof_joint_state.header.seq, _x.goal.planning_options.planning_scene_diff.robot_state.multi_dof_joint_state.header.stamp.secs, _x.goal.planning_options.planning_scene_diff.robot_state.multi_dof_joint_state.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: self.goal.planning_options.planning_scene_diff.robot_state.multi_dof_joint_state.header.frame_id = str[start:end].decode('utf-8') else: self.goal.planning_options.planning_scene_diff.robot_state.multi_dof_joint_state.header.frame_id = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.planning_options.planning_scene_diff.robot_state.multi_dof_joint_state.joint_names = [] for i in range(0, length): start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val1 = str[start:end].decode('utf-8') else: val1 = str[start:end] self.goal.planning_options.planning_scene_diff.robot_state.multi_dof_joint_state.joint_names.append(val1) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.planning_options.planning_scene_diff.robot_state.multi_dof_joint_state.transforms = [] for i in range(0, length): val1 = geometry_msgs.msg.Transform() _v258 = val1.translation _x = _v258 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v259 = val1.rotation _x = _v259 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) self.goal.planning_options.planning_scene_diff.robot_state.multi_dof_joint_state.transforms.append(val1) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.planning_options.planning_scene_diff.robot_state.multi_dof_joint_state.twist = [] for i in range(0, length): val1 = geometry_msgs.msg.Twist() _v260 = val1.linear _x = _v260 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v261 = val1.angular _x = _v261 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) self.goal.planning_options.planning_scene_diff.robot_state.multi_dof_joint_state.twist.append(val1) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.planning_options.planning_scene_diff.robot_state.multi_dof_joint_state.wrench = [] for i in range(0, length): val1 = geometry_msgs.msg.Wrench() _v262 = val1.force _x = _v262 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v263 = val1.torque _x = _v263 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) self.goal.planning_options.planning_scene_diff.robot_state.multi_dof_joint_state.wrench.append(val1) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.planning_options.planning_scene_diff.robot_state.attached_collision_objects = [] for i in range(0, length): val1 = moveit_msgs.msg.AttachedCollisionObject() start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val1.link_name = str[start:end].decode('utf-8') else: val1.link_name = str[start:end] _v264 = val1.object _v265 = _v264.header start = end end += 4 (_v265.seq,) = _get_struct_I().unpack(str[start:end]) _v266 = _v265.stamp _x = _v266 start = end end += 8 (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v265.frame_id = str[start:end].decode('utf-8') else: _v265.frame_id = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v264.id = str[start:end].decode('utf-8') else: _v264.id = str[start:end] _v267 = _v264.type start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v267.key = str[start:end].decode('utf-8') else: _v267.key = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v267.db = str[start:end].decode('utf-8') else: _v267.db = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v264.primitives = [] for i in range(0, length): val3 = shape_msgs.msg.SolidPrimitive() start = end end += 1 (val3.type,) = _get_struct_B().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sd'%length start = end end += struct.calcsize(pattern) val3.dimensions = struct.unpack(pattern, str[start:end]) _v264.primitives.append(val3) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v264.primitive_poses = [] for i in range(0, length): val3 = geometry_msgs.msg.Pose() _v268 = val3.position _x = _v268 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v269 = val3.orientation _x = _v269 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) _v264.primitive_poses.append(val3) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v264.meshes = [] for i in range(0, length): val3 = shape_msgs.msg.Mesh() start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val3.triangles = [] for i in range(0, length): val4 = shape_msgs.msg.MeshTriangle() start = end end += 12 val4.vertex_indices = _get_struct_3I().unpack(str[start:end]) val3.triangles.append(val4) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val3.vertices = [] for i in range(0, length): val4 = geometry_msgs.msg.Point() _x = val4 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) val3.vertices.append(val4) _v264.meshes.append(val3) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v264.mesh_poses = [] for i in range(0, length): val3 = geometry_msgs.msg.Pose() _v270 = val3.position _x = _v270 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v271 = val3.orientation _x = _v271 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) _v264.mesh_poses.append(val3) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v264.planes = [] for i in range(0, length): val3 = shape_msgs.msg.Plane() start = end end += 32 val3.coef = _get_struct_4d().unpack(str[start:end]) _v264.planes.append(val3) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v264.plane_poses = [] for i in range(0, length): val3 = geometry_msgs.msg.Pose() _v272 = val3.position _x = _v272 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v273 = val3.orientation _x = _v273 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) _v264.plane_poses.append(val3) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v264.subframe_names = [] for i in range(0, length): start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val3 = str[start:end].decode('utf-8') else: val3 = str[start:end] _v264.subframe_names.append(val3) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v264.subframe_poses = [] for i in range(0, length): val3 = geometry_msgs.msg.Pose() _v274 = val3.position _x = _v274 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v275 = val3.orientation _x = _v275 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) _v264.subframe_poses.append(val3) start = end end += 1 (_v264.operation,) = _get_struct_b().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val1.touch_links = [] for i in range(0, length): start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val2 = str[start:end].decode('utf-8') else: val2 = str[start:end] val1.touch_links.append(val2) _v276 = val1.detach_posture _v277 = _v276.header start = end end += 4 (_v277.seq,) = _get_struct_I().unpack(str[start:end]) _v278 = _v277.stamp _x = _v278 start = end end += 8 (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v277.frame_id = str[start:end].decode('utf-8') else: _v277.frame_id = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v276.joint_names = [] for i in range(0, length): start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val3 = str[start:end].decode('utf-8') else: val3 = str[start:end] _v276.joint_names.append(val3) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v276.points = [] for i in range(0, length): val3 = trajectory_msgs.msg.JointTrajectoryPoint() start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sd'%length start = end end += struct.calcsize(pattern) val3.positions = struct.unpack(pattern, str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sd'%length start = end end += struct.calcsize(pattern) val3.velocities = struct.unpack(pattern, str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sd'%length start = end end += struct.calcsize(pattern) val3.accelerations = struct.unpack(pattern, str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sd'%length start = end end += struct.calcsize(pattern) val3.effort = struct.unpack(pattern, str[start:end]) _v279 = val3.time_from_start _x = _v279 start = end end += 8 (_x.secs, _x.nsecs,) = _get_struct_2i().unpack(str[start:end]) _v276.points.append(val3) start = end end += 8 (val1.weight,) = _get_struct_d().unpack(str[start:end]) self.goal.planning_options.planning_scene_diff.robot_state.attached_collision_objects.append(val1) start = end end += 1 (self.goal.planning_options.planning_scene_diff.robot_state.is_diff,) = _get_struct_B().unpack(str[start:end]) self.goal.planning_options.planning_scene_diff.robot_state.is_diff = bool(self.goal.planning_options.planning_scene_diff.robot_state.is_diff) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: self.goal.planning_options.planning_scene_diff.robot_model_name = str[start:end].decode('utf-8') else: self.goal.planning_options.planning_scene_diff.robot_model_name = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.planning_options.planning_scene_diff.fixed_frame_transforms = [] for i in range(0, length): val1 = geometry_msgs.msg.TransformStamped() _v280 = val1.header start = end end += 4 (_v280.seq,) = _get_struct_I().unpack(str[start:end]) _v281 = _v280.stamp _x = _v281 start = end end += 8 (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v280.frame_id = str[start:end].decode('utf-8') else: _v280.frame_id = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val1.child_frame_id = str[start:end].decode('utf-8') else: val1.child_frame_id = str[start:end] _v282 = val1.transform _v283 = _v282.translation _x = _v283 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v284 = _v282.rotation _x = _v284 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) self.goal.planning_options.planning_scene_diff.fixed_frame_transforms.append(val1) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.planning_options.planning_scene_diff.allowed_collision_matrix.entry_names = [] for i in range(0, length): start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val1 = str[start:end].decode('utf-8') else: val1 = str[start:end] self.goal.planning_options.planning_scene_diff.allowed_collision_matrix.entry_names.append(val1) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.planning_options.planning_scene_diff.allowed_collision_matrix.entry_values = [] for i in range(0, length): val1 = moveit_msgs.msg.AllowedCollisionEntry() start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sB'%length start = end end += struct.calcsize(pattern) val1.enabled = struct.unpack(pattern, str[start:end]) val1.enabled = map(bool, val1.enabled) self.goal.planning_options.planning_scene_diff.allowed_collision_matrix.entry_values.append(val1) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.planning_options.planning_scene_diff.allowed_collision_matrix.default_entry_names = [] for i in range(0, length): start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val1 = str[start:end].decode('utf-8') else: val1 = str[start:end] self.goal.planning_options.planning_scene_diff.allowed_collision_matrix.default_entry_names.append(val1) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sB'%length start = end end += struct.calcsize(pattern) self.goal.planning_options.planning_scene_diff.allowed_collision_matrix.default_entry_values = struct.unpack(pattern, str[start:end]) self.goal.planning_options.planning_scene_diff.allowed_collision_matrix.default_entry_values = map(bool, self.goal.planning_options.planning_scene_diff.allowed_collision_matrix.default_entry_values) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.planning_options.planning_scene_diff.link_padding = [] for i in range(0, length): val1 = moveit_msgs.msg.LinkPadding() start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val1.link_name = str[start:end].decode('utf-8') else: val1.link_name = str[start:end] start = end end += 8 (val1.padding,) = _get_struct_d().unpack(str[start:end]) self.goal.planning_options.planning_scene_diff.link_padding.append(val1) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.planning_options.planning_scene_diff.link_scale = [] for i in range(0, length): val1 = moveit_msgs.msg.LinkScale() start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val1.link_name = str[start:end].decode('utf-8') else: val1.link_name = str[start:end] start = end end += 8 (val1.scale,) = _get_struct_d().unpack(str[start:end]) self.goal.planning_options.planning_scene_diff.link_scale.append(val1) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.planning_options.planning_scene_diff.object_colors = [] for i in range(0, length): val1 = moveit_msgs.msg.ObjectColor() start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val1.id = str[start:end].decode('utf-8') else: val1.id = str[start:end] _v285 = val1.color _x = _v285 start = end end += 16 (_x.r, _x.g, _x.b, _x.a,) = _get_struct_4f().unpack(str[start:end]) self.goal.planning_options.planning_scene_diff.object_colors.append(val1) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.planning_options.planning_scene_diff.world.collision_objects = [] for i in range(0, length): val1 = moveit_msgs.msg.CollisionObject() _v286 = val1.header start = end end += 4 (_v286.seq,) = _get_struct_I().unpack(str[start:end]) _v287 = _v286.stamp _x = _v287 start = end end += 8 (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v286.frame_id = str[start:end].decode('utf-8') else: _v286.frame_id = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val1.id = str[start:end].decode('utf-8') else: val1.id = str[start:end] _v288 = val1.type start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v288.key = str[start:end].decode('utf-8') else: _v288.key = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v288.db = str[start:end].decode('utf-8') else: _v288.db = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val1.primitives = [] for i in range(0, length): val2 = shape_msgs.msg.SolidPrimitive() start = end end += 1 (val2.type,) = _get_struct_B().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sd'%length start = end end += struct.calcsize(pattern) val2.dimensions = struct.unpack(pattern, str[start:end]) val1.primitives.append(val2) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val1.primitive_poses = [] for i in range(0, length): val2 = geometry_msgs.msg.Pose() _v289 = val2.position _x = _v289 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v290 = val2.orientation _x = _v290 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) val1.primitive_poses.append(val2) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val1.meshes = [] for i in range(0, length): val2 = shape_msgs.msg.Mesh() start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val2.triangles = [] for i in range(0, length): val3 = shape_msgs.msg.MeshTriangle() start = end end += 12 val3.vertex_indices = _get_struct_3I().unpack(str[start:end]) val2.triangles.append(val3) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val2.vertices = [] for i in range(0, length): val3 = geometry_msgs.msg.Point() _x = val3 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) val2.vertices.append(val3) val1.meshes.append(val2) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val1.mesh_poses = [] for i in range(0, length): val2 = geometry_msgs.msg.Pose() _v291 = val2.position _x = _v291 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v292 = val2.orientation _x = _v292 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) val1.mesh_poses.append(val2) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val1.planes = [] for i in range(0, length): val2 = shape_msgs.msg.Plane() start = end end += 32 val2.coef = _get_struct_4d().unpack(str[start:end]) val1.planes.append(val2) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val1.plane_poses = [] for i in range(0, length): val2 = geometry_msgs.msg.Pose() _v293 = val2.position _x = _v293 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v294 = val2.orientation _x = _v294 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) val1.plane_poses.append(val2) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val1.subframe_names = [] for i in range(0, length): start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val2 = str[start:end].decode('utf-8') else: val2 = str[start:end] val1.subframe_names.append(val2) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val1.subframe_poses = [] for i in range(0, length): val2 = geometry_msgs.msg.Pose() _v295 = val2.position _x = _v295 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v296 = val2.orientation _x = _v296 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) val1.subframe_poses.append(val2) start = end end += 1 (val1.operation,) = _get_struct_b().unpack(str[start:end]) self.goal.planning_options.planning_scene_diff.world.collision_objects.append(val1) _x = self start = end end += 12 (_x.goal.planning_options.planning_scene_diff.world.octomap.header.seq, _x.goal.planning_options.planning_scene_diff.world.octomap.header.stamp.secs, _x.goal.planning_options.planning_scene_diff.world.octomap.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: self.goal.planning_options.planning_scene_diff.world.octomap.header.frame_id = str[start:end].decode('utf-8') else: self.goal.planning_options.planning_scene_diff.world.octomap.header.frame_id = str[start:end] _x = self start = end end += 68 (_x.goal.planning_options.planning_scene_diff.world.octomap.origin.position.x, _x.goal.planning_options.planning_scene_diff.world.octomap.origin.position.y, _x.goal.planning_options.planning_scene_diff.world.octomap.origin.position.z, _x.goal.planning_options.planning_scene_diff.world.octomap.origin.orientation.x, _x.goal.planning_options.planning_scene_diff.world.octomap.origin.orientation.y, _x.goal.planning_options.planning_scene_diff.world.octomap.origin.orientation.z, _x.goal.planning_options.planning_scene_diff.world.octomap.origin.orientation.w, _x.goal.planning_options.planning_scene_diff.world.octomap.octomap.header.seq, _x.goal.planning_options.planning_scene_diff.world.octomap.octomap.header.stamp.secs, _x.goal.planning_options.planning_scene_diff.world.octomap.octomap.header.stamp.nsecs,) = _get_struct_7d3I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: self.goal.planning_options.planning_scene_diff.world.octomap.octomap.header.frame_id = str[start:end].decode('utf-8') else: self.goal.planning_options.planning_scene_diff.world.octomap.octomap.header.frame_id = str[start:end] start = end end += 1 (self.goal.planning_options.planning_scene_diff.world.octomap.octomap.binary,) = _get_struct_B().unpack(str[start:end]) self.goal.planning_options.planning_scene_diff.world.octomap.octomap.binary = bool(self.goal.planning_options.planning_scene_diff.world.octomap.octomap.binary) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: self.goal.planning_options.planning_scene_diff.world.octomap.octomap.id = str[start:end].decode('utf-8') else: self.goal.planning_options.planning_scene_diff.world.octomap.octomap.id = str[start:end] start = end end += 8 (self.goal.planning_options.planning_scene_diff.world.octomap.octomap.resolution,) = _get_struct_d().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sb'%length start = end end += struct.calcsize(pattern) self.goal.planning_options.planning_scene_diff.world.octomap.octomap.data = struct.unpack(pattern, str[start:end]) _x = self start = end end += 28 (_x.goal.planning_options.planning_scene_diff.is_diff, _x.goal.planning_options.plan_only, _x.goal.planning_options.look_around, _x.goal.planning_options.look_around_attempts, _x.goal.planning_options.max_safe_execution_cost, _x.goal.planning_options.replan, _x.goal.planning_options.replan_attempts, _x.goal.planning_options.replan_delay,) = _get_struct_3BidBid().unpack(str[start:end]) self.goal.planning_options.planning_scene_diff.is_diff = bool(self.goal.planning_options.planning_scene_diff.is_diff) self.goal.planning_options.plan_only = bool(self.goal.planning_options.plan_only) self.goal.planning_options.look_around = bool(self.goal.planning_options.look_around) self.goal.planning_options.replan = bool(self.goal.planning_options.replan) return self except struct.error as e: raise genpy.DeserializationError(e) #most likely buffer underfill
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def deserialize(self, str):\n try:\n end = 0\n _x = self\n start = end\n end += 152\n (_x.tcp, _x.ori, _x.zone, _x.vacuum, _x.workx, _x.worky, _x.workz, _x.workq0, _x.workqx, _x.workqy, _x.workqz, _x.toolx, _x.tooly, _x.toolz, _x.toolq0, _x.toolqx, _x.toolqy, _x.toolqz, _x.ret,) = _stru...
[ "0.76323575", "0.7464221", "0.73207736", "0.7303699", "0.72687525", "0.7223702", "0.72171384", "0.71758324", "0.7169619", "0.7095711", "0.7095332", "0.70419973", "0.70292974", "0.6962802", "0.6956721", "0.69556004", "0.6943546", "0.6941993", "0.6941265", "0.69108033", "0.6894...
0.6215644
92
serialize message with numpy array types into buffer
def serialize_numpy(self, buff, numpy): try: _x = self buff.write(_get_struct_3I().pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) _x = self.header.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _x = self buff.write(_get_struct_2I().pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs)) _x = self.goal_id.id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _x = self buff.write(_get_struct_3I().pack(_x.goal.request.workspace_parameters.header.seq, _x.goal.request.workspace_parameters.header.stamp.secs, _x.goal.request.workspace_parameters.header.stamp.nsecs)) _x = self.goal.request.workspace_parameters.header.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _x = self buff.write(_get_struct_6d3I().pack(_x.goal.request.workspace_parameters.min_corner.x, _x.goal.request.workspace_parameters.min_corner.y, _x.goal.request.workspace_parameters.min_corner.z, _x.goal.request.workspace_parameters.max_corner.x, _x.goal.request.workspace_parameters.max_corner.y, _x.goal.request.workspace_parameters.max_corner.z, _x.goal.request.start_state.joint_state.header.seq, _x.goal.request.start_state.joint_state.header.stamp.secs, _x.goal.request.start_state.joint_state.header.stamp.nsecs)) _x = self.goal.request.start_state.joint_state.header.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) length = len(self.goal.request.start_state.joint_state.name) buff.write(_struct_I.pack(length)) for val1 in self.goal.request.start_state.joint_state.name: length = len(val1) if python3 or type(val1) == unicode: val1 = val1.encode('utf-8') length = len(val1) buff.write(struct.pack('<I%ss'%length, length, val1)) length = len(self.goal.request.start_state.joint_state.position) buff.write(_struct_I.pack(length)) pattern = '<%sd'%length buff.write(self.goal.request.start_state.joint_state.position.tostring()) length = len(self.goal.request.start_state.joint_state.velocity) buff.write(_struct_I.pack(length)) pattern = '<%sd'%length buff.write(self.goal.request.start_state.joint_state.velocity.tostring()) length = len(self.goal.request.start_state.joint_state.effort) buff.write(_struct_I.pack(length)) pattern = '<%sd'%length buff.write(self.goal.request.start_state.joint_state.effort.tostring()) _x = self buff.write(_get_struct_3I().pack(_x.goal.request.start_state.multi_dof_joint_state.header.seq, _x.goal.request.start_state.multi_dof_joint_state.header.stamp.secs, _x.goal.request.start_state.multi_dof_joint_state.header.stamp.nsecs)) _x = self.goal.request.start_state.multi_dof_joint_state.header.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) length = len(self.goal.request.start_state.multi_dof_joint_state.joint_names) buff.write(_struct_I.pack(length)) for val1 in self.goal.request.start_state.multi_dof_joint_state.joint_names: length = len(val1) if python3 or type(val1) == unicode: val1 = val1.encode('utf-8') length = len(val1) buff.write(struct.pack('<I%ss'%length, length, val1)) length = len(self.goal.request.start_state.multi_dof_joint_state.transforms) buff.write(_struct_I.pack(length)) for val1 in self.goal.request.start_state.multi_dof_joint_state.transforms: _v297 = val1.translation _x = _v297 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v298 = val1.rotation _x = _v298 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) length = len(self.goal.request.start_state.multi_dof_joint_state.twist) buff.write(_struct_I.pack(length)) for val1 in self.goal.request.start_state.multi_dof_joint_state.twist: _v299 = val1.linear _x = _v299 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v300 = val1.angular _x = _v300 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) length = len(self.goal.request.start_state.multi_dof_joint_state.wrench) buff.write(_struct_I.pack(length)) for val1 in self.goal.request.start_state.multi_dof_joint_state.wrench: _v301 = val1.force _x = _v301 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v302 = val1.torque _x = _v302 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) length = len(self.goal.request.start_state.attached_collision_objects) buff.write(_struct_I.pack(length)) for val1 in self.goal.request.start_state.attached_collision_objects: _x = val1.link_name length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _v303 = val1.object _v304 = _v303.header buff.write(_get_struct_I().pack(_v304.seq)) _v305 = _v304.stamp _x = _v305 buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs)) _x = _v304.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _x = _v303.id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _v306 = _v303.type _x = _v306.key length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _x = _v306.db length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) length = len(_v303.primitives) buff.write(_struct_I.pack(length)) for val3 in _v303.primitives: buff.write(_get_struct_B().pack(val3.type)) length = len(val3.dimensions) buff.write(_struct_I.pack(length)) pattern = '<%sd'%length buff.write(val3.dimensions.tostring()) length = len(_v303.primitive_poses) buff.write(_struct_I.pack(length)) for val3 in _v303.primitive_poses: _v307 = val3.position _x = _v307 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v308 = val3.orientation _x = _v308 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) length = len(_v303.meshes) buff.write(_struct_I.pack(length)) for val3 in _v303.meshes: length = len(val3.triangles) buff.write(_struct_I.pack(length)) for val4 in val3.triangles: buff.write(val4.vertex_indices.tostring()) length = len(val3.vertices) buff.write(_struct_I.pack(length)) for val4 in val3.vertices: _x = val4 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) length = len(_v303.mesh_poses) buff.write(_struct_I.pack(length)) for val3 in _v303.mesh_poses: _v309 = val3.position _x = _v309 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v310 = val3.orientation _x = _v310 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) length = len(_v303.planes) buff.write(_struct_I.pack(length)) for val3 in _v303.planes: buff.write(val3.coef.tostring()) length = len(_v303.plane_poses) buff.write(_struct_I.pack(length)) for val3 in _v303.plane_poses: _v311 = val3.position _x = _v311 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v312 = val3.orientation _x = _v312 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) length = len(_v303.subframe_names) buff.write(_struct_I.pack(length)) for val3 in _v303.subframe_names: length = len(val3) if python3 or type(val3) == unicode: val3 = val3.encode('utf-8') length = len(val3) buff.write(struct.pack('<I%ss'%length, length, val3)) length = len(_v303.subframe_poses) buff.write(_struct_I.pack(length)) for val3 in _v303.subframe_poses: _v313 = val3.position _x = _v313 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v314 = val3.orientation _x = _v314 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) buff.write(_get_struct_b().pack(_v303.operation)) length = len(val1.touch_links) buff.write(_struct_I.pack(length)) for val2 in val1.touch_links: length = len(val2) if python3 or type(val2) == unicode: val2 = val2.encode('utf-8') length = len(val2) buff.write(struct.pack('<I%ss'%length, length, val2)) _v315 = val1.detach_posture _v316 = _v315.header buff.write(_get_struct_I().pack(_v316.seq)) _v317 = _v316.stamp _x = _v317 buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs)) _x = _v316.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) length = len(_v315.joint_names) buff.write(_struct_I.pack(length)) for val3 in _v315.joint_names: length = len(val3) if python3 or type(val3) == unicode: val3 = val3.encode('utf-8') length = len(val3) buff.write(struct.pack('<I%ss'%length, length, val3)) length = len(_v315.points) buff.write(_struct_I.pack(length)) for val3 in _v315.points: length = len(val3.positions) buff.write(_struct_I.pack(length)) pattern = '<%sd'%length buff.write(val3.positions.tostring()) length = len(val3.velocities) buff.write(_struct_I.pack(length)) pattern = '<%sd'%length buff.write(val3.velocities.tostring()) length = len(val3.accelerations) buff.write(_struct_I.pack(length)) pattern = '<%sd'%length buff.write(val3.accelerations.tostring()) length = len(val3.effort) buff.write(_struct_I.pack(length)) pattern = '<%sd'%length buff.write(val3.effort.tostring()) _v318 = val3.time_from_start _x = _v318 buff.write(_get_struct_2i().pack(_x.secs, _x.nsecs)) buff.write(_get_struct_d().pack(val1.weight)) buff.write(_get_struct_B().pack(self.goal.request.start_state.is_diff)) length = len(self.goal.request.goal_constraints) buff.write(_struct_I.pack(length)) for val1 in self.goal.request.goal_constraints: _x = val1.name length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) length = len(val1.joint_constraints) buff.write(_struct_I.pack(length)) for val2 in val1.joint_constraints: _x = val2.joint_name length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _x = val2 buff.write(_get_struct_4d().pack(_x.position, _x.tolerance_above, _x.tolerance_below, _x.weight)) length = len(val1.position_constraints) buff.write(_struct_I.pack(length)) for val2 in val1.position_constraints: _v319 = val2.header buff.write(_get_struct_I().pack(_v319.seq)) _v320 = _v319.stamp _x = _v320 buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs)) _x = _v319.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _x = val2.link_name length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _v321 = val2.target_point_offset _x = _v321 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v322 = val2.constraint_region length = len(_v322.primitives) buff.write(_struct_I.pack(length)) for val4 in _v322.primitives: buff.write(_get_struct_B().pack(val4.type)) length = len(val4.dimensions) buff.write(_struct_I.pack(length)) pattern = '<%sd'%length buff.write(val4.dimensions.tostring()) length = len(_v322.primitive_poses) buff.write(_struct_I.pack(length)) for val4 in _v322.primitive_poses: _v323 = val4.position _x = _v323 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v324 = val4.orientation _x = _v324 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) length = len(_v322.meshes) buff.write(_struct_I.pack(length)) for val4 in _v322.meshes: length = len(val4.triangles) buff.write(_struct_I.pack(length)) for val5 in val4.triangles: buff.write(val5.vertex_indices.tostring()) length = len(val4.vertices) buff.write(_struct_I.pack(length)) for val5 in val4.vertices: _x = val5 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) length = len(_v322.mesh_poses) buff.write(_struct_I.pack(length)) for val4 in _v322.mesh_poses: _v325 = val4.position _x = _v325 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v326 = val4.orientation _x = _v326 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) buff.write(_get_struct_d().pack(val2.weight)) length = len(val1.orientation_constraints) buff.write(_struct_I.pack(length)) for val2 in val1.orientation_constraints: _v327 = val2.header buff.write(_get_struct_I().pack(_v327.seq)) _v328 = _v327.stamp _x = _v328 buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs)) _x = _v327.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _v329 = val2.orientation _x = _v329 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) _x = val2.link_name length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _x = val2 buff.write(_get_struct_4d().pack(_x.absolute_x_axis_tolerance, _x.absolute_y_axis_tolerance, _x.absolute_z_axis_tolerance, _x.weight)) length = len(val1.visibility_constraints) buff.write(_struct_I.pack(length)) for val2 in val1.visibility_constraints: buff.write(_get_struct_d().pack(val2.target_radius)) _v330 = val2.target_pose _v331 = _v330.header buff.write(_get_struct_I().pack(_v331.seq)) _v332 = _v331.stamp _x = _v332 buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs)) _x = _v331.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _v333 = _v330.pose _v334 = _v333.position _x = _v334 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v335 = _v333.orientation _x = _v335 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) buff.write(_get_struct_i().pack(val2.cone_sides)) _v336 = val2.sensor_pose _v337 = _v336.header buff.write(_get_struct_I().pack(_v337.seq)) _v338 = _v337.stamp _x = _v338 buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs)) _x = _v337.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _v339 = _v336.pose _v340 = _v339.position _x = _v340 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v341 = _v339.orientation _x = _v341 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) _x = val2 buff.write(_get_struct_2dBd().pack(_x.max_view_angle, _x.max_range_angle, _x.sensor_view_direction, _x.weight)) _x = self.goal.request.path_constraints.name length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) length = len(self.goal.request.path_constraints.joint_constraints) buff.write(_struct_I.pack(length)) for val1 in self.goal.request.path_constraints.joint_constraints: _x = val1.joint_name length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _x = val1 buff.write(_get_struct_4d().pack(_x.position, _x.tolerance_above, _x.tolerance_below, _x.weight)) length = len(self.goal.request.path_constraints.position_constraints) buff.write(_struct_I.pack(length)) for val1 in self.goal.request.path_constraints.position_constraints: _v342 = val1.header buff.write(_get_struct_I().pack(_v342.seq)) _v343 = _v342.stamp _x = _v343 buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs)) _x = _v342.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _x = val1.link_name length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _v344 = val1.target_point_offset _x = _v344 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v345 = val1.constraint_region length = len(_v345.primitives) buff.write(_struct_I.pack(length)) for val3 in _v345.primitives: buff.write(_get_struct_B().pack(val3.type)) length = len(val3.dimensions) buff.write(_struct_I.pack(length)) pattern = '<%sd'%length buff.write(val3.dimensions.tostring()) length = len(_v345.primitive_poses) buff.write(_struct_I.pack(length)) for val3 in _v345.primitive_poses: _v346 = val3.position _x = _v346 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v347 = val3.orientation _x = _v347 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) length = len(_v345.meshes) buff.write(_struct_I.pack(length)) for val3 in _v345.meshes: length = len(val3.triangles) buff.write(_struct_I.pack(length)) for val4 in val3.triangles: buff.write(val4.vertex_indices.tostring()) length = len(val3.vertices) buff.write(_struct_I.pack(length)) for val4 in val3.vertices: _x = val4 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) length = len(_v345.mesh_poses) buff.write(_struct_I.pack(length)) for val3 in _v345.mesh_poses: _v348 = val3.position _x = _v348 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v349 = val3.orientation _x = _v349 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) buff.write(_get_struct_d().pack(val1.weight)) length = len(self.goal.request.path_constraints.orientation_constraints) buff.write(_struct_I.pack(length)) for val1 in self.goal.request.path_constraints.orientation_constraints: _v350 = val1.header buff.write(_get_struct_I().pack(_v350.seq)) _v351 = _v350.stamp _x = _v351 buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs)) _x = _v350.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _v352 = val1.orientation _x = _v352 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) _x = val1.link_name length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _x = val1 buff.write(_get_struct_4d().pack(_x.absolute_x_axis_tolerance, _x.absolute_y_axis_tolerance, _x.absolute_z_axis_tolerance, _x.weight)) length = len(self.goal.request.path_constraints.visibility_constraints) buff.write(_struct_I.pack(length)) for val1 in self.goal.request.path_constraints.visibility_constraints: buff.write(_get_struct_d().pack(val1.target_radius)) _v353 = val1.target_pose _v354 = _v353.header buff.write(_get_struct_I().pack(_v354.seq)) _v355 = _v354.stamp _x = _v355 buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs)) _x = _v354.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _v356 = _v353.pose _v357 = _v356.position _x = _v357 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v358 = _v356.orientation _x = _v358 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) buff.write(_get_struct_i().pack(val1.cone_sides)) _v359 = val1.sensor_pose _v360 = _v359.header buff.write(_get_struct_I().pack(_v360.seq)) _v361 = _v360.stamp _x = _v361 buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs)) _x = _v360.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _v362 = _v359.pose _v363 = _v362.position _x = _v363 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v364 = _v362.orientation _x = _v364 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) _x = val1 buff.write(_get_struct_2dBd().pack(_x.max_view_angle, _x.max_range_angle, _x.sensor_view_direction, _x.weight)) length = len(self.goal.request.trajectory_constraints.constraints) buff.write(_struct_I.pack(length)) for val1 in self.goal.request.trajectory_constraints.constraints: _x = val1.name length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) length = len(val1.joint_constraints) buff.write(_struct_I.pack(length)) for val2 in val1.joint_constraints: _x = val2.joint_name length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _x = val2 buff.write(_get_struct_4d().pack(_x.position, _x.tolerance_above, _x.tolerance_below, _x.weight)) length = len(val1.position_constraints) buff.write(_struct_I.pack(length)) for val2 in val1.position_constraints: _v365 = val2.header buff.write(_get_struct_I().pack(_v365.seq)) _v366 = _v365.stamp _x = _v366 buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs)) _x = _v365.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _x = val2.link_name length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _v367 = val2.target_point_offset _x = _v367 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v368 = val2.constraint_region length = len(_v368.primitives) buff.write(_struct_I.pack(length)) for val4 in _v368.primitives: buff.write(_get_struct_B().pack(val4.type)) length = len(val4.dimensions) buff.write(_struct_I.pack(length)) pattern = '<%sd'%length buff.write(val4.dimensions.tostring()) length = len(_v368.primitive_poses) buff.write(_struct_I.pack(length)) for val4 in _v368.primitive_poses: _v369 = val4.position _x = _v369 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v370 = val4.orientation _x = _v370 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) length = len(_v368.meshes) buff.write(_struct_I.pack(length)) for val4 in _v368.meshes: length = len(val4.triangles) buff.write(_struct_I.pack(length)) for val5 in val4.triangles: buff.write(val5.vertex_indices.tostring()) length = len(val4.vertices) buff.write(_struct_I.pack(length)) for val5 in val4.vertices: _x = val5 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) length = len(_v368.mesh_poses) buff.write(_struct_I.pack(length)) for val4 in _v368.mesh_poses: _v371 = val4.position _x = _v371 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v372 = val4.orientation _x = _v372 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) buff.write(_get_struct_d().pack(val2.weight)) length = len(val1.orientation_constraints) buff.write(_struct_I.pack(length)) for val2 in val1.orientation_constraints: _v373 = val2.header buff.write(_get_struct_I().pack(_v373.seq)) _v374 = _v373.stamp _x = _v374 buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs)) _x = _v373.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _v375 = val2.orientation _x = _v375 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) _x = val2.link_name length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _x = val2 buff.write(_get_struct_4d().pack(_x.absolute_x_axis_tolerance, _x.absolute_y_axis_tolerance, _x.absolute_z_axis_tolerance, _x.weight)) length = len(val1.visibility_constraints) buff.write(_struct_I.pack(length)) for val2 in val1.visibility_constraints: buff.write(_get_struct_d().pack(val2.target_radius)) _v376 = val2.target_pose _v377 = _v376.header buff.write(_get_struct_I().pack(_v377.seq)) _v378 = _v377.stamp _x = _v378 buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs)) _x = _v377.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _v379 = _v376.pose _v380 = _v379.position _x = _v380 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v381 = _v379.orientation _x = _v381 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) buff.write(_get_struct_i().pack(val2.cone_sides)) _v382 = val2.sensor_pose _v383 = _v382.header buff.write(_get_struct_I().pack(_v383.seq)) _v384 = _v383.stamp _x = _v384 buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs)) _x = _v383.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _v385 = _v382.pose _v386 = _v385.position _x = _v386 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v387 = _v385.orientation _x = _v387 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) _x = val2 buff.write(_get_struct_2dBd().pack(_x.max_view_angle, _x.max_range_angle, _x.sensor_view_direction, _x.weight)) length = len(self.goal.request.reference_trajectories) buff.write(_struct_I.pack(length)) for val1 in self.goal.request.reference_trajectories: _v388 = val1.header buff.write(_get_struct_I().pack(_v388.seq)) _v389 = _v388.stamp _x = _v389 buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs)) _x = _v388.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) length = len(val1.joint_trajectory) buff.write(_struct_I.pack(length)) for val2 in val1.joint_trajectory: _v390 = val2.header buff.write(_get_struct_I().pack(_v390.seq)) _v391 = _v390.stamp _x = _v391 buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs)) _x = _v390.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) length = len(val2.joint_names) buff.write(_struct_I.pack(length)) for val3 in val2.joint_names: length = len(val3) if python3 or type(val3) == unicode: val3 = val3.encode('utf-8') length = len(val3) buff.write(struct.pack('<I%ss'%length, length, val3)) length = len(val2.points) buff.write(_struct_I.pack(length)) for val3 in val2.points: length = len(val3.positions) buff.write(_struct_I.pack(length)) pattern = '<%sd'%length buff.write(val3.positions.tostring()) length = len(val3.velocities) buff.write(_struct_I.pack(length)) pattern = '<%sd'%length buff.write(val3.velocities.tostring()) length = len(val3.accelerations) buff.write(_struct_I.pack(length)) pattern = '<%sd'%length buff.write(val3.accelerations.tostring()) length = len(val3.effort) buff.write(_struct_I.pack(length)) pattern = '<%sd'%length buff.write(val3.effort.tostring()) _v392 = val3.time_from_start _x = _v392 buff.write(_get_struct_2i().pack(_x.secs, _x.nsecs)) length = len(val1.cartesian_trajectory) buff.write(_struct_I.pack(length)) for val2 in val1.cartesian_trajectory: _v393 = val2.header buff.write(_get_struct_I().pack(_v393.seq)) _v394 = _v393.stamp _x = _v394 buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs)) _x = _v393.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _x = val2.tracked_frame length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) length = len(val2.points) buff.write(_struct_I.pack(length)) for val3 in val2.points: _v395 = val3.point _v396 = _v395.pose _v397 = _v396.position _x = _v397 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v398 = _v396.orientation _x = _v398 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) _v399 = _v395.velocity _v400 = _v399.linear _x = _v400 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v401 = _v399.angular _x = _v401 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v402 = _v395.acceleration _v403 = _v402.linear _x = _v403 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v404 = _v402.angular _x = _v404 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v405 = val3.time_from_start _x = _v405 buff.write(_get_struct_2i().pack(_x.secs, _x.nsecs)) _x = self.goal.request.planner_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _x = self.goal.request.group_name length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _x = self buff.write(_get_struct_i3d().pack(_x.goal.request.num_planning_attempts, _x.goal.request.allowed_planning_time, _x.goal.request.max_velocity_scaling_factor, _x.goal.request.max_acceleration_scaling_factor)) _x = self.goal.planning_options.planning_scene_diff.name length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _x = self buff.write(_get_struct_3I().pack(_x.goal.planning_options.planning_scene_diff.robot_state.joint_state.header.seq, _x.goal.planning_options.planning_scene_diff.robot_state.joint_state.header.stamp.secs, _x.goal.planning_options.planning_scene_diff.robot_state.joint_state.header.stamp.nsecs)) _x = self.goal.planning_options.planning_scene_diff.robot_state.joint_state.header.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) length = len(self.goal.planning_options.planning_scene_diff.robot_state.joint_state.name) buff.write(_struct_I.pack(length)) for val1 in self.goal.planning_options.planning_scene_diff.robot_state.joint_state.name: length = len(val1) if python3 or type(val1) == unicode: val1 = val1.encode('utf-8') length = len(val1) buff.write(struct.pack('<I%ss'%length, length, val1)) length = len(self.goal.planning_options.planning_scene_diff.robot_state.joint_state.position) buff.write(_struct_I.pack(length)) pattern = '<%sd'%length buff.write(self.goal.planning_options.planning_scene_diff.robot_state.joint_state.position.tostring()) length = len(self.goal.planning_options.planning_scene_diff.robot_state.joint_state.velocity) buff.write(_struct_I.pack(length)) pattern = '<%sd'%length buff.write(self.goal.planning_options.planning_scene_diff.robot_state.joint_state.velocity.tostring()) length = len(self.goal.planning_options.planning_scene_diff.robot_state.joint_state.effort) buff.write(_struct_I.pack(length)) pattern = '<%sd'%length buff.write(self.goal.planning_options.planning_scene_diff.robot_state.joint_state.effort.tostring()) _x = self buff.write(_get_struct_3I().pack(_x.goal.planning_options.planning_scene_diff.robot_state.multi_dof_joint_state.header.seq, _x.goal.planning_options.planning_scene_diff.robot_state.multi_dof_joint_state.header.stamp.secs, _x.goal.planning_options.planning_scene_diff.robot_state.multi_dof_joint_state.header.stamp.nsecs)) _x = self.goal.planning_options.planning_scene_diff.robot_state.multi_dof_joint_state.header.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) length = len(self.goal.planning_options.planning_scene_diff.robot_state.multi_dof_joint_state.joint_names) buff.write(_struct_I.pack(length)) for val1 in self.goal.planning_options.planning_scene_diff.robot_state.multi_dof_joint_state.joint_names: length = len(val1) if python3 or type(val1) == unicode: val1 = val1.encode('utf-8') length = len(val1) buff.write(struct.pack('<I%ss'%length, length, val1)) length = len(self.goal.planning_options.planning_scene_diff.robot_state.multi_dof_joint_state.transforms) buff.write(_struct_I.pack(length)) for val1 in self.goal.planning_options.planning_scene_diff.robot_state.multi_dof_joint_state.transforms: _v406 = val1.translation _x = _v406 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v407 = val1.rotation _x = _v407 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) length = len(self.goal.planning_options.planning_scene_diff.robot_state.multi_dof_joint_state.twist) buff.write(_struct_I.pack(length)) for val1 in self.goal.planning_options.planning_scene_diff.robot_state.multi_dof_joint_state.twist: _v408 = val1.linear _x = _v408 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v409 = val1.angular _x = _v409 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) length = len(self.goal.planning_options.planning_scene_diff.robot_state.multi_dof_joint_state.wrench) buff.write(_struct_I.pack(length)) for val1 in self.goal.planning_options.planning_scene_diff.robot_state.multi_dof_joint_state.wrench: _v410 = val1.force _x = _v410 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v411 = val1.torque _x = _v411 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) length = len(self.goal.planning_options.planning_scene_diff.robot_state.attached_collision_objects) buff.write(_struct_I.pack(length)) for val1 in self.goal.planning_options.planning_scene_diff.robot_state.attached_collision_objects: _x = val1.link_name length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _v412 = val1.object _v413 = _v412.header buff.write(_get_struct_I().pack(_v413.seq)) _v414 = _v413.stamp _x = _v414 buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs)) _x = _v413.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _x = _v412.id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _v415 = _v412.type _x = _v415.key length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _x = _v415.db length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) length = len(_v412.primitives) buff.write(_struct_I.pack(length)) for val3 in _v412.primitives: buff.write(_get_struct_B().pack(val3.type)) length = len(val3.dimensions) buff.write(_struct_I.pack(length)) pattern = '<%sd'%length buff.write(val3.dimensions.tostring()) length = len(_v412.primitive_poses) buff.write(_struct_I.pack(length)) for val3 in _v412.primitive_poses: _v416 = val3.position _x = _v416 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v417 = val3.orientation _x = _v417 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) length = len(_v412.meshes) buff.write(_struct_I.pack(length)) for val3 in _v412.meshes: length = len(val3.triangles) buff.write(_struct_I.pack(length)) for val4 in val3.triangles: buff.write(val4.vertex_indices.tostring()) length = len(val3.vertices) buff.write(_struct_I.pack(length)) for val4 in val3.vertices: _x = val4 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) length = len(_v412.mesh_poses) buff.write(_struct_I.pack(length)) for val3 in _v412.mesh_poses: _v418 = val3.position _x = _v418 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v419 = val3.orientation _x = _v419 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) length = len(_v412.planes) buff.write(_struct_I.pack(length)) for val3 in _v412.planes: buff.write(val3.coef.tostring()) length = len(_v412.plane_poses) buff.write(_struct_I.pack(length)) for val3 in _v412.plane_poses: _v420 = val3.position _x = _v420 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v421 = val3.orientation _x = _v421 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) length = len(_v412.subframe_names) buff.write(_struct_I.pack(length)) for val3 in _v412.subframe_names: length = len(val3) if python3 or type(val3) == unicode: val3 = val3.encode('utf-8') length = len(val3) buff.write(struct.pack('<I%ss'%length, length, val3)) length = len(_v412.subframe_poses) buff.write(_struct_I.pack(length)) for val3 in _v412.subframe_poses: _v422 = val3.position _x = _v422 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v423 = val3.orientation _x = _v423 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) buff.write(_get_struct_b().pack(_v412.operation)) length = len(val1.touch_links) buff.write(_struct_I.pack(length)) for val2 in val1.touch_links: length = len(val2) if python3 or type(val2) == unicode: val2 = val2.encode('utf-8') length = len(val2) buff.write(struct.pack('<I%ss'%length, length, val2)) _v424 = val1.detach_posture _v425 = _v424.header buff.write(_get_struct_I().pack(_v425.seq)) _v426 = _v425.stamp _x = _v426 buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs)) _x = _v425.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) length = len(_v424.joint_names) buff.write(_struct_I.pack(length)) for val3 in _v424.joint_names: length = len(val3) if python3 or type(val3) == unicode: val3 = val3.encode('utf-8') length = len(val3) buff.write(struct.pack('<I%ss'%length, length, val3)) length = len(_v424.points) buff.write(_struct_I.pack(length)) for val3 in _v424.points: length = len(val3.positions) buff.write(_struct_I.pack(length)) pattern = '<%sd'%length buff.write(val3.positions.tostring()) length = len(val3.velocities) buff.write(_struct_I.pack(length)) pattern = '<%sd'%length buff.write(val3.velocities.tostring()) length = len(val3.accelerations) buff.write(_struct_I.pack(length)) pattern = '<%sd'%length buff.write(val3.accelerations.tostring()) length = len(val3.effort) buff.write(_struct_I.pack(length)) pattern = '<%sd'%length buff.write(val3.effort.tostring()) _v427 = val3.time_from_start _x = _v427 buff.write(_get_struct_2i().pack(_x.secs, _x.nsecs)) buff.write(_get_struct_d().pack(val1.weight)) buff.write(_get_struct_B().pack(self.goal.planning_options.planning_scene_diff.robot_state.is_diff)) _x = self.goal.planning_options.planning_scene_diff.robot_model_name length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) length = len(self.goal.planning_options.planning_scene_diff.fixed_frame_transforms) buff.write(_struct_I.pack(length)) for val1 in self.goal.planning_options.planning_scene_diff.fixed_frame_transforms: _v428 = val1.header buff.write(_get_struct_I().pack(_v428.seq)) _v429 = _v428.stamp _x = _v429 buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs)) _x = _v428.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _x = val1.child_frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _v430 = val1.transform _v431 = _v430.translation _x = _v431 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v432 = _v430.rotation _x = _v432 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) length = len(self.goal.planning_options.planning_scene_diff.allowed_collision_matrix.entry_names) buff.write(_struct_I.pack(length)) for val1 in self.goal.planning_options.planning_scene_diff.allowed_collision_matrix.entry_names: length = len(val1) if python3 or type(val1) == unicode: val1 = val1.encode('utf-8') length = len(val1) buff.write(struct.pack('<I%ss'%length, length, val1)) length = len(self.goal.planning_options.planning_scene_diff.allowed_collision_matrix.entry_values) buff.write(_struct_I.pack(length)) for val1 in self.goal.planning_options.planning_scene_diff.allowed_collision_matrix.entry_values: length = len(val1.enabled) buff.write(_struct_I.pack(length)) pattern = '<%sB'%length buff.write(val1.enabled.tostring()) length = len(self.goal.planning_options.planning_scene_diff.allowed_collision_matrix.default_entry_names) buff.write(_struct_I.pack(length)) for val1 in self.goal.planning_options.planning_scene_diff.allowed_collision_matrix.default_entry_names: length = len(val1) if python3 or type(val1) == unicode: val1 = val1.encode('utf-8') length = len(val1) buff.write(struct.pack('<I%ss'%length, length, val1)) length = len(self.goal.planning_options.planning_scene_diff.allowed_collision_matrix.default_entry_values) buff.write(_struct_I.pack(length)) pattern = '<%sB'%length buff.write(self.goal.planning_options.planning_scene_diff.allowed_collision_matrix.default_entry_values.tostring()) length = len(self.goal.planning_options.planning_scene_diff.link_padding) buff.write(_struct_I.pack(length)) for val1 in self.goal.planning_options.planning_scene_diff.link_padding: _x = val1.link_name length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) buff.write(_get_struct_d().pack(val1.padding)) length = len(self.goal.planning_options.planning_scene_diff.link_scale) buff.write(_struct_I.pack(length)) for val1 in self.goal.planning_options.planning_scene_diff.link_scale: _x = val1.link_name length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) buff.write(_get_struct_d().pack(val1.scale)) length = len(self.goal.planning_options.planning_scene_diff.object_colors) buff.write(_struct_I.pack(length)) for val1 in self.goal.planning_options.planning_scene_diff.object_colors: _x = val1.id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _v433 = val1.color _x = _v433 buff.write(_get_struct_4f().pack(_x.r, _x.g, _x.b, _x.a)) length = len(self.goal.planning_options.planning_scene_diff.world.collision_objects) buff.write(_struct_I.pack(length)) for val1 in self.goal.planning_options.planning_scene_diff.world.collision_objects: _v434 = val1.header buff.write(_get_struct_I().pack(_v434.seq)) _v435 = _v434.stamp _x = _v435 buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs)) _x = _v434.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _x = val1.id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _v436 = val1.type _x = _v436.key length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _x = _v436.db length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) length = len(val1.primitives) buff.write(_struct_I.pack(length)) for val2 in val1.primitives: buff.write(_get_struct_B().pack(val2.type)) length = len(val2.dimensions) buff.write(_struct_I.pack(length)) pattern = '<%sd'%length buff.write(val2.dimensions.tostring()) length = len(val1.primitive_poses) buff.write(_struct_I.pack(length)) for val2 in val1.primitive_poses: _v437 = val2.position _x = _v437 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v438 = val2.orientation _x = _v438 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) length = len(val1.meshes) buff.write(_struct_I.pack(length)) for val2 in val1.meshes: length = len(val2.triangles) buff.write(_struct_I.pack(length)) for val3 in val2.triangles: buff.write(val3.vertex_indices.tostring()) length = len(val2.vertices) buff.write(_struct_I.pack(length)) for val3 in val2.vertices: _x = val3 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) length = len(val1.mesh_poses) buff.write(_struct_I.pack(length)) for val2 in val1.mesh_poses: _v439 = val2.position _x = _v439 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v440 = val2.orientation _x = _v440 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) length = len(val1.planes) buff.write(_struct_I.pack(length)) for val2 in val1.planes: buff.write(val2.coef.tostring()) length = len(val1.plane_poses) buff.write(_struct_I.pack(length)) for val2 in val1.plane_poses: _v441 = val2.position _x = _v441 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v442 = val2.orientation _x = _v442 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) length = len(val1.subframe_names) buff.write(_struct_I.pack(length)) for val2 in val1.subframe_names: length = len(val2) if python3 or type(val2) == unicode: val2 = val2.encode('utf-8') length = len(val2) buff.write(struct.pack('<I%ss'%length, length, val2)) length = len(val1.subframe_poses) buff.write(_struct_I.pack(length)) for val2 in val1.subframe_poses: _v443 = val2.position _x = _v443 buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z)) _v444 = val2.orientation _x = _v444 buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w)) buff.write(_get_struct_b().pack(val1.operation)) _x = self buff.write(_get_struct_3I().pack(_x.goal.planning_options.planning_scene_diff.world.octomap.header.seq, _x.goal.planning_options.planning_scene_diff.world.octomap.header.stamp.secs, _x.goal.planning_options.planning_scene_diff.world.octomap.header.stamp.nsecs)) _x = self.goal.planning_options.planning_scene_diff.world.octomap.header.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) _x = self buff.write(_get_struct_7d3I().pack(_x.goal.planning_options.planning_scene_diff.world.octomap.origin.position.x, _x.goal.planning_options.planning_scene_diff.world.octomap.origin.position.y, _x.goal.planning_options.planning_scene_diff.world.octomap.origin.position.z, _x.goal.planning_options.planning_scene_diff.world.octomap.origin.orientation.x, _x.goal.planning_options.planning_scene_diff.world.octomap.origin.orientation.y, _x.goal.planning_options.planning_scene_diff.world.octomap.origin.orientation.z, _x.goal.planning_options.planning_scene_diff.world.octomap.origin.orientation.w, _x.goal.planning_options.planning_scene_diff.world.octomap.octomap.header.seq, _x.goal.planning_options.planning_scene_diff.world.octomap.octomap.header.stamp.secs, _x.goal.planning_options.planning_scene_diff.world.octomap.octomap.header.stamp.nsecs)) _x = self.goal.planning_options.planning_scene_diff.world.octomap.octomap.header.frame_id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) buff.write(_get_struct_B().pack(self.goal.planning_options.planning_scene_diff.world.octomap.octomap.binary)) _x = self.goal.planning_options.planning_scene_diff.world.octomap.octomap.id length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) buff.write(struct.pack('<I%ss'%length, length, _x)) buff.write(_get_struct_d().pack(self.goal.planning_options.planning_scene_diff.world.octomap.octomap.resolution)) length = len(self.goal.planning_options.planning_scene_diff.world.octomap.octomap.data) buff.write(_struct_I.pack(length)) pattern = '<%sb'%length buff.write(self.goal.planning_options.planning_scene_diff.world.octomap.octomap.data.tostring()) _x = self buff.write(_get_struct_3BidBid().pack(_x.goal.planning_options.planning_scene_diff.is_diff, _x.goal.planning_options.plan_only, _x.goal.planning_options.look_around, _x.goal.planning_options.look_around_attempts, _x.goal.planning_options.max_safe_execution_cost, _x.goal.planning_options.replan, _x.goal.planning_options.replan_attempts, _x.goal.planning_options.replan_delay)) except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self))))) except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def serialize_numpy(self, buff, numpy):\n try:\n pass\n except struct.error as se: self._check_types(se)\n except TypeError as te: self._check_types(te)", "def serialize_numpy(self, buff, numpy):\n try:\n _x = self\n buff.write(_struct_2d2q14dq.pack(_x.tcp, _x.ori, _x.zone, _x.vacuum, ...
[ "0.7994329", "0.7972612", "0.7893365", "0.785495", "0.7740611", "0.7677824", "0.7657543", "0.7626826", "0.75874037", "0.7565361", "0.75626636", "0.75620574", "0.7558187", "0.75431186", "0.7534563", "0.7527763", "0.75262064", "0.75172293", "0.75110817", "0.749996", "0.7497972"...
0.6807753
95
unpack serialized message in str into this message instance using numpy for array types
def deserialize_numpy(self, str, numpy): try: if self.header is None: self.header = std_msgs.msg.Header() if self.goal_id is None: self.goal_id = actionlib_msgs.msg.GoalID() if self.goal is None: self.goal = moveit_msgs.msg.MoveGroupGoal() end = 0 _x = self start = end end += 12 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: self.header.frame_id = str[start:end].decode('utf-8') else: self.header.frame_id = str[start:end] _x = self start = end end += 8 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _get_struct_2I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: self.goal_id.id = str[start:end].decode('utf-8') else: self.goal_id.id = str[start:end] _x = self start = end end += 12 (_x.goal.request.workspace_parameters.header.seq, _x.goal.request.workspace_parameters.header.stamp.secs, _x.goal.request.workspace_parameters.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: self.goal.request.workspace_parameters.header.frame_id = str[start:end].decode('utf-8') else: self.goal.request.workspace_parameters.header.frame_id = str[start:end] _x = self start = end end += 60 (_x.goal.request.workspace_parameters.min_corner.x, _x.goal.request.workspace_parameters.min_corner.y, _x.goal.request.workspace_parameters.min_corner.z, _x.goal.request.workspace_parameters.max_corner.x, _x.goal.request.workspace_parameters.max_corner.y, _x.goal.request.workspace_parameters.max_corner.z, _x.goal.request.start_state.joint_state.header.seq, _x.goal.request.start_state.joint_state.header.stamp.secs, _x.goal.request.start_state.joint_state.header.stamp.nsecs,) = _get_struct_6d3I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: self.goal.request.start_state.joint_state.header.frame_id = str[start:end].decode('utf-8') else: self.goal.request.start_state.joint_state.header.frame_id = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.request.start_state.joint_state.name = [] for i in range(0, length): start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val1 = str[start:end].decode('utf-8') else: val1 = str[start:end] self.goal.request.start_state.joint_state.name.append(val1) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sd'%length start = end end += struct.calcsize(pattern) self.goal.request.start_state.joint_state.position = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sd'%length start = end end += struct.calcsize(pattern) self.goal.request.start_state.joint_state.velocity = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sd'%length start = end end += struct.calcsize(pattern) self.goal.request.start_state.joint_state.effort = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) _x = self start = end end += 12 (_x.goal.request.start_state.multi_dof_joint_state.header.seq, _x.goal.request.start_state.multi_dof_joint_state.header.stamp.secs, _x.goal.request.start_state.multi_dof_joint_state.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: self.goal.request.start_state.multi_dof_joint_state.header.frame_id = str[start:end].decode('utf-8') else: self.goal.request.start_state.multi_dof_joint_state.header.frame_id = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.request.start_state.multi_dof_joint_state.joint_names = [] for i in range(0, length): start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val1 = str[start:end].decode('utf-8') else: val1 = str[start:end] self.goal.request.start_state.multi_dof_joint_state.joint_names.append(val1) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.request.start_state.multi_dof_joint_state.transforms = [] for i in range(0, length): val1 = geometry_msgs.msg.Transform() _v445 = val1.translation _x = _v445 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v446 = val1.rotation _x = _v446 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) self.goal.request.start_state.multi_dof_joint_state.transforms.append(val1) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.request.start_state.multi_dof_joint_state.twist = [] for i in range(0, length): val1 = geometry_msgs.msg.Twist() _v447 = val1.linear _x = _v447 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v448 = val1.angular _x = _v448 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) self.goal.request.start_state.multi_dof_joint_state.twist.append(val1) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.request.start_state.multi_dof_joint_state.wrench = [] for i in range(0, length): val1 = geometry_msgs.msg.Wrench() _v449 = val1.force _x = _v449 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v450 = val1.torque _x = _v450 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) self.goal.request.start_state.multi_dof_joint_state.wrench.append(val1) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.request.start_state.attached_collision_objects = [] for i in range(0, length): val1 = moveit_msgs.msg.AttachedCollisionObject() start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val1.link_name = str[start:end].decode('utf-8') else: val1.link_name = str[start:end] _v451 = val1.object _v452 = _v451.header start = end end += 4 (_v452.seq,) = _get_struct_I().unpack(str[start:end]) _v453 = _v452.stamp _x = _v453 start = end end += 8 (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v452.frame_id = str[start:end].decode('utf-8') else: _v452.frame_id = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v451.id = str[start:end].decode('utf-8') else: _v451.id = str[start:end] _v454 = _v451.type start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v454.key = str[start:end].decode('utf-8') else: _v454.key = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v454.db = str[start:end].decode('utf-8') else: _v454.db = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v451.primitives = [] for i in range(0, length): val3 = shape_msgs.msg.SolidPrimitive() start = end end += 1 (val3.type,) = _get_struct_B().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sd'%length start = end end += struct.calcsize(pattern) val3.dimensions = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) _v451.primitives.append(val3) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v451.primitive_poses = [] for i in range(0, length): val3 = geometry_msgs.msg.Pose() _v455 = val3.position _x = _v455 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v456 = val3.orientation _x = _v456 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) _v451.primitive_poses.append(val3) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v451.meshes = [] for i in range(0, length): val3 = shape_msgs.msg.Mesh() start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val3.triangles = [] for i in range(0, length): val4 = shape_msgs.msg.MeshTriangle() start = end end += 12 val4.vertex_indices = numpy.frombuffer(str[start:end], dtype=numpy.uint32, count=3) val3.triangles.append(val4) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val3.vertices = [] for i in range(0, length): val4 = geometry_msgs.msg.Point() _x = val4 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) val3.vertices.append(val4) _v451.meshes.append(val3) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v451.mesh_poses = [] for i in range(0, length): val3 = geometry_msgs.msg.Pose() _v457 = val3.position _x = _v457 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v458 = val3.orientation _x = _v458 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) _v451.mesh_poses.append(val3) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v451.planes = [] for i in range(0, length): val3 = shape_msgs.msg.Plane() start = end end += 32 val3.coef = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=4) _v451.planes.append(val3) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v451.plane_poses = [] for i in range(0, length): val3 = geometry_msgs.msg.Pose() _v459 = val3.position _x = _v459 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v460 = val3.orientation _x = _v460 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) _v451.plane_poses.append(val3) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v451.subframe_names = [] for i in range(0, length): start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val3 = str[start:end].decode('utf-8') else: val3 = str[start:end] _v451.subframe_names.append(val3) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v451.subframe_poses = [] for i in range(0, length): val3 = geometry_msgs.msg.Pose() _v461 = val3.position _x = _v461 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v462 = val3.orientation _x = _v462 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) _v451.subframe_poses.append(val3) start = end end += 1 (_v451.operation,) = _get_struct_b().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val1.touch_links = [] for i in range(0, length): start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val2 = str[start:end].decode('utf-8') else: val2 = str[start:end] val1.touch_links.append(val2) _v463 = val1.detach_posture _v464 = _v463.header start = end end += 4 (_v464.seq,) = _get_struct_I().unpack(str[start:end]) _v465 = _v464.stamp _x = _v465 start = end end += 8 (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v464.frame_id = str[start:end].decode('utf-8') else: _v464.frame_id = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v463.joint_names = [] for i in range(0, length): start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val3 = str[start:end].decode('utf-8') else: val3 = str[start:end] _v463.joint_names.append(val3) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v463.points = [] for i in range(0, length): val3 = trajectory_msgs.msg.JointTrajectoryPoint() start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sd'%length start = end end += struct.calcsize(pattern) val3.positions = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sd'%length start = end end += struct.calcsize(pattern) val3.velocities = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sd'%length start = end end += struct.calcsize(pattern) val3.accelerations = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sd'%length start = end end += struct.calcsize(pattern) val3.effort = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) _v466 = val3.time_from_start _x = _v466 start = end end += 8 (_x.secs, _x.nsecs,) = _get_struct_2i().unpack(str[start:end]) _v463.points.append(val3) start = end end += 8 (val1.weight,) = _get_struct_d().unpack(str[start:end]) self.goal.request.start_state.attached_collision_objects.append(val1) start = end end += 1 (self.goal.request.start_state.is_diff,) = _get_struct_B().unpack(str[start:end]) self.goal.request.start_state.is_diff = bool(self.goal.request.start_state.is_diff) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.request.goal_constraints = [] for i in range(0, length): val1 = moveit_msgs.msg.Constraints() start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val1.name = str[start:end].decode('utf-8') else: val1.name = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val1.joint_constraints = [] for i in range(0, length): val2 = moveit_msgs.msg.JointConstraint() start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val2.joint_name = str[start:end].decode('utf-8') else: val2.joint_name = str[start:end] _x = val2 start = end end += 32 (_x.position, _x.tolerance_above, _x.tolerance_below, _x.weight,) = _get_struct_4d().unpack(str[start:end]) val1.joint_constraints.append(val2) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val1.position_constraints = [] for i in range(0, length): val2 = moveit_msgs.msg.PositionConstraint() _v467 = val2.header start = end end += 4 (_v467.seq,) = _get_struct_I().unpack(str[start:end]) _v468 = _v467.stamp _x = _v468 start = end end += 8 (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v467.frame_id = str[start:end].decode('utf-8') else: _v467.frame_id = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val2.link_name = str[start:end].decode('utf-8') else: val2.link_name = str[start:end] _v469 = val2.target_point_offset _x = _v469 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v470 = val2.constraint_region start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v470.primitives = [] for i in range(0, length): val4 = shape_msgs.msg.SolidPrimitive() start = end end += 1 (val4.type,) = _get_struct_B().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sd'%length start = end end += struct.calcsize(pattern) val4.dimensions = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) _v470.primitives.append(val4) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v470.primitive_poses = [] for i in range(0, length): val4 = geometry_msgs.msg.Pose() _v471 = val4.position _x = _v471 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v472 = val4.orientation _x = _v472 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) _v470.primitive_poses.append(val4) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v470.meshes = [] for i in range(0, length): val4 = shape_msgs.msg.Mesh() start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val4.triangles = [] for i in range(0, length): val5 = shape_msgs.msg.MeshTriangle() start = end end += 12 val5.vertex_indices = numpy.frombuffer(str[start:end], dtype=numpy.uint32, count=3) val4.triangles.append(val5) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val4.vertices = [] for i in range(0, length): val5 = geometry_msgs.msg.Point() _x = val5 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) val4.vertices.append(val5) _v470.meshes.append(val4) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v470.mesh_poses = [] for i in range(0, length): val4 = geometry_msgs.msg.Pose() _v473 = val4.position _x = _v473 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v474 = val4.orientation _x = _v474 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) _v470.mesh_poses.append(val4) start = end end += 8 (val2.weight,) = _get_struct_d().unpack(str[start:end]) val1.position_constraints.append(val2) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val1.orientation_constraints = [] for i in range(0, length): val2 = moveit_msgs.msg.OrientationConstraint() _v475 = val2.header start = end end += 4 (_v475.seq,) = _get_struct_I().unpack(str[start:end]) _v476 = _v475.stamp _x = _v476 start = end end += 8 (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v475.frame_id = str[start:end].decode('utf-8') else: _v475.frame_id = str[start:end] _v477 = val2.orientation _x = _v477 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val2.link_name = str[start:end].decode('utf-8') else: val2.link_name = str[start:end] _x = val2 start = end end += 32 (_x.absolute_x_axis_tolerance, _x.absolute_y_axis_tolerance, _x.absolute_z_axis_tolerance, _x.weight,) = _get_struct_4d().unpack(str[start:end]) val1.orientation_constraints.append(val2) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val1.visibility_constraints = [] for i in range(0, length): val2 = moveit_msgs.msg.VisibilityConstraint() start = end end += 8 (val2.target_radius,) = _get_struct_d().unpack(str[start:end]) _v478 = val2.target_pose _v479 = _v478.header start = end end += 4 (_v479.seq,) = _get_struct_I().unpack(str[start:end]) _v480 = _v479.stamp _x = _v480 start = end end += 8 (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v479.frame_id = str[start:end].decode('utf-8') else: _v479.frame_id = str[start:end] _v481 = _v478.pose _v482 = _v481.position _x = _v482 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v483 = _v481.orientation _x = _v483 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) start = end end += 4 (val2.cone_sides,) = _get_struct_i().unpack(str[start:end]) _v484 = val2.sensor_pose _v485 = _v484.header start = end end += 4 (_v485.seq,) = _get_struct_I().unpack(str[start:end]) _v486 = _v485.stamp _x = _v486 start = end end += 8 (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v485.frame_id = str[start:end].decode('utf-8') else: _v485.frame_id = str[start:end] _v487 = _v484.pose _v488 = _v487.position _x = _v488 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v489 = _v487.orientation _x = _v489 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) _x = val2 start = end end += 25 (_x.max_view_angle, _x.max_range_angle, _x.sensor_view_direction, _x.weight,) = _get_struct_2dBd().unpack(str[start:end]) val1.visibility_constraints.append(val2) self.goal.request.goal_constraints.append(val1) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: self.goal.request.path_constraints.name = str[start:end].decode('utf-8') else: self.goal.request.path_constraints.name = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.request.path_constraints.joint_constraints = [] for i in range(0, length): val1 = moveit_msgs.msg.JointConstraint() start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val1.joint_name = str[start:end].decode('utf-8') else: val1.joint_name = str[start:end] _x = val1 start = end end += 32 (_x.position, _x.tolerance_above, _x.tolerance_below, _x.weight,) = _get_struct_4d().unpack(str[start:end]) self.goal.request.path_constraints.joint_constraints.append(val1) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.request.path_constraints.position_constraints = [] for i in range(0, length): val1 = moveit_msgs.msg.PositionConstraint() _v490 = val1.header start = end end += 4 (_v490.seq,) = _get_struct_I().unpack(str[start:end]) _v491 = _v490.stamp _x = _v491 start = end end += 8 (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v490.frame_id = str[start:end].decode('utf-8') else: _v490.frame_id = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val1.link_name = str[start:end].decode('utf-8') else: val1.link_name = str[start:end] _v492 = val1.target_point_offset _x = _v492 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v493 = val1.constraint_region start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v493.primitives = [] for i in range(0, length): val3 = shape_msgs.msg.SolidPrimitive() start = end end += 1 (val3.type,) = _get_struct_B().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sd'%length start = end end += struct.calcsize(pattern) val3.dimensions = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) _v493.primitives.append(val3) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v493.primitive_poses = [] for i in range(0, length): val3 = geometry_msgs.msg.Pose() _v494 = val3.position _x = _v494 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v495 = val3.orientation _x = _v495 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) _v493.primitive_poses.append(val3) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v493.meshes = [] for i in range(0, length): val3 = shape_msgs.msg.Mesh() start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val3.triangles = [] for i in range(0, length): val4 = shape_msgs.msg.MeshTriangle() start = end end += 12 val4.vertex_indices = numpy.frombuffer(str[start:end], dtype=numpy.uint32, count=3) val3.triangles.append(val4) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val3.vertices = [] for i in range(0, length): val4 = geometry_msgs.msg.Point() _x = val4 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) val3.vertices.append(val4) _v493.meshes.append(val3) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v493.mesh_poses = [] for i in range(0, length): val3 = geometry_msgs.msg.Pose() _v496 = val3.position _x = _v496 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v497 = val3.orientation _x = _v497 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) _v493.mesh_poses.append(val3) start = end end += 8 (val1.weight,) = _get_struct_d().unpack(str[start:end]) self.goal.request.path_constraints.position_constraints.append(val1) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.request.path_constraints.orientation_constraints = [] for i in range(0, length): val1 = moveit_msgs.msg.OrientationConstraint() _v498 = val1.header start = end end += 4 (_v498.seq,) = _get_struct_I().unpack(str[start:end]) _v499 = _v498.stamp _x = _v499 start = end end += 8 (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v498.frame_id = str[start:end].decode('utf-8') else: _v498.frame_id = str[start:end] _v500 = val1.orientation _x = _v500 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val1.link_name = str[start:end].decode('utf-8') else: val1.link_name = str[start:end] _x = val1 start = end end += 32 (_x.absolute_x_axis_tolerance, _x.absolute_y_axis_tolerance, _x.absolute_z_axis_tolerance, _x.weight,) = _get_struct_4d().unpack(str[start:end]) self.goal.request.path_constraints.orientation_constraints.append(val1) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.request.path_constraints.visibility_constraints = [] for i in range(0, length): val1 = moveit_msgs.msg.VisibilityConstraint() start = end end += 8 (val1.target_radius,) = _get_struct_d().unpack(str[start:end]) _v501 = val1.target_pose _v502 = _v501.header start = end end += 4 (_v502.seq,) = _get_struct_I().unpack(str[start:end]) _v503 = _v502.stamp _x = _v503 start = end end += 8 (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v502.frame_id = str[start:end].decode('utf-8') else: _v502.frame_id = str[start:end] _v504 = _v501.pose _v505 = _v504.position _x = _v505 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v506 = _v504.orientation _x = _v506 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) start = end end += 4 (val1.cone_sides,) = _get_struct_i().unpack(str[start:end]) _v507 = val1.sensor_pose _v508 = _v507.header start = end end += 4 (_v508.seq,) = _get_struct_I().unpack(str[start:end]) _v509 = _v508.stamp _x = _v509 start = end end += 8 (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v508.frame_id = str[start:end].decode('utf-8') else: _v508.frame_id = str[start:end] _v510 = _v507.pose _v511 = _v510.position _x = _v511 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v512 = _v510.orientation _x = _v512 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) _x = val1 start = end end += 25 (_x.max_view_angle, _x.max_range_angle, _x.sensor_view_direction, _x.weight,) = _get_struct_2dBd().unpack(str[start:end]) self.goal.request.path_constraints.visibility_constraints.append(val1) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.request.trajectory_constraints.constraints = [] for i in range(0, length): val1 = moveit_msgs.msg.Constraints() start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val1.name = str[start:end].decode('utf-8') else: val1.name = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val1.joint_constraints = [] for i in range(0, length): val2 = moveit_msgs.msg.JointConstraint() start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val2.joint_name = str[start:end].decode('utf-8') else: val2.joint_name = str[start:end] _x = val2 start = end end += 32 (_x.position, _x.tolerance_above, _x.tolerance_below, _x.weight,) = _get_struct_4d().unpack(str[start:end]) val1.joint_constraints.append(val2) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val1.position_constraints = [] for i in range(0, length): val2 = moveit_msgs.msg.PositionConstraint() _v513 = val2.header start = end end += 4 (_v513.seq,) = _get_struct_I().unpack(str[start:end]) _v514 = _v513.stamp _x = _v514 start = end end += 8 (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v513.frame_id = str[start:end].decode('utf-8') else: _v513.frame_id = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val2.link_name = str[start:end].decode('utf-8') else: val2.link_name = str[start:end] _v515 = val2.target_point_offset _x = _v515 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v516 = val2.constraint_region start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v516.primitives = [] for i in range(0, length): val4 = shape_msgs.msg.SolidPrimitive() start = end end += 1 (val4.type,) = _get_struct_B().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sd'%length start = end end += struct.calcsize(pattern) val4.dimensions = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) _v516.primitives.append(val4) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v516.primitive_poses = [] for i in range(0, length): val4 = geometry_msgs.msg.Pose() _v517 = val4.position _x = _v517 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v518 = val4.orientation _x = _v518 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) _v516.primitive_poses.append(val4) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v516.meshes = [] for i in range(0, length): val4 = shape_msgs.msg.Mesh() start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val4.triangles = [] for i in range(0, length): val5 = shape_msgs.msg.MeshTriangle() start = end end += 12 val5.vertex_indices = numpy.frombuffer(str[start:end], dtype=numpy.uint32, count=3) val4.triangles.append(val5) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val4.vertices = [] for i in range(0, length): val5 = geometry_msgs.msg.Point() _x = val5 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) val4.vertices.append(val5) _v516.meshes.append(val4) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v516.mesh_poses = [] for i in range(0, length): val4 = geometry_msgs.msg.Pose() _v519 = val4.position _x = _v519 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v520 = val4.orientation _x = _v520 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) _v516.mesh_poses.append(val4) start = end end += 8 (val2.weight,) = _get_struct_d().unpack(str[start:end]) val1.position_constraints.append(val2) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val1.orientation_constraints = [] for i in range(0, length): val2 = moveit_msgs.msg.OrientationConstraint() _v521 = val2.header start = end end += 4 (_v521.seq,) = _get_struct_I().unpack(str[start:end]) _v522 = _v521.stamp _x = _v522 start = end end += 8 (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v521.frame_id = str[start:end].decode('utf-8') else: _v521.frame_id = str[start:end] _v523 = val2.orientation _x = _v523 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val2.link_name = str[start:end].decode('utf-8') else: val2.link_name = str[start:end] _x = val2 start = end end += 32 (_x.absolute_x_axis_tolerance, _x.absolute_y_axis_tolerance, _x.absolute_z_axis_tolerance, _x.weight,) = _get_struct_4d().unpack(str[start:end]) val1.orientation_constraints.append(val2) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val1.visibility_constraints = [] for i in range(0, length): val2 = moveit_msgs.msg.VisibilityConstraint() start = end end += 8 (val2.target_radius,) = _get_struct_d().unpack(str[start:end]) _v524 = val2.target_pose _v525 = _v524.header start = end end += 4 (_v525.seq,) = _get_struct_I().unpack(str[start:end]) _v526 = _v525.stamp _x = _v526 start = end end += 8 (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v525.frame_id = str[start:end].decode('utf-8') else: _v525.frame_id = str[start:end] _v527 = _v524.pose _v528 = _v527.position _x = _v528 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v529 = _v527.orientation _x = _v529 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) start = end end += 4 (val2.cone_sides,) = _get_struct_i().unpack(str[start:end]) _v530 = val2.sensor_pose _v531 = _v530.header start = end end += 4 (_v531.seq,) = _get_struct_I().unpack(str[start:end]) _v532 = _v531.stamp _x = _v532 start = end end += 8 (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v531.frame_id = str[start:end].decode('utf-8') else: _v531.frame_id = str[start:end] _v533 = _v530.pose _v534 = _v533.position _x = _v534 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v535 = _v533.orientation _x = _v535 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) _x = val2 start = end end += 25 (_x.max_view_angle, _x.max_range_angle, _x.sensor_view_direction, _x.weight,) = _get_struct_2dBd().unpack(str[start:end]) val1.visibility_constraints.append(val2) self.goal.request.trajectory_constraints.constraints.append(val1) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.request.reference_trajectories = [] for i in range(0, length): val1 = moveit_msgs.msg.GenericTrajectory() _v536 = val1.header start = end end += 4 (_v536.seq,) = _get_struct_I().unpack(str[start:end]) _v537 = _v536.stamp _x = _v537 start = end end += 8 (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v536.frame_id = str[start:end].decode('utf-8') else: _v536.frame_id = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val1.joint_trajectory = [] for i in range(0, length): val2 = trajectory_msgs.msg.JointTrajectory() _v538 = val2.header start = end end += 4 (_v538.seq,) = _get_struct_I().unpack(str[start:end]) _v539 = _v538.stamp _x = _v539 start = end end += 8 (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v538.frame_id = str[start:end].decode('utf-8') else: _v538.frame_id = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val2.joint_names = [] for i in range(0, length): start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val3 = str[start:end].decode('utf-8') else: val3 = str[start:end] val2.joint_names.append(val3) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val2.points = [] for i in range(0, length): val3 = trajectory_msgs.msg.JointTrajectoryPoint() start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sd'%length start = end end += struct.calcsize(pattern) val3.positions = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sd'%length start = end end += struct.calcsize(pattern) val3.velocities = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sd'%length start = end end += struct.calcsize(pattern) val3.accelerations = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sd'%length start = end end += struct.calcsize(pattern) val3.effort = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) _v540 = val3.time_from_start _x = _v540 start = end end += 8 (_x.secs, _x.nsecs,) = _get_struct_2i().unpack(str[start:end]) val2.points.append(val3) val1.joint_trajectory.append(val2) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val1.cartesian_trajectory = [] for i in range(0, length): val2 = moveit_msgs.msg.CartesianTrajectory() _v541 = val2.header start = end end += 4 (_v541.seq,) = _get_struct_I().unpack(str[start:end]) _v542 = _v541.stamp _x = _v542 start = end end += 8 (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v541.frame_id = str[start:end].decode('utf-8') else: _v541.frame_id = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val2.tracked_frame = str[start:end].decode('utf-8') else: val2.tracked_frame = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val2.points = [] for i in range(0, length): val3 = moveit_msgs.msg.CartesianTrajectoryPoint() _v543 = val3.point _v544 = _v543.pose _v545 = _v544.position _x = _v545 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v546 = _v544.orientation _x = _v546 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) _v547 = _v543.velocity _v548 = _v547.linear _x = _v548 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v549 = _v547.angular _x = _v549 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v550 = _v543.acceleration _v551 = _v550.linear _x = _v551 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v552 = _v550.angular _x = _v552 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v553 = val3.time_from_start _x = _v553 start = end end += 8 (_x.secs, _x.nsecs,) = _get_struct_2i().unpack(str[start:end]) val2.points.append(val3) val1.cartesian_trajectory.append(val2) self.goal.request.reference_trajectories.append(val1) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: self.goal.request.planner_id = str[start:end].decode('utf-8') else: self.goal.request.planner_id = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: self.goal.request.group_name = str[start:end].decode('utf-8') else: self.goal.request.group_name = str[start:end] _x = self start = end end += 28 (_x.goal.request.num_planning_attempts, _x.goal.request.allowed_planning_time, _x.goal.request.max_velocity_scaling_factor, _x.goal.request.max_acceleration_scaling_factor,) = _get_struct_i3d().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: self.goal.planning_options.planning_scene_diff.name = str[start:end].decode('utf-8') else: self.goal.planning_options.planning_scene_diff.name = str[start:end] _x = self start = end end += 12 (_x.goal.planning_options.planning_scene_diff.robot_state.joint_state.header.seq, _x.goal.planning_options.planning_scene_diff.robot_state.joint_state.header.stamp.secs, _x.goal.planning_options.planning_scene_diff.robot_state.joint_state.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: self.goal.planning_options.planning_scene_diff.robot_state.joint_state.header.frame_id = str[start:end].decode('utf-8') else: self.goal.planning_options.planning_scene_diff.robot_state.joint_state.header.frame_id = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.planning_options.planning_scene_diff.robot_state.joint_state.name = [] for i in range(0, length): start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val1 = str[start:end].decode('utf-8') else: val1 = str[start:end] self.goal.planning_options.planning_scene_diff.robot_state.joint_state.name.append(val1) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sd'%length start = end end += struct.calcsize(pattern) self.goal.planning_options.planning_scene_diff.robot_state.joint_state.position = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sd'%length start = end end += struct.calcsize(pattern) self.goal.planning_options.planning_scene_diff.robot_state.joint_state.velocity = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sd'%length start = end end += struct.calcsize(pattern) self.goal.planning_options.planning_scene_diff.robot_state.joint_state.effort = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) _x = self start = end end += 12 (_x.goal.planning_options.planning_scene_diff.robot_state.multi_dof_joint_state.header.seq, _x.goal.planning_options.planning_scene_diff.robot_state.multi_dof_joint_state.header.stamp.secs, _x.goal.planning_options.planning_scene_diff.robot_state.multi_dof_joint_state.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: self.goal.planning_options.planning_scene_diff.robot_state.multi_dof_joint_state.header.frame_id = str[start:end].decode('utf-8') else: self.goal.planning_options.planning_scene_diff.robot_state.multi_dof_joint_state.header.frame_id = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.planning_options.planning_scene_diff.robot_state.multi_dof_joint_state.joint_names = [] for i in range(0, length): start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val1 = str[start:end].decode('utf-8') else: val1 = str[start:end] self.goal.planning_options.planning_scene_diff.robot_state.multi_dof_joint_state.joint_names.append(val1) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.planning_options.planning_scene_diff.robot_state.multi_dof_joint_state.transforms = [] for i in range(0, length): val1 = geometry_msgs.msg.Transform() _v554 = val1.translation _x = _v554 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v555 = val1.rotation _x = _v555 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) self.goal.planning_options.planning_scene_diff.robot_state.multi_dof_joint_state.transforms.append(val1) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.planning_options.planning_scene_diff.robot_state.multi_dof_joint_state.twist = [] for i in range(0, length): val1 = geometry_msgs.msg.Twist() _v556 = val1.linear _x = _v556 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v557 = val1.angular _x = _v557 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) self.goal.planning_options.planning_scene_diff.robot_state.multi_dof_joint_state.twist.append(val1) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.planning_options.planning_scene_diff.robot_state.multi_dof_joint_state.wrench = [] for i in range(0, length): val1 = geometry_msgs.msg.Wrench() _v558 = val1.force _x = _v558 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v559 = val1.torque _x = _v559 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) self.goal.planning_options.planning_scene_diff.robot_state.multi_dof_joint_state.wrench.append(val1) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.planning_options.planning_scene_diff.robot_state.attached_collision_objects = [] for i in range(0, length): val1 = moveit_msgs.msg.AttachedCollisionObject() start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val1.link_name = str[start:end].decode('utf-8') else: val1.link_name = str[start:end] _v560 = val1.object _v561 = _v560.header start = end end += 4 (_v561.seq,) = _get_struct_I().unpack(str[start:end]) _v562 = _v561.stamp _x = _v562 start = end end += 8 (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v561.frame_id = str[start:end].decode('utf-8') else: _v561.frame_id = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v560.id = str[start:end].decode('utf-8') else: _v560.id = str[start:end] _v563 = _v560.type start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v563.key = str[start:end].decode('utf-8') else: _v563.key = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v563.db = str[start:end].decode('utf-8') else: _v563.db = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v560.primitives = [] for i in range(0, length): val3 = shape_msgs.msg.SolidPrimitive() start = end end += 1 (val3.type,) = _get_struct_B().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sd'%length start = end end += struct.calcsize(pattern) val3.dimensions = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) _v560.primitives.append(val3) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v560.primitive_poses = [] for i in range(0, length): val3 = geometry_msgs.msg.Pose() _v564 = val3.position _x = _v564 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v565 = val3.orientation _x = _v565 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) _v560.primitive_poses.append(val3) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v560.meshes = [] for i in range(0, length): val3 = shape_msgs.msg.Mesh() start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val3.triangles = [] for i in range(0, length): val4 = shape_msgs.msg.MeshTriangle() start = end end += 12 val4.vertex_indices = numpy.frombuffer(str[start:end], dtype=numpy.uint32, count=3) val3.triangles.append(val4) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val3.vertices = [] for i in range(0, length): val4 = geometry_msgs.msg.Point() _x = val4 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) val3.vertices.append(val4) _v560.meshes.append(val3) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v560.mesh_poses = [] for i in range(0, length): val3 = geometry_msgs.msg.Pose() _v566 = val3.position _x = _v566 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v567 = val3.orientation _x = _v567 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) _v560.mesh_poses.append(val3) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v560.planes = [] for i in range(0, length): val3 = shape_msgs.msg.Plane() start = end end += 32 val3.coef = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=4) _v560.planes.append(val3) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v560.plane_poses = [] for i in range(0, length): val3 = geometry_msgs.msg.Pose() _v568 = val3.position _x = _v568 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v569 = val3.orientation _x = _v569 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) _v560.plane_poses.append(val3) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v560.subframe_names = [] for i in range(0, length): start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val3 = str[start:end].decode('utf-8') else: val3 = str[start:end] _v560.subframe_names.append(val3) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v560.subframe_poses = [] for i in range(0, length): val3 = geometry_msgs.msg.Pose() _v570 = val3.position _x = _v570 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v571 = val3.orientation _x = _v571 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) _v560.subframe_poses.append(val3) start = end end += 1 (_v560.operation,) = _get_struct_b().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val1.touch_links = [] for i in range(0, length): start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val2 = str[start:end].decode('utf-8') else: val2 = str[start:end] val1.touch_links.append(val2) _v572 = val1.detach_posture _v573 = _v572.header start = end end += 4 (_v573.seq,) = _get_struct_I().unpack(str[start:end]) _v574 = _v573.stamp _x = _v574 start = end end += 8 (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v573.frame_id = str[start:end].decode('utf-8') else: _v573.frame_id = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v572.joint_names = [] for i in range(0, length): start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val3 = str[start:end].decode('utf-8') else: val3 = str[start:end] _v572.joint_names.append(val3) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) _v572.points = [] for i in range(0, length): val3 = trajectory_msgs.msg.JointTrajectoryPoint() start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sd'%length start = end end += struct.calcsize(pattern) val3.positions = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sd'%length start = end end += struct.calcsize(pattern) val3.velocities = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sd'%length start = end end += struct.calcsize(pattern) val3.accelerations = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sd'%length start = end end += struct.calcsize(pattern) val3.effort = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) _v575 = val3.time_from_start _x = _v575 start = end end += 8 (_x.secs, _x.nsecs,) = _get_struct_2i().unpack(str[start:end]) _v572.points.append(val3) start = end end += 8 (val1.weight,) = _get_struct_d().unpack(str[start:end]) self.goal.planning_options.planning_scene_diff.robot_state.attached_collision_objects.append(val1) start = end end += 1 (self.goal.planning_options.planning_scene_diff.robot_state.is_diff,) = _get_struct_B().unpack(str[start:end]) self.goal.planning_options.planning_scene_diff.robot_state.is_diff = bool(self.goal.planning_options.planning_scene_diff.robot_state.is_diff) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: self.goal.planning_options.planning_scene_diff.robot_model_name = str[start:end].decode('utf-8') else: self.goal.planning_options.planning_scene_diff.robot_model_name = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.planning_options.planning_scene_diff.fixed_frame_transforms = [] for i in range(0, length): val1 = geometry_msgs.msg.TransformStamped() _v576 = val1.header start = end end += 4 (_v576.seq,) = _get_struct_I().unpack(str[start:end]) _v577 = _v576.stamp _x = _v577 start = end end += 8 (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v576.frame_id = str[start:end].decode('utf-8') else: _v576.frame_id = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val1.child_frame_id = str[start:end].decode('utf-8') else: val1.child_frame_id = str[start:end] _v578 = val1.transform _v579 = _v578.translation _x = _v579 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v580 = _v578.rotation _x = _v580 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) self.goal.planning_options.planning_scene_diff.fixed_frame_transforms.append(val1) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.planning_options.planning_scene_diff.allowed_collision_matrix.entry_names = [] for i in range(0, length): start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val1 = str[start:end].decode('utf-8') else: val1 = str[start:end] self.goal.planning_options.planning_scene_diff.allowed_collision_matrix.entry_names.append(val1) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.planning_options.planning_scene_diff.allowed_collision_matrix.entry_values = [] for i in range(0, length): val1 = moveit_msgs.msg.AllowedCollisionEntry() start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sB'%length start = end end += struct.calcsize(pattern) val1.enabled = numpy.frombuffer(str[start:end], dtype=numpy.bool, count=length) val1.enabled = map(bool, val1.enabled) self.goal.planning_options.planning_scene_diff.allowed_collision_matrix.entry_values.append(val1) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.planning_options.planning_scene_diff.allowed_collision_matrix.default_entry_names = [] for i in range(0, length): start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val1 = str[start:end].decode('utf-8') else: val1 = str[start:end] self.goal.planning_options.planning_scene_diff.allowed_collision_matrix.default_entry_names.append(val1) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sB'%length start = end end += struct.calcsize(pattern) self.goal.planning_options.planning_scene_diff.allowed_collision_matrix.default_entry_values = numpy.frombuffer(str[start:end], dtype=numpy.bool, count=length) self.goal.planning_options.planning_scene_diff.allowed_collision_matrix.default_entry_values = map(bool, self.goal.planning_options.planning_scene_diff.allowed_collision_matrix.default_entry_values) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.planning_options.planning_scene_diff.link_padding = [] for i in range(0, length): val1 = moveit_msgs.msg.LinkPadding() start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val1.link_name = str[start:end].decode('utf-8') else: val1.link_name = str[start:end] start = end end += 8 (val1.padding,) = _get_struct_d().unpack(str[start:end]) self.goal.planning_options.planning_scene_diff.link_padding.append(val1) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.planning_options.planning_scene_diff.link_scale = [] for i in range(0, length): val1 = moveit_msgs.msg.LinkScale() start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val1.link_name = str[start:end].decode('utf-8') else: val1.link_name = str[start:end] start = end end += 8 (val1.scale,) = _get_struct_d().unpack(str[start:end]) self.goal.planning_options.planning_scene_diff.link_scale.append(val1) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.planning_options.planning_scene_diff.object_colors = [] for i in range(0, length): val1 = moveit_msgs.msg.ObjectColor() start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val1.id = str[start:end].decode('utf-8') else: val1.id = str[start:end] _v581 = val1.color _x = _v581 start = end end += 16 (_x.r, _x.g, _x.b, _x.a,) = _get_struct_4f().unpack(str[start:end]) self.goal.planning_options.planning_scene_diff.object_colors.append(val1) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) self.goal.planning_options.planning_scene_diff.world.collision_objects = [] for i in range(0, length): val1 = moveit_msgs.msg.CollisionObject() _v582 = val1.header start = end end += 4 (_v582.seq,) = _get_struct_I().unpack(str[start:end]) _v583 = _v582.stamp _x = _v583 start = end end += 8 (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v582.frame_id = str[start:end].decode('utf-8') else: _v582.frame_id = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val1.id = str[start:end].decode('utf-8') else: val1.id = str[start:end] _v584 = val1.type start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v584.key = str[start:end].decode('utf-8') else: _v584.key = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: _v584.db = str[start:end].decode('utf-8') else: _v584.db = str[start:end] start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val1.primitives = [] for i in range(0, length): val2 = shape_msgs.msg.SolidPrimitive() start = end end += 1 (val2.type,) = _get_struct_B().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sd'%length start = end end += struct.calcsize(pattern) val2.dimensions = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) val1.primitives.append(val2) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val1.primitive_poses = [] for i in range(0, length): val2 = geometry_msgs.msg.Pose() _v585 = val2.position _x = _v585 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v586 = val2.orientation _x = _v586 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) val1.primitive_poses.append(val2) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val1.meshes = [] for i in range(0, length): val2 = shape_msgs.msg.Mesh() start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val2.triangles = [] for i in range(0, length): val3 = shape_msgs.msg.MeshTriangle() start = end end += 12 val3.vertex_indices = numpy.frombuffer(str[start:end], dtype=numpy.uint32, count=3) val2.triangles.append(val3) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val2.vertices = [] for i in range(0, length): val3 = geometry_msgs.msg.Point() _x = val3 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) val2.vertices.append(val3) val1.meshes.append(val2) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val1.mesh_poses = [] for i in range(0, length): val2 = geometry_msgs.msg.Pose() _v587 = val2.position _x = _v587 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v588 = val2.orientation _x = _v588 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) val1.mesh_poses.append(val2) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val1.planes = [] for i in range(0, length): val2 = shape_msgs.msg.Plane() start = end end += 32 val2.coef = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=4) val1.planes.append(val2) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val1.plane_poses = [] for i in range(0, length): val2 = geometry_msgs.msg.Pose() _v589 = val2.position _x = _v589 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v590 = val2.orientation _x = _v590 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) val1.plane_poses.append(val2) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val1.subframe_names = [] for i in range(0, length): start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: val2 = str[start:end].decode('utf-8') else: val2 = str[start:end] val1.subframe_names.append(val2) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) val1.subframe_poses = [] for i in range(0, length): val2 = geometry_msgs.msg.Pose() _v591 = val2.position _x = _v591 start = end end += 24 (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end]) _v592 = val2.orientation _x = _v592 start = end end += 32 (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end]) val1.subframe_poses.append(val2) start = end end += 1 (val1.operation,) = _get_struct_b().unpack(str[start:end]) self.goal.planning_options.planning_scene_diff.world.collision_objects.append(val1) _x = self start = end end += 12 (_x.goal.planning_options.planning_scene_diff.world.octomap.header.seq, _x.goal.planning_options.planning_scene_diff.world.octomap.header.stamp.secs, _x.goal.planning_options.planning_scene_diff.world.octomap.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: self.goal.planning_options.planning_scene_diff.world.octomap.header.frame_id = str[start:end].decode('utf-8') else: self.goal.planning_options.planning_scene_diff.world.octomap.header.frame_id = str[start:end] _x = self start = end end += 68 (_x.goal.planning_options.planning_scene_diff.world.octomap.origin.position.x, _x.goal.planning_options.planning_scene_diff.world.octomap.origin.position.y, _x.goal.planning_options.planning_scene_diff.world.octomap.origin.position.z, _x.goal.planning_options.planning_scene_diff.world.octomap.origin.orientation.x, _x.goal.planning_options.planning_scene_diff.world.octomap.origin.orientation.y, _x.goal.planning_options.planning_scene_diff.world.octomap.origin.orientation.z, _x.goal.planning_options.planning_scene_diff.world.octomap.origin.orientation.w, _x.goal.planning_options.planning_scene_diff.world.octomap.octomap.header.seq, _x.goal.planning_options.planning_scene_diff.world.octomap.octomap.header.stamp.secs, _x.goal.planning_options.planning_scene_diff.world.octomap.octomap.header.stamp.nsecs,) = _get_struct_7d3I().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: self.goal.planning_options.planning_scene_diff.world.octomap.octomap.header.frame_id = str[start:end].decode('utf-8') else: self.goal.planning_options.planning_scene_diff.world.octomap.octomap.header.frame_id = str[start:end] start = end end += 1 (self.goal.planning_options.planning_scene_diff.world.octomap.octomap.binary,) = _get_struct_B().unpack(str[start:end]) self.goal.planning_options.planning_scene_diff.world.octomap.octomap.binary = bool(self.goal.planning_options.planning_scene_diff.world.octomap.octomap.binary) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) start = end end += length if python3: self.goal.planning_options.planning_scene_diff.world.octomap.octomap.id = str[start:end].decode('utf-8') else: self.goal.planning_options.planning_scene_diff.world.octomap.octomap.id = str[start:end] start = end end += 8 (self.goal.planning_options.planning_scene_diff.world.octomap.octomap.resolution,) = _get_struct_d().unpack(str[start:end]) start = end end += 4 (length,) = _struct_I.unpack(str[start:end]) pattern = '<%sb'%length start = end end += struct.calcsize(pattern) self.goal.planning_options.planning_scene_diff.world.octomap.octomap.data = numpy.frombuffer(str[start:end], dtype=numpy.int8, count=length) _x = self start = end end += 28 (_x.goal.planning_options.planning_scene_diff.is_diff, _x.goal.planning_options.plan_only, _x.goal.planning_options.look_around, _x.goal.planning_options.look_around_attempts, _x.goal.planning_options.max_safe_execution_cost, _x.goal.planning_options.replan, _x.goal.planning_options.replan_attempts, _x.goal.planning_options.replan_delay,) = _get_struct_3BidBid().unpack(str[start:end]) self.goal.planning_options.planning_scene_diff.is_diff = bool(self.goal.planning_options.planning_scene_diff.is_diff) self.goal.planning_options.plan_only = bool(self.goal.planning_options.plan_only) self.goal.planning_options.look_around = bool(self.goal.planning_options.look_around) self.goal.planning_options.replan = bool(self.goal.planning_options.replan) return self except struct.error as e: raise genpy.DeserializationError(e) #most likely buffer underfill
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def deserialize_numpy(self, str, numpy):\n try:\n end = 0\n _x = self\n start = end\n end += 152\n (_x.tcp, _x.ori, _x.zone, _x.vacuum, _x.workx, _x.worky, _x.workz, _x.workq0, _x.workqx, _x.workqy, _x.workqz, _x.toolx, _x.tooly, _x.toolz, _x.toolq0, _x.toolqx, _x.toolqy, _x.toolqz, _x....
[ "0.8090085", "0.79770607", "0.7917897", "0.7906423", "0.7893816", "0.78317606", "0.78120494", "0.7810609", "0.7784728", "0.77594984", "0.7740543", "0.77159595", "0.77151734", "0.7697443", "0.7693122", "0.768625", "0.76731443", "0.763944", "0.7637318", "0.7629651", "0.7625018"...
0.68092334
90
Compute the log function of the pdf for a fixed value on the support.
def log_pdf_at_x(x): return lambda point: gs.log( self.information_manifold.point_to_pdf(point)(x) )
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def logPdf(self,x):\n logPdf = np.log(self.pdf(x))\n return logPdf", "def logPdf(self,x):\n logPdf = np.log(self.pdf(x))\n return logPdf", "def log_pdf(self, x):\n if x < 0:\n raise Exception(\"input value x can't be a negative value!\")\n\n if self.is_fit:\n if ...
[ "0.808809", "0.808809", "0.7765762", "0.767868", "0.7636893", "0.74008185", "0.7215648", "0.7135841", "0.7101646", "0.7030553", "0.6977651", "0.6970404", "0.6965355", "0.6961038", "0.6950404", "0.6910325", "0.6866383", "0.68497586", "0.68354607", "0.6822285", "0.6806993", "...
0.7301884
6
Compute the derivative of the logpdf with respect to the parameters.
def log_pdf_derivative(x): return gs.autodiff.jacobian(log_pdf_at_x(x))(base_point)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def log_pdf_derivative_squared(x):\n dlog = log_pdf_derivative(x)\n return gs.einsum(\"...i, ...j -> ...ij\", dlog, dlog)", "def logpdf(self, x):\n if self.transform is not None:\n x = self.transform(x) \n return (-self.alpha-1)*np.log(x) - (self.beta/float(x)...
[ "0.77660567", "0.70519257", "0.6876588", "0.6850686", "0.67922556", "0.677512", "0.67627126", "0.67627126", "0.6756322", "0.67217326", "0.67073756", "0.65952337", "0.6584878", "0.6568949", "0.65437335", "0.6536892", "0.65261656", "0.65239733", "0.651334", "0.6512677", "0.6508...
0.82203406
0
Compute the square (in matrix terms) of dlog. This is the variable whose expectance is the FisherRao information.
def log_pdf_derivative_squared(x): dlog = log_pdf_derivative(x) return gs.einsum("...i, ...j -> ...ij", dlog, dlog)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def logdim():\n dim = Real(\"yolo4\", \"reciprocal\", 1.0, 10.0, shape=(3, 2))\n return dim", "def dloglam(self):\n # This number was determined using the resolution and sampling quoted on the FIRE website\n R = 6000.0 * 2.7\n dloglam = 1.0 / R / np.log(10.0)\n return dloglam", ...
[ "0.63612115", "0.63412535", "0.6210124", "0.6097916", "0.60911155", "0.60809803", "0.60428435", "0.60420275", "0.6025387", "0.601383", "0.6008682", "0.59616804", "0.5944786", "0.5878604", "0.5871771", "0.5864707", "0.5863798", "0.58423436", "0.5829568", "0.5821031", "0.581717...
0.6198977
3
r"""Compute the derivative of the innerproduct matrix. Compute the derivative of the innerproduct matrix of the Fisher information metric at the tangent space at base point.
def inner_product_derivative_matrix(self, base_point): def pdf(x): """Compute pdf at a fixed point on the support. Parameters ---------- x : float, shape (,) Point on the support of the distribution """ return lambda point: self.information_manifold.point_to_pdf(point)(x) def _function_to_integrate(x): pdf_x = pdf(x) pdf_x_at_base_point = pdf_x(base_point) pdf_x_derivative = gs.autodiff.jacobian(pdf_x) pdf_x_derivative_at_base_point = pdf_x_derivative(base_point) return ( 1 / (pdf_x_at_base_point**2) * ( 2 * pdf_x_at_base_point * gs.einsum( "...ij, ...k -> ...ijk", gs.autodiff.jacobian(pdf_x_derivative)(base_point), pdf_x_derivative_at_base_point, ) + gs.einsum( "...i, ...j, ...k -> ...ijk", pdf_x_derivative_at_base_point, pdf_x_derivative_at_base_point, pdf_x_derivative_at_base_point, ) ) ) return quad_vec(_function_to_integrate, *self.support)[0]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def integrability_tensor_derivative(\n self,\n horizontal_vec_x,\n horizontal_vec_y,\n nabla_x_y,\n tangent_vec_e,\n nabla_x_e,\n base_point,\n ):\n raise NotImplementedError", "def derivatives(x_p, y_p):\r\n # set up the matrix equation\r\n n = x_...
[ "0.65636075", "0.6383123", "0.6320185", "0.6274132", "0.62254035", "0.6178101", "0.6175668", "0.6127627", "0.61223304", "0.61122054", "0.61108375", "0.60562176", "0.60325277", "0.6020855", "0.6019261", "0.6014277", "0.60129786", "0.60129786", "0.5989726", "0.59852016", "0.598...
0.6529994
1
Compute pdf at a fixed point on the support.
def pdf(x): return lambda point: self.information_manifold.point_to_pdf(point)(x)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pdf(x, point):\n raise NotImplementedError(\"The pdf method has not yet been implemented.\")", "def pdf(self, x):\n raise NotImplementedError", "def pdf(self,x):\n returnPdf = self._distribution.pdf(x)\n return returnPdf", "def pdf(self,x):\n if self.base == 'natural':\n pdfVa...
[ "0.7687768", "0.74538267", "0.74296933", "0.73647636", "0.7215672", "0.71905404", "0.7085889", "0.70647675", "0.70454675", "0.69965947", "0.69869745", "0.69869745", "0.697386", "0.6928952", "0.6928614", "0.69227785", "0.69120353", "0.684598", "0.68387115", "0.6809058", "0.678...
0.73273325
4
Normalize the features in the data set.
def normalize_features(df): mu = df.mean() sigma = df.std() if (sigma == 0).any(): raise Exception("One or more features had the same value for all samples, and thus could " + \ "not be normalized. Please do not include features with only a single value " + \ "in your model.") df_normalized = (df - df.mean()) / df.std() return df_normalized, mu, sigma
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def normalizeFeatureVector(self):\n # Normalize features\n total = 0.0\n for v in self.features.values(): total += abs(v)\n if total == 0.0: \n total = 1.0\n for k,v in self.features.iteritems():\n self.features[k] = float(v) / total", "def _normalize(self...
[ "0.79551655", "0.79528546", "0.7853807", "0.77867204", "0.7698743", "0.76595855", "0.76581943", "0.7635334", "0.76207286", "0.7542891", "0.75298584", "0.74793464", "0.74740255", "0.7413795", "0.7318681", "0.73162293", "0.7313582", "0.72916085", "0.72567785", "0.7242953", "0.7...
0.7320142
15
Compute the cost function given a set of features / values, and the values for our thetas.
def compute_cost(features, values, theta): # your code here error = (values - features.dot(theta)) cost = error.dot(error) return cost
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def compute_cost(features, values, theta):\r\n m = len(values)\r\n sum_of_square_errors = numpy.square(numpy.dot(features, theta) - values).sum()\r\n cost = sum_of_square_errors / (2*m)\r\n\r\n return cost", "def compute_cost(features, values, theta):\n m = len(values)\n sum_of_square_errors = ...
[ "0.72324276", "0.7181755", "0.71723294", "0.69701", "0.69247854", "0.6471834", "0.6227543", "0.6182345", "0.617613", "0.6167203", "0.6144014", "0.6132684", "0.61300564", "0.6123157", "0.6107986", "0.6094501", "0.60778195", "0.6051131", "0.60425967", "0.60174876", "0.60173744"...
0.74634284
0
Perform gradient descent given a data set with an arbitrary number of features.
def gradient_descent(features, values, theta, alpha, num_iterations): m = len(values) cost_history = [] for i in range(num_iterations): # your code here cost = compute_cost(features, values, theta)/(2.0*m) cost_history.append([cost]) error = features.dot(theta) - values error = np.reshape(error,(error.shape[0], 1)) errorWeighted = features*error errorSum = (np.sum(errorWeighted,0))/(m*1.0) theta = theta - alpha*errorSum return theta, pandas.Series(cost_history)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def gradient_descent(features, labels, alpha, num_iters):\n # Initial settings of weights\n weights = [0, 0, 0]\n\n # Length of dataset\n N = len(features[0])\n\n # Take 100 gradient steps\n gradient_losses = [0, 0, 0]\n\n # Take num_iters steps of gradient descent\n for step in range(num_i...
[ "0.7502321", "0.73805606", "0.72277737", "0.7210376", "0.71823865", "0.7039117", "0.6943254", "0.69380903", "0.6851058", "0.68016803", "0.66611814", "0.6622531", "0.6600367", "0.65702754", "0.656558", "0.655788", "0.65387475", "0.6533046", "0.6499761", "0.64804655", "0.643184...
0.7124435
5
Reset all counters and greedy parameter
def reset(self): self.c_count = 0 self.a_count = -1 self.epsilon = self.init_epsilon
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reset (self):\n self.counter = 0", "def reset(self):\n self.counter = 0", "def reset(self):\n self.algo_state = {}\n self.actual_repetitions = 0\n self.next_session = -1\n self.last_session = -1\n self.past_quality = []", "def reset(self):\n self.te...
[ "0.706285", "0.70557153", "0.69341266", "0.6901927", "0.6901927", "0.6901927", "0.68682015", "0.6837828", "0.6697244", "0.6697244", "0.6697244", "0.6695066", "0.66831166", "0.66431034", "0.66348666", "0.65636104", "0.65636104", "0.65636104", "0.64995754", "0.64995754", "0.649...
0.69747984
2
Policy that selects one of the available actions at random
def random_action(self, action_list=None): # sample from all actions if action_list is None: return np.random.choice(self.actions) # sample from a subset of actions else: return np.random.choice(action_list)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getAction(self, state):\n # Pick Action\n legalActions = self.getLegalActions(state)\n action = None\n \"*** YOUR CODE HERE ***\"\n # util.raiseNotDefined()\n if random.random() < self.epsilon:\n action = random.choice(legalActions)\n else:\n action = self.getPolicy(state)\n ...
[ "0.7818525", "0.77571136", "0.7665768", "0.76560175", "0.7534476", "0.7534476", "0.7523864", "0.750895", "0.750895", "0.7486864", "0.74745595", "0.74528134", "0.7383261", "0.7376664", "0.7366769", "0.73616487", "0.732289", "0.73151815", "0.7300658", "0.72869414", "0.72837925"...
0.7174809
32
Clone structure and weights and compile
def update_target_network(self): self.target_Qmodel = clone_model(self.Qmodel) self.target_Qmodel.set_weights(self.Qmodel.get_weights()) # target network is never compiled self.target_Qmodel.compile(loss='mse', optimizer=Adam())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def meta_clone(self, include_buffers=False):\n if include_buffers:\n self.buffers_clone = {k: v.data.clone()\n for k, v in self.named_buffers()}\n self.params_clone = {k: v.data.clone()\n for k, v in self.named_parameters()}\n ...
[ "0.64318305", "0.6379705", "0.6327976", "0.6265465", "0.6256646", "0.62523013", "0.61420536", "0.6140329", "0.613779", "0.61183465", "0.6103677", "0.6048058", "0.603064", "0.6028374", "0.60247666", "0.5962394", "0.5946479", "0.5925313", "0.590854", "0.5892423", "0.58535075", ...
0.0
-1
Predict movement of game controler where is epsilon probability randomly move.
def eps_greedy_action(self, phi, tabu): # increase counter of actions taken self.a_count += 1 # if within the initial buffer before learning starts, random action aval_actions = None if self.a_count < self.warmup: if len(tabu) > 0: # Remove tabu actions from list of available actions aval_actions = [a for a in self.actions if a not in tabu] action = self.random_action(aval_actions) return action, None elif (self.a_count == self.warmup) and self.verbose: print('learning starts') # evaluate Q(phi, a) for each action qvalues = self.Qmodel.predict(phi, batch_size=1)[0] # generate random value randn = np.random.uniform() # eliminate tabu values from possible actions to pick aval_actions = None if len(tabu) > 0: if randn < self.epsilon: aval_actions = [a for a in self.actions if a not in tabu] else: # Update Qs to low values to ensure they are not picked tabu_idx = [i for i in range(self.num_actions) if self.actions[i] in tabu] qvalues[tabu_idx] = -9999 # eps-greedy, select random action if randn < self.epsilon: action = self.random_action(aval_actions) a_i = self.action_str2idx(action) else: # select best action a_i = np.argmax(qvalues) action = self.actions[a_i] # update greedy parameter and action count self.epsilon *= self.discount_epsilon self.a_count += 1 return action, qvalues[a_i]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def predict_movement(self, data, epsilon):\n\n q_actions = self.model.predict(data, batch_size = 1)\n opt_policy = np.argmax(q_actions)\n rand_val = np.random.random()\n if rand_val < epsilon:\n opt_policy = np.random.randint(0, NUM_ACTIONS)\n return opt_policy, q_acti...
[ "0.702739", "0.69440806", "0.61970955", "0.60627735", "0.60549825", "0.6046344", "0.5988161", "0.5935208", "0.59265876", "0.59182566", "0.58736765", "0.5839762", "0.58332235", "0.5812775", "0.5812775", "0.5780309", "0.5775754", "0.5767696", "0.57500184", "0.57460207", "0.5745...
0.0
-1
Calculate yj = rj + gamma argmaxQ or yj = rj (terminating state) This is the target value used to train the neural network and it uses the target network to make predictions
def get_target(self, batch): # initialise array to store yj values target = np.zeros((len(batch[0]), self.num_actions)) # loop over samples in the minibatch for j in range(len(batch[0])): a0_i = self.action_str2idx(batch[1][j]) r0 = batch[2][j] done = batch[3][j] s1 = batch[4][j] # if terminating state if done: target[j, a0_i] = r0 else: qs_target = self.target_Qmodel.predict(s1) target[j, a0_i] = r0 + self.gamma * np.max(qs_target) return target
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Q_net(self, state):\n\t\tif not self._prediction_made: \n\t\t\tQ = tf.matmul(tf.nn.relu( tf.matmul(state, self.weights_hidden) + self.bias_hidden ), self.weights_out) + self.bias_out \n\t\t\tself._Qval = Q\t\n\t\t\tself._prediction_made = True\n\t\treturn self._Qval", "def final_result(self, board):\n ...
[ "0.6133086", "0.59240603", "0.59210104", "0.58679605", "0.586299", "0.5832981", "0.58184266", "0.58139116", "0.58036226", "0.5798045", "0.5787385", "0.5786582", "0.5784244", "0.57797366", "0.5778133", "0.57767266", "0.57760173", "0.5755751", "0.57456607", "0.5729801", "0.5724...
0.59281206
1
Perform one step of gradient descent on (yj Q(phi, aj, w))^2
def one_step_gd(self, batch): # get target values yj targets = self.get_target(batch) phi_input = np.vstack(batch[0]) masks = self.get_masks(batch[1]) dummy_targets = targets.max(axis=1) X = [phi_input, targets, masks] Y = [dummy_targets, targets] # update main network with one step of gradient descent # self.Qmodel.fit(X, Y, batch_size=len(X)) # pdb.set_trace() metrics = self.train_model.train_on_batch(X, Y) # every fixed number of steps, update target network self.c_count += 1 # print(self.c_count, self.c) if self.c_count == self.c: # if self.verbose: # print('* Target network updated') # update target network to be equal the main network self.update_target_network() # reset counter self.c_count = 0 return metrics[0]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def learning_by_gradient_descent(y, tx, w, gamma):\n loss = calculate_loss(y,tx,w)\n grad = calculate_gradient(y,tx,w)\n w_new = w - gamma*grad\n #grad is for debugging purpose\n return loss, w_new,grad", "def learning_by_gradient_descent(y, tx, w, gamma):\n loss = calculate_loss(y,tx,w)\n g...
[ "0.7216477", "0.71876305", "0.71149236", "0.7052852", "0.7013499", "0.69575596", "0.69293684", "0.68894744", "0.6888488", "0.688774", "0.6869979", "0.68588704", "0.6835098", "0.6807218", "0.6702064", "0.66813123", "0.66674036", "0.65884393", "0.6562325", "0.6562148", "0.65378...
0.0
-1
Small function to build the correct argtypes for the LibXC computers
def _build_comute_argtype(num_nd, num_nd_write): ret = [_xc_func_p, ctypes.c_size_t] ret += [_ndptr] * num_nd ret += [_ndptr_w] * num_nd_write return tuple(ret)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cmd_type(args):", "def _cast_types(args):\n\targs.x_val = None if args.x_val == 'None' else int(args.x_val)\n\targs.test_size = float(args.test_size)\n\targs.alpha = float(args.alpha)\n\targs.fit_prior = (args.fit_prior in ['True', \"True\", 'true', \"true\"])\n\n\t# class_prior - array like type (problem to...
[ "0.6376518", "0.58763367", "0.58502054", "0.5712465", "0.5642069", "0.5633545", "0.56088585", "0.5531215", "0.5515016", "0.550904", "0.5504691", "0.5500384", "0.54895383", "0.5458106", "0.5442237", "0.53984636", "0.5386691", "0.5374875", "0.53544724", "0.5347694", "0.5341656"...
0.6243665
1
A specialized function built to construct and check the sizes of arrays given to the LibXCFunctional class.
def _check_arrays(current_arrays, fields, sizes, factor, required): # Nothing supplied so we build it out if current_arrays is None: current_arrays = {} for label in fields: if required: size = sizes[label] current_arrays[label] = np.zeros((factor, size)) else: current_arrays[label] = None # np.empty((1)) return current_arrays
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _checkSize(X1,X2):\n \n if len(X1) != len(X2):\n raise ValueError, 'Lists are differnt lengths'", "def check_array_shape(logger, arr, name, expected_shape):\n shape = arr.shape\n check_array_ndim(arr, name, len(expected_shape))\n for i in range(len(shape)):\n check_array_dim(logg...
[ "0.6265682", "0.620982", "0.61681736", "0.6165635", "0.612598", "0.6100851", "0.606523", "0.60568863", "0.6044883", "0.60175836", "0.6015358", "0.60039693", "0.599243", "0.59703016", "0.59418064", "0.5937286", "0.59317034", "0.59271264", "0.59253454", "0.5924653", "0.59069985...
0.5808242
54
The primary LibXCFunctional class used to build and compute DFT exchangecorrelation quantities.
def __init__(self, func_name, spin): self.xc_func = None self._xc_func_init = False # Handle func_name if isinstance(func_name, str): func_id = util.xc_functional_get_number(func_name) if func_id == -1: raise KeyError("LibXCFunctional: name '%s' not found." % func_name) elif isinstance(func_name, (int, np.integer)): func_id = func_name if util.xc_functional_get_name(func_name) is None: raise KeyError("LibXCFunctional: ID '%d' not found." % func_name) else: raise TypeError("LibXCFunctional: func_name must either be a string or int. Got {}".format(func_name)) self._xc_func_name = util.xc_functional_get_name(func_id) # Handle spin if isinstance(spin, str): spin = spin.lower() if spin == "polarized": self._spin = 2 elif spin == "unpolarized": self._spin = 1 else: raise KeyError("LibXCFunctional: spin must either be 'polarized' or 'unpolarized' if represented by a string. Got {}".format(spin)) else: self._spin = spin if self._spin not in [1, 2]: raise KeyError("LibXCFunctional: spin must either be 1 or 2 if represented by a integer. Got {}".format(self._spin)) # Build the LibXC functional self.xc_func = core.xc_func_alloc() self.xc_func_size_names = [x for x in dir(self.xc_func.contents.dim) if not "_" in x] # Set all int attributes to zero (not all set to zero in libxc) for attr in self.xc_func_size_names: setattr(self.xc_func.contents, attr, 0) ret = core.xc_func_init(self.xc_func, func_id, self._spin) if ret != 0: raise ValueError("LibXC Functional construction did not complete. Error code %d" % ret) self._xc_func_init = True # Pull out all sizes after init self.xc_func_sizes = {} for attr in self.xc_func_size_names: self.xc_func_sizes[attr] = getattr(self.xc_func.contents.dim, attr) # Unpack functional info self.xc_func_info = core.xc_func_get_info(self.xc_func) self._number = core.xc_func_info_get_number(self.xc_func_info) self._kind = core.xc_func_info_get_kind(self.xc_func_info) self._name = core.xc_func_info_get_name(self.xc_func_info).decode("UTF-8") self._family = core.xc_func_info_get_family(self.xc_func_info) self._flags = core.xc_func_info_get_flags(self.xc_func_info) # Set needed flags self._needs_laplacian = self._flags & flags.XC_FLAGS_NEEDS_LAPLACIAN # Set derivatives self._have_exc = self._flags & flags.XC_FLAGS_HAVE_EXC self._have_vxc = self._flags & flags.XC_FLAGS_HAVE_VXC self._have_fxc = self._flags & flags.XC_FLAGS_HAVE_FXC self._have_kxc = self._flags & flags.XC_FLAGS_HAVE_KXC self._have_lxc = self._flags & flags.XC_FLAGS_HAVE_LXC # Set omega self._have_cam = self._flags & flags.XC_FLAGS_HYB_CAM self._have_cam |= self._flags & flags.XC_FLAGS_HYB_CAMY self._have_cam |= self._flags & flags.XC_FLAGS_HYB_LC self._have_cam |= self._flags & flags.XC_FLAGS_HYB_LCY self._cam_omega = self._cam_alpha = self._cam_beta = False if self._have_cam: self._cam_omega = self.xc_func.contents.cam_omega self._cam_alpha = self.xc_func.contents.cam_alpha self._cam_beta = self.xc_func.contents.cam_beta elif self._family in [flags.XC_FAMILY_HYB_LDA, flags.XC_FAMILY_HYB_GGA, flags.XC_FAMILY_HYB_MGGA]: self._cam_alpha = self.xc_func.contents.cam_alpha # VV10 self._have_vv10 = self._flags & flags.XC_FLAGS_VV10 self._nlc_b = self._nlc_C = False if self._have_vv10: self._nlc_b = self.xc_func.contents.nlc_b self._nlc_C = self.xc_func.contents.nlc_C # Stable self._stable = self._flags & flags.XC_FLAGS_STABLE self._dev = self._flags & flags.XC_FLAGS_DEVELOPMENT # Pull out references self._refs = [] self._bibtexs = [] self._dois = [] for pos in range(flags.XC_MAX_REFERENCES): ref = core.xc_func_info_get_references(self.xc_func_info, pos) if not ref: break self._refs.append(ref.contents.ref.decode("UTF-8")) self._bibtexs.append(ref.contents.bibtex.decode("UTF-8")) self._dois.append(ref.contents.doi.decode("UTF-8"))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_QFT(self):\n op = qml.QFT(wires=range(3))\n res = op.matrix()\n exp = QFT\n assert np.allclose(res, exp)", "def _function_class(self):\n return FriCASExpectFunction", "def calc_Cinv_FC(P_design_W, FC_cost_data):\n # if the Q_design is below the lowest capacity ava...
[ "0.5634133", "0.5603821", "0.5425639", "0.53961235", "0.5307997", "0.5247506", "0.5236571", "0.5233002", "0.52122086", "0.519866", "0.5186619", "0.51836646", "0.5171188", "0.51476127", "0.51282215", "0.51221067", "0.5082539", "0.5082539", "0.50807905", "0.5078336", "0.5075296...
0.5122659
15
Cleans up the LibXC C struct on deletion
def __del__(self): if self.xc_func is None: return if self._xc_func_init: core.xc_func_end(self.xc_func) core.xc_func_free(self.xc_func)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __del__(self):\n #self.myCModule.free_array(self.arrayRef)\n pass", "def cleanup(self):\n\n self.PLC['1'].set_plc_mode(0)\n self.PLC['1'].plc_clear('all')\n super(Test200SmartSanityClear005, self).cleanup()", "def _clean_up(self):", "def cleanup(self):\n self._tm...
[ "0.6692683", "0.64728636", "0.6445634", "0.6374687", "0.63566375", "0.63566375", "0.63566375", "0.63114005", "0.6220566", "0.62159604", "0.62110907", "0.6195016", "0.61885726", "0.6173303", "0.6173303", "0.615202", "0.6146283", "0.6124178", "0.61184067", "0.6114401", "0.61109...
0.5984679
53
Provides a simple string representation with functional name data.
def __repr__(self): return '<%s.%s (%s) object at %s>' % (self.__class__.__module__, self.__class__.__name__, self._xc_func_name, hex(id(self)))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def name(self):\n name = self.function_name\n\n # Feature type is based on additional data that used\n # for example if insight is for Healthsites Facilities\n # than feature type is Healthsites Facilities\n\n if self.feature_type:\n name = '%s for %s' % (name, self.fe...
[ "0.70717007", "0.6821342", "0.67295676", "0.67295676", "0.6623396", "0.6613039", "0.66009283", "0.6593334", "0.65830815", "0.654439", "0.6526365", "0.6526365", "0.6526365", "0.6526365", "0.6526365", "0.6521252", "0.6521252", "0.6521252", "0.6521252", "0.65120167", "0.6506895"...
0.0
-1
Prints out a short description of the functional
def describe(self): ret = [] ret.append("Functional ID: %s" % self._number) ret.append("Functional Name: %s" % self._xc_func_name) ret.append("Attributes:") ret.append(" Name: %s" % self._name) ret.append(" Kind: %d" % self._kind) ret.append(" Family: %d" % self._family) ret.append("Citations:") for x in self._refs: ret.append(" " + x) return "\n".join(ret)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __repr__(self):\n\t\treturn self.func.__doc__", "def __repr__(self):\r\n return self.func.__doc__", "def __repr__(self):\r\n return self.func.__doc__", "def __repr__(self):\r\n return self.func.__doc__", "def __repr__(self):\r\n return self.func.__doc__", "def __repr__(sel...
[ "0.7420096", "0.73075235", "0.73075235", "0.73075235", "0.73075235", "0.73075235", "0.72935873", "0.72935873", "0.72935873", "0.72896236", "0.7270395", "0.7270395", "0.7270395", "0.7270395", "0.7270395", "0.7270395", "0.7270395", "0.7270395", "0.7167525", "0.7109541", "0.6981...
0.6748803
24
Returns the LibXCFunctional ID.
def get_number(self): return self._number
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getId(self):\n return _libsbml.FunctionDefinition_getId(self)", "def get_func_id_from_tsuid(self, tsuid):\n check_type(value=tsuid, allowed_types=str, var_name=\"tsuid\", raise_exception=True)\n\n response = self.send(root_url=self.session.dm_url + self.root_url,\n ...
[ "0.65617096", "0.63113815", "0.6098559", "0.6041057", "0.59945154", "0.5900914", "0.587187", "0.58197254", "0.5804145", "0.5734139", "0.57230854", "0.5713289", "0.57015187", "0.5693463", "0.56737447", "0.5662043", "0.56479746", "0.5644955", "0.5611577", "0.5568527", "0.556456...
0.0
-1
Returns the LibXCFunctional kind.
def get_kind(self): return self._kind
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_type(self):\n return self.get_udev_property('ID_FS_TYPE')", "def kind(self):\n return self.get_data(\"kind\")", "def kind(self) -> str:\n return pulumi.get(self, \"kind\")", "def kind(self) -> str:\n return pulumi.get(self, \"kind\")", "def kind(self) -> str:\n re...
[ "0.5934257", "0.5878089", "0.582752", "0.582752", "0.582752", "0.582752", "0.582752", "0.582752", "0.582752", "0.582752", "0.582752", "0.582752", "0.582752", "0.582752", "0.582752", "0.582752", "0.582752", "0.582752", "0.582752", "0.582752", "0.582752", "0.582752", "0.582...
0.552994
45
Returns the LibXCFunctional name.
def get_name(self): return self._name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def name(self):\n name = self.function_name\n\n # Feature type is based on additional data that used\n # for example if insight is for Healthsites Facilities\n # than feature type is Healthsites Facilities\n\n if self.feature_type:\n name = '%s for %s' % (name, self.fe...
[ "0.66209394", "0.6552643", "0.6552643", "0.6492396", "0.6492396", "0.64339757", "0.64050496", "0.63731533", "0.6299338", "0.622816", "0.6214293", "0.617792", "0.61538583", "0.61080116", "0.6059312", "0.5927638", "0.58204305", "0.58170474", "0.58135116", "0.58068055", "0.57791...
0.0
-1
Returns the LibXCFunctional family.
def get_family(self): return self._family
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_01_GetFamily(self):\n self.m_device_obj.DeviceFamily = TESTING_FAMILY_NAME_1\n l_family = FamUtil.get_family(self.m_device_obj)\n # print(PrettyFormatAny.form(l_family, 'B3-01-A - Family'))\n self.assertEqual(l_family, TESTING_FAMILY_NAME_1)", "def test_02_GetFamily(self):\n ...
[ "0.6671878", "0.66315264", "0.6380709", "0.6380162", "0.62706983", "0.62706983", "0.62412816", "0.62412816", "0.62412816", "0.6231695", "0.6231695", "0.6231695", "0.6102895", "0.6017814", "0.5974126", "0.5966167", "0.58548194", "0.57114094", "0.5633405", "0.5601125", "0.55779...
0.68424135
0
Returns the LibXCFunctional flags.
def get_flags(self): return self._flags
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def feature_flags(self):\r\n return self.env_tokens.get('FEATURES', dict())", "def get_flags(cls):\n return cls.get_short_flag(), cls.get_flag()", "def get_flags(self):\n return self.short_flag, self.long_flag", "def get_system_flags(self):\n\t\treturn call_sdk_function('PrlVmCfg_GetSyst...
[ "0.68110704", "0.66530377", "0.6499626", "0.6473792", "0.64643645", "0.6449167", "0.6381851", "0.6338008", "0.6265147", "0.6250086", "0.6250086", "0.6250086", "0.6250086", "0.62319344", "0.62319344", "0.62319344", "0.62319344", "0.6223301", "0.61941856", "0.61895657", "0.6145...
0.6317779
8
Returns the LibXCFunctional references.
def get_references(self): return self._refs
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def function_refs(self) -> List[FunctionReference]:\n return self._function_refs", "def getXRefsTo(self):\r\n # type: () -> (list[int], list[int])\r\n crefs = []\r\n drefs = []\r\n # If the current address is function process it\r\n if idc.get_func_flags(self.func_ea) !=...
[ "0.69382197", "0.6387038", "0.6072197", "0.58689415", "0.5774684", "0.57471573", "0.57462764", "0.57416767", "0.5685982", "0.561145", "0.5598167", "0.5594494", "0.55660653", "0.5555497", "0.55140364", "0.55033904", "0.5478641", "0.54763013", "0.5456211", "0.5435863", "0.54161...
0.56396455
9
Returns the LibXCFunctional bibtex references.
def get_bibtex(self): return self._bibtexs
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def references(self):\n ref_nodes = self.root.xpath(\".//bib-reference\")\n return list(\n itertools.chain.from_iterable(\n self.get_reference_iter(node) for node in ref_nodes\n )\n )", "def get_refs(func):\n found = re.findall(\"References:(.*)\",...
[ "0.69096875", "0.63146305", "0.6111194", "0.6034255", "0.5903538", "0.5896246", "0.58946764", "0.58436126", "0.5805503", "0.5782022", "0.5763529", "0.5747076", "0.5733833", "0.57011646", "0.5679117", "0.56542027", "0.5642207", "0.56400794", "0.55577713", "0.55523235", "0.5548...
0.5591979
18
Returns the LibXCFunctional reference DOIs.
def get_doi(self): return self._dois
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def list_defect_refs(self):\n print('-----------\\nDEFECT_REFs\\n-----------')\n self._print_dict(self.defect_refs)", "def list_refs(self):\n pass", "def references(self) -> \"IterableList[Reference]\":\n return Reference.list_items(self)", "def list_defect_ref_keys(self):\n ...
[ "0.6066506", "0.59986335", "0.581545", "0.57736564", "0.5760365", "0.573005", "0.5729725", "0.5693465", "0.5646567", "0.5640934", "0.56323737", "0.55529517", "0.5526186", "0.5518354", "0.55112725", "0.5438071", "0.5417537", "0.5400339", "0.53872216", "0.5386622", "0.53764004"...
0.0
-1
Returns the amount of global exchange to include.
def get_hyb_exx_coef(self): if self._family not in [flags.XC_FAMILY_HYB_LDA, flags.XC_FAMILY_HYB_GGA, flags.XC_FAMILY_HYB_MGGA]: raise ValueError("get_hyb_exx_coef can only be called on hybrid functionals.") if self._have_cam: raise ValueError("get_hyb_exx_coef cannot be called on range-separated functionals.") return self._cam_alpha
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_total_instruments(self):\n\n total = 0\n for exchange in self.exchanges:\n total += len(exchange.symbols)\n return total", "def CountGlobal():\r\n return _hiew.HiewGate_Names_CountGlobal()", "def getGlobalSize(self):\n return self._get_global_size( )", "d...
[ "0.6179084", "0.57443017", "0.5690381", "0.54959685", "0.5471419", "0.5430132", "0.54086834", "0.5376728", "0.53472584", "0.532548", "0.52933073", "0.5260959", "0.52479035", "0.52417845", "0.5236068", "0.52341425", "0.52264065", "0.5225553", "0.5212044", "0.5207183", "0.51927...
0.0
-1
Returns the (omega, alpha, beta) quantities
def get_cam_coef(self): if self._family not in [flags.XC_FAMILY_HYB_LDA, flags.XC_FAMILY_HYB_GGA, flags.XC_FAMILY_HYB_MGGA]: raise ValueError("get_cam_coef can only be called on hybrid functionals.") if not self._have_cam: raise ValueError("get_cam_coef can only be called on range-separated functionals.") return (self._cam_omega, self._cam_alpha, self._cam_beta)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def quantities():\n # publish the modules\n return (\n SI,\n angle, area, energy, force, length, mass, power, pressure,\n speed, substance, temperature, time, volume\n )", "def omega(self):\n return self._omega", "def getParam(self):\n return self.__alpha0, self....
[ "0.67075425", "0.5999553", "0.5995143", "0.59202677", "0.58304745", "0.5786519", "0.5735779", "0.572618", "0.5639546", "0.5626567", "0.5616059", "0.55831593", "0.55683064", "0.55592185", "0.5534734", "0.55158263", "0.54844254", "0.5464986", "0.54503083", "0.54469895", "0.5446...
0.0
-1
Returns the VV10 (b, C) coefficients
def get_vv10_coef(self): if self._nlc_b is False: raise ValueError("get_vv10_coeff can only be called on -V functionals.") return (self._nlc_b, self._nlc_C)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def coefficients(self):\r\n return self.coef_['x']", "def coefficients(self) :\n raise NotImplementedError", "def b_coefficients(x1,x2,x3,y1,y2,y3,CCoefficients,DCoefficients):\n\tBCoefficients = np.array([\t((y2-y1)/(x2-x1)-CCoefficients[0]*(x2-x1) - DCoefficients[0]*((x2-x1)**2)), \\\n\t\t\t\t...
[ "0.65958256", "0.65501094", "0.6504454", "0.6486117", "0.6194975", "0.61420995", "0.60554177", "0.60554177", "0.60174334", "0.5979773", "0.59653145", "0.59653145", "0.59482545", "0.59466475", "0.5945674", "0.59176135", "0.59019333", "0.58690476", "0.58312464", "0.582763", "0....
0.83470845
0
Gets the names of all external parameters
def get_ext_param_names(self): num_param = core.xc_func_info_get_n_ext_params(self.xc_func_info) ret = [] for p in range(num_param): tmp = core.xc_func_info_get_ext_params_name(self.xc_func_info, p) ret.append(tmp.decode("UTF-8")) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def parameter_names(self) -> List[str]:", "def get_param_names(self):\n return list(self.params.keys())", "def parameter_names(self) -> list:\n parameters = []\n parameters.extend(self.properties.parameter_names)\n return parameters", "def parameters_names(cls):\n return cl...
[ "0.77504754", "0.7389947", "0.72158164", "0.71607", "0.71043503", "0.7083737", "0.7037365", "0.70315456", "0.7013595", "0.70036983", "0.698914", "0.687916", "0.6841593", "0.6833137", "0.68269855", "0.6797805", "0.6785064", "0.6723883", "0.6707179", "0.6698673", "0.6685417", ...
0.7800671
0
Gets the descriptions of all external parameters
def get_ext_param_descriptions(self): num_param = core.xc_func_info_get_n_ext_params(self.xc_func_info) ret = [] for p in range(num_param): tmp = core.xc_func_info_get_ext_params_description(self.xc_func_info, p) ret.append(tmp.decode("UTF-8")) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _external_params():\n list_ext_params = []\n list_ext_params.append(\n (hoomd.md.external.field.Periodic, \"params\",\n list([dict(A=1.5, i=1, w=3.5, p=5),\n dict(A=10, i=0, w=3.4, p=2)]), _evaluate_periodic))\n list_ext_params.append(\n (hoomd.md.external.field.Ele...
[ "0.7344136", "0.66554403", "0.6622951", "0.6612917", "0.6590222", "0.65895045", "0.65495247", "0.6545839", "0.64892864", "0.6436556", "0.6409071", "0.6368646", "0.6351103", "0.6338677", "0.6323158", "0.63069546", "0.628588", "0.628588", "0.6284201", "0.6275635", "0.62606674",...
0.7465921
0
Gets the default values of all external parameters.
def get_ext_param_default_values(self): num_param = core.xc_func_info_get_n_ext_params(self.xc_func_info) ret = [] for p in range(num_param): tmp = core.xc_func_info_get_ext_params_default_value(self.xc_func_info, p) ret.append(tmp) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def parameters_default(cls):\n return cls._Parameters.__new__.__defaults__", "def default_parameters(self) -> List[Parameter]:\n return self.settings.job_default_parameters", "def initDefaults(self):\n return _libsbml.Parameter_initDefaults(self)", "def parameters(self):\n return ...
[ "0.7586267", "0.75206536", "0.7345313", "0.7338341", "0.7124671", "0.708384", "0.7017844", "0.68795174", "0.68700486", "0.6861506", "0.68081266", "0.6789644", "0.672888", "0.670684", "0.670621", "0.6609515", "0.6601124", "0.6569071", "0.6553868", "0.6518829", "0.6501356", "...
0.80710435
0
Sets all external parameters.
def set_ext_params(self, ext_params): num_param = core.xc_func_info_get_n_ext_params(self.xc_func_info) if num_param == 0: raise ValueError("LibXCFunctional '%s' has no external parameters to set." % self.get_name()) if len(ext_params) != num_param: raise ValueError( "The length of the input external parameters (%d) does not match the length of the functional's external parameters (%d)." % (len(ext_params), num_param)) core.xc_func_set_ext_params(self.xc_func, np.asarray(ext_params, dtype=np.double))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_params(self):\r\n pass", "def set_params(self, **kwargs):\n ...", "def set_params(self):\n raise NotImplementedError", "def set_params(self, params):", "def set_parameters(self,params):\n K3Supervisor.set_parameters(self,params)\n self.blending.set_parameters(self...
[ "0.7574865", "0.7349388", "0.7286496", "0.7278232", "0.7277006", "0.71515125", "0.712049", "0.712049", "0.712049", "0.712049", "0.712049", "0.70605385", "0.6988655", "0.6949013", "0.67994875", "0.6789911", "0.67877454", "0.67204505", "0.6715573", "0.67097175", "0.6694738", ...
0.6574025
26
Sets the density threshold below which the functional will not be evaluated.
def set_dens_threshold(self, dens_threshold): if dens_threshold < 0: raise ValueError("The density threshold cannot be smaller than 0.") core.xc_func_set_dens_threshold(self.xc_func, ctypes.c_double(dens_threshold))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setThreshold(self, threshold): # real signature unknown; restored from __doc__\n pass", "def clear_density(self):\n self._density = None", "def set_threshold(self, threshold):\n self._threshold = check_value_positive('threshold', threshold)", "def threshold(self,thresholdValue):\n ...
[ "0.63226175", "0.61955786", "0.6171416", "0.61262935", "0.59644085", "0.58235157", "0.58235157", "0.58235157", "0.58235157", "0.58235157", "0.57770663", "0.5771117", "0.5760468", "0.5694355", "0.5690046", "0.56802684", "0.5664838", "0.56599784", "0.56505716", "0.5615393", "0....
0.7752366
0
Sets the spin polarization threshold below which components will not be evaluated.
def set_zeta_threshold(self, zeta_threshold): if zeta_threshold < 0: raise ValueError("The spin polarization threshold cannot be smaller than 0.") core.xc_func_set_zeta_threshold(self.xc_func, ctypes.c_double(zeta_threshold))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_threshold(self, threshold):\n self._threshold = check_value_positive('threshold', threshold)", "def setThreshold(self, threshold): # real signature unknown; restored from __doc__\n pass", "def setAngleLimit(angle_limit):\n return RoboCaller().call(\"setAngleLimit\", \"void\", angle_limit...
[ "0.58173597", "0.57458097", "0.55919087", "0.5545165", "0.55155236", "0.547716", "0.53742176", "0.53729236", "0.5330762", "0.5303351", "0.52957284", "0.52762413", "0.52762413", "0.52762413", "0.52762413", "0.52762413", "0.52495974", "0.52326035", "0.5226283", "0.52042127", "0...
0.56321895
2
Sets the smallest value allowed for sigma = \sqrt(\gamma). Smaller values than this get overwritten in the evaluation.
def set_sigma_threshold(self, sigma_threshold): if sigma_threshold < 0: raise ValueError("The sigma threshold cannot be smaller than 0.") core.xc_func_set_sigma_threshold(self.xc_func, ctypes.c_double(sigma_threshold))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _update_gamma(self):\n # type: () -> None\n if self._world is None:\n self.gamma = np.inf\n return\n # higher bound for the free space volume\n config_space_volume = self._world.get_configuration_space_volume()\n gamma_L = 8*(4/3)* config_space_volume\n ...
[ "0.6821172", "0.6443684", "0.64384013", "0.6321744", "0.6190171", "0.5993369", "0.59834427", "0.5934069", "0.5904044", "0.5883485", "0.5871269", "0.5817794", "0.58008724", "0.57933", "0.5751669", "0.569705", "0.5695616", "0.56666064", "0.5641036", "0.5599601", "0.5595213", ...
0.53603756
39
Sets the smallest value allowed for tau. Smaller values than this get overwritten in the evaluation.
def set_tau_threshold(self, tau_threshold): if tau_threshold < 0: raise ValueError("The tau threshold cannot be smaller than 0.") core.xc_func_set_tau_threshold(self.xc_func, ctypes.c_double(tau_threshold))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self,tau = 1e-3):\n self._tau = tau \n pass", "def __init__(self, tau=1, eps=None):\n self.tau = tau\n self.eps = eps or np.finfo(config.precision).eps\n self.rng = np.random.default_rng()\n self.smax = Softmax()", "def init_tau(self, type: str = 'safest', we...
[ "0.64921534", "0.61496323", "0.61187613", "0.6012751", "0.59901506", "0.58402216", "0.5835517", "0.56944895", "0.5693752", "0.5693752", "0.5661594", "0.55744827", "0.55099267", "0.5492436", "0.5492436", "0.54596823", "0.5449228", "0.5433668", "0.54214495", "0.54214495", "0.54...
0.60347635
3
Evaluates the functional and its derivatives on a grid.
def compute(self, inp, output=None, do_exc=True, do_vxc=True, do_fxc=False, do_kxc=False, do_lxc=False): # Check flags if not self._have_exc and do_exc: raise ValueError("Functional '%s' does not have EXC capabilities." % self.get_name()) if not self._have_vxc and do_vxc: raise ValueError("Functional '%s' does not have VXC capabilities built in." % self.get_name()) if not self._have_fxc and do_fxc: raise ValueError("Functional '%s' does not have FXC capabilities built in." % self.get_name()) if not self._have_kxc and do_kxc: raise ValueError("Functional '%s' does not have KXC capabilities built in." % self.get_name()) if not self._have_lxc and do_lxc: raise ValueError("Functional '%s' does not have LXC capabilities built in." % self.get_name()) # Parse input arrays if isinstance(inp, np.ndarray): inp = {"rho": np.asarray(inp, dtype=np.double)} elif isinstance(inp, dict): inp = {k: np.asarray(v, dtype=np.double) for k, v in inp.items()} else: raise KeyError("Input must have a 'rho' variable or a single array.") # How long are we? npoints = int(inp["rho"].size / self._spin) if (inp["rho"].size % self._spin): raise ValueError("Rho input has an invalid shape, must be divisible by %d" % self._spin) # Find the right compute function args = [self.xc_func, ctypes.c_size_t(npoints)] if self.get_family() in [flags.XC_FAMILY_LDA, flags.XC_FAMILY_HYB_LDA]: input_labels = ["rho"] input_num_args = 1 output_labels = [ "zk", # 1, 1 "vrho", # 1, 2 "v2rho2", # 1, 3 "v3rho3", # 1, 4 "v4rho4" # 1, 5 ] # Build input args output = _check_arrays(output, output_labels[0:1], self.xc_func_sizes, npoints, do_exc) output = _check_arrays(output, output_labels[1:2], self.xc_func_sizes, npoints, do_vxc) output = _check_arrays(output, output_labels[2:3], self.xc_func_sizes, npoints, do_fxc) output = _check_arrays(output, output_labels[3:4], self.xc_func_sizes, npoints, do_kxc) output = _check_arrays(output, output_labels[4:5], self.xc_func_sizes, npoints, do_lxc) args.extend([ inp[x] for x in input_labels]) args.extend([output[x] for x in output_labels]) core.xc_lda(*args) elif self.get_family() in [flags.XC_FAMILY_GGA, flags.XC_FAMILY_HYB_GGA]: input_labels = ["rho", "sigma"] input_num_args = 2 output_labels = [ "zk", # 1, 1 "vrho", "vsigma", # 2, 3 "v2rho2", "v2rhosigma", "v2sigma2", # 3, 6 "v3rho3", "v3rho2sigma", "v3rhosigma2", "v3sigma3", # 4, 10 "v4rho4", "v4rho3sigma", "v4rho2sigma2", "v4rhosigma3", "v4sigma4" # 5, 15 ] # Build input args output = _check_arrays(output, output_labels[0:1], self.xc_func_sizes, npoints, do_exc) output = _check_arrays(output, output_labels[1:3], self.xc_func_sizes, npoints, do_vxc) output = _check_arrays(output, output_labels[3:6], self.xc_func_sizes, npoints, do_fxc) output = _check_arrays(output, output_labels[6:10], self.xc_func_sizes, npoints, do_kxc) output = _check_arrays(output, output_labels[10:15], self.xc_func_sizes, npoints, do_lxc) args.extend([ inp[x] for x in input_labels]) args.extend([output[x] for x in output_labels]) core.xc_gga(*args) elif self.get_family() in [flags.XC_FAMILY_MGGA, flags.XC_FAMILY_HYB_MGGA]: # Build input args if self._needs_laplacian: input_labels = ["rho", "sigma", "lapl", "tau"] else: input_labels = ["rho", "sigma", "tau"] input_num_args = 4 output_labels = [ "zk", # 1, 1 "vrho", "vsigma", "vlapl", "vtau", # 4, 5 "v2rho2", "v2rhosigma", "v2rholapl", "v2rhotau", "v2sigma2", # 10, 15 "v2sigmalapl", "v2sigmatau", "v2lapl2", "v2lapltau", "v2tau2", "v3rho3", "v3rho2sigma", "v3rho2lapl", "v3rho2tau", "v3rhosigma2", # 20, 35 "v3rhosigmalapl", "v3rhosigmatau", "v3rholapl2", "v3rholapltau", "v3rhotau2", "v3sigma3", "v3sigma2lapl", "v3sigma2tau", "v3sigmalapl2", "v3sigmalapltau", "v3sigmatau2", "v3lapl3", "v3lapl2tau", "v3lapltau2", "v3tau3", "v4rho4", "v4rho3sigma", "v4rho3lapl", "v4rho3tau", "v4rho2sigma2", # 35, 70 "v4rho2sigmalapl", "v4rho2sigmatau", "v4rho2lapl2", "v4rho2lapltau", "v4rho2tau2", "v4rhosigma3", "v4rhosigma2lapl", "v4rhosigma2tau", "v4rhosigmalapl2", "v4rhosigmalapltau", "v4rhosigmatau2", "v4rholapl3", "v4rholapl2tau", "v4rholapltau2", "v4rhotau3", "v4sigma4", "v4sigma3lapl", "v4sigma3tau", "v4sigma2lapl2", "v4sigma2lapltau", "v4sigma2tau2", "v4sigmalapl3", "v4sigmalapl2tau", "v4sigmalapltau2", "v4sigmatau3", "v4lapl4", "v4lapl3tau", "v4lapl2tau2", "v4lapltau3", "v4tau4" ] # Build input args output = _check_arrays(output, output_labels[0:1], self.xc_func_sizes, npoints, do_exc) output = _check_arrays(output, output_labels[1:5], self.xc_func_sizes, npoints, do_vxc) output = _check_arrays(output, output_labels[5:15], self.xc_func_sizes, npoints, do_fxc) output = _check_arrays(output, output_labels[15:35], self.xc_func_sizes, npoints, do_kxc) output = _check_arrays(output, output_labels[35:70], self.xc_func_sizes, npoints, do_lxc) args.extend([ inp[x] for x in input_labels]) if not self._needs_laplacian: args.insert(-1, np.empty((1))) # Add none ptr to laplacian args.extend([output[x] for x in output_labels]) core.xc_mgga(*args) else: raise KeyError("Functional kind not recognized! (%d)" % self.get_kind()) return {k: v for k, v in zip(output_labels, args[2+input_num_args:]) if not v is None}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def grid_eval(self, gridaxes):\n assert len(gridaxes) == self.sdim, \"Input has wrong dimension\"\n # make sure axes are one-dimensional\n if not all(np.ndim(ax) == 1 for ax in gridaxes):\n gridaxes = tuple(np.squeeze(ax) for ax in gridaxes)\n assert all(ax.ndim == 1 for ...
[ "0.62774193", "0.62126994", "0.6181909", "0.6074451", "0.6043692", "0.6043692", "0.6038648", "0.60327077", "0.59558785", "0.58665967", "0.58031106", "0.5786653", "0.57752985", "0.5758363", "0.5745993", "0.57132185", "0.57118523", "0.56945556", "0.56928897", "0.56743944", "0.5...
0.0
-1
Strip path and extension. Return base filename.
def basename(self): return get_basename(self.filename)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def filename_strip_ext(filename):\n base = os.path.basename(filename)\n # Strip file extension\n return os.path.splitext(base)[0]", "def get_filename(file_path):\n\n # Get rid of directories and etc\n just_file = os.path.basename(file_path)\n\n # Now we return just the base name\n return os....
[ "0.80113024", "0.7722132", "0.7642737", "0.7580186", "0.7531498", "0.74958444", "0.7461117", "0.72882116", "0.726376", "0.72585756", "0.7248201", "0.72440237", "0.7239742", "0.7233385", "0.7215656", "0.721015", "0.72061", "0.7173597", "0.7156511", "0.7147149", "0.7107287", ...
0.6472341
80
Construct and return a filename for this tile.
def generate_filename( self, directory=os.getcwd(), prefix="tile", format="png", path=True ): filename = prefix + "_{col:02d}_{row:02d}.{ext}".format( col=self.column, row=self.row, ext=format.lower().replace("jpeg", "jpg") ) if not path: return filename return os.path.join(directory, filename)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tilefilename(self, x, y, z):\n\n tileIndex = x + y * self.tierSizeInTiles[z][0] + self.tileCountUpToTier[z]\n return os.path.join(\"TileGroup%.0f\" % math.floor( tileIndex / 256 ),\n \"%s-%s-%s.%s\" % ( z, x, y, self.tileformat))", "def tilefilename(self, x, y, z):\n\n tileIndex = x + y * self.tie...
[ "0.7717686", "0.77164763", "0.74944174", "0.73645", "0.71533597", "0.7137769", "0.7135323", "0.71192485", "0.7112908", "0.7089001", "0.69753784", "0.69214255", "0.6892904", "0.6883375", "0.686652", "0.68156606", "0.6811536", "0.6807842", "0.6796225", "0.6787518", "0.6782904",...
0.7444088
3
Show tile number, and if saved to disk, filename.
def __repr__(self): if self.filename: return "<Tile #{} - {}>".format( self.number, os.path.basename(self.filename) ) return "<Tile #{}>".format(self.number)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tilefilename(self, x, y, z):\n\n tileIndex = x + y * self.tierSizeInTiles[z][0] + self.tileCountUpToTier[z]\n return os.path.join(\"TileGroup%.0f\" % math.floor( tileIndex / 256 ),\n \"%s-%s-%s.%s\" % ( z, x, y, self.tileformat))", "def tilefilename(self, x, y, z):\n\n tileIndex = x + y * self.tie...
[ "0.7170778", "0.7017842", "0.62615716", "0.6062539", "0.6021516", "0.58989334", "0.5845273", "0.58161515", "0.5786859", "0.5772618", "0.5726611", "0.56966686", "0.568967", "0.5651235", "0.56373155", "0.5635666", "0.56198174", "0.5595406", "0.5574993", "0.5558204", "0.555806",...
0.68945366
2