[isaacsim.ros2.bridge] ROS 2 Bridge#
Version: 4.8.3
The ROS 2 Bridge extension enables communication between the Isaac Sim and ROS 2 systems. It allows for the publishing and subscribing of ROS 2 topics and services via OmniGraph nodes and Action graphs. ROS 2 publishers, subscribers and services are only active when play is pressed. To enable this extension, ensure ROS 2 libraries are sourced in the terminal before running Isaac Sim or source the lightweight ROS 2 libraries included with Isaac Sim as an alternative.
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.bridge
Define the next entry under [dependencies]
in an experience (.kit
) file or an extension configuration (extension.toml
) file.
[dependencies]
"isaacsim.ros2.bridge" = {}
Open the Window > Extensions menu in a running application instance and search for isaacsim.ros2.bridge
.
Then, toggle the enable control button if it is not already active.
API#
Isaac Sim ROS 2 Bridge Interface
This module provides Python bindings for the ROS 2 bridge functionality in Isaac Sim. It enables communication between Isaac Sim and ROS 2, allowing simulation components to interact with ROS 2 nodes, topics, services, and actions.
The bridge supports creating nodes, publishers, subscribers, service clients, service servers, action clients, and action servers directly from Python scripts in Isaac Sim.
- class Ros2Bridge
Main interface class for ROS 2 bridge functionality.
This class provides the core interface for interacting with ROS 2 functionality within Isaac Sim. It manages the lifecycle of ROS 2 context handlers and provides factory access for creating ROS 2 related objects.
The Ros2Bridge serves as the entry point for all ROS 2 operations in Isaac Sim, including node creation, message publishing, and service handling.
- get_startup_status(
- self: isaacsim.ros2.bridge._ros2_bridge.Ros2Bridge,
Checks the initialization status of the ROS 2 bridge.
This method verifies if both the factory and context handler objects have been properly instantiated. These objects are created when the Ros2Bridge interface is first acquired after the plugin is loaded.
- Returns:
True if both factory and context handler are successfully instantiated, False otherwise.
- Return type:
bool
Note
This method should be called before attempting to use any other methods of this interface. Using other methods when this returns False may result in undefined behavior.
- acquire_ros2_bridge_interface(
- plugin_name: str = None,
- library_path: str = None,
- release_ros2_bridge_interface(
- arg0: isaacsim.ros2.bridge._ros2_bridge.Ros2Bridge,
Omnigraph Nodes#
The extension exposes the following Omnigraph nodes:
- ROS2 Camera Helper
- ROS2 Camera Info Helper
- ROS2 Context
- ROS2 Publish AckermannDrive
- ROS2 Publish Bbox2D
- ROS2 Publish Bbox3D
- ROS2 Publish Camera Info
- ROS2 Publish Clock
- ROS2 Publish Image
- ROS2 Publish Imu
- ROS2 Publish Joint State
- ROS2 Publish Laser Scan
- ROS2 Publish Odometry
- ROS2 Publish Point Cloud
- ROS2 Publish Raw Transform Tree
- ROS2 Publish Semantic Labels
- ROS2 Publish Transform Tree
- ROS2 Publisher
- ROS2 QoS Profile
- ROS2 RTX Lidar Helper
- ROS2 Service Client
- ROS2 Service Prim
- ROS2 Service Server Request
- ROS2 Service Server Response
- ROS2 Subscribe AckermannDrive
- ROS2 Subscribe Clock
- ROS2 Subscribe Joint State
- ROS2 Subscribe Transform Tree
- ROS2 Subscribe Twist
- ROS2 Subscriber
Settings#
Extension Settings#
The table list the extension-specific settings.
Setting name |
Description |
Type |
Default value |
---|---|---|---|
|
ROS 2 distributions to fallback onto if none were sourced. |
|
|
|
Whether ROS 2 publishers are allowed to publish even if there is no active subscription for their topics. |
|
|
|
Whether to disable multithreading use in the ROS2PublishImage OmniGraph node. |
|
|
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.bridge/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.bridge".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.bridge/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.bridge/SETTING_NAME")