ros-drivers / rosserial

A ROS client library for small, embedded devices, such as Arduino. See: http://wiki.ros.org/rosserial
518 stars 525 forks source link

rosserial_server: Never establishes connection #411

Open raabuchanan opened 5 years ago

raabuchanan commented 5 years ago

When I run the following command in terminal: rosrun rosserial_server serial_node _port:=/dev/ttyACM0 _baud:=57600

I get repeated messages:

[ INFO] [1549038775.675072157]: Opened /dev/ttyACM0
[ INFO] [1549038777.676201954]: Opened /dev/ttyACM0
[ INFO] [1549038779.677131650]: Opened /dev/ttyACM0
[ INFO] [1549038781.677761948]: Opened /dev/ttyACM0

But I never see the topics the Arduino is supposed to be advertising. It's as if it can't establish a connection. I am also running message_info_service.py. It works if I use rosserial_python with the exact same parameters but I want to switch to the supposedly more stable rosserial_server.

Ubuntu 16.04 + Kinetic + Arduino Uno

doisyg commented 5 years ago

Same issue with 18.04 + Melodic + Arduino Uno

andre-nguyen commented 5 years ago

Same Ubuntu 18.04.2 LTS + STM32L4

Looks like the checksum never passes. Have you guys investigated further?

tuandle commented 5 years ago

I have the same problem with 16.04 + Kinetic + Arduino Mega 2560. Have you guys found any workaround? I already tried to build from source but the problem is the same.

andre-nguyen commented 5 years ago

Never managed to figure it out and ended up using the Python version. Still a mystery to me.

raabuchanan commented 5 years ago

Like @andre-nguyen I gave up trying to find a fix and used the Python version.

hamma95 commented 5 years ago

same issue here with 18.04 ros melodic and arduino uno. could it be the cables?

romainreignier commented 5 years ago

Usaually, when I have the issue, either there is an issue with the connection cables or the firmware has crashed and do not call nh.spinOnce() fast enough.

hamma95 commented 5 years ago

the same code works fine with rosserial python though, and with the socket node of rosserial server. as for the cables the cable works with rosserial python too. i really want to switch to rosserial server tho because its (supposedly) more robust and less prone to errors

jsseng commented 4 years ago

I have the same problem as well. Did anyone ever figure it out?

Jenifen commented 4 years ago

try to launch the node server twice :

rosrun rosserial_server serial_node _port:=/dev/ttyACM0 &
rosrun rosserial_server serial_node _port:=/dev/ttyACM0 

works for me !

or use

rosrun rosserial_python serial_node.py _port:=/dev/ttyACM0 _baud:=115200

At this time, rosserial_server is experimental. It is missing key features of the rosserial_python-provided node, including parameters, logging, and services. If you require these features, please stick to the standard Python server for now.