About ROS2 installation and docker environment usage

About ROS2 installation and docker environment usage

Why use Docker?

Docker is a container that can be used to load images. I can use Docker to package my basic environment into an image, and everyone can use this image.

While learning ROS, I found that there were many problems during the installation process. I believe that many students were blocked by the problems during installation, so I thought that I could make a ROS image for myself and everyone to use. So I chose docker, and then I found that there were ready-made images - it was easy to get started.

After improvement, it can be packaged into its own image.

Docker installation

1 Update software list

sudo apt-get update

2 Install Docker

sudo apt-get install -y docker.io

3 Configure startup

systemctl start docker
 
systemctl enable docker

4 Check if the installation is successful

sudo docker --version 

Pull the ROS image

I am using the foxy version

1 Download the image file, more than 3G, you need to wait for a while

sudo docker pull osrf/ros:foxy-desktop 

s2 View mirror information

sudo docker images

3 Start the image

sudo docker run -it osrf/ros:foxy-desktop

4. Enjoy your Rosé

This step displays the help information of ROS2. ROS2 has been installed. Isn’t it fast? ! !

ros2 -h 

Run ROS turtle

ros2 run turtlesim turtlesim_node

Open a new terminal and restart the image to enter the docker environment

sudo docker run -it osrf/ros:foxy-desktop
ros2 run turtlesim turtle_teleop_key

This is the end of this article about ROS2 installation and docker environment usage. For more information about ROS2 installation and docker environment, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Detailed steps for installing ros2 in docker

<<:  Detailed explanation of common methods of Vue development

>>:  In the interview, I was asked whether select...for update would lock the table or the row.

Recommend

Detailed explanation of Linux copy and paste in VMware virtual machine

1. Linux under VMware Workstation: 1. Update sour...

How to mark the source and origin of CSS3 citations

I am almost going moldy staying at home due to th...

MySQL download and installation details graphic tutorial

1. To download the MySQL database, visit the offi...

Understand the implementation of Nginx location matching in one article

Since the team is separating the front-end and ba...

CSS menu button animation

To write a drop-down menu, click the button. The ...

MySQL 8.0.21 installation steps and problem solutions

Download the official website First go to the off...

Nginx local directory mapping implementation code example

Sometimes you need to access some static resource...

mysql5.7 remote access settings

Setting up remote access in mysql5.7 is not like ...

Detailed explanation of downloading, installing and using nginx server

download http://nginx.org/en/download.html Unzip ...

MySQL 5.7.23 installation and configuration method graphic tutorial

This article records the installation tutorial of...

Pure CSS to change the color of the picture

The css technique for changing the color of an im...

Use of Docker image storage overlayfs

1. Overview The image in Docker is designed in la...

A brief discussion on the implementation of fuzzy query using wildcards in MySQL

In the MySQL database, when we need fuzzy query, ...

Three ways to implement waterfall flow layout

Preface When I was browsing Xianyu today, I notic...

How to enable the root account in Ubuntu 20.04

After Ubuntu 20.04 is installed, there is no root...