Ros Lab 1
Ros Lab 1
W HY ROS NOW !
1
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
W HY ROS 2 THEN ?
Disclaimer
In this course, we will assume no
previous knowledge of ROS.
2
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
T HE CHALLENGE !
Suppose you are working on a KUKA R820 iiwa End-effector moving (Java)
3
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
T HE CHALLENGE !
Suppose you are working on a KUKA R820 iiwa End-effector moving (Java)
3
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
T HE CHALLENGE !
Suppose you are working on a KUKA R820 iiwa End-effector moving (Java)
ROS
toolAttachedToLBR.move(ptpMove); target_pose.pose.position.y = 0.0;
target_pose.pose.position.z = 0.9;
group.setPoseTarget(target_pose);
O UTLINE
5
What is and why ROS 2?
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
W HAT IS ROS?
R OBOT O PERATING S YSTEM (ROS):
The Robot Operating System (ROS) is a set of open-source software libraries and tools that
help you build robot applications.
6
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
W HAT IS ROS?
R OBOT O PERATING S YSTEM (ROS):
The Robot Operating System (ROS) is a set of open-source software libraries and tools that
help you build robot applications.
Plumbing
Process
management.
Inter-process
communication.
Device drivers. 6
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
W HAT IS ROS?
R OBOT O PERATING S YSTEM (ROS):
The Robot Operating System (ROS) is a set of open-source software libraries and tools that
help you build robot applications.
Plumbing
Tools
Process
management. Simulation
Inter-process Visualization
communication. Data logging
Device drivers. 6
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
W HAT IS ROS?
R OBOT O PERATING S YSTEM (ROS):
The Robot Operating System (ROS) is a set of open-source software libraries and tools that
help you build robot applications.
Capabilites
Plumbing
Tools Control
Process
management. Simulation Planning
W HAT IS ROS?
R OBOT O PERATING S YSTEM (ROS):
The Robot Operating System (ROS) is a set of open-source software libraries and tools that
help you build robot applications.
Community
Capabilites
Plumbing Packaging
Tools Control
Process Software
management. Simulation Planning
distribution
Inter-process Visualization Perception
Documentation
communication. Data logging Mapping
Tutorials
Device drivers. Manipulation 6
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
H ISTORY OF ROS
7
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
ROS 1 A RCHITECTURE
ROS Node:
It is the basic unit of processing. ROS ROS
Node 1 Node 2
ROS
Master
Client libraries
(roscpp, rospy)
TCPROS/ UDPROS
Linux
8
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
ROS 1 A RCHITECTURE
ROS Node:
It is the basic unit of processing. ROS ROS
Node 1 Node 2
ROS Master:
The core of ROS program. Nodes need to
register theselves and communicate through it. ROS
(Problematic!) Master
Client libraries
(roscpp, rospy)
TCPROS/ UDPROS
Linux
8
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
ROS 1 A RCHITECTURE
ROS Node:
It is the basic unit of processing. ROS ROS
Node 1 Node 2
ROS Master:
The core of ROS program. Nodes need to
register theselves and communicate through it. ROS
(Problematic!) Master
Client libraries:
C++ and Python programming language are Client libraries
(roscpp, rospy)
supported.
TCPROS/ UDPROS
Linux
8
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
ROS 1 A RCHITECTURE
ROS Node:
It is the basic unit of processing. ROS ROS
Node 1 Node 2
ROS Master:
The core of ROS program. Nodes need to
register theselves and communicate through it. ROS
(Problematic!) Master
Client libraries:
C++ and Python programming language are Client libraries
(roscpp, rospy)
supported.
TCP/ UDP: TCPROS/ UDPROS
8
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
ROS 1 A RCHITECTURE
ROS Node:
It is the basic unit of processing. ROS ROS
Node 1 Node 2
ROS Master:
The core of ROS program. Nodes need to
register theselves and communicate through it. ROS
(Problematic!) Master
Client libraries:
C++ and Python programming language are Client libraries
(roscpp, rospy)
supported.
TCP/ UDP: TCPROS/ UDPROS
S TARTING OF ROS 2.
Limitations of ROS 1:
Built for a single robot.
Not real-time.
Needs reliable network.
Single point of failure.
Next-generation ROS: Building on DDS (2014).
First official release of ROS 2: Ardent Apalone,
December 2017.
9
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
ROS 2 VS . ROS 1
ROS 1 ROS 2
ROS ROS ROS ROS ROS
Node 1 Node 2 Node 1 Node 2 Node 3
ROS
Client libraries
Master
(rclpy, rclcpp)
Abstract DDS
Client libraries
(roscpp, rospy) Intra-process
DDS
API
TCPROS/ UDPROS
10
ROS 2 Design Philosophy
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
Reference Book: ROS Robot Programming (in English).Authors: Yoonseok Pyo, Hancheol Cho, Leon Jung, 11
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
What is DDS?
DDS stands for Data
Distribution Service.
DDS is an open standard for
data-centric communication
middleware.
It enables efficient, real-time
data exchange between
components in a distributed
system.
mDDS offers a
publish-subscribe model. ROS 2 layered design
12
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
ROS 2 breaks complex systems down into many modular nodes. Topics are a vital
element of the ROS graph that act as a bus for nodes to exchange messages.
13
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
The Kobuki robot driver is a ROS node that communicates with the robot’s hardware,
publishing the bumper state, and recieving the robot’s velocity.
14
Basic Linux Commands
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
15
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
ROS 2 I NSTALLATION .
16
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
ROS 2 I NSTALLATION .
17
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
pwd
It shows us the file path of the working
directory.
18
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
pwd
It shows us the file path of the working
directory.
mkdir
“mkdir” command creates a folder on the
working directory.
$ mkdir folder1
18
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
pwd
It shows us the file path of the working
directory.
mkdir
“mkdir” command creates a folder on the
working directory.
$ mkdir folder1
mkdir -p
“mkdir -p” command creates nested folders
on the working directory.
$ mkdir -p folder2/folder3
18
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
pwd touch
It shows us the file path of the working This command creates any file that has a
directory. specific extension.
mkdir $ touch file2.py
“mkdir” command creates a folder on the $ touch file2.cpp
working directory.
$ mkdir folder1
mkdir -p
“mkdir -p” command creates nested folders
on the working directory.
$ mkdir -p folder2/folder3
18
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
pwd touch
It shows us the file path of the working This command creates any file that has a
directory. specific extension.
mkdir $ touch file2.py
“mkdir” command creates a folder on the $ touch file2.cpp
working directory.
cat
$ mkdir folder1 The cat command opens any file on the
mkdir -p terminal.
“mkdir -p” command creates nested folders $ cat file.py
on the working directory.
$ mkdir -p folder2/folder3
18
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
pwd touch
It shows us the file path of the working This command creates any file that has a
directory. specific extension.
mkdir $ touch file2.py
“mkdir” command creates a folder on the $ touch file2.cpp
working directory.
cat
$ mkdir folder1 The cat command opens any file on the
mkdir -p terminal.
“mkdir -p” command creates nested folders $ cat file.py
on the working directory. ls
$ mkdir -p folder2/folder3 lists all files and folders in the directory.
18
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
history
The “History” command lists all previously
used commands.
19
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
history
The “History” command lists all previously
used commands.
sudo
The “sudo” command makes the user a
superuser for only one operation.
$ sudo apt-get install python3
19
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
history
The “History” command lists all previously
used commands.
sudo
The “sudo” command makes the user a
superuser for only one operation.
$ sudo apt-get install python3
clear
The “clear” command clears the terminal
screen.
19
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
history
The “History” command lists all previously man ls
The “man ls” command gives pieces of
used commands.
information about the commands.
sudo
The “sudo” command makes the user a
superuser for only one operation.
$ sudo apt-get install python3
clear
The “clear” command clears the terminal
screen.
19
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
history
The “History” command lists all previously man ls
The “man ls” command gives pieces of
used commands.
information about the commands.
sudo
The “sudo” command makes the user a sudo apt-get install
Install the specified package.
superuser for only one operation. $ sudo apt-get install nano
$ sudo apt-get install python3
clear
The “clear” command clears the terminal
screen.
19
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
history
The “History” command lists all previously man ls
The “man ls” command gives pieces of
used commands.
information about the commands.
sudo
The “sudo” command makes the user a sudo apt-get install
Install the specified package.
superuser for only one operation. $ sudo apt-get install nano
$ sudo apt-get install python3
sudo apt-get remove
clear Uninstall the specified package.
The “clear” command clears the terminal $ sudo apt-get remove nano
screen.
19
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
nano
he nano command is a text editor that works
on the terminal.
$ nano hello world.py
20
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
nano
he nano command is a text editor that works
on the terminal.
$ nano hello world.py
cp
The “cp” command copies that we specified
file into a specific folder.
$ cp file1.py folder1
20
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
nano
he nano command is a text editor that works
on the terminal.
$ nano hello world.py
cp
The “cp” command copies that we specified
file into a specific folder.
$ cp file1.py folder1
cp -r
The “cp -r” command copies a specified
folder into another folder.
20
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
nano mv
he nano command is a text editor that works Moves/renames any file or folder into another
on the terminal. folder.
$ nano hello world.py $ move file.py folder2
$ move file.py file2.py
cp
The “cp” command copies that we specified
file into a specific folder.
$ cp file1.py folder1
cp -r
The “cp -r” command copies a specified
folder into another folder.
20
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
nano mv
he nano command is a text editor that works Moves/renames any file or folder into another
on the terminal. folder.
$ nano hello world.py $ move file.py folder2
$ move file.py file2.py
cp
The “cp” command copies that we specified chmod +x
file into a specific folder. give the execute right to the file
$ cp file1.py folder1 $ chmod +x file.py
cp -r
The “cp -r” command copies a specified
folder into another folder.
20
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
nano mv
he nano command is a text editor that works Moves/renames any file or folder into another
on the terminal. folder.
$ nano hello world.py $ move file.py folder2
$ move file.py file2.py
cp
The “cp” command copies that we specified chmod +x
file into a specific folder. give the execute right to the file
$ cp file1.py folder1 $ chmod +x file.py
cp -r cd
The “cp -r” command copies a specified change the directory
folder into another folder. $ cd myfolder
20
ROS 2 Command Line Interface
(CLI).
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
C ONFIGURING ENVIRONMENT
21
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
C ONFIGURING ENVIRONMENT
21
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
C ONFIGURING ENVIRONMENT
Turtlesim
Turtlesim is a lightweight simulator for learning ROS 2.
22
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
Turtlesim
Turtlesim is a lightweight simulator for learning ROS 2.
1. Install Turtlesim
$ sudo apt-get install ros-foxy-turtlesim
22
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
Turtlesim
Turtlesim is a lightweight simulator for learning ROS 2.
1. Install Turtlesim
$ sudo apt-get install ros-foxy-turtlesim
22
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
Turtlesim
Turtlesim is a lightweight simulator for learning ROS 2.
1. Install Turtlesim
$ sudo apt-get install ros-foxy-turtlesim
22
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
23
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
ROS 2 topics are unidirectional and allow communication of 1:N, N:1 or N:N.
24
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
25
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
25
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
25
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
26
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
26
What is and why ROS 2? ROS 2 Design Philosophy Basic Linux Commands ROS 2 Command Line Interface (CLI).
End of Lecture
27