Interfacing Arduino with ROS
Interfacing an Arduino board with ROS simply means running a ROS node on Arduino that can publish/subscribe like a normal ROS node. An Arduino ROS node can be used to acquire and publish sensor values to a ROS environment, and other nodes can process it. Also, we can control devices, for example, actuators such as DC motors, by publishing values to an Arduino node. The main communication between PC and Arduino happens over UART. There is a dedicated protocol called ROS Serial (http://wiki.ros.org/rosserial/Overview), implemented as a ROS metapackage called rosserial
, which can encode and decode ROS Serial messages. Using the ROS Serial protocol, we can publish and subscribe to Arduino like a ROS node over UART.
To start with ROS interfacing of Arduino, follow these steps:
- First, we have to install some ROS packages on Ubuntu. The following commands can be used to install them.
- Installing the
rosserial
metapackage:$ sudo apt-get install ros-kinetic-rosserial
- The...