rosserial - losing sync when running servo example [closed]

asked 2011-09-20 21:21:11 -0600

Bence Magyar gravatar image

I thought of moving my projects to ROS so I started with the most interesting part: setting up ROS on my Arduino Duemilanove (atmega328p-pu).

I have a project where I have to control two servos so I tried running the servo example but after a while (usually 2 or 3 commands) the device loses sync and manages to resync rarely.

Trying to debug I modified the message type from UInt16 to UInt8 but that did not help. With the line containing "servo.write" commented out it works perfectly (but does nothing :)) so my suspicion is that handling that PWM signal when writing to the servo is the one that causes desynchronization. The Blink, Hello and Sonar examples are flawless, the problem only arises when a servo object is "write"-n.

I know there are memory issues with Duemilanove but only with the ones running on an Atmega168 and all the other examples worked for me.

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2013-03-11 15:49:51