ROS, meet Arduino

| No Comments | No TrackBacks

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.

Arduino interfaces a gyro to ROS

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

No TrackBacks

TrackBack URL:

Leave a comment

Find this blog and more at

Monthly Archives

About this Entry

This page contains a single entry by kwc published on February 23, 2011 10:09 AM.

ROS Diamondback Release Candidate 2 was the previous entry in this blog.

ROS Diamondback Release Candidate 3 is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.