ROS Lecture9 UpdatedbyMe
ROS Lecture9 UpdatedbyMe
ROS Lecture9 UpdatedbyMe
• It uses the existing operating system’s process management system, file system, user interface, program
utilities (compiler, thread, model etc.). In addition, it provides essential functions for developing robot
application software such as data transmission/reception, scheduling and error handling among many
different types of hardware in a library form.
• In addition, it develops, manages and provides various application programs based on the robot software
framework and distributed packages developed by users.
ROS: Software Framework
Software framework for developing robot software
It is possible to jointly develop complex programs by finely dividing
them with message exchanging method between nodes.
Supports command tools, Visualization tool Rviz, GUI toolbar rqt, 3D
simulator Gazebo
Supports modeling, sensing, recognition, navigation and
manipulation functions commonly used in robotics
ROS Add Ons
rqt
rqt is a software framework of ROS that implements the various GUI tools in the form
of plugins. One can run all the existing GUI tools as dockable windows within rqt!
The tools can still run in a traditional standalone method, but rqt makes it easier to
manage all the various windows on the screen at one moment. A QT based GUI
developed for ROS
rqt
• A QT based GUI developed for ROS
• Lots of different plugins.
`rqt_graph`, `rqt_image_view`, `rqt_console` to name a few.
`rqt_graph` can be used to view the graph structure of the system,
i.e the nodes, and how are they related etc.
• Multiple plugins can be run simultaneously.
• Anyone can add more custom plugins written in C++ or Python.
RVIZ : ROS
• A Powerful tool for 3D Visualization in ROS
• Modular state and sensor visualization
• Excellent community support.
Gazebo Simulator
• Simulate 3D rigid body dynamics
• Simulate a variety of different sensors, many of them are available
online ready to use.
• Has many environments and robots pre-implemented.
• With ROS interface, it can be used to directly to test the applications
inside a simulation.
• Has even more plugins available.
ROS-enabled operating system
• Traditional operating system
Ubuntu, Windows, Fedora, OS X, Gentoo, OpenSUSE, Debian,
Raspbian, Arch, QNX Realtime OS. (There can be functional limitations
in some OS)
Partially available for Android and iOS, smartphone operating system
In case of microcontroller unit (MCU) which can not be equipped
with OS, it provides a library to communicate via serial
communication, Bluetooth and LAN.
Basically it is recommended to run on Ubuntu
Philosophy of ROS
• Peer to Peer: Individual programs (nodes) communicate over ROS API
(messages, etc.)
• Distributed: Nodes can communicate over a network.
• Multilingual: Native support for C++, Python and Lisp, Experimental
support exist for Java and Lua too. Client Libraries for MATLAB etc.
• Light Weight: Doesn’t slow the programs or even hinder their ability
to work with other frameworks.
• Free and Open Source
What ROS isn’t?
• An actual Operating System
• A programming Language
• A programming environment/IDE
• A hardware
ROS terms
• Node: The smallest unit of executable processors i.e. sensors, actuators etc. It can be regarded as
single executable program. In ROS, a system is consist of many nodes. Each node transmits and
receives data by message communication
• Package: One or more nodes, information for node execution . Also bundles of packages are called
as metapackages.
• Message: Data is transmitted and received through message between nodes. Messages can have
various types such as integer, floating point and Boolean. You can also use structures such as a
simple data structure and an array of messages that hold messages in the message.
ROS terms Topic, Publisher, Subscriber
ROS terms Service, Service server, Service Client
ROS terms Action, Action server, Action Client
Message Communication
Understanding Message Communication
• The most fundamental technical point of ROS: message communication
among nodes
Understanding Message Communication
1. Run Master: XMLRPC(XML-Remote Procedure Call)
$ roscore
Understanding Message Communication
2. Run Subscriber node
$rosrun packagename nodename
Understanding Message Communication
3. Run Publisher node
$rosrun packagename nodename
Understanding Message Communication
4. Publisher Information
The master informs the subscriber node of the new publisher
information
Understanding Message Communication
5. Request access to the publisher node
Request TCPROS connection using the publisher information from the
master
Understanding Message Communication
6. Connection response to subscriber node
Return TCP URL and port number corresponding to the connection
response
Understanding Message Communication
7. TCP Connection
Establish connection with the publisher node using TCPROS
Understanding Message Communication
8. Send Message
The publisher node sends a message to the subscriber node (topic)
Understanding Message Communication
• In Topic mode, message are continuously transmitted unless the connection is
terminated. That is continuity.
• turtlesim package
• roscore
• rosrun turtlesim turtlesim_node
• rosrun turtlesim turtle_teleop_key
• rosrun rqt_graph rqt_graph
Catching the message communication concept
10. Example! turtlesim
Message
ROS Message
ROS shell commands
Commands Command description Detailed Description
roscd ros+cd (changes directory) Move to the directory of the specified ROS package
rosls ros+ls(lists file) Check the list of files in the ROS package
catkin_eclipse Converts the package created by the Catkin build system for Eclipse