Ros indigo serial to Arduino UNO but unable to sync
I connect UNO to ROS indigo , ROS publish message to UNO. have problems like this:
[ERROR] [WallTime: 1433186203.033925] Unable to sync with device; possible link problem or link software version mismatch such as hydro rosserial_python with groovy Arduino
But I use ROS indigo and rosserial-indigo-devel. Actually, code sometimes works, and "lose sync" again. sometimes have error like that.
Is the problem of publish rate in ROS and subscribe rate in UNO?
Somebody can help me, thanks so much.
node "determine_path" in ros publish an angle with rate 0.09,
then another node "zumo_controller " in ros subscribe it and publish to UNO with rate 0.019.
UNO subscribe like this:
void loop(){
nh.spinOnce();
delay(10);
}
Launch file:
<launch>
<group ns = "space1">
<node
pkg = "rosserial_python"
type = "serial_node.py"
name = "serial_node"
>
<param name = "port" value = "/dev/ttyACM1"/>
</node>
<node
pkg = "jl"
type = "zumo_controller"
name = "zumo_controller"
/>
<node
pkg = "jl"
type = "determine_path"
name = "hokuyo_analyze"
/>
<node
pkg = "hokuyo_node"
type = "hokuyo_node"
name = "hokuyo"
>
<param name = "port" value = "/dev/ttyACM0"/>
</node>
</group>
</launch>
If your code "sometimes" works maybe you run out of SRAM, see http://answers.ros.org/question/19320...
you could also try using something like the teensy that has a lot more RAM, amongst other things https://www.pjrc.com/teensy/teensy31....
thanks all