0
$\begingroup$

Rosanswers logo

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?


Originally posted by MKnight on ROS Answers with karma: 51 on 2015-06-09

Post score: 2


Original comments

Comment by Andromeda on 2015-06-09:
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?!?!

$\endgroup$

4 Answers 4

0
$\begingroup$

Rosanswers logo

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.


Originally posted by miguel with karma: 170 on 2015-07-23

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by sirrarthur on 2021-06-20:
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.

$\endgroup$
0
$\begingroup$

Rosanswers logo

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!


Originally posted by Karthikeya Parunandi with karma: 78 on 2016-05-27

This answer was NOT ACCEPTED on the original site

Post score: 2


Original comments

Comment by loopback59 on 2017-06-12:
After many attempts with different Arduinos and re-installations a simple Serial.begin(57600) solved my problem. :-)

Comment by أسامة الادريسي on 2017-11-04:
Don't work for me

$\endgroup$
0
$\begingroup$

Rosanswers logo

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)

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

click file -> examples -> ros_lib -> pubsub

  1. make sure your arduino exists:

    ls /dev/ttyACM0

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

    sudo adduser my_user_name dialout

  3. run

roscore

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


Originally posted by Oscar Lima with karma: 831 on 2017-02-28

This answer was NOT ACCEPTED on the original site

Post score: 4


Original comments

Comment by ss4771 on 2017-03-04:
what if I'm on step 2 and I receive error that the programmer is not responding?

Comment by R@m on 2017-05-08:
Strangely true, this method actually worked, i have no freaking idea how...

$\endgroup$
0
$\begingroup$

Rosanswers logo

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.


Originally posted by tsdk00 with karma: 85 on 2019-11-04

This answer was NOT ACCEPTED on the original site

Post score: 2


Original comments

Comment by Abhinavgandhi09 on 2020-11-05:
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

Comment by vonunwerth on 2021-06-08:
Yes, you can. But you can not send something with Serial.write()

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.