ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Arduino rosserial - Unable to sync with device

asked 2015-06-09 09:10:11 -0500

MKnight gravatar image


I have been using the rosserial_arduino in order to run a ROS node on arduino.

I have the following error:

[ERROR] [WallTime: 1433855869.447165] Unable to sync with device; possible link problem or link software version mismatch such as hydro rosserial_python with groovy Arduino

But, If I use the Arduino IDE before run the node it works fine.

[INFO] [WallTime: 1433858173.848825] Note: publish buffer size is 512 bytes
[INFO] [WallTime: 1433858173.849108] Setup publisher on /joystick_raw [lhd_msgs/Joystick]
[INFO] [WallTime: 1433858173.855225] Note: subscribe buffer size is 512 bytes
[INFO] [WallTime: 1433858173.855483] Setup subscriber on /leds_ocu [lhd_msgs/Leds]

If I disconnect the arduino, and I connect it again doesn't work again.

Is not a problem with the permissions of the USB.


Can you help me out?

edit retag flag offensive close merge delete


possible link problem or link software version mismatch such as hydro rosserial_python with groovy Arduino

do you have hydro installed and did you compile the libraries with groovy?!?!

Andromeda gravatar image Andromeda  ( 2015-06-09 17:11:02 -0500 )edit

9 Answers

Sort by » oldest newest most voted

answered 2015-07-23 13:21:08 -0500

miguel gravatar image

I encountered the same problem, mine was due to the buffer being over filled ( see q/a ). Try increasing the buffer size or reducing the message size. Im not sure of the contents of you messages but that was my issue.

Also try a diferent USB cable, I also encountered faulty cables giving this issue.

edit flag offensive delete link more


I had the same issue and the errors looked like a memory problem: I could run each half of my code separately, but when I put the halves together I got that error. Also, I tried to comment out code to identify the "problematic section," but kept identifying different lines that caused the error. In the end I was able to work around this by reducing the number of publishers and the message size in each one.

sirrarthur gravatar image sirrarthur  ( 2021-06-20 23:28:34 -0500 )edit

answered 2017-02-28 12:05:30 -0500

updated 2017-02-28 12:16:48 -0500

I had the same problem, this procedure solve it:

  1. Go to Arduino IDE -> Tools -> Programmer -> Select: Arduino as ISP

  2. Upload using programmer

    ctrl + shitf + u (or click file -> upload using programmer)

  3. Upload an example code (pubsub is a good one to debug this kind of problems)

    click file -> examples -> ros_lib -> pubsub

  4. make sure your arduino exists:

    ls /dev/ttyACM0

  5. make sure your user has access to dialout group:

    sudo adduser my_user_name dialout

  6. run


    rosrun rosserial_python _port:=/dev/ttyACM0 _baud:=57600

edit flag offensive delete link more



what if I'm on step 2 and I receive error that the programmer is not responding?

ss4771 gravatar image ss4771  ( 2017-03-04 17:31:20 -0500 )edit

Strangely true, this method actually worked, i have no freaking idea how...

R@m gravatar image R@m  ( 2017-05-08 05:44:17 -0500 )edit

answered 2016-05-27 04:46:31 -0500

Karthikeya Parunandi gravatar image

Hi! I also encountered the same problem and fixed it finally. It displays "Connecting to /dev/ttyACM0 at 57600 baud" while the baud rate in my Arduino code was set to be 115200. Hence, set the baud rate as it was in your arduino code (In my case it is 115200) by adding_baud:=X (where 'X' is the baud rate between your computer and the Arduino) to the same command as follows:

rosrun rosserial_python _port:=/dev/ttyACM0 _baud:=115200

The other reason could be that your port is different from that of the above command. For example, check if your port to which the Arduino is connected, is as entered in the above command i.e, ttyACM0 or ttyACM1 etc .

Hope this helps!

edit flag offensive delete link more



After many attempts with different Arduinos and re-installations a simple Serial.begin(57600) solved my problem. :-)

loopback59 gravatar image loopback59  ( 2017-06-12 16:42:17 -0500 )edit

Don't work for me

أسامة الادريسي gravatar image أسامة الادريسي  ( 2017-11-04 04:30:40 -0500 )edit

answered 2019-11-04 10:03:50 -0500

tsdk00 gravatar image

updated 2019-11-04 10:04:25 -0500

Hi, Initialize the ros handle with the same baud rate in your Arduino code nh.getHardware()->setBaud(BAUD) Something like this

   void setup() {

Once you are done uploading, start roscore and then type

rosrun rosserial_python _port:=/dev/ttyACM0 _baud:=115200

Make sure your port and baud rate are same.

edit flag offensive delete link more


You cannot use Serial.begin(..) if you are trying to connect your arduino to ROS Master using rosserial since they use the same communication port

Abhinavgandhi09 gravatar image Abhinavgandhi09  ( 2020-11-05 13:14:56 -0500 )edit

Yes, you can. But you can not send something with Serial.write()

vonunwerth gravatar image vonunwerth  ( 2021-06-08 17:03:25 -0500 )edit

answered 2016-06-23 04:54:38 -0500

Tones gravatar image

updated 2016-06-23 04:55:55 -0500

Your problem might be related to this issue:

I am encountering this problem with ubuntu 14.04 and different kernel versions (3.10.96, 3.13.0, 3.16.0).

I found three possible workarounds:

  • Use the current xenial kernel (version 4.4.0) with ubuntu 14.04 (DISCLAIMER: This is a serious change in your system and might cause trouble such as driver incompatibilities)
  • Start the serial_node with baud rate 0, exit and restart the serial node with the correct baud rate. You have to repeat this every time the error occurs.
  • Modify according to the suggestion of kvogt
edit flag offensive delete link more

answered 2019-10-22 08:20:28 -0500

tuman3515 gravatar image

i solved the problem using arduino mega.i think problem is not cable or package.its buffer size.

edit flag offensive delete link more

answered 2020-11-03 12:40:59 -0500

Abhinavgandhi09 gravatar image

I encountered this issue after installing ros serial library from the arduino IDE. It was fixed by installing ros_lib instead from:

You will also need to delete the library that you installed from the arduino IDE.

Another issue could be your version of genpy. In that case simply run the following:

$ sudo apt-get install ros-<distro>-genpy

edit flag offensive delete link more

answered 2022-08-30 14:40:15 -0500

updated 2022-12-02 05:32:28 -0500

This problem is commonly seen when there is an error in the baud rate that Arduino serial takes. The commonly used baud rates are 9600, 57600, and 115200. so you can try changing the baud rates which is working with you by the following command

rosrun rosserial_python _port:=/dev/ttyACM0 _baud:=9600

(note : ensure your port is /dev/ttyACM0 . If not try others like /dev/ttyACM1)

edit flag offensive delete link more

answered 2019-05-22 09:55:19 -0500

Marcel Usai gravatar image

Just adding another possibility for this error to occur: I wrote a simple publisher and ran into this error. After adding a spinOnce to my loop function, it disappeared.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2015-06-09 09:10:11 -0500

Seen: 31,767 times

Last updated: Dec 02 '22