![]() |
ex01_first_package package from ros2_tutorial repoex01_first_package ex02_gazebo_simulation ex03_state_estimation ex04_actions ex04_msgs ex04_nav2_client ex05_behavior_trees ex05_bt_plugins |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 0.0.0 |
License | BSD |
Build type | AMENT_CMAKE |
Use | RECOMMENDED |
Repository Summary
Description | Tutorials for the KBS robotics labs |
Checkout URI | https://github.com/uos/ros2_tutorial.git |
VCS Type | git |
VCS Version | main |
Last Updated | 2025-05-06 |
Dev Status | UNKNOWN |
Released | UNRELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Additional Links
Maintainers
- Alexander Mock
Authors
- Alexander Mock
ex01_first_package
ROS is short for Robot Operating System. It is a framework/middleware for the quick development of software related to robotics. It provides the infrastructure for sensor and actuator communications, sensor data handling, serialization, visualizations, and software packaging. All these things don’t change for different types of robots. Roboticists are happy
- to not implement everything from scratch for every robot they have,
- that they can use other software that was already implemented somewhere in the world.
ROS1 was invented in 2007. It was mostly used in research and is completely open-source. Some design choices were considered bad. In addition, it had no guarantees in real-time executions nor in how safe communications were. Recently ROS2 was released in 2017, seeking to overcome those and other issues.
With the following set of repositories, we try to explain the basic ROS concepts by example.
ROS2
To continue a computer with natively installed Ubuntu 22.04 is required. Come back if you find one.
Great to see you have found one. Now install ROS2 humble with the following steps (official instructions: https://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debians.html)
Open a terminal:
Useful packages
sudo apt-get install vim
Preparation
locale # check for UTF-8
sudo apt update && sudo apt install locales
sudo locale-gen en_US en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
export LANG=en_US.UTF-8
locale # verify settings
sudo apt install software-properties-common
sudo add-apt-repository universe
sudo apt update && sudo apt install curl -y
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
Refresh the package sources
sudo apt update
Upgrade all packages you already have
sudo apt upgrade
Installation
Now start the ROS2-humble installation:
sudo apt install ros-humble-desktop
Some additional dev tools:
sudo apt install ros-dev-tools
Environment Variables
In many situations, ROS2 will need additional configuration via setting environment variables. A good way is to add additional environment variables to the ~/.bashrc
file (~
is the path to your home folder). Then they will be set every time a new terminal is started. Open the file with Vim (yes with vim) and add the following line to the end of the file:
vi ~/.bashrc
Try to insert this at the end of the file:
source /opt/ros/humble/setup.bash
Exit Vim: https://stackoverflow.com/questions/11828270/how-do-i-exit-vim. The sooner you learn Vim the better. As soon as you restart your terminal this command will set up everything you will need for your global ROS2. Test your installation via
ros2 run demo_nodes_cpp talker
open another terminal (Ctrl+Shift+T) and execute:
File truncated at 100 lines see the full file
Package Dependencies
Deps | Name |
---|---|
ament_cmake | |
rclcpp | |
std_msgs |
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged ex01_first_package at Robotics Stack Exchange
![]() |
ex01_first_package package from ros2_tutorial repoex01_first_package ex02_gazebo_simulation ex03_state_estimation ex04_actions ex04_msgs ex04_nav2_client ex05_behavior_trees ex05_bt_plugins |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 0.0.0 |
License | BSD |
Build type | AMENT_CMAKE |
Use | RECOMMENDED |
Repository Summary
Description | Tutorials for the KBS robotics labs |
Checkout URI | https://github.com/uos/ros2_tutorial.git |
VCS Type | git |
VCS Version | main |
Last Updated | 2025-05-06 |
Dev Status | UNKNOWN |
Released | UNRELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Additional Links
Maintainers
- Alexander Mock
Authors
- Alexander Mock
ex01_first_package
ROS is short for Robot Operating System. It is a framework/middleware for the quick development of software related to robotics. It provides the infrastructure for sensor and actuator communications, sensor data handling, serialization, visualizations, and software packaging. All these things don’t change for different types of robots. Roboticists are happy
- to not implement everything from scratch for every robot they have,
- that they can use other software that was already implemented somewhere in the world.
ROS1 was invented in 2007. It was mostly used in research and is completely open-source. Some design choices were considered bad. In addition, it had no guarantees in real-time executions nor in how safe communications were. Recently ROS2 was released in 2017, seeking to overcome those and other issues.
With the following set of repositories, we try to explain the basic ROS concepts by example.
ROS2
To continue a computer with natively installed Ubuntu 22.04 is required. Come back if you find one.
Great to see you have found one. Now install ROS2 humble with the following steps (official instructions: https://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debians.html)
Open a terminal:
Useful packages
sudo apt-get install vim
Preparation
locale # check for UTF-8
sudo apt update && sudo apt install locales
sudo locale-gen en_US en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
export LANG=en_US.UTF-8
locale # verify settings
sudo apt install software-properties-common
sudo add-apt-repository universe
sudo apt update && sudo apt install curl -y
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
Refresh the package sources
sudo apt update
Upgrade all packages you already have
sudo apt upgrade
Installation
Now start the ROS2-humble installation:
sudo apt install ros-humble-desktop
Some additional dev tools:
sudo apt install ros-dev-tools
Environment Variables
In many situations, ROS2 will need additional configuration via setting environment variables. A good way is to add additional environment variables to the ~/.bashrc
file (~
is the path to your home folder). Then they will be set every time a new terminal is started. Open the file with Vim (yes with vim) and add the following line to the end of the file:
vi ~/.bashrc
Try to insert this at the end of the file:
source /opt/ros/humble/setup.bash
Exit Vim: https://stackoverflow.com/questions/11828270/how-do-i-exit-vim. The sooner you learn Vim the better. As soon as you restart your terminal this command will set up everything you will need for your global ROS2. Test your installation via
ros2 run demo_nodes_cpp talker
open another terminal (Ctrl+Shift+T) and execute:
File truncated at 100 lines see the full file
Package Dependencies
Deps | Name |
---|---|
ament_cmake | |
rclcpp | |
std_msgs |
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged ex01_first_package at Robotics Stack Exchange
![]() |
ex01_first_package package from ros2_tutorial repoex01_first_package ex02_gazebo_simulation ex03_state_estimation ex04_actions ex04_msgs ex04_nav2_client ex05_behavior_trees ex05_bt_plugins |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 0.0.0 |
License | BSD |
Build type | AMENT_CMAKE |
Use | RECOMMENDED |
Repository Summary
Description | Tutorials for the KBS robotics labs |
Checkout URI | https://github.com/uos/ros2_tutorial.git |
VCS Type | git |
VCS Version | main |
Last Updated | 2025-05-06 |
Dev Status | UNKNOWN |
Released | UNRELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Additional Links
Maintainers
- Alexander Mock
Authors
- Alexander Mock
ex01_first_package
ROS is short for Robot Operating System. It is a framework/middleware for the quick development of software related to robotics. It provides the infrastructure for sensor and actuator communications, sensor data handling, serialization, visualizations, and software packaging. All these things don’t change for different types of robots. Roboticists are happy
- to not implement everything from scratch for every robot they have,
- that they can use other software that was already implemented somewhere in the world.
ROS1 was invented in 2007. It was mostly used in research and is completely open-source. Some design choices were considered bad. In addition, it had no guarantees in real-time executions nor in how safe communications were. Recently ROS2 was released in 2017, seeking to overcome those and other issues.
With the following set of repositories, we try to explain the basic ROS concepts by example.
ROS2
To continue a computer with natively installed Ubuntu 22.04 is required. Come back if you find one.
Great to see you have found one. Now install ROS2 humble with the following steps (official instructions: https://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debians.html)
Open a terminal:
Useful packages
sudo apt-get install vim
Preparation
locale # check for UTF-8
sudo apt update && sudo apt install locales
sudo locale-gen en_US en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
export LANG=en_US.UTF-8
locale # verify settings
sudo apt install software-properties-common
sudo add-apt-repository universe
sudo apt update && sudo apt install curl -y
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
Refresh the package sources
sudo apt update
Upgrade all packages you already have
sudo apt upgrade
Installation
Now start the ROS2-humble installation:
sudo apt install ros-humble-desktop
Some additional dev tools:
sudo apt install ros-dev-tools
Environment Variables
In many situations, ROS2 will need additional configuration via setting environment variables. A good way is to add additional environment variables to the ~/.bashrc
file (~
is the path to your home folder). Then they will be set every time a new terminal is started. Open the file with Vim (yes with vim) and add the following line to the end of the file:
vi ~/.bashrc
Try to insert this at the end of the file:
source /opt/ros/humble/setup.bash
Exit Vim: https://stackoverflow.com/questions/11828270/how-do-i-exit-vim. The sooner you learn Vim the better. As soon as you restart your terminal this command will set up everything you will need for your global ROS2. Test your installation via
ros2 run demo_nodes_cpp talker
open another terminal (Ctrl+Shift+T) and execute:
File truncated at 100 lines see the full file
Package Dependencies
Deps | Name |
---|---|
ament_cmake | |
rclcpp | |
std_msgs |
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged ex01_first_package at Robotics Stack Exchange
![]() |
ex01_first_package package from ros2_tutorial repoex01_first_package ex02_gazebo_simulation ex03_state_estimation ex04_actions ex04_msgs ex04_nav2_client ex05_behavior_trees ex05_bt_plugins |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 0.0.0 |
License | BSD |
Build type | AMENT_CMAKE |
Use | RECOMMENDED |
Repository Summary
Description | Tutorials for the KBS robotics labs |
Checkout URI | https://github.com/uos/ros2_tutorial.git |
VCS Type | git |
VCS Version | main |
Last Updated | 2025-05-06 |
Dev Status | UNKNOWN |
Released | UNRELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Additional Links
Maintainers
- Alexander Mock
Authors
- Alexander Mock
ex01_first_package
ROS is short for Robot Operating System. It is a framework/middleware for the quick development of software related to robotics. It provides the infrastructure for sensor and actuator communications, sensor data handling, serialization, visualizations, and software packaging. All these things don’t change for different types of robots. Roboticists are happy
- to not implement everything from scratch for every robot they have,
- that they can use other software that was already implemented somewhere in the world.
ROS1 was invented in 2007. It was mostly used in research and is completely open-source. Some design choices were considered bad. In addition, it had no guarantees in real-time executions nor in how safe communications were. Recently ROS2 was released in 2017, seeking to overcome those and other issues.
With the following set of repositories, we try to explain the basic ROS concepts by example.
ROS2
To continue a computer with natively installed Ubuntu 22.04 is required. Come back if you find one.
Great to see you have found one. Now install ROS2 humble with the following steps (official instructions: https://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debians.html)
Open a terminal:
Useful packages
sudo apt-get install vim
Preparation
locale # check for UTF-8
sudo apt update && sudo apt install locales
sudo locale-gen en_US en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
export LANG=en_US.UTF-8
locale # verify settings
sudo apt install software-properties-common
sudo add-apt-repository universe
sudo apt update && sudo apt install curl -y
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
Refresh the package sources
sudo apt update
Upgrade all packages you already have
sudo apt upgrade
Installation
Now start the ROS2-humble installation:
sudo apt install ros-humble-desktop
Some additional dev tools:
sudo apt install ros-dev-tools
Environment Variables
In many situations, ROS2 will need additional configuration via setting environment variables. A good way is to add additional environment variables to the ~/.bashrc
file (~
is the path to your home folder). Then they will be set every time a new terminal is started. Open the file with Vim (yes with vim) and add the following line to the end of the file:
vi ~/.bashrc
Try to insert this at the end of the file:
source /opt/ros/humble/setup.bash
Exit Vim: https://stackoverflow.com/questions/11828270/how-do-i-exit-vim. The sooner you learn Vim the better. As soon as you restart your terminal this command will set up everything you will need for your global ROS2. Test your installation via
ros2 run demo_nodes_cpp talker
open another terminal (Ctrl+Shift+T) and execute:
File truncated at 100 lines see the full file
Package Dependencies
Deps | Name |
---|---|
ament_cmake | |
rclcpp | |
std_msgs |
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged ex01_first_package at Robotics Stack Exchange
![]() |
ex01_first_package package from ros2_tutorial repoex01_first_package ex02_gazebo_simulation ex03_state_estimation ex04_actions ex04_msgs ex04_nav2_client ex05_behavior_trees ex05_bt_plugins |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 0.0.0 |
License | BSD |
Build type | AMENT_CMAKE |
Use | RECOMMENDED |
Repository Summary
Description | Tutorials for the KBS robotics labs |
Checkout URI | https://github.com/uos/ros2_tutorial.git |
VCS Type | git |
VCS Version | main |
Last Updated | 2025-05-06 |
Dev Status | UNKNOWN |
Released | UNRELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Additional Links
Maintainers
- Alexander Mock
Authors
- Alexander Mock
ex01_first_package
ROS is short for Robot Operating System. It is a framework/middleware for the quick development of software related to robotics. It provides the infrastructure for sensor and actuator communications, sensor data handling, serialization, visualizations, and software packaging. All these things don’t change for different types of robots. Roboticists are happy
- to not implement everything from scratch for every robot they have,
- that they can use other software that was already implemented somewhere in the world.
ROS1 was invented in 2007. It was mostly used in research and is completely open-source. Some design choices were considered bad. In addition, it had no guarantees in real-time executions nor in how safe communications were. Recently ROS2 was released in 2017, seeking to overcome those and other issues.
With the following set of repositories, we try to explain the basic ROS concepts by example.
ROS2
To continue a computer with natively installed Ubuntu 22.04 is required. Come back if you find one.
Great to see you have found one. Now install ROS2 humble with the following steps (official instructions: https://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debians.html)
Open a terminal:
Useful packages
sudo apt-get install vim
Preparation
locale # check for UTF-8
sudo apt update && sudo apt install locales
sudo locale-gen en_US en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
export LANG=en_US.UTF-8
locale # verify settings
sudo apt install software-properties-common
sudo add-apt-repository universe
sudo apt update && sudo apt install curl -y
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
Refresh the package sources
sudo apt update
Upgrade all packages you already have
sudo apt upgrade
Installation
Now start the ROS2-humble installation:
sudo apt install ros-humble-desktop
Some additional dev tools:
sudo apt install ros-dev-tools
Environment Variables
In many situations, ROS2 will need additional configuration via setting environment variables. A good way is to add additional environment variables to the ~/.bashrc
file (~
is the path to your home folder). Then they will be set every time a new terminal is started. Open the file with Vim (yes with vim) and add the following line to the end of the file:
vi ~/.bashrc
Try to insert this at the end of the file:
source /opt/ros/humble/setup.bash
Exit Vim: https://stackoverflow.com/questions/11828270/how-do-i-exit-vim. The sooner you learn Vim the better. As soon as you restart your terminal this command will set up everything you will need for your global ROS2. Test your installation via
ros2 run demo_nodes_cpp talker
open another terminal (Ctrl+Shift+T) and execute:
File truncated at 100 lines see the full file
Package Dependencies
Deps | Name |
---|---|
ament_cmake | |
rclcpp | |
std_msgs |
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged ex01_first_package at Robotics Stack Exchange
![]() |
ex01_first_package package from ros2_tutorial repoex01_first_package ex02_gazebo_simulation ex03_state_estimation ex04_actions ex04_msgs ex04_nav2_client ex05_behavior_trees ex05_bt_plugins |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 0.0.0 |
License | BSD |
Build type | AMENT_CMAKE |
Use | RECOMMENDED |
Repository Summary
Description | Tutorials for the KBS robotics labs |
Checkout URI | https://github.com/uos/ros2_tutorial.git |
VCS Type | git |
VCS Version | main |
Last Updated | 2025-05-06 |
Dev Status | UNKNOWN |
Released | UNRELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Additional Links
Maintainers
- Alexander Mock
Authors
- Alexander Mock
ex01_first_package
ROS is short for Robot Operating System. It is a framework/middleware for the quick development of software related to robotics. It provides the infrastructure for sensor and actuator communications, sensor data handling, serialization, visualizations, and software packaging. All these things don’t change for different types of robots. Roboticists are happy
- to not implement everything from scratch for every robot they have,
- that they can use other software that was already implemented somewhere in the world.
ROS1 was invented in 2007. It was mostly used in research and is completely open-source. Some design choices were considered bad. In addition, it had no guarantees in real-time executions nor in how safe communications were. Recently ROS2 was released in 2017, seeking to overcome those and other issues.
With the following set of repositories, we try to explain the basic ROS concepts by example.
ROS2
To continue a computer with natively installed Ubuntu 22.04 is required. Come back if you find one.
Great to see you have found one. Now install ROS2 humble with the following steps (official instructions: https://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debians.html)
Open a terminal:
Useful packages
sudo apt-get install vim
Preparation
locale # check for UTF-8
sudo apt update && sudo apt install locales
sudo locale-gen en_US en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
export LANG=en_US.UTF-8
locale # verify settings
sudo apt install software-properties-common
sudo add-apt-repository universe
sudo apt update && sudo apt install curl -y
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
Refresh the package sources
sudo apt update
Upgrade all packages you already have
sudo apt upgrade
Installation
Now start the ROS2-humble installation:
sudo apt install ros-humble-desktop
Some additional dev tools:
sudo apt install ros-dev-tools
Environment Variables
In many situations, ROS2 will need additional configuration via setting environment variables. A good way is to add additional environment variables to the ~/.bashrc
file (~
is the path to your home folder). Then they will be set every time a new terminal is started. Open the file with Vim (yes with vim) and add the following line to the end of the file:
vi ~/.bashrc
Try to insert this at the end of the file:
source /opt/ros/humble/setup.bash
Exit Vim: https://stackoverflow.com/questions/11828270/how-do-i-exit-vim. The sooner you learn Vim the better. As soon as you restart your terminal this command will set up everything you will need for your global ROS2. Test your installation via
ros2 run demo_nodes_cpp talker
open another terminal (Ctrl+Shift+T) and execute:
File truncated at 100 lines see the full file
Package Dependencies
Deps | Name |
---|---|
ament_cmake | |
rclcpp | |
std_msgs |
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged ex01_first_package at Robotics Stack Exchange
![]() |
ex01_first_package package from ros2_tutorial repoex01_first_package ex02_gazebo_simulation ex03_state_estimation ex04_actions ex04_msgs ex04_nav2_client ex05_behavior_trees ex05_bt_plugins |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 0.0.0 |
License | BSD |
Build type | AMENT_CMAKE |
Use | RECOMMENDED |
Repository Summary
Description | Tutorials for the KBS robotics labs |
Checkout URI | https://github.com/uos/ros2_tutorial.git |
VCS Type | git |
VCS Version | main |
Last Updated | 2025-05-06 |
Dev Status | UNKNOWN |
Released | UNRELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Additional Links
Maintainers
- Alexander Mock
Authors
- Alexander Mock
ex01_first_package
ROS is short for Robot Operating System. It is a framework/middleware for the quick development of software related to robotics. It provides the infrastructure for sensor and actuator communications, sensor data handling, serialization, visualizations, and software packaging. All these things don’t change for different types of robots. Roboticists are happy
- to not implement everything from scratch for every robot they have,
- that they can use other software that was already implemented somewhere in the world.
ROS1 was invented in 2007. It was mostly used in research and is completely open-source. Some design choices were considered bad. In addition, it had no guarantees in real-time executions nor in how safe communications were. Recently ROS2 was released in 2017, seeking to overcome those and other issues.
With the following set of repositories, we try to explain the basic ROS concepts by example.
ROS2
To continue a computer with natively installed Ubuntu 22.04 is required. Come back if you find one.
Great to see you have found one. Now install ROS2 humble with the following steps (official instructions: https://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debians.html)
Open a terminal:
Useful packages
sudo apt-get install vim
Preparation
locale # check for UTF-8
sudo apt update && sudo apt install locales
sudo locale-gen en_US en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
export LANG=en_US.UTF-8
locale # verify settings
sudo apt install software-properties-common
sudo add-apt-repository universe
sudo apt update && sudo apt install curl -y
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
Refresh the package sources
sudo apt update
Upgrade all packages you already have
sudo apt upgrade
Installation
Now start the ROS2-humble installation:
sudo apt install ros-humble-desktop
Some additional dev tools:
sudo apt install ros-dev-tools
Environment Variables
In many situations, ROS2 will need additional configuration via setting environment variables. A good way is to add additional environment variables to the ~/.bashrc
file (~
is the path to your home folder). Then they will be set every time a new terminal is started. Open the file with Vim (yes with vim) and add the following line to the end of the file:
vi ~/.bashrc
Try to insert this at the end of the file:
source /opt/ros/humble/setup.bash
Exit Vim: https://stackoverflow.com/questions/11828270/how-do-i-exit-vim. The sooner you learn Vim the better. As soon as you restart your terminal this command will set up everything you will need for your global ROS2. Test your installation via
ros2 run demo_nodes_cpp talker
open another terminal (Ctrl+Shift+T) and execute:
File truncated at 100 lines see the full file
Package Dependencies
Deps | Name |
---|---|
ament_cmake | |
rclcpp | |
std_msgs |
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged ex01_first_package at Robotics Stack Exchange
![]() |
ex01_first_package package from ros2_tutorial repoex01_first_package ex02_gazebo_simulation ex03_state_estimation ex04_actions ex04_msgs ex04_nav2_client ex05_behavior_trees ex05_bt_plugins |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 0.0.0 |
License | BSD |
Build type | AMENT_CMAKE |
Use | RECOMMENDED |
Repository Summary
Description | Tutorials for the KBS robotics labs |
Checkout URI | https://github.com/uos/ros2_tutorial.git |
VCS Type | git |
VCS Version | main |
Last Updated | 2025-05-06 |
Dev Status | UNKNOWN |
Released | UNRELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Additional Links
Maintainers
- Alexander Mock
Authors
- Alexander Mock
ex01_first_package
ROS is short for Robot Operating System. It is a framework/middleware for the quick development of software related to robotics. It provides the infrastructure for sensor and actuator communications, sensor data handling, serialization, visualizations, and software packaging. All these things don’t change for different types of robots. Roboticists are happy
- to not implement everything from scratch for every robot they have,
- that they can use other software that was already implemented somewhere in the world.
ROS1 was invented in 2007. It was mostly used in research and is completely open-source. Some design choices were considered bad. In addition, it had no guarantees in real-time executions nor in how safe communications were. Recently ROS2 was released in 2017, seeking to overcome those and other issues.
With the following set of repositories, we try to explain the basic ROS concepts by example.
ROS2
To continue a computer with natively installed Ubuntu 22.04 is required. Come back if you find one.
Great to see you have found one. Now install ROS2 humble with the following steps (official instructions: https://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debians.html)
Open a terminal:
Useful packages
sudo apt-get install vim
Preparation
locale # check for UTF-8
sudo apt update && sudo apt install locales
sudo locale-gen en_US en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
export LANG=en_US.UTF-8
locale # verify settings
sudo apt install software-properties-common
sudo add-apt-repository universe
sudo apt update && sudo apt install curl -y
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
Refresh the package sources
sudo apt update
Upgrade all packages you already have
sudo apt upgrade
Installation
Now start the ROS2-humble installation:
sudo apt install ros-humble-desktop
Some additional dev tools:
sudo apt install ros-dev-tools
Environment Variables
In many situations, ROS2 will need additional configuration via setting environment variables. A good way is to add additional environment variables to the ~/.bashrc
file (~
is the path to your home folder). Then they will be set every time a new terminal is started. Open the file with Vim (yes with vim) and add the following line to the end of the file:
vi ~/.bashrc
Try to insert this at the end of the file:
source /opt/ros/humble/setup.bash
Exit Vim: https://stackoverflow.com/questions/11828270/how-do-i-exit-vim. The sooner you learn Vim the better. As soon as you restart your terminal this command will set up everything you will need for your global ROS2. Test your installation via
ros2 run demo_nodes_cpp talker
open another terminal (Ctrl+Shift+T) and execute:
File truncated at 100 lines see the full file
Package Dependencies
Deps | Name |
---|---|
ament_cmake | |
rclcpp | |
std_msgs |
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged ex01_first_package at Robotics Stack Exchange
![]() |
ex01_first_package package from ros2_tutorial repoex01_first_package ex02_gazebo_simulation ex03_state_estimation ex04_actions ex04_msgs ex04_nav2_client ex05_behavior_trees ex05_bt_plugins |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 0.0.0 |
License | BSD |
Build type | AMENT_CMAKE |
Use | RECOMMENDED |
Repository Summary
Description | Tutorials for the KBS robotics labs |
Checkout URI | https://github.com/uos/ros2_tutorial.git |
VCS Type | git |
VCS Version | main |
Last Updated | 2025-05-06 |
Dev Status | UNKNOWN |
Released | UNRELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Additional Links
Maintainers
- Alexander Mock
Authors
- Alexander Mock
ex01_first_package
ROS is short for Robot Operating System. It is a framework/middleware for the quick development of software related to robotics. It provides the infrastructure for sensor and actuator communications, sensor data handling, serialization, visualizations, and software packaging. All these things don’t change for different types of robots. Roboticists are happy
- to not implement everything from scratch for every robot they have,
- that they can use other software that was already implemented somewhere in the world.
ROS1 was invented in 2007. It was mostly used in research and is completely open-source. Some design choices were considered bad. In addition, it had no guarantees in real-time executions nor in how safe communications were. Recently ROS2 was released in 2017, seeking to overcome those and other issues.
With the following set of repositories, we try to explain the basic ROS concepts by example.
ROS2
To continue a computer with natively installed Ubuntu 22.04 is required. Come back if you find one.
Great to see you have found one. Now install ROS2 humble with the following steps (official instructions: https://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debians.html)
Open a terminal:
Useful packages
sudo apt-get install vim
Preparation
locale # check for UTF-8
sudo apt update && sudo apt install locales
sudo locale-gen en_US en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
export LANG=en_US.UTF-8
locale # verify settings
sudo apt install software-properties-common
sudo add-apt-repository universe
sudo apt update && sudo apt install curl -y
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
Refresh the package sources
sudo apt update
Upgrade all packages you already have
sudo apt upgrade
Installation
Now start the ROS2-humble installation:
sudo apt install ros-humble-desktop
Some additional dev tools:
sudo apt install ros-dev-tools
Environment Variables
In many situations, ROS2 will need additional configuration via setting environment variables. A good way is to add additional environment variables to the ~/.bashrc
file (~
is the path to your home folder). Then they will be set every time a new terminal is started. Open the file with Vim (yes with vim) and add the following line to the end of the file:
vi ~/.bashrc
Try to insert this at the end of the file:
source /opt/ros/humble/setup.bash
Exit Vim: https://stackoverflow.com/questions/11828270/how-do-i-exit-vim. The sooner you learn Vim the better. As soon as you restart your terminal this command will set up everything you will need for your global ROS2. Test your installation via
ros2 run demo_nodes_cpp talker
open another terminal (Ctrl+Shift+T) and execute:
File truncated at 100 lines see the full file
Package Dependencies
Deps | Name |
---|---|
ament_cmake | |
rclcpp | |
std_msgs |