Dear sir,
I use arduino yun and build rosserial-arduino example helloworld, when I complier and upload the code, it show warning:
Sketch uses 11,968 bytes (41%) of program storage space. Maximum is 28,672 bytes.
Global variables use 1,948 bytes (76%) of dynamic memory, leaving 612 bytes for local variables. Maximum is 2,560 bytes.
Low memory available, stability problems may occur. Could this cause problem? How to reduce size?
Helloword is simple:
#include
#include
ros::NodeHandle nh;
std_msgs::String str_msg;
ros::Publisher chatter("chatter", &str_msg);
char hello[13] = "hello world!";
void setup()
{
nh.initNode();
nh.advertise(chatter);
}
void loop()
{
str_msg.data = hello;
chatter.publish( &str_msg );
nh.spinOnce();
delay(1000);
}
The communication errors:
john@uDocker:~$ rosrun rosserial_python serial_node.py _port:=/dev/ttyACM1
[INFO] [WallTime: 1461906854.574293] ROS Serial Python Node
[INFO] [WallTime: 1461906854.580512] Connecting to /dev/ttyACM1 at 57600 baud
[ERROR] [WallTime: 1461906871.685965] Unable to sync with device; possible link problem or link software version mismatch such as hydro rosserial_python with groovy Arduino
I had follow http://wiki.ros.org/rosserial_arduino/Tutorials/Arduino%20IDE%20Setup
and then follow http://answers.ros.org/question/196204/unable-to-sync-with-device-arduino-uno/
to get indigo source code, but the errors are the same.
Could somebody show me how to debug this?
1. how to low the serial baud from 57600 to a low rate to make the link stable
2. How to check my rosserial_python version and my Arduino version, such as "link software version mismatch such as hydro rosserial_python with groovy Arduino"
Thanks
John
↧