Open wenhaogan9898 opened 1 year ago
Unfortunately it's not really set up to do that. Instead I would recommend connecting all ROS systems to a single master (ROS1) or in ROS2 ensuring they can all talk by using the ROS2 domain ID. Then separating each of the ROS machines' topics by using namespacing on your topics and services.
I want to use unity to connect to multiple ROS systems, but the code in ROSConnection to create the ros connection instance is static, which means it can always connect to only one ROS system. I wonder if there is another way to connect multiple ROS systems (different IP and port) at the same time.
public static void DrawConnectionArrows(bool withBar, float x, float y, float receivedTime, float sentTime, bool isPublisher, bool isSubscriber, bool hasError);
public static Color GetConnectionColor(float elapsedTime, bool hasConnection, bool hasError);
public static ROSConnection GetOrCreateInstance();
public static bool IPFormatIsCorrect(string ipAddress);
public static void SetIPPref(string ipAddress);
public static void SetPortPref(int port);