Rosserial & arduino

Dec 01 2011 Published under Robotics | Tags:

Problem:
Running rosserial using Arduino Diecimila with atmega168 exhibit the following error:

$ rosrun rosserial_python serial_node.py /dev/ttyUSB0
[INFO] [WallTime: 1322594525.996815] ROS Serial Python Node
[INFO] [WallTime: 1322594526.001244] Connected on /dev/ttyUSB0 at 57600 baud
[ERROR] [WallTime: 1322594541.012049] Lost sync with device, restarting...
[ERROR] [WallTime: 1322594556.021583] Lost sync with device, restarting...
[ERROR] [WallTime: 1322594571.023361] Lost sync with device, restarting...

This error is caused by the fact that atmega168 does not have sufficient RAM.

Solution:
Upgrade to atmega328p chip. Burn arduino bootloader using avrisp mkII
Before loading arduino bootloader to new atmega328p microcontroller, make sure device signature matches 0x1e950f (for atmega328 microcontrollers).

$ avrdude -B 6 -c avrispmkII -p m328p -P usb -U lfuse:w:0xFF:m
$ avrdude -B 6 -c avrispmkII -p m328p -P usb -U hfuse:w:0xDA:m
$ avrdude -B 6 -c avrispmkII -p m328p -P usb -U efuse:w:0x05:m

Burn bootloader using arduino IDE. Make sure board is set to Arduino Duemilanove w/ Atmega328
Tools > Burn Bootloader > w/ AVRISP mkII

reupload rosserial examples & rerun rosserial

ref:

http://answers.ros.org/question/2120/problem-setting-up-rosserial_arduino

http://answers.ros.org/question/2156/rosserial-lost-sync-with-device-arduino

Tags:

No responses yet

Comments are closed at this time.

Login