This is a tutorial explaining how to connect your ros2 system with Unity engine.
So there are mainly 2 ways in order to setup them up together:
-
Using both
UnityandROS2on the same machine. -
Using 2 different machines for
UnityandROS2.
Let's first see how to set them on the same machine.
-
Ubuntu 22.04
-
Unity editor 2022.3.62f3
-
ROS2 Humble
So, the first step is you download the UnityHub and install the Unity editor (2022.3.62f3). Then install ros2 humble framework for the
official documentation. The installation of both the things is quite straight forward.
- Unity Successfull Installation
- ROS2 Humble Successfull Installation
Clone the repo and copy the RosUnity folder to your main workspace.
cp -r /home/$USER/path-to-this-repo/RosUnity /home/$USER/Okay, so now you need to add some packages in your Unity and configure it inorder to communicate with ROS2 framework. Below is a video
showing the whole setup on the Unity side and after that is done you need to setup your ROS2 ecosystem.

