-
-
Notifications
You must be signed in to change notification settings - Fork 153
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
No external controller connection(ROS2 on WLS to Webots on Windows) #759
Comments
I am facing the same problem as well. Hope someone can help to resolve this issue. Same configuration as in the above message. Thanks |
I will take a look at your issue. It is possible that the package is somehow broken on Windows. Could you just give me a few more details:
|
In my case, I have installed from apt binaries using this command: 'sudo apt-get install ros-$ROS_DISTRO-webots-ros2'. (ROS_DISTRO is humble). The package version that I see is ' 2023.0.3' Thanks |
I am not able to reproduce the issue. I tried the package from sources and apt binaries and both work in version 2023.0.3 in WSL (Humble). Could you please try to install it from sources by following these instructions: https://docs.ros.org/en/humble/Tutorials/Advanced/Simulators/Webots/Installation-Ubuntu.html. Remove the apt package to avoid conflicts. The current version of sources is 2023.0.4, which is released and should be synchronized with Humble and Iron very soon. The weird part in the logs provided by @Dan010123, is that the driver and supervisor nodes are started but they don't produce any logs and don't crash. They should write messages like the following one:
Are there any other logs related to these nodes? |
I tried installing through source but still facing the same issue. After I run the launch command, my Webots window opens up and the world gets loaded but I am not able to communicate with webots after that. I tried running teleop on a new Ubuntu window but there is no response in Webots to any of the key presses. |
Your controllers are started correctly, but there seems to be a problem preventing the extern controllers from connecting to the simulation. When starting a controller node from the launch file, the Now that you have the package installed from the sources, could you please open the launch file of any project (for example the epuck: print(controller_url_prefix()) Could you also try to start the mavic example? It is even simpler than the epuck and turtlebot. This would allow to discard potential issues coming from other packages like ros_control. |
I tried the mavic example. I am again unable to communicate with the webots window using teleop_twist_keyboard. I see this now in the webots console. Regarding the print statement, can you tell me where exactly in the robot_launch.py file, I need to add this command? Should I add it below the import statements at the top or inside one of the functions defined in the launch.py file? |
You can add the following line anywhere in the print('prefix: ' + controller_url_prefix()) When running the launch file, you should get a line in the console with the prefix. |
In all the logs you've provided, the counter doesn't go below 50 or 45 seconds. Can you confirm that it is still looking for the Webots instance? According to the output of the prefix, the packet correctly detects the WSL environment and tries to connect via TCP connection. There may be a problem with the firewall somehow preventing the connection. You can check if the Webots instance is detected by WSL by following these steps:
Is the 1234 port detected? In addition, you can also try the following command to test the TCP connection (with Webots still open):
|
For me the prefix was tcp://172.18.224.1:1234/ Later: made New-NetFirewallRule -DisplayName "WSL2 Port Bridge" -Direction Inbound -Action Allow -Protocol TCP -LocalPort 1234 now nmap in WSL/Ubuntu shows and got after trying to launch a package from WSL-ROS2 [driver-2] Error: Unknown Webots response Webots started, but still INFO: 'my_robot' extern controller: waiting for connection on ipc://1234/my_robot or on tcp://<ip_address>:1234/my_robot next time I got response And later: removed Humble totally all the same with Epuck robot: I'm at a loss.... Don't know what to try else |
Seems I've found the reason.
may be vEthernet(WSL) should be checked-off according to the shown |
I fought this issue for a while and it was windows firewall on my end. When you have the firewall popup and click "allow for private networks", it creates a matching rule which blocks for public networks. Disabling the matching block for public networks and extending the original inbound rule to work for both private and public networks was the solution for me. |
It indeed seems to be a firewall issue. @Dan010123, were you able to launch your |
@Dan010123, @suresh-venkate, any updates on this issue? Are you able to run demos now? If not feel free to reopen the issue. |
hey, I meet the same problem in webots R2023b with Ubuntu 22.04 on WSL 2.0.11. |
@nanjo712 hi i have the same issue has you and can't find any solution did you succeed to fix the problem ? |
I was experiencing the same problem as above. I was using WSL 2.2.0. I uninstalled wsl and reinstalled version 2.1.5.0, and that solved the issue for me. |
I was using WSL version: 2.3.24.0 and ran into the same issues. Downgrading to WSL 2.1.5.0 solved the issue for me as well. |
Describe the Bug
launched ROS2 Webot demos open Webots, show the world but stuck on waiting for extern controller connection on IPC or TCP which newer happens.
Steps to Reproduce
Expected behavior
Simulation running
Screenshots
System
Additional context
I guess I should somehow get IPC or TCP configured, but can't find info on how to manage this....
Thanks!
The text was updated successfully, but these errors were encountered: