Guest post from James Bowman of Willow Garage
We recently wanted to hook up an analog gyro (the Analog Devices ADXRS614) to ROS,Â and decided to use an Arduino to handle the conversion.
The Arduino runs a tiny loop that reads the analog values from its six analog lines,and writes these values to the USB serial connection. Â Meanwhile on the robot, a small ROS PythonÂ nodeÂ listens toÂ the USB reports, and publishes them as a ROS topic.
That's all there is to it: the whole thing takes under 40 lines of code.
This is probably the simplest possible way to use an Arduino with ROS. Â There are quite a few moreÂ sophisticated projects: