pycram.external_interfaces.procthor#

Attributes#

Classes#

Module Contents#

pycram.external_interfaces.procthor.filename#
class pycram.external_interfaces.procthor.ProcThorInterface(base_url='http://procthor.informatik.uni-bremen.de:5000', source_folder=os.path.join(ros_tools.get_ros_package_path('pycram'), 'resources/tmp/'))#
base_url = 'http://procthor.informatik.uni-bremen.de:5000'#
source_folder#
stored_environments = []#
_download_file(base_url: str, full_url: str, folder: str) str#

Downloads the file given in full_url and stores it into folder. If necessary it will create the same folder structure. For this purpose the base_url is necessary to decide what is folder structure and what is just url.

Parameters:
  • base_url – Base url as string from

  • full_url – Full url of the file to be downloaded

  • folder – Folder where the file should be stored

Returns:

The local file name of the downloaded file

_get_files_list(base_url: str) typing_extensions.Set[str]#

Function to get the list of files in a directory on the web server.

Parameters:

base_url – Base url as string from

Returns:

Set of all files found below the given url

download_all_files_from_URL(base_url: str, folder: str) None#

Main function to download all files from a given path. Files will be stored in folder.

Parameters:
  • base_url – Base url as string from

  • folder – folder where the files should be stored

Returns:

None

get_all_environments_stored_below_directory(source_folder: str) list#

Returns a list of dictionaries that contains the name and the storage_place of all urdf files below a given folder. Only looks for urdf.

Parameters:

source_folder – Base path as string from

Returns:

map from name to storage place

download_one_random_environment() typing_extensions.Dict[str, str]#

Downloads one random environment currently not present.

Param:

None

Returns:

Dictionary of name and storage place

download_num_random_environment(num_of_environments: int) list#

Downloads given amount of random environment currently not present.

Parameters:

num_of_environments – Amount of environments that get downloaded

Returns:

List of Dictionaries of name and storage place