How to Install ROS 2 Iron on Ubuntu Linux

In this blog post, I will show you how to install ROS 2 Iron (the latest distribution of ROS 2) on Ubuntu.

You Will Need

In order to complete this tutorial, you will need:

Prerequisites

It is helpful if you’ve completed this tutorial on Linux fundamentals, but it is not required.

Set the Locale

The official steps for installing ROS are at this link at ROS.org, but I will walk you through the process below so that you can see what each step should look like. 

We will install ROS 2 Iron via Debian Packages.

The first thing we are going to do is to set the locale. You can understand what locale means at this link.  

Click the 9 dots on the bottom-left portion of the screen and search for the “Terminal” application.

1-click-9-dots

Open it.

Type this command inside a terminal window.

locale

The locale command is used to display or change the locale settings on a Linux system. A locale is a set of environmental variables that define the language, country, and character encoding settings. These settings are used by system libraries and locale-aware applications to determine how to display text, dates, times, and other information.

1-set-locale

Now type the following command:

sudo apt update && sudo apt install locales

“sudo apt update” updates the package index list, which is a database of all the software packages available for your Linux distribution.

“sudo apt install locales” installs the locales package, which provides support for different languages and regions.

Now type:

sudo locale-gen en_US en_US.UTF-8

The command “sudo locale-gen en_US en_US.UTF-8” generates locale definition files for the specified locales. Locale definition files are used by the system to generate locale data, which is used by programs to determine how to format text, dates, times, and other information.

In this case, the command is generating locale definition files for the English (United States) locale and the English (United States) UTF-8 locale. The UTF-8 locale is a special locale that supports the UTF-8 character encoding, which is the standard encoding for most languages.

Now type:

sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8

The command above is updating the locale data for the English (United States) locale and the English (United States) UTF-8 locale. You typically need to run this command after you have changed the locale on your system. This will ensure that all of your programs are using the correct locale data.

Now type:

export LANG=en_US.UTF-8

Setting the LANG environment variable to en_US.UTF-8 will ensure that all of your programs are using the English (United States) UTF-8 locale. This is important for programs that need to display or process text in multiple languages.

Now we need to verify the settings by typing:

locale

Here is what you should see:

2-here-is-what-you-should-see-locale

Enable the Required Repositories

Let’s add the ROS 2 apt repository to our system. Open a terminal window, and type the following two commands:

sudo apt install software-properties-common
sudo add-apt-repository universe

The software-properties-common package provides a number of tools for managing software sources on Ubuntu and Debian systems. One of these tools is the add-apt-repository command, which is used to add new repositories to your system’s software sources.

The universe repository is a software repository that contains a wide variety of software packages, including many that are not included in the default Ubuntu and Debian repositories. Adding the universe repository to your system’s software sources will give you access to a wider selection of software to install.

Now we need to add the ROS 2 GPG key with apt.

The ROS 2 GPG key is a public key that is used to verify the authenticity of ROS 2 packages. It is used by the ROS 2 package manager (apt) to ensure that the packages you are installing are from a trusted source.

To add the ROS 2 GPG key, type these two commands:

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

Add the repository to your sources list (copy and paste all of this below):

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

Type the following command to install ROS 2 development tools.

sudo apt update && sudo apt install ros-dev-tools

The command sudo apt install ros-dev-tools installs the ROS development tools package on Ubuntu systems. This package contains a number of tools that are useful for developing ROS packages, including:

  • ament_cmake: A CMake-based build system for ROS packages.
  • ament_index: A tool for generating and managing ROS package indexes.
  • ament_lint: A tool for linting ROS packages.
  • ament_test: A tool for testing ROS packages.
  • ament_uncrustify: A tool for formatting ROS code according to the ROS coding style guide.

Now update the apt repository:

sudo apt update

Upgrade the packages on your system to make sure you have the newest versions.

sudo apt upgrade

Install ROS 2

Install ROS 2 Iron by opening a terminal window, and typing:

sudo apt install ros-iron-desktop

Some of the tools and resources included in the ROS Iron desktop package include:

  • The ROS desktop environment, which includes a number of tools for developing and using ROS, such as RViz2, and RQt.
  • A number of documentation resources, such as the ROS wiki and tutorials.

Set Up the Environment Variables

Add Iron to your bash file.

echo "source /opt/ros/iron/setup.bash" >> ~/.bashrc

You can verify it is added by typing:

gedit ~/.bashrc
3-gedit-bashrc

If you don’t have gedit installed, you can type:

sudo apt-get install gedit

Close the terminal window, and open a new one.

Type the following command to see what version of ROS you are using:

printenv ROS_DISTRO

Here is what you should see:

4-iron-ros-distro

You can also type:

env | grep ROS
5-env-grep-ros

Install some other useful packages:

sudo apt install -y python3-pip
pip3 install -U argcomplete
sudo apt-get install ros-$ROS_DISTRO-gazebo-ros-pkgs
sudo rosdep init
rosdep update

Test Your Installation

Open a terminal window, and type:

ros2 run demo_nodes_cpp talker
6-run-talker

Open another terminal window, and type:

ros2 run demo_nodes_py listener
7-run-listener

