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

Web designers also need to learn web coding

Often, after a web design is completed, the desig...

Detailed explanation of how to mount remote file systems via SSH on Linux

Features of SSHFS: Based on FUSE (the best usersp...

How to view and clean up Docker container logs (tested and effective)

1. Problem The docker container logs caused the h...

CSS polar coordinates example code

Preface The project has requirements for charts, ...

SVG button example code based on CSS animation

The specific code is as follows: <a href="...

Vue sample code for easily implementing virtual scrolling

Table of contents Preface Rolling principle accom...

How does MySQL implement ACID transactions?

Preface Recently, during an interview, I was aske...

JavaScript to achieve tab switching effect

This article shares the specific code of JavaScri...

8 ways to manually and automatically backup your MySQL database

As a popular open source database management syst...

How to install and deploy gitlab server on centos7

I am using centos 7 64bit system here. I have tri...

Bootstrap 3.0 study notes for beginners

As the first article of this study note, we will ...

impress.js presentation layer framework (demonstration tool) - first experience

I haven’t blogged for half a year, which I feel a ...

A brief talk about calculated properties and property listening in Vue

Table of contents 1. Computed properties Syntax: ...

Some points on using standard HTML codes in web page creation

The most common mistake made by many website desi...