utils
Small utils
- Author:
Lukas Rustler
- class pybullet_grasper.utils.Config(config_path: str)[source]
Bases:
objectClass to parse and keep the config loaded from yaml file
Loads YAML config and exposes keys as object attributes.
- Parameters:
config_path (str) – path to YAML config file
- Returns:
None
- Return type:
None
- set_attribute(attr: str, value: Any, reference: Any) int[source]
Function to recursively fill the instance variables from dictionary. When value is non-dict, it is directly assigned to a variable. Else, the dict is recursively parsed. :param attr: name of the attribute :type attr: str :param value: value of the attribute :type value: str, float, int, dict, list, … - and other that can be loaded from yaml :param reference: reference to the parent class. “self” for the upper attributes, pointer to namedtuple for
inner attributes
- Returns:
0
- Return type:
int
- class pybullet_grasper.utils.Logger(ros: bool, debug: bool = False)[source]
Bases:
objectClass to handle logging for both ROS and non-ROS behaviours
Initializes logger backend for ROS or standard Python logging.
- Parameters:
ros (bool) – whether ROS logging API should be used
debug (bool, optional, default=False) – enables debug-level logs
- Returns:
None
- Return type:
None
- log_critical(msg: Any) None[source]
Logs a critical/fatal message.
- Parameters:
msg (Any) – message payload
- Returns:
None
- Return type:
None
- log_debug(msg: Any) None[source]
Logs a debug message.
- Parameters:
msg (Any) – message payload
- Returns:
None
- Return type:
None
- log_error(msg: Any) None[source]
Logs an error message.
- Parameters:
msg (Any) – message payload
- Returns:
None
- Return type:
None
- class pybullet_grasper.utils.Pose(position: Point, orientation: Quaternion)[source]
Bases:
object