Arduino for ROS-001 -build a development environment for the ROS and Arduino connections
My ubuntu system:ubuntu 14.04.10 TLS 32-bit
Arduino version:Arduino 1.6.11 Linux 32-bit
Ros version used:Ros Indigo one. Download and install the relevant software
Step 0. If you have not installed Ros Indigo This version of the Ros robot operating system on Ubuntu , please refer to this blog for installation: Ros Learning-001 install Ros Indigo
Step 1. The first thing to do is to download and install the Arduino IDE development environment. (Please see this blog)
two. Build the ROS connection Arduino IDE Development Environment
Step 2. Then install the Arduino related packages for your ROS environment:
sudo apt-get install-y ros-indigo-rosserial-arduino
sudo apt-get install-y ros-indigo-rosserial
three. Build Arduino IDE connection to ROS development Environment
Step 3. Then install ros_lib Library for your Arduino development environment.
1. Open a new terminal, start the ROS master node:
$ roscore
2. Reopen a terminal and switch the path to/opt/arduino-1.6.11/libraries/this path:
~$ cd/opt/arduino-1.6.11/libraries/
3. See if there is a Ros_lib folder under this path. If yes, remove it first (the command to delete is sudo rm-rf ros_lib). (We are not here.) There's no first outfit. )
4. Execute the following command. The goal is to generate a ros_lib library within this/opt/arduino-1.6.11/libraries path.
Note: This command is followed by a small dot ".", which means that the Ros_lib library is built again under the current path.
/opt/arduino-1.6.11/libraries$
rosrun Rosserial_arduino make_libraries.py.
(Before executing this command, you must first execute $ roscore in a terminal.) This you understand, I do not explain. )
5. After the execution, let's check to see if the Ros_lib folder was successfully generated:
If you see the current path, the new student becomes a ros_lib folder, the description is successful.
Step 4. Now you're starting the Arduino IDE Software
$arduino
done
Summary:
The two development environments, ROS and Arduino , are now connected.
In this way, under the ROS , the successful establishment of the Arduino development environment. Ros -related library functions have also been successfully added under the Arduino IDE .
Next, introduce a Hello World program to describe how this Arduino and ROS are used.