In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article will explain in detail what are the detailed steps for docker to install ros2. The content of the article is of high quality, so the editor will share it with you for reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.
Main topic
When it comes to today's topics docker and ros2, this article aims to solve three problems:
How to install dockerdocker on ubuntu, how to install ros2, how to visualize turtles in docker
Install docker on ubuntu
This is very simple, done in a word.
Sudo apt install docker.io
2. Install ROS2-Foxy in Docker
Actually, installation is out of the question. Here, we directly pull the official image of ROS2.
Sudo docker pull osrf/ros:foxy-desktop
After pulling, you can enter the installed image by using the following command
Sudo docker run-it osrf/ros:foxy-desktop
Then enter ros2 in the terminal
At this point, you have finished running ros2 images in docker. Is it fast and completely isolated from your computer? you can generate multiple images with one command, and even rosdep is good for init and update.
3. ROS2 docker visualization runs Little Tortoise
Install and start the mobaxterm remote tool
Make sure you and your computer with docker are in a local area network.
Notice the display here, and then we set the value of the environment variable of the DISPLAY mirrored by ros2 in docker
Export DISPLAY=192.168.0.112:0.0
Then you can start the little turtle simulator to have a look.
Ros2 run turtlesim turtlesim_node
Then you will find a magical scene in which the interface of the little turtle pops up on your windows computer.
Then run the keyboard control node
Ros2 run turtlesim turtle_teleop_key
Press the button and the little turtle runs.
On the docker installation of ros2 detailed steps are shared here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.