Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TCP connection failed in Unity in Pick and Place Tutorial—part 2 (using docker) #384

Open
owlmoo opened this issue Oct 27, 2022 · 3 comments

Comments

@owlmoo
Copy link

owlmoo commented Oct 27, 2022

Describe the bug
I follow the instruction to set up the docker and unity. However, when I hit play, I cannot build the connection.
In unity, it reports "Connection to 127.0.0.1:10000 failed" and "The remote host forcibly closed an existing connection".

trouble

“远程主机强迫关闭了一个现有的连接” means "The remote host forcibly closed an existing connection".

To Reproduce
In the ros side, I just source the setup.bash and run the part2.launch(roslaunch niryo_moveit part_2.launch).
In the unity side, I just follow the instuction and hit play.
rossettings
unitysettings

Console logs / stack traces

Connection to 127.0.0.1:10000 failed - System.IO.IOException: Unable to write data to the transport connection: 远程主机强迫关闭了一个现有的连接。 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.Threading._ThreadPoolWaitCallback:PerformWaitCallback ()

Environment (please complete the following information, where applicable):

  • Unity Version: Unity 2020.3.35f1
  • Unity machine OS + version: Windows 10
  • ROS machine OS + version: Ubuntu 18.04, ROS Melodic
  • ROS–Unity communication: Docker
  • Branch or version: v0.7.0
@owlmoo
Copy link
Author

owlmoo commented Oct 27, 2022

I transformed the ros part to another machine(ubuntu 20.04) and everything worked fine, but I still want to run on docker..

@sergiosolorzano
Copy link

sergiosolorzano commented Dec 17, 2022

Hi @owlmoo I could run ubuntu connection on v.18.04 but when I upgraded to 20.04 it fails.
(note - I upgraded to 20.04 after seeing you post because in my case Unity doesn't connect)

In the tutorial I enter command:
roslaunch niryo_moveit part_2.launch
I get:
server_endpoint-2] restarting process
process[server_endpoint-2]: started with pid [27240]
/usr/bin/env: ‘python’: No such file or directory
[server_endpoint-2] process has died [pid 27240, exit code 127, cmd /home/sergio/IoT/Unity-Robotics-Hub/tutorials/pick_and_place/ROS/src/ros_tcp_endpoint/src/ros_tcp_endpoint/default_server_endpoint.py --wait __name:=server_endpoint __log:=/home/sergio/.ros/log/9fa2e58c-7e33-11ed-831c-cd67f84396f1/server_endpoint-2.log].
log file: /home/sergio/.ros/log/9fa2e58c-7e33-11ed-831c-cd67f84396f1/server_endpoint-2*.log

Did you have a problem in 20.04 when using python3? I read Ubuntu 20.04 uses python3 and I'm wondering if the ros packages prepared by unity are for python2 and would only run on Ubuntu 18.04.

@owlmoo
Copy link
Author

owlmoo commented Dec 19, 2022

@sergiosolorzano Hi, I have this problem too, ros noetic support python3, and I just re-link the python interpreter using :
sudo ln -s /usr/bin/python3 /usr/bin/python

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants