This documentation is for a prerelease version of O3DE. Click here to switch to the latest release, or select a version from the dropdown.

Version:

ROS 2 System Component

The ROS 2 System component creates a default ROS 2 Node with an executor, and handles singleton behaviors such as publishing simulation clock and broadcasting transforms.

Provider

ROS 2 Gem

Dependencies

The ROS 2 System Component depends only on Physics System Service.

Properties

The system component has no properties.

Usage

ROS 2 System Component handles several singleton-like behaviors of the simulation. You can make use of its Node to conveniently create publishers and subscribers. When creating or updating ROS messages, you can use it to get current ROS timestamp from the simulation clock. It is also internally used to publish static and dynamic transforms which are computed through ROS 2 Frame components.

Note that the simulation ROS node accessible through component’s API is there as a convenience, and you can create your own nodes and executors if you wish.

ROS2RequestsBus and ROS2Interface

The ROS2RequestBus alongside the ROS2Interface is an API system bus and interface intended for both internal ROS 2 Gem components and external Gems.

Request NameDescriptionParametersReturnScriptable
GetNodeReturns simulation node which is already setup and executing.NoneNode: rclcpp::NodeNo
GetROSTimestampReturns a ROS timestamp based on simulation clock. Timestamps are useful for any message with a header.NoneTime: simulation time in ROS formatNo
BroadcastTransformBroadcasts static or dynamic transforms. This API is used internally to handle ROS 2 Frame transform publishing.T: transform to broadcast; IsDynamic: whether it is a dynamic transformNoneNo