Unity-Technologies / Robotics-Object-Pose-Estimation

A complete end-to-end demonstration in which we collect training data in Unity and use that data to train a deep neural network to predict the pose of a cube. This model is then deployed in a simulated robotic pick-and-place task.
Apache License 2.0
293 stars 75 forks source link

System.Net.SocketException: Address already in use #20

Closed nullbyte91 closed 3 years ago

nullbyte91 commented 3 years ago

Hello Team,

I'm getting the System.Net.SocketException: Address already in use error from the Unity console.

Troubleshooting workaround by leaving the Override Unity IP Address blank and Change the ROS IP Address to the IP of your Docker container didn't fix the error.

Docker IP Configuration,

root@d283c453367f:/catkin_ws# ifconfig 
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.17.0.3  netmask 255.255.0.0  broadcast 172.17.255.255
        ether 02:42:ac:11:00:03  txqueuelen 0  (Ethernet)
        RX packets 179  bytes 24664 (24.6 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 61  bytes 4008 (4.0 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 53259  bytes 14479754 (14.4 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 53259  bytes 14479754 (14.4 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Unity_IP_Configuration

Regards, Jegathesan S

mrpropellers commented 3 years ago

Hey Jegathesan! To confirm, you also get this same message when your ROS settings are set up like so? 4_ros_settings

nullbyte91 commented 3 years ago

@mrpropellers Yes.

mrpropellers commented 3 years ago

Ok! I'll document this and investigate with some colleagues. We may have some issue with our singleton class not behaving like a singleton for some reason... In the meantime, could you also check to see that you only have one instance of the Unity editor open? Some cursory searches reveal that this exception typically means that there are two copies of the same process attempting to communicate over a socket at the same time. Any extra information you can provide about your specific configuration would be helpful for tracking this down as well. What host OS and Unity version are you using? How did you build and launch the Docker container? Do you have any additional processes running that might affect network communication? etc.

mrpropellers commented 3 years ago

Hey @nullbyte91, any progress made on this issue? The additional information I mentioned above would be really useful for us internally to help isolate this bug if it is still causing problems for you.

mrpropellers commented 3 years ago

Closing due to lack of activity. We were unable to repro the issue. @nullbyte91 feel free to re-open if you are still seeing this issue and can provide some additional context to help us reproduce it.