ros-drivers / rosserial

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

Unable to sync with device; possible link problem or link software version mismatch such as hydro rosserial_python with groovy Arduino #398

Open lehider opened 5 years ago

lehider commented 5 years ago

Unable to sync with device; possible link problem or link software version mismatch such as hydro rosserial_python with groovy Arduino

I am getting this error while rosserial reading from melodic

nicolasarl commented 5 years ago

I have the same problem. When I rote my code in Arduino I used kinetic version, but I updated all the system, including the ros_lib folder to melodic. Since that moment I got the error that you mentioned.

Any suggestion?

lehider commented 5 years ago

check your arduino code .... I am pretty sure , some blocks of your arduino code is not suporting by 'ROS' serial package . change that lines according to ROS

senceryazici commented 5 years ago

If the versions match, might be due to a runtime error on your hardware that prevents the device to talk to the server. Check if subscribers and publishers are set correctly, and node initializes properly, and loop is handled properly (nh.initNode() for init and nh.spinOnce() for loop), but I highly recommend you to check the ros_lib, the library that was generated for arduino, it should be generated by it's package with the correct version of ROS.

Check this link out, http://wiki.ros.org/rosserial_arduino/Tutorials

And also the issue can be closed due to inactivity.

nehagarg commented 4 years ago

Does your rosmsg type has an array field inside it? Melodic gives this error with array msg type. See here : https://nehainblunderland.blogspot.com/2020/08/running-arduino-board-with-ubuntu-18.html

Abhinavgandhi09 commented 3 years ago

This issue might occur if you are trying to use Float32MultiArray msgs. There is some issue with it's implementation(maybe something with the buffer size) in ros_lib or rosserial which causes a runtime error and thus rosserial is not able to connect to the arduino. I tried using Float64MultiArray instead and it worked. You can refer to this post if you are trying to implement the same: https://web.archive.org/web/20160711134453/http://answers.ros.org/question/10988/use-multiarray-in-rosserial/

DeepakKumarShah commented 3 years ago

https://github.com/ros-drivers/rosserial/issues/354 try this if you are using esp, may be it will solve the problem.

javidaslam commented 2 years ago

SOLVED : Hey, I encountered the same error , it related to baud rate ! i changed baud rate to 57600 and it worked ,error solved !

rosrun rosserial_arduino serial_node.py /dev/ttyACM0 _baud:=57600

jones2126 commented 1 year ago

@javidaslam Thank you. baud:=57600 fixed it for me also.

limn3 commented 1 year ago

/dev/ttyACM0 _baud:=57600

Where can this file be found?

StohanzlMart commented 1 year ago

Had the same error (really !helpful error message).

After "rosrun rosserial_arduino make_libraries.py .":

For me the fix was to change the line in my (Platformio) project in lib/ros_lib/ros.h where just because ESP8266 hw it assumes you want to use WiFi. So the error message should have included the hint "(ros)Serial interface may be misconfigured, please check ros.h in your project." -- Someone with more patience might do a pull request on this.

Who ever had the bright idea to put this (in ros.h) there, !thank you for wasting about 10 hours of my life!

Hdriwn commented 1 year ago

If none of the solutions mentioned above resolve the problem, consider rechecking or removing any loops from your Arduino code. I encountered a similar issue, and removing a while loop which i used in the void loop in my code resolved it. My issue was the program was getting stuck in that while loop, maybe due to something on my side regarding the exit condition, but i got the same error message.