Ask Your Question
2

Arduino rosserial - Unable to sync with device

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

MKnight gravatar image

Hi,

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.

Thanks

Can you help me out?

edit retag flag offensive close merge delete

Comments

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 imageAndromeda ( 2015-06-09 17:11:02 -0600 )edit

7 Answers

Sort by » oldest newest most voted
1

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

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
2

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

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

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

    roscore

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

edit flag offensive delete link more

Comments

1

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

ss4771 gravatar imagess4771 ( 2017-03-04 17:31:20 -0600 )edit

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

R@m gravatar imageR@m ( 2017-05-08 05:44:17 -0600 )edit
1

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

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 serial_node.py _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

Comments

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

loopback59 gravatar imageloopback59 ( 2017-06-12 16:42:17 -0600 )edit

Don't work for me

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

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

Tones gravatar image

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

Your problem might be related to this issue: https://github.com/ros-drivers/rosser...

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 SerialClient.py according to the suggestion of kvogt
edit flag offensive delete link more
0

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

tsdk00 gravatar image

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

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

   void setup() {
      Serial.begin(115200);
      nh.getHardware()->setBaud(115200);
      nh.initNode();

Once you are done uploading, start roscore and then type

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

Make sure your port and baud rate are same.

edit flag offensive delete link more
0

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

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
0

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

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

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

Seen: 14,107 times

Last updated: Nov 04