当前位置:网站首页>Ros2 topic [01]: installing ros2 on win10
Ros2 topic [01]: installing ros2 on win10
2022-07-05 20:19:00 【Mr anhydrous】
One 、 summary :
If we finally set up the computer , Established a network connection , We can start installing ROS 了 ! This is actually not difficult , Although the official documents are very detailed , But where should beginners start ? In especial , Should I use it ROS2? This article is mainly to point out the direction and correct installation method for you .
ROS2 Sooner or later, it will replace ROS1, therefore , Contact ahead of time ROS2 Is knowing the choice . Generally speaking ,windows Than Ubuntu To facilitate development , therefore , It's recommended here ROS2+Win10 System configuration .
Two 、 Necessary tools and preparations
2.1 System requirements
- ROS-for-Windows need 64 position Windows 10 Desktop or Windows 10 Internet of things Enterprise Edition .
- Please make sure that... Is installed in the system path Powershell.
- Exclude from real-time virus scanners c:\opt( And the workspace folder later ), Because they may interfere with installation and development .
2.1 powershell Introduce
powershell It's an interactive terminal , Its commands and linux It's about the same ,ls,ssh,ping,scp And so on are supported . have access to win+R, Input powershell open , You can also search through the bottom left powershell open .
3、 ... and 、 install Visual Studio 2019
( install VC2019 Many posts , Look online )
- Vcpkg is used for managing dependent libraries. It requires that the English language pack be installed.
- Include "Desktop development with C++" workload.
- In the Individual Components, select "Windows 10 SDK (10.0.19041.0)".
Be careful : installed VC2019 after , There is one VC Version of the command line tool is important , Pictured :

Where 64 Bit software operation , You need to open this command line to .
Four 、 “ chocolate ”-Chocolatey install
4.1 Chocolatey What is it ?
stay Ubuntu Download the update tool apt-get,Chocolatey It means win10 Version of apt-get became .
4.2 To install a chocolatey
- In the start menu , find “VS 2019 Of x64 Native tool command prompt ” term .
- Right click , choice “ more ”, And then choose “ Run as administrator ”

- Copy the following command line :
Open... With administrator privileges powershell, Remember to have administrator privileges
Copy and paste Dafa to powershell, Install well choco
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
- Paste it into the command window .

- Approve any hint
- After completion , Close the command prompt to complete
After the installation is completed, please wait powershell Input in choco It will be like this

5、 ... and 、 install ROS2
5.1 Administrator access powershell install
Then copy the following four lines to the terminal :
mkdir c:\opt\chocolatey
set PYTHONNOUSERSITE=1
set ChocolateyInstall=c:\opt\chocolatey
choco source add -n=ros-win -s="https://aka.ms/ros/public" --priority=1Wait half an hour ...... installation is complete .
5.2 to update ROS2 To the new version
choco upgrade ros-foxy-desktop -y --execution-timeout=0It will be automatically downloaded and installed in the middle ros2, It's also very convenient
When it's done , Now start running little turtle ~
6、 ... and 、 Run little turtle
It needs to be opened at this time cmd 了 ,Win+R,cmd, Enter the following two lines of instructions
call C:\opt\ros\foxy\x64\local_setup.bat
ros2 run turtlesim turtlesim_nodeYou should see the print below , At the same time, a turtle simulator jumps out 【 Longer time , about 10 second 】
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community>ros2 run turtlesim turtlesim_node &
[INFO] [1631619840.995104400] [turtlesim]: Starting turtlesim with node name /turtlesim
[INFO] [1631619840.999301900] [turtlesim]: Spawning turtle [turtle1] at x=[5.544445], y=[5.544445], theta=[0.000000]
Then we do the same , Start keyboard control node
Start another window ~
call C:\opt\ros\foxy\x64\local_setup.bat
ros2 run turtlesim turtle_teleop_key
Reference article :
Technology sharing | Detailed explanation ROS 2 Installation steps of - You know (zhihu.com)
边栏推荐
- [quick start of Digital IC Verification] 9. Finite state machine (FSM) necessary for Verilog RTL design
- 【数字IC验证快速入门】6、Questasim 快速上手使用(以全加器设计与验证为例)
- y57.第三章 Kubernetes从入门到精通 -- 业务镜像版本升级及回滚(三十)
- sun.misc.BASE64Encoder报错解决方法[通俗易懂]
- Securerandom things | true and false random numbers
- PyTorch 1.12发布,正式支持苹果M1芯片GPU加速,修复众多Bug
- leetcode刷题:二叉树18(最大二叉树)
- .Net分布式事務及落地解决方案
- 【数字IC验证快速入门】3、数字IC设计全流程介绍
- Go language | 03 array, pointer, slice usage
猜你喜欢

鸿蒙系统控制LED的实现方法之经典

.Net分布式事务及落地解决方案

【数字IC验证快速入门】6、Questasim 快速上手使用(以全加器设计与验证为例)

Leetcode skimming: binary tree 10 (number of nodes of a complete binary tree)

618 "low key" curtain call, how can baiqiushangmei join hands with the brand to cross the "uncertain era"?

How to select the Block Editor? Impression notes verse, notation, flowus

CTF逆向基础
![[quick start of Digital IC Verification] 9. Finite state machine (FSM) necessary for Verilog RTL design](/img/32/a156293f145417eeae8d93c539ca55.png)
[quick start of Digital IC Verification] 9. Finite state machine (FSM) necessary for Verilog RTL design

Introduction to dead letter queue (two consumers, one producer)
![[quick start of Digital IC Verification] 6. Quick start of questasim (taking the design and verification of full adder as an example)](/img/6d/110b87747f0a4be52da9fd49a05b82.png)
[quick start of Digital IC Verification] 6. Quick start of questasim (taking the design and verification of full adder as an example)
随机推荐
【数字IC验证快速入门】3、数字IC设计全流程介绍
Leetcode skimming: binary tree 12 (all paths of binary tree)
CVPR 2022 | 常见3D损坏和数据增强
.Net分布式事務及落地解决方案
信息学奥赛一本通 1337:【例3-2】单词查找树 | 洛谷 P5755 [NOI2000] 单词查找树
Database logic processing function
Minimum commission for stock trading account opening, where to open an account with low commission? Is it safe to open an account on your mobile phone
Elk distributed log analysis system deployment (Huawei cloud)
Rainbond 5.7.1 支持对接多家公有云和集群异常报警
CCPC 2021威海 - G. Shinyruo and KFC(组合数,小技巧)
【数字IC验证快速入门】8、数字IC中的典型电路及其对应的Verilog描述方法
信息学奥赛一本通 1339:【例3-4】求后序遍历 | 洛谷 P1827 [USACO3.4] 美国血统 American Heritage
Leetcode brush questions: binary tree 11 (balanced binary tree)
解决Thinkphp框架应用目录下数据库配置信息修改后依然按默认方式连接
Go language | 01 wsl+vscode environment construction pit avoidance Guide
leetcode刷题:二叉树12(二叉树的所有路径)
MySql的root密码忘记该怎么找回
Oracle-表空间管理
[quick start of Digital IC Verification] 6. Quick start of questasim (taking the design and verification of full adder as an example)
mongodb文档间关系