Launch a ros node over wifi
Hello,
I want to link my Arduino Uno (with a wifi-shield) with my PC (on Ubuntu 14.04, ROS Indigo) over wifi and run the ROS-node on the Arduino with the following command :
rosrun rosserial_python serial_node.py tcp
or
rosrun rosserial_python serial_node.py _port:=tcp _baud:=57600
But when I launch that, the Arduino open the socket on the port 11411, the serial_node.py say calling startSerialClient
and I get the message Unable to sync with device; possible link problem or link software version mismatch such as hydro rosserial_python with groovy Arduino
.
I don't understand that error because when I link them using USB connection, I don't have any problem. I searched on Google but nothing solved this problem.
Thank you !
The first part is important: "Unable to sync with device; possible link problem". Forget the rest. Check that your shield works and that you send/receive data over it.
This is not a standard configuration, and to the best of my knowledge the rosserial_arduino libraries don't usually support communication over TCP. How are you setting up the TCP connection on the arduino?
@Humpelstilzchen Yup the shield works, when I create a C++ socket on my PC, the Arduino can connect to it and send/receive data
@ahendrix I connect the Arduino to wifi with
WiFi.begin(ssid, pass);
then I connect it to the socket on port 11411client.connect(server, 11411);
rosserial_arduino is set up to use serial communication; it isn't going to automatically detect that you have an open TCP socket and suddenly start using it.
In the serial_node.py, there's
if port_name == "tcp" : server = RosSerialServer(tcp_portnum, fork_server)
try : server.listen()
so I guess that's for wireless connection. How is it supposed to work ?
The
tcp
option to rosserial_python is for other rosserial clients such as http://wiki.ros.org/rosserial_embedde... . As far as I know, the arduino client doesn't support wifi