robokudo.utils.file_loader ========================== .. py:module:: robokudo.utils.file_loader Classes ------- .. autoapisummary:: robokudo.utils.file_loader.FileLoader Module Contents --------------- .. py:class:: FileLoader A helper class to look up filenames, especially in conjunction with ROS paths. .. py:attribute:: logger :value: None .. py:method:: get_ros_pkg_path(ros_pkg_name: str) -> pathlib.Path Get a Path object to a ROS package given the name Throws OSError if ROS package can't be found. :param ros_pkg_name: name of a ros package :return: path object with the ros package path .. py:method:: get_path_to_file_in_ros_package(ros_pkg_name: str, relative_path: str) -> pathlib.Path Get a Path object to a given the filename inside a ROS package. Please note, that relative_path should NOT start with '/', because then it would be considered as an absolute path from pathlib.Path.joinpath() Throws OSError if ROS package can't be found or relative_path in ROS package doesn't exist. :param ros_pkg_name: name of a ros package :param relative_path: the filename of the desired file, relative to the path of ros_pkg_name :return: path object to the desired file relative the ros package