How to do it…

  1. To run the ROS nodes from Arduino, let us set up the rosserial packages and the rosserial_arduino client in the Arduino IDE.
  2. Install the rosserial packages on Ubuntu 16.04 using the following commands:
$ sudo apt-get install ros-kinetic-rosserial-arduino ros-kinetic-rosserial-embeddedlinux ros-kinetic-rosserial-windows ros-kinetic-rosserial-server ros-kinetic-rosserial-python
  1. Build the packages from the source after cloning the rosserial repository in the catkin workspace:
$ cd ~/catkin_ws/src/
$ git clone https://github.com/ros-drivers/rosserial.git
$ cd ~/catkin_ws/
$ catkin_make
  1. Install the Arduino IDE by following the steps described at http://arduino.cc/en/Main/Software.
  2.  Download the Linux 64-bit version and copy the Arduino IDE folder to the Ubuntu desktop.

Arduino requires Java runtime support to run it. If you do not have Java installed, we can install it using the following command:

$ sudo apt-get install java-common
  1. After installation, we can start the Arduino IDE from the Ubuntu application launcher. The following screenshot shows the Arduino IDE window:
Arduino IDE window
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.12.205