ros2-for-unity icon indicating copy to clipboard operation
ros2-for-unity copied to clipboard

ROS2UnityComponent - decide on constraint

Open adamdbrw opened this issue 4 years ago • 3 comments

Either test multiple components and confirm they work or enforce singleton

adamdbrw avatar Aug 28 '21 14:08 adamdbrw

I tested using multiple ROS2 Unity Components in different configurations over Unity project (for example adding components to single or multiple GameObjects). Everything is working fine inside Unity and ros2 environment. I believe enforcing this component to become singleton will be much more time consuming, than letting every Unity GameObject have it's own ROS2 Unity Component (if it doesn't bring any performance drawback).

kielczykowski-rai avatar Aug 30 '21 12:08 kielczykowski-rai

From design principle it is meant as one-of, since it centralizes initialization and destruction, holds all the nodes etc. Multiples only work because we made ros2cs resilient to double-init and so on.

adamdbrw avatar Aug 30 '21 12:08 adamdbrw

I encountered a similar problem by using unity2021 2022-09-26 17-18-09 的屏幕截图

l13517069919 avatar Sep 26 '22 09:09 l13517069919