环境
Windows 11 安装的 wsl-ubuntu
Error: jammy Release 404 Not Found
Err:10 http://packages.ros.org/ros/ubuntu jammy Release 404 Not Found [IP: 140.211.166.134 80] Reading package lists... Done
W: https://dl.yarnpkg.com/debian/dists/stable/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
E: The repository 'http://packages.ros.org/ros/ubuntu jammy Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.
解决方案
请确认 ros 版本和 ubuntu 版本是否匹配,我的问题在于 ubuntu22.04 只能安装 ros2 无法兼容 ros1,因为 ros1 最高只支持到 ubuntu20.04。于是在通过 wsl 下载了 ubuntu20.04,步骤如下。
推荐 powershell 工具
蛮推荐微软官方的这个 PowerShell美区链接
wsl 安装 ubuntu20.04
windows 打开 powershell,现在要检索可以直接安装的系统,输入:
wsl --list --online
安装 20.04 版本 ubuntu 请输入:
wsl --install -d Ubuntu-20.04
vscode 启动 wsl
若存在多个 wsl 安装的系统,在 vscode 中如何链接?
先安装 ssh 拓展
如图操作,然后选择需要的 20.04 的 ubuntu 系统
即可
Error: 'TURTLEBOT3_MODEL' is not set
安装完成后用 roslaunch 命令尝试启动 turtlebot3 package 启动报错如下:
$ roslaunch turtlebot3_gazebo turtlebot3_world.launch
RLException: Invalid <arg> tag: environment variable 'TURTLEBOT3_MODEL' is not set.
Arg xml is <arg name="model" default="$(env TURTLEBOT3_MODEL)" doc="model type [burger, waffle, waffle_pi]"/>
The traceback for the exception was written to the log file
解决方案
我的解决办法是设置成 waffle,可按需修改
export TURTLEBOT3_MODEL=waffle
再次尝试