Unity-Technologies / ROS-TCP-Endpoint

ROS package used to create an endpoint to accept ROS messages sent from a Unity scene using the ROS TCP Connector scripts
Apache License 2.0
177 stars 118 forks source link

Disabled ubuntu uncomplicated firewall (ufw) causes ROS-Unity Connection issues between two machines, Documentation should be updated to include issue #165

Open iceikking888 opened 1 year ago

iceikking888 commented 1 year ago

Problem

I was running into issues with connecting ROS to Unity.

My previous setup (which worked fine, we had a connection) had both ROS and Unity installed in Ubuntu on one Machine.

My new setup has ROS and Ubuntu on one machine, and Unity on a separate machine. Although we were following the same procedure to connect ROS and Unity using the ROSTCPConnector, it was failing to connect. The ROS terminal did not show any debugging information.

@ZhuoyunZhong and I discovered that on the Ubuntu ROS machine, the firewall was not enabled. Once it was enabled and port 10000 was added as a policy, I was able to successfully connect both machines.

Solution

I would like to add to the documentation, when debugging network issues. The file was ROS-Unity Integration: Network Description I imagine the most useful thing to add is:

  1. A way to check to see if the Ubuntu Uncomplicated Firewall (UFW) is enabled, by checking the status.
  2. How to enable UFW if not done so already
  3. Viewing the current policies
  4. Adding the policy to connect to port 10000 as needed

Additional Context

Here is roughly the commands that we followed to solve my issue.

sudo ufw enable
sudo ufw allow 10000

For debugging purposes use:

sudo ufw status 
sudo ufw status verbose

We also referenced this website here for our commands: Basic UFW (Uncomplicated Firewall) commands