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:
- pmad  - controls an Arduino's I/Os using ROS service calls
- avr_bridge - automates generation of ROS-Arduino message transport
- arduino - our own package: an Arduino as an Ethernet-connected ROS node
Leave a comment