Hi,
Relatively New to ROS.
Im trying to connect to my roscore through unity but i keep getting::
Connection to 192.168.50.3:11311 failed - System.IO.IOException: Unable to write data to the transport connection: An established connection was aborted by the software in your host machine.
I was able to connect before using localhost but after changing my ip address I could not. Worse reverting back to localhost cause the same issue.
I am currently running in windows and able to run
c:\catkin_ws\devel\setup.bat && roslaunch ros_tcp_endpoint endpoint.launch
successfully and able to see Unity connect to it before.
Not sure where I have gone wrong but im sure its a stupid mistake I make somewhere.
Thanks in advance
Hi there! Although I don’t know what the problem might be at the moment, here are some questions that might help me understand your problem.
How do you run ROS? Are you running it directly in Windows, from docker, or on a Virtual Machine?
Are you trying to use ROS 1 or ROS 2?
Is the exception from ROS TCP Connector in Unity?
Where did the IP address come from?
Did you change the setup somehow before switching from localhost to that IP address?
Hi Thanks for replying
How do you run ROS? Are you running it directly in Windows, from docker, or on a Virtual Machine?
Are you trying to use ROS 1 or ROS 2?
- Im running directly from Windows noetic ROS1 .
Is the exception from ROS TCP Connector in Unity?
- Yes. I got the error from Unity.
Where did the IP address come from?
- The IP address is set in the IPV4 Settings for my Ethernet Port. I set the ROS_IP = 192.168.50.3 and ROS_MASTER_URI to be http://192.168.50.3:11311. Also in Unity I set the ROS IP Address to be 192.168.50.3 and ROS Port to be 11311. ROSCOMPA is set to 192.168.50.3 in my host file.
Did you change the setup somehow before switching from localhost to that IP address?
- I only change the IP Address after i confirm localHost is working first and connecting to my switch.
Also I installed XAMPP Client and check that only python.exe has the address and port. Also disabled all firewalls to ensure that it is not a factor.
Appreciate that you take the time to look into my problem.
[Solved]
Hi All,
Solve my problem.
I was misled by this statement::
Note, By default, the server_endpoint will listen on ip 0.0.0.0 (i.e. allowing all incoming addresses) and port 10000, but these settings are configurable. To override them, you can change the command to roslaunch ros_tcp_endpoint endpoint.launch tcp_ip:=127.0.0.1 tcp_port:=10000 (obviously replacing 127.0.0.1 with your desired IP and 10000 with your desired port number.)
It is necessary to specify the tcp_ip and tcp_port in order for the connection to work else U will get the above error.
1 Like