ROS2UE5 is a plugin that enables the simulation of Cyber-Physical Systems (CPS) controlled by ROS2 (Robot Operating System 2) within Unreal Engine 5.3. By integrating ROS2 with Unreal Engine, this plugin provides a powerful environment to simulate and visualize complex robotic systems in real time.
The plugin is built around four key modules:
- ConfigLoader: Handles the loading and configuration of ROS2 communication settings.
- UROSBridge: Facilitates the communication between Unreal Engine and ROS2 via the ROS web bridge.
- URoboSim: Provides simulation components specifically for robotic systems.
- URoboSimEditor: Tools and features for editing and managing robotic simulations directly in the Unreal Editor.
Before using the plugin, ensure you have the following installed:
-
ROS2 (Humble Hawksbill): ROS2 is required for handling robotic systems and middleware. You can install ROS2 Humble from the official ROS installation page.
-
Unreal Engine 5.3: You will need a UE5 project with version 5.3. Download Unreal Engine here.
-
ROS Web Bridge: The plugin uses
rosbridge_suitefor web communication between ROS and Unreal Engine. You can find therosbridge_suitehere: ROS Bridge Suite GitHub.
Follow the official guide for installing ROS2 Humble:
Once installed, ensure that your environment is correctly set up to use ROS2. Test the installation by running:
source /opt/ros/humble/setup.bash
ros2 --versionYou can download and install Unreal Engine from the Epic Games Launcher. Create a project in Unreal Engine 5.3, or open an existing one to integrate the ROS2UE5 plugin.
Install the rosbridge_suite package using the following:
sudo apt install ros-humble-rosbridge-suiteOnce installed, run the ROS bridge server with:
ros2 launch rosbridge_server rosbridge_websocket_launch.xml-
Download or clone the ROS2UE5 repository to your local machine:
git clone https://github.com/ManuETR/ROS2UE5.git
-
Copy the plugin folder into your Unreal project’s
Pluginsdirectory:<YourUnrealProject>/Plugins/ROS2UE5 -
Open your project in Unreal Engine and activate the ROS2UE5 plugin:
- Go to Edit -> Plugins.
- Search for "ROS2UE5" and enable the plugin.
- Restart Unreal Engine if prompted.
These repositories are not required but can greatly extend and automate your simulation workflows:
The ROS2UE5 Automation Tools repository provides utilities to streamline the setup, creation, and launching of Unreal Engine simulations using configuration files for easy automation.
Clone the repository:
git clone https://github.com/ManuETR/ROS2UE5-tools.gitThis will allow for rapid simulation setup with predefined configurations and automation scripts. Refer to the README in this repository for detailed instructions on usage.
The SeqLog Integration repository extends ROS2UE5 by providing an interface to the SeqLog data sink, allowing retrieval of detailed simulation data and logging.
Clone the repository:
git clone https://github.com/ManuETR/SeqLog.gitFollow the setup instructions in the repository to integrate SeqLog with ROS2UE5, enabling advanced data collection from your simulations.
After setup, you can test the ROS2 and Unreal Engine integration by following these steps:
-
Launch the ROS bridge server:
ros2 launch rosbridge_server rosbridge_websocket_launch.xml
-
Open your Unreal project and run a scene that includes ROS2 simulation components (such as URoboSim).
-
Verify the ROS2 topics, services, and messages are correctly being transmitted by monitoring ROS topics with:
ros2 topic list
- Seamless integration of ROS2 and Unreal Engine simulations.
- Support for ROS2 communication via WebSockets (using ROS bridge).
- Configurable robotic simulation environment using URoboSim.
- Editor support via URoboSimEditor for easy management of robot configurations and interactions.
- Optional automation tools for easy simulation setup and control.
This project is the result of my bachelor project. The paper can be found here: https://github.com/ManuETR/ROS2UE5/blob/main/docs/bachelor.pdf
