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 "determinepath" in ros publish an angle with rate 0.09,
then another node "zumocontroller " 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>
Asked by crazymumu on 2015-06-01 14:36:02 UTC
Comments
If your code "sometimes" works maybe you run out of SRAM, see http://answers.ros.org/question/193202/rosserial-arduino-use-progmem-in-ros_lib/
Asked by Wolf on 2015-06-02 04:58:39 UTC
you could also try using something like the teensy that has a lot more RAM, amongst other things https://www.pjrc.com/teensy/teensy31.html
Asked by nickw on 2015-06-02 07:37:01 UTC
thanks all
Asked by crazymumu on 2015-06-04 19:45:34 UTC