1
votes

When I try to use the 'Hello World' program with rosserial and arduino after restarting my pc. The code works fine, however once i stop the serial communication and try to rerun the same code. I get the following error.

[INFO] [WallTime: 1399983521.604184] ROS Serial Python Node
[INFO] [WallTime: 1399983521.617853] Connecting to /dev/ttyACM0 at 57600 baud
[ERROR] [WallTime: 1399983538.726124] Unable to sync with device; possible link problem or link software version mismatch such as hydro rosserial_python with groovy Arduino

I am facing the same issue using both arduino UNO and arduino Nano. I have tried increasing the buffer size in ros.h, setting the baud rate in arduino code with Serial.begin(57600) and all the solutions mentioned in link. What else can i do to fix the problem ?

Here is a link to the library code I am using : http://wiki.ros.org/rosserial_arduino/Tutorials/Hello%20World

2
Need to see some code. Particularly the start up code.wallyk
Question updated!Harjatin
Did you ever figure out why this was happening @Tanvir?hornairs

2 Answers

0
votes

This Problem is because of baud rate. Please cross check the baud rate. Try on slower baud rate like 9600.

Your baud rate also changes with F_CPU frequency. If your board is working on some other frequency. Use #define F_CPU before burning the hex file in arduino. change the baud rate by running the following the command:

rosrun rosserial_python serial_node.py _port:=/dev/ttyACM0 _baud:=9600
0
votes

Check whether you are using any Serial.print() in your Arduino code. You cannot use the serial monitor when publishing because ROS Serial uses the same communication ports. So, remove any code related to Serial including Serial.begin() in your Arduino code.