Installation/Windows - ROS Wiki
1、安装条件
- ROS for Windows requires 64-bit Windows 10 Desktop or Windows 10 IoT Enterprise.
- Please ensure that you have Powershell installed and in the system path.
-
Exclude c:\opt (and later your workspace folder) from real-time virus Scanners, as they can interfere with install and development.
2、安装目录和磁盘大小
-
Clean and back up any existing data under c:\opt before proceeding.
-
c:\opt is the required install location. Relocation is not currently enabled.
- Please ensure you have 10 GB of free space on the C:\ drive for the installation and development.
3、VS2019安装
Building a ROS project for Windows requires Visual Studio 2019 and the Microsoft Windows 10 SDK.
4、安装Windows平台的巧克力包管理器
Chocolatey is a package manager for Windows. It is used to make it easy to install tools and libraries needed for building and running ROS projects. The following instructions redirect the chocolatey install location into the c:\opt, so that you can clean or move a ROS environment from that one location.
- In the Start Menu, find the "x64 Native Tools Command Prompt for VS 2019" item.
- Right Click, select More then "Run as Administrator"
- Copy the following command line:
-
@"%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 prompts
- Once it has completed, close the command prompt to complete the install.
-
5、安装ROS
1)桌面完整元包安装(这个需要等待比较长的时间)
Open the Visual Studio Command Prompt as Administrator as described above.
mkdir c:\opt\chocolatey set ChocolateyInstall=c:\opt\chocolatey choco source add -n=ros-win -s="https://aka.ms/ros/public" --priority=1 choco upgrade ros-melodic-desktop_full -y --execution-timeout=0
2)ROS2安装
To get started with ROS 2, one can also follow the similar steps to install ROS 2 from the same Chocolatey feed.
For example, if you want to install ROS2 Foxy build, open the ROS Command Prompt created above and approve the administrative elevation if not already opened.
mkdir c:\opt\chocolatey set ChocolateyInstall=c:\opt\chocolatey choco source add -n=ros-win -s="https://aka.ms/ros/public" --priority=1 choco upgrade ros-foxy-desktop -y --execution-timeout=0