Hello there,
I am trying to send messages from a pc through ROS to another copmputer in the same local network and into Unity via ROS-TCP-Endpoint and ROS-TCP-Connector. I have only set ROS_IP and ROS_MASTER_URI at each device and ROS_IP value in Unity is set to ip of the computer which will run endpoint.launch and Unity (subscriber side). But, when i launch endpoint.launch with roslaunch ros_tcp_endpoint endpoint.launch
and then press the play button in unity, i see that the icon next to the ROS_IP is red and i see the following error in console
Connection to 192.XXX.XXX.ab:10000 failed - System.IO.IOException: Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host.
UnityEngine.Debug:Log (object)
Unity.Robotics.ROSTCPConnector.ROSConnection/<ConnectionThread>d__115:MoveNext () (at Library/PackageCache/com.unity.robotics.ros-tcp-connector@c27f00c6cf/Runtime/TcpConnector/ROSConnection.cs:854)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder:Start<Unity.Robotics.ROSTCPConnector.ROSConnection/<ConnectionThread>d__115> (Unity.Robotics.ROSTCPConnector.ROSConnection/<ConnectionThread>d__115&)
Unity.Robotics.ROSTCPConnector.ROSConnection:ConnectionThread (string,int,single,single,int,System.Action`1<System.Net.Sockets.NetworkStream>,System.Action,Unity.Robotics.ROSTCPConnector.ROSConnection/OutgoingMessageQueue,System.Collections.Concurrent.ConcurrentQueue`1<System.Tuple`2<string, byte[]>>,System.Threading.CancellationToken)
Unity.Robotics.ROSTCPConnector.ROSConnection:<Connect>b__102_0 () (at Library/PackageCache/com.unity.robotics.ros-tcp-connector@c27f00c6cf/Runtime/TcpConnector/ROSConnection.cs:507)
System.Threading._ThreadPoolWaitCallback:PerformWaitCallback ()
Subscriber PC (Running endpoint, Unity and subscriber):
- OS: Windows 10
- IP Address: 192.XXX.XXX.ab
- ROS_IP (set from cmd): 192.XXX.XXX.ab
- ROS_IP (set inside Unity): 192.XXX.XXX.ab
- ROS_MASTER_URI (set from cmd): http://192.XXX.XXX.dc:11311
- Unity Version: 2021.3.25f1
- ROS-TCP-Connector Version: 0.7.0-preview
- ROS-TCP-Endpoint Version: 0.7.0
- ROS Distro: Noetic
- Connection Method: WIFI
Publisher PC (Running roscore and publisher):
- OS: Linux Ubuntu 18.04
- IP Address: 192.XXX.XXX.dc
- ROS_IP (set inside .bashrc with
export ROS_IP
): 192.XXX.XXX.dc - ROS_MASTER_URI (set inside .bashrc with export command): http://192.XXX.XXX.dc:11311
- ROS Distro: Melodic
- Connection Method: Ethernet
Could you help me on this issue please?
Thanks in advance.
P.S. I tried setting tcp_ip and tcp_port parameters on roslaunch. But, the issue still persists.