ros_sugar.tf¶
ROS TF Listener
Module Contents¶
Classes¶
TF listener config |
|
ROS TF listener class to lookup a transformation and execute it |
API¶
- class ros_sugar.tf.TFListenerConfig¶
Bases:
ros_sugar.config.BaseAttrsTF listener config
- asdict(filter: Optional[Callable] = None) Dict¶
- to_dict() Dict¶
- from_dict(dict_obj: Dict) None¶
- from_file(file_path: str, nested_root_name: Union[str, None] = None, get_common: bool = False) bool¶
- 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¶
- classmethod get_fields_info(class_object) Dict[str, Dict[str, Any]]¶
- class ros_sugar.tf.TFListener(tf_config: Optional[ros_sugar.tf.TFListenerConfig] = None, node_name: str = '')¶
ROS TF listener class to lookup a transformation and execute it
- property translation: Optional[numpy.ndarray]¶
Getter of transform listener TF translation as numpy array
- Returns:
Translation vector
- Return type:
Optional[np.ndarray]
- property rotation: Optional[numpy.ndarray]¶
Getter of transform listener TF rotation as numpy array
- Returns:
Rotation Quaternion vector
- Return type:
Optional[np.ndarray]
- 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 created 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