Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install Linux Subsystem + ROS in win10

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article will explain in detail how to install Linux subsystem + ROS in win10. The content of the article is of high quality, so the editor will share it for you as a reference. I hope you will have some understanding of the relevant knowledge after reading this article.

For programmers, they work under windows on a daily basis, but some engineering projects are developed under Linux. What should I do?

Many people have installed a virtual machine, and slowly you find that the virtual machine is so slow, and you can't find the reason for many mistakes.

Then install a dual system, it is extremely inconvenient to switch the system back and forth, sometimes starting up more than a dozen times a day. When I run something under Linux, I can't do anything. And when you install a dual system, you are likely to collapse your original windows.

So, to say goodbye to these ancient operations, we installed the Linux subsystem under win10. From then on, you can give full play to the computing speed of computer hardware resources, and you can start work under two systems at the same time. Yes!

Install several softwares

1.windows Settings-> updates and Security-> developer options, select developer Mode

Insert a picture description here

Control Panel-> Uninstall programs-> enable or disable the windows feature, select Windows Subsystem for Linux

Insert a picture description here

two。 After reboot, type linux in MicrosoftStore, download Ubuntu 18.04 LTS, and then install

Insert a picture description here

3. Baidu, install mobaxterm and xming

All are installed with one click, and then double-click

Insert a picture description here

You can see that the subsystem you installed has been automatically identified

Insert a picture description here

Double-click the subsystem, open the terminal, and set your own user name and password. At this time, our subsystem installation is done.

Second, install ROS on the command line

Here, there are 17 lines of commands, all with comments marked by me. Even if you want to install another library, it may be instructive for you.

/ / back up the .list file

1 sudo cp / etc/apt/sources.list / etc/apt/sources.list.bak

2 sudo vi / etc/apt/sources.list

/ / ubuntu official source update is slow. Delete the contents and copy the source of China University of Science and Technology.

Deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse

Deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse

Deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse

Deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse

Deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse

Deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse

Deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse

Deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse

Deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse

Deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse

3 sudo apt-get update

4 sudo apt-get upgrade

/ / find the ros source file

5 sudo sh-c'. / etc/lsb-release & & echo "deb http://mirrors.ustc.edu.cn/ros/ubuntu/ $DISTRIB_CODENAME main" > / etc/apt/sources.list.d/ros-latest.list'

6 sudo apt-get update

/ / verify the public key

7 sudo apt-key adv-keyserver keyserver.ubuntu.com-recv-keys F42ED6FBAB17C654

8 sudo apt-get update

/ / install the compilation environment

9 sudo apt-get install build-essential

/ / install ros. If it fails, it will be a network problem. Just try again twice more.

10 sudo apt-get install ros-melodic-desktop-full

/ / make environmental variables work

11 source / opt/ros/melodic/setup.bash

/ / append ros environment variables to the .bashrc file under home

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

13 vi ~ / .bashrc

/ / the last line plus: export LIBGL_ALWAYS_INDIRECT= =

14 source ~ / .bashrc

/ / enter rviz at this time to visualize normally

15 rviz

/ / if ubuntu 18.04 lz4 compilation conflicts

16 sudo vi / usr/include/lz4.h

17 sudo vi / usr/include/flann/ext/lz4.h

Put two header files: / usr/include/lz4.h and # pragma once under / usr/include/flann/ext/lz4.h

To be replaced by:

Ifndef LZ4_H_2983827168210

Define LZ4_H_2983827168210

...

Endif / * LZ4_H_2983827168210 * /

Some basic operations, such as how to modify the file after opening the file in vi, let's do it on our own.

On how to install win10 Linux subsystem + ROS to share here, I hope 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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report