[isaacsim.ros2.core] ROS 2 Core#

Version: 1.2.4

The ROS 2 core extension containing backend libraries required to run the ROS 2 bridge.

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.core

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

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

Open the Window > Extensions menu in a running application instance and search for isaacsim.ros2.core. 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 core 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 Ros2Core

Main interface class for ROS 2 core 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.core.bindings._ros2_core.Ros2Core,
) bool

Checks the initialization status of the ROS 2 core.

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_core_interface(
plugin_name: str = None,
library_path: str = None,
) isaacsim.ros2.core.bindings._ros2_core.Ros2Core
release_ros2_core_interface(
arg0: isaacsim.ros2.core.bindings._ros2_core.Ros2Core,
) None

Settings#

Other Settings#

The extension changes some settings of the application or other extensions, which are listed in the table below.

Application/extension setting

Description

Value

exts."isaacsim.ros2.bridge".ros_distro

ROS 2 Bridge Settings (centralized in core extension) ROS 2 distributions to fallback onto if none were sourced.

'system_default'

exts."isaacsim.ros2.bridge".publish_without_verification

Whether ROS 2 publishers are allowed to publish even if there is no active subscription for their topics.

False

exts."isaacsim.ros2.bridge".publish_multithreading_disabled

Whether to disable multithreading use in the ROS2PublishImage OmniGraph node.

False

exts."isaacsim.ros2.bridge".publish_with_queue_thread

Whether to enable the queue-based publish thread in the ROS2PublishImage OmniGraph node.

False

exts."isaacsim.ros2.bridge".publish_queue_thread_sleep_us

How long the above queue-based publish thread sleeps between publishes in microseconds.

1000

exts."isaacsim.ros2.bridge".enable_nitros_bridge

Whether to enable image publishing via NITROS

False