ros_sugar.tf#

ROS TF Listener

Module Contents#

Classes#

TFListenerConfig

TF listener config

TFListener

ROS TF listener class to lookup a transformation and execute it

API#

class ros_sugar.tf.TFListenerConfig#

Bases: ros_sugar.config.BaseAttrs

TF listener config

asdict(filter: Optional[Callable] = None) dict#
from_dict(dict_obj: Dict) None#
from_yaml(file_path: str, nested_root_name: str | None = None, get_common: bool = False) None#
to_json() Union[str, bytes, bytearray]#
from_json(json_obj: Union[str, bytes, bytearray]) None#
has_attribute(attr_name: str) bool#
get_attribute_type(attr_name: str) Optional[type]#
update_value(attr_name: str, attr_value: Any) bool#
class ros_sugar.tf.TFListener(tf_config: Optional[ros_sugar.tf.TFListenerConfig] = None, node_name: Optional[str] = '')#

ROS TF listener class to lookup a transformation and execute it

property tf_buffer#

Getter of transform listener TF buffer

Returns:

Return type:

Buffer

set_listener(tf_listener: tf2_ros.transform_listener.TransformListener)#

Set the TF listener creqted in the node

Parameters:

tf_listener (TransformListener) – Node transform listener

property timer: Optional[rclpy.timer.Timer]#

Timer used for the transformation lookup

Returns:

Return type:

Timer

timer_callback()#

Timer callback to performe the requested transformation lookup

check_tf() bool#

Check if the transform is found

Returns:

Transform lookup found

Return type:

bool