ros2与windows入门教程-windows上安装ROS2 foxy
ros2与windows入门教程-windows上安装ROS2 foxy
说明:
- 介绍如何在windows上安装二进制版本ROS2 foxy
前提条件:
- 已安装windows 10系统
步骤:
- 安装Chocolatey,使用管理员模式打开cmd命令提示符窗口,输入以下内容并回车
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "[System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
- 验证安装是否成功,显示版本号
choco
Chocolatey v1.1.0
Please run 'choco -?' or 'choco <command> -?' for help menu.
- 在C盘创建安装目录
mkdir c:\opt\chocolatey
- 安装ROS2,安装目录为 c:\opt\chocolatey
set PYTHONNOUSERSITE=1
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
- 验证是否安装成功,设置环境
call C:\opt\ros\foxy\x64\local_setup.bat
- 打印话题
ros2 topic list
/parameter_events
/rosout
获取最新文章: 扫一扫右上角的二维码加入“创客智造”公众号