Robot Operating System
- hlamyanba
- Nov 6, 2016
- 2 min read

Brief Introduction
ROS is the acronym for Robot Operating System. Beginners often confuse it as the Operating System for robots like Ubuntu, Windows for pc. ROS is not an operating system for robots. It is a meta-operating system. A meta-operating system is a software platform built on the top of a operating system and allows different processes to communicate. It provides the services you would expect from an operating system, including hardware abstraction, low-level device control, implementation of commonly-used functionality, message-passing between processes, and package management. It also provides tools and libraries for obtaining, building, writing, and running code across multiple computers. Check it's important features here .
A robot is all about integration of various sensors, actuators and programs. ROS provides the platform to integrate all these stuffs and libraries like openCV, moveIt, gazebo etc. Many of the robots are using ROS .
For installation click here .
Errors may occur while initializing rosdep if you are using a proxy network.
Assuming you have installed ROS successfully , Let us interface arduino with ROS and try a simple program to Toggle the LED attached to Arduino.
1. Install rosserial by running
sudo apt-get install ros-version-rosserial-arduino
sudo apt-get install ros-version-rosserial
Replace version with your ROS distro like jade, kinetic ...
2. Install ros_lib into the Arduino Environment
<sketchbook> <sketchbook> is the directory where the Linux Arduino environment saves your sketches. Typically this is a directory called sketchbook in your home directory.
cd <sketchbook>/libraries
rm -rf ros_lib
rosrun rosserial_arduino make_libraries.py .
3. Add 'ros_lib' library to the arduino IDE(https://www.arduino.cc/en/Guide/Libraries#toc4)
After adding successfully, you can see the ros_lib in the 'Include Library'
4. Open the "Blink" program under "ros_lib" examples.
5. Upload it to the arduino
6. Find out your connection info and serial port address by running
gort scan serial
(http://gort.io/documentation/getting_started/downloads/)
7. launch roscore in new terminal
roscore
8. run the rosserial client application. replace the serial port address for the above scan result. Mine was ttyACM0
rosrun rosserial_python serial_node.py /dev/ttyACM0
9. Toggle the LED using rostopic:
rostopic pub toggle_led std_msgs/Empty --once
コメント