robokudo.utils.module_loader ============================ .. py:module:: robokudo.utils.module_loader Classes ------- .. autoapisummary:: robokudo.utils.module_loader.RobokudoModuleType robokudo.utils.module_loader.ModuleLoader Module Contents --------------- .. py:class:: RobokudoModuleType Bases: :py:obj:`enum.Enum` Generic enumeration. Derive from this class to define new enumerations. .. py:attribute:: ActionServer .. py:attribute:: Annotator .. py:attribute:: AnalysisEngine .. py:attribute:: CameraConfig .. py:attribute:: IO .. py:attribute:: SemanticMap .. py:attribute:: ObjectKnowledgeBase .. py:attribute:: TreeComponents .. py:attribute:: Types .. py:attribute:: Utils .. py:attribute:: Data .. py:class:: ModuleLoader .. py:attribute:: logger :value: None .. py:method:: _get_ros_pkg_src_path(ros_pkg_name: str) -> pathlib.Path Get the ros package src path given the name of the package. Parameters ---------- ros_pkg_name : str name of a ros package Returns ------- ros_pkg_path : Path path object with the ros package path .. py:method:: _get_module_dir_path(package_src_path: pathlib.Path, module_type: RobokudoModuleType) Get the path of a directory in a robokudo module of a given ros package. Parameters ---------- package_src_path : Path path to the src of a robokudo ros package module_type: RobokudoModuleType type of the robokudo module to load Returns ------- module_dir_path : Path path object with the directory path .. py:method:: _get_module_path(package_src_path: pathlib.Path, module_type: RobokudoModuleType, module_name: str) -> pathlib.Path Get the path of a robokudo module given the ros package src path. Parameters ---------- package_src_path : Path path to the src of a robokudo ros package module_type: RobokudoModuleType type of the robokudo module to load module_name: str name of the module to load, e.g. the name of an analysis engine or annotator Returns ------- module_path : Path path object with the module path .. py:method:: _load_module(ros_pkg_name: str, module_type: RobokudoModuleType, module_name: str) Load a robokudo module from given the ros package. Parameters ---------- ros_pkg_name : str name of the ros package module_type: RobokudoModuleType type of the robokudo module to load module_name: str name of the module to load, e.g. the name of an analysis engine or annotator Returns ------- loaded_module object of the module to load .. py:method:: load_ae(ros_pkg_name: str, module_name: str) Load an Analysis Engine (AE) given the AE module name and the ros package name. The ros package has to be in located in the same workspace. The path to the AE within the package is meant to be: $package_path/src/robokudo_example_package/descriptors/analysis_engines/. Parameters ---------- ros_pkg_name : str name of the ros package where the AE is located module_name: str name of the module to load, e.g. the name of an analysis engine or annotator Returns ------- ae_root root of the AE .. py:method:: load_annotator(ros_pkg_name: str, module_name: str) .. py:method:: load_camera_config(ros_pkg_name: str, module_name: str) Load a camera config module given the ros package and module name. Parameters ---------- ros_pkg_name : str name of the ros package where the camera config is located module_name: str name of the camera config module to load annotator Returns ------- loaded_config loaded camera config class .. py:method:: load_action_server(ros_pkg_name: str, module_name: str) Load an action server module given the ros package name where the module is located the module name. Parameters ---------- ros_pkg_name : str name of the ros package where the action server is located module_name: str name of action server module to load Returns ------- loaded_action_server loaded action server class .. py:method:: load_io(ros_pkg_name: str, module_name: str) .. py:method:: load_object_knowledge_base(ros_pkg_name: str, module_name: str) Load an ObjectKnowledgeBase given the module name and the ros package name. The path to the AE within the package is meant to be: $package_path/src/PACKAGE_NAME/descriptors/object_knowledge/. Parameters ---------- ros_pkg_name : str name of the ros package where the semantic map is located module_name: str name of the module to load, e.g. the name of a object knowledge base Returns ------- object_knowledge_base The object knowledge base .. py:method:: load_semantic_map(ros_pkg_name: str, module_name: str) Load an Analysis Engine (AE) given the AE module name and the ros package name. The path to the AE within the package is meant to be: $package_path/src/PACKAGE_NAME/descriptors/semantic_maps/. Parameters ---------- ros_pkg_name : str name of the ros package where the semantic map is located module_name: str name of the module to load, e.g. the name of a semantic map Returns ------- ae_root root of the AE .. py:method:: load_tree_components(ros_pkg_name: str, module_name: str) .. py:method:: load_types(ros_pkg_name: str, module_name: str) .. py:method:: load_utils(ros_pkg_name: str, module_name: str) .. py:method:: get_file_paths(ros_pkg_name: str, module_type: RobokudoModuleType, dir_name: str, file_extension: str = None) -> List[pathlib.Path] Get the path of a robokudo module given the ros package src path. Parameters ---------- ros_pkg_name : str name of the ros package where the AE is located module_type: RobokudoModuleType type of the robokudo module to load dir_name: str name of the directory where the files are located relative to the module file_extension: str extension of files to load, e.g. '.txt', '.png', '.yaml' etc. Returns ------- file_paths : List[Path] list of file path objects