Hi all,
I have a problem with rosserial_arduino. The demo hello world program compiles fine in the arduino IDE.
#include <ros.h>
#include <std_msgs/String.h>
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 problem that I have is that ros can't connect to the arduino.
When I run this "rosrun rosserial_python serial_node.py /dev/ttyACM0" I get the error:
[INFO] [WallTime: 1399983521.604184] ROS Serial Python Node
[INFO] [WallTime: 1399983521.617853] Connecting to /dev/ttyACM0 at 57600 baud
[ERROR] [WallTime: 1399983538.726124] Unable to sync with device; possible link problem or link software version mismatch such as hydro rosserial_python with groovy Arduino
When I run this "rosrun rosserial_server serial_node /dtyACM0" I get these messsages:
[ INFO] [1399983906.306684433]: Opening serial port.
[ INFO] [1399983906.306988104]: Starting session.
[ WARN] [1399983907.309690537]: Sync with device lost.
I also have added my user to the usergroups dialout and tty. That fixes the problem that I can access the port without admin(sudo) right.
I use this in combination with an Arduino Micro but it's the same as an Arduino Uno but then a bit smaller.
I hope you can help me with my problem.
Originally posted by Daniel_2210 on ROS Answers with karma: 166 on 2014-05-13
Post score: 3
Original comments
Comment by Daniel_2210 on 2014-05-20:
I have already reinstalled ROS now and that still didn't fixed it.