[isaacsim.ros2.tf_viewer] TF Viewer#

Version: 2.1.17

Show the tf transform tree in the viewport

Enable Extension#

The extension can be enabled (if not already) in one of the following ways:

Define the next entry as an application argument from a terminal.

APP_SCRIPT.(sh|bat) --enable isaacsim.ros2.tf_viewer

Define the next entry under [dependencies] in an experience (.kit) file or an extension configuration (extension.toml) file.

[dependencies]
"isaacsim.ros2.tf_viewer" = {}

Open the Window > Extensions menu in a running application instance and search for isaacsim.ros2.tf_viewer. Then, toggle the enable control button if it is not already active.

API#

ROS 2 Transform Listener module for Isaac Sim.

This module provides an interface to ROS 2 transform (tf) functionality, allowing Isaac Sim to listen to and process transform messages from ROS 2. It enables visualization and utilization of coordinate frames broadcast through the ROS 2 tf2 system.

The module allows applications to: - Connect to a ROS 2 system - Subscribe to transform messages - Process and retrieve transformation data - Visualize transform hierarchies within Isaac Sim

class ITransformListener
finalize(
self: isaacsim.ros2.tf_viewer._transform_listener.ITransformListener,
) None

Finalize and clean up the transform listener.

Unsubscribes from tf topics and cleans up ROS 2 resources.

get_transforms(
self: isaacsim.ros2.tf_viewer._transform_listener.ITransformListener,
root_frame: str,
) Tuple[List[str], Dict[str, Tuple[Tuple[float, float, float], Tuple[float, float, float, float]]], List[Tuple[str, str]]]

Get all transforms relative to the specified root frame.

This method computes transforms for all frames relative to the specified root frame and returns the frame data, transform data, and frame relationships.

Parameters:

root_frame (str) – The reference frame ID to compute transforms against.

Returns:

A tuple containing three elements:
  • list of str: Available frame IDs

  • dict: Map of frame IDs to transforms (translation: xyz, rotation: xyzw)

  • list of tuple: Parent-child relationships between frames

Return type:

tuple

initialize(
self: isaacsim.ros2.tf_viewer._transform_listener.ITransformListener,
ros_distro: str,
) bool

Initialize the transform listener with the specified ROS 2 distribution.

Parameters:

ros_distro (str) – The ROS 2 distribution name to use (e.g., “humble”, “foxy”).

Returns:

True if initialization was successful, False otherwise.

Return type:

bool

reset(
self: isaacsim.ros2.tf_viewer._transform_listener.ITransformListener,
) None

Reset the transform buffer.

Clears all stored transform data.

spin(
self: isaacsim.ros2.tf_viewer._transform_listener.ITransformListener,
) bool

Process incoming transform messages.

This method should be called regularly to process new transform data from ROS 2.

Returns:

True if transforms were processed successfully, False otherwise.

Return type:

bool

acquire_transform_listener_interface(
plugin_name: str = None,
library_path: str = None,
) isaacsim.ros2.tf_viewer._transform_listener.ITransformListener
release_transform_listener_interface(
arg0: isaacsim.ros2.tf_viewer._transform_listener.ITransformListener,
) None

Settings#

Extension Settings#

The table list the extension-specific settings.

Setting name

Description

Type

Default value

cpp

Whether to use the C++ implementation to listen to the tf and process the incoming data. If false, the Python implementation will be used (may degrade performance considerably).

bool

True

include_root_frame

Whether to include the pose of the root frame when drawing the TF in the viewport if not listed. Root frame’s pose is defined with position (0,0,0) and orientation (0,0,0,1), as xyzw quaternion.

bool

True

The extension-specific settings can be either specified (set) or retrieved (get) in one of the following ways:

Define the key and value of the setting as an application argument from a terminal.

APP_SCRIPT.(sh|bat) --/exts/isaacsim.ros2.tf_viewer/SETTING_NAME=SETTING_VALUE

Define the key and value of the setting under [settings] in an experience (.kit) file or an extension configuration (extension.toml) file.

[settings]
exts."isaacsim.ros2.tf_viewer".SETTING_NAME = SETTING_VALUE

Define the key and value of the setting using the carb framework (in Python).

import carb

settings = carb.settings.get_settings()
settings.set("/exts/isaacsim.ros2.tf_viewer/SETTING_NAME", SETTING_VALUE)

Define the key to query the value of the setting using the carb framework (in Python).

import carb

settings = carb.settings.get_settings()
value = settings.get("/exts/isaacsim.ros2.tf_viewer/SETTING_NAME")