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

A simple method to implement scheduled backup of MySQL database in Linux

Here are the detailed steps: 1. Check the disk sp...

Docker private warehouse harbor construction process

1. Preparation 1.1 harbor download harbor downloa...

Detailed tutorial on how to monitor Nginx/Tomcat/MySQL using Zabbix

Table of contents Zabbix monitors Nginx Zabbix mo...

Sample code for implementing follow ads with JavaScript

Floating ads are a very common form of advertisin...

N ways to cleverly implement adaptive dividers with CSS

Dividing lines are a common type of design on web...

Vue.set() and this.$set() usage and difference

When we use Vue for development, we may encounter...

Let's talk about what JavaScript's URL object is

Table of contents Overview Hash Properties Host p...

How to use React forwardRef and what to note

Previously, react.forwardRef could not be applied...

Let's talk about destructuring in JS ES6

Overview es6 adds a new way to get specified elem...

Detailed steps to configure MySQL remote connection under Alibaba Cloud

Preface As we all know, by default, the MySQL ins...

Using shadowsocks to build a LAN transparent gateway

Table of contents Install and configure dnsmasq I...

JavaScript imitates Jingdong magnifying glass special effects

This article shares the specific code of JavaScri...

How to force vertical screen on mobile pages

I recently wrote a mobile page at work, which was...