If your output looks like the images above, you have installed ROS 2 successfully. Yay!

That’s it! Keep building!

Revolutionizing Healthcare: The Future Impact of Robots

The healthcare industry has witnessed incredible advancements over the years, from groundbreaking medical discoveries to innovative surgical techniques. However, as we take a look into the future, there is one technological revolution that promises to redefine healthcare as we know it: robots.

Robots are going to transform every aspect of healthcare, from diagnostics and surgery to patient care and beyond. In this blog post, we’ll cover the exciting potential of robots in healthcare and the profound impact they are likely to have on the industry.

Robots in Diagnostics

human-skeleton

One of the primary areas where robots are already making significant strides is in diagnostics.

Imagine a robot capable of analyzing vast amounts of patient data, including medical history, genetic information, and real-time monitoring data. This robot can quickly identify potential health issues, predict disease risks, and recommend personalized treatment plans. With machine learning and artificial intelligence, these robots can continuously improve their diagnostic accuracy, ultimately saving lives by catching diseases at their earliest stages.

Let’s take a look at some companies that are currently involved in this market:

  • Diagnostic Robotics: This company has developed an AI-powered platform that can be used to diagnose a wide range of diseases, including cancer, heart disease, and diabetes. The platform is currently being used by healthcare providers around the world.
  • Paige AI: This company has developed AI-powered software that can be used to analyze pathology images and detect cancer cells. The software is currently being used by pathologists around the world to help them diagnose cancer more accurately and efficiently.

Robotic-assisted Surgery

surgey-operating-room

Robotic-assisted surgery is another promising frontier in healthcare. Robots equipped with advanced surgical instruments and guided by skilled surgeons can perform intricate procedures with unmatched precision and minimal invasiveness. These practices will reduce patient trauma, speed up recovery times, and lower the risk of complications.

davinci-surgical-robot

Also, robots can bridge geographical gaps by enabling remote surgery, allowing a surgeon in one location to operate on a patient in another, potentially saving lives in emergency situations and improving access to specialized care in remote areas.

Here are some of the leading companies involved in robotic-assisted surgery:

  • Intuitive Surgical: Intuitive Surgical is the dominant player in the robotic-assisted surgery market, with its da Vinci surgical system being the most widely used robotic surgical system in the world.
  • Medtronic: Medtronic recently entered the robotic-assisted surgery market with its Hugo robotic surgery system.
  • Johnson & Johnson: Johnson & Johnson offers a variety of robotic surgery systems through its Johnson & Johnson Medical Devices division, including the Monarch platform for bronchoscopy, and the Velys platform for orthopedic surgery.
  • Stryker: Stryker offers the Mako robotic-assisted surgery system for orthopedic surgery.
  • Brainlab: Brainlab offers the Curve robotic-assisted surgery system for spinal and neurosurgery.
  • CMR Surgical: CMR Surgical offers the Versius robotic-assisted surgery system for a variety of procedures, including general surgery, gynecologic surgery, and urologic surgery.

Enhanced Rehabilitation

rehabilitation

Rehabilitation is a cornerstone of healthcare, especially for patients recovering from injuries, surgeries, or chronic conditions. Robots are playing an increasingly important role in this area, providing consistent, personalized, and intensive therapy.

For example, robotic exoskeletons help patients regain mobility, while robotic arms assist those with limited dexterity. These devices not only enhance the quality of life for patients but also alleviate the strain on healthcare professionals by automating routine tasks, allowing them to focus on more complex aspects of care.

One of the first companies that comes to mind is ReWalk Robotics. ReWalk Robotics develops and manufactures robotic exoskeletons for people with spinal cord injuries.

ReWalk’s most well-known product is the ReWalk exoskeleton, which allows people with paraplegia to walk again. ReWalk Robotics also produces the ReStore exoskeleton, which is used to help people with lower limb disability regain their mobility.

Another company is Cyberdyne. Cyberdyne is a Japanese company that develops and manufactures robotic exoskeletons for medical and industrial use. Its most well-known product is the HAL (Hybrid Assistive Limb) exoskeleton, which is used to help people with disabilities walk, stand, and climb stairs. The HAL exoskeleton is also used in industrial settings to help workers lift heavy objects and perform other physically demanding tasks.

Robots in Patient Care

xtend_ai

The future of healthcare also includes robots directly interacting with patients. Social robots equipped with natural language processing capabilities can provide companionship and emotional support to patients, particularly those in long-term care facilities or dealing with mental health issues. These robots can engage in conversations, give reminders when patients need to take medication, and monitor vital signs, ensuring patients receive the attention and care they need.

The company I work for, Xtend AI, is doing just that.

Pharmaceutical Advancements

pharmaceuical-advancements

In the pharmaceutical industry, robots are revolutionizing drug discovery and development. Robotic systems can automate high-throughput screening of compounds, drastically accelerating the process of identifying potential drug candidates.

Additionally, robots can handle complex chemical reactions with precision, leading to the creation of more effective and safe medications. This not only reduces the time and cost of drug development but also opens doors to personalized medicine, where treatments are tailored to individual patients based on their genetic makeup and health data.

