robokudo.utils.file_loader¶
Classes¶
A helper class to look up filenames, especially in conjunction with ROS paths. |
Module Contents¶
- class robokudo.utils.file_loader.FileLoader¶
-
A helper class to look up filenames, especially in conjunction with ROS paths.
- logger = None¶
- 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.
- Parameters:
-
ros_pkg_name – name of a ros package
- Returns:
-
path object with the ros package path
- 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.
- Parameters:
-
ros_pkg_name – name of a ros package
relative_path – the filename of the desired file, relative to the path of ros_pkg_name
- Returns:
-
path object to the desired file relative the ros package