Closed Cokthemhok closed 3 years ago
It is likely that you didn't set up your ROS_IP appropriately on the phone or your phone is not on the same subnet as the computer. Make sure that your phone has an IP address something like 192.168.2.XXX, and if it is then just make sure that when you initialize the node, pass in a custom ROS_IP as the IP address of the phone. If that looks fine it is probably a permissions problem. Note that ROS uses http not https and I know that in newer versions of Android you have to specifically opt out of only allowing https connections.
This kind of error is a network error not an error with this package to be clear, it has to do with how you set up your network for ROS. It could also be an issue with the firewall on your computer, to see if that is the issue you can temporarily disable the firewall.
Thank you for supporting me. I already fixed this problem. It's my mistake. In my PC, I use localhost
for ROS_MASTER_URI
, so it cannot connect with my phone. After changed to IP, it work normally.
And I have an other question: Do you have plan to make Dartros work with web (in Flutter)?
Thank you so much for this project. It's very awesome!
It's technically impossible to support dartros on web since you can't create a server on a web-client (and ros nodes create a server). However, it is technically feasible to do it through rosbridge. Currently you can use rosbridge through the roslib package for dart. However, it exposes a different interface and is not as complete as this package, there will be stuff missing or incomplete. I've used it successfully in the past for simple publisher and subscribers. I'm thinking about providing a dartros compatible interface for rosbridge that will make the differences invisible to the user, but it requires time, and I don't have a lot of spare time right now.
Opened #40 for web support
I build the app with the example code from this link: example, and of course, I use the rosMasterUri like that:
final nh = await dartros.initNode('ros_node_1', args, rosMasterUri: "http://192.168.2.142:11311");
192.168.2.142 is my PC's IP (Ubuntu 18.04) Total my code:And when debug (with my android phone), the error is:
Exception has occurred. SocketException (SocketException: OS Error: Connection refused, errno = 111, address = 192.168.2.142, port = 39883)
This error happen at line 25 of file "time.dart":
Please support me. Thank you so much.