One robot that already has a head start in this area is NiCoLA-B. This robot is used at the U.K. Center for Lead Discovery to test more than 300,000 compounds a day in search of promising drug candidates. It uses sound waves to move droplets of potential drugs into miniature wells on assay plates, where they are tested for activity.

Logistics and Supply Chain Management

logistics

Efficient logistics and supply chain management are critical in healthcare, ensuring that medications, medical equipment, and supplies are readily available when needed. Robots are already playing a pivotal role in this aspect by automating inventory management, drug dispensing, and even transportation within healthcare facilities. This not only reduces human errors but also optimizes resource allocation and minimizes wastage, ultimately leading to cost savings and improved patient care.

Challenges and Ethical Considerations

While the future of healthcare with robots is incredibly promising, it is not without its challenges and ethical considerations. Privacy concerns, data security, and the potential for bias in AI algorithms must be addressed. I predict there will always be a need for human oversight and expertise to ensure robots operate safely and effectively.

The Best is Yet to Come

The future impact of robots on healthcare is nothing short of transformative. From diagnostics and surgery to patient care and pharmaceutical advancements, robots are set to revolutionize every facet of the healthcare industry. As technology continues to advance, we can look forward to a healthcare system that is more efficient, accessible, and personalized, ultimately leading to better patient outcomes and an improved quality of life for all.

However, it is important we navigate this transformation with careful consideration of the ethical and privacy implications, ensuring that the benefits of healthcare robotics are realized while minimizing potential risks. The future of healthcare is indeed exciting, and robots will undoubtedly be at the forefront of this revolution.

Keep building!

How Robots Help Us Explore Extreme Environments

Robots are now being used to explore some of the most dangerous and inhospitable places on Earth, and even beyond.

In this blog post, we will cover some of the ways that robots are helping to explore the unknown. We will also take a look at some of the challenges that need to be overcome in order to develop robots that can safely and effectively explore even the most extreme environments.

Robots in Space

One of the most exciting areas of robotic exploration is space. Robots have been used to explore the Moon, Mars, and other planets in our solar system. They have also been used to repair and service satellites in orbit.

One of the most famous robotic space explorers is the Curiosity rover, which landed on Mars in 2012. Curiosity has been exploring the Gale Crater on Mars for over a decade, and has made many important discoveries about the planet’s past and present environment.

curiosity_rover_mars

Another notable robotic space explorer is the Perseverance rover, which landed on Mars in 2021. Perseverance is tasked with collecting samples from Mars that will be returned to Earth for analysis. This could help us to learn even more about the Red Planet and its potential for habitability.

perseverance_mars_rover

Robots in the Deep Sea

Robots are also being used to explore the deep sea. The deep sea is one of the least explored places on Earth, and robots are helping us to learn more about its unique ecosystems and biodiversity.

One example of a robotic deep sea explorer is the remotely operated vehicle (ROV) Nereus. Nereus is capable of diving to depths of over 10,000 meters, and has been used to explore the Mariana Trench, the deepest point in the ocean.

nereus_underwater_vehicle

Another example of a robotic deep sea explorer is the autonomous underwater vehicle (AUV) Sentry. Sentry is capable of operating independently for months at a time, and has been used to map the seafloor and collect data on marine life.

sentry

Robots in Other Extreme Environments

Robots are also being used to explore other extreme environments on Earth, such as volcanoes, caves, and glaciers. These environments can be dangerous for humans to explore, but robots can safely navigate them and collect data.

One example of a robotic extreme environment explorer is the robot submarine Nereid Under Ice (NUI). NUI is a hybrid remotely operated vehicle (ROV) developed by the Woods Hole Oceanographic Institution (WHOI). It is designed to explore and sample under-ice environments, which are difficult to access using traditional methods.

drift-ice-3048163_640

NUI is equipped with a high-definition video camera, a 7-function electro-hydraulic manipulator arm, and a range of acoustic, chemical, and biological sensors. It can operate in water depths of up to 4,000 meters and can be deployed from icebreakers or research vessels.

Challenges and Future Directions

There are still a number of challenges that need to be overcome in order to develop robots that can safely and effectively explore even the most extreme environments.

One challenge is developing robots that are powered by long-lasting batteries. This is especially important for robots that need to operate in remote or inaccessible areas.

Another challenge is developing robots that can withstand harsh environmental conditions. For example, robots that explore volcanoes need to be able to withstand high temperatures and toxic gases.

kilauea-3088675_640

Finally, robots need to be equipped with sensors and artificial intelligence (AI) that allow them to perceive their surroundings and make decisions autonomously. This is especially important for robots that need to operate in dangerous or unpredictable environments.

Additional Thoughts

Here are some additional thoughts on how robots are helping us to explore the unknown:

  • Robots are being used to explore the human body. For example, robotic surgical systems allow surgeons to perform complex procedures with greater precision and accuracy than would be possible with traditional methods.
  • Robots are being used to explore the past. For example, archaeologists are using robots to excavate ancient ruins and search for lost artifacts.

The possibilities for robotic exploration are endless. As robots become more capable and sophisticated, we can expect them to help us to learn more about the world around us.

Keep building!