docker安装ros后怎么apt-get install ros-包
-
speike@ss-ub22:~$ noetic1
请输入指令控制noetic1: 重启(r) 进入(e) 启动(s) 关闭(c) 删除(d) 测试(t):
e
root@17cffc92086f:/home/speike# sudo apt-get install ros-noetic-teleop-twist-keyboard
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package ros-noetic-teleop-twist-keyboardubuntu22.04使用docker安装noetic后,容器内外都无法安装ros包
-
@Speike 需要先dudo apt update 下,就像新电脑一样
-
@小鱼
sudo apt update后这样:speike@ss-ub22:~$ noetic1 请输入指令控制noetic1: 重启(r) 进入(e) 启动(s) 关闭(c) 删除(d) 测试(t): e root@17cffc92086f:/home/speike# sudo apt update Ign:1 http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu focal InRelease Hit:2 https://mirrors.ustc.edu.cn/ubuntu focal InRelease Get:3 http://mirrors.tuna.tsinghua.edu.cn/ros2/ubuntu focal InRelease [4679 B] Hit:4 https://mirrors.ustc.edu.cn/ubuntu focal-updates InRelease Get:5 http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu focal Release [3794 B] Hit:6 https://mirrors.ustc.edu.cn/ubuntu focal-backports InRelease Get:7 http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu focal Release.gpg [833 B] Hit:8 https://mirrors.ustc.edu.cn/ubuntu focal-security InRelease Get:9 http://192.168.111.241:8081/IXC6ce55d137e7d52efd957279f09784e94_218.197.192.224/ros2/ubuntu focal/main amd64 Packages [1093 kB] Err:9 http://192.168.111.241:8081/IXC6ce55d137e7d52efd957279f09784e94_218.197.192.224/ros2/ubuntu focal/main amd64 Packages File has unexpected size (1079790 != 1092928). Mirror sync in progress? [IP: 192.168.111.241 8081] Hashes of expected file: - Filesize:1092928 [weak] - SHA256:399489b1137d48ad19917f0f55c395a01cf8b2a9653c573ada099bccaffcdf2e - SHA1:e4c6e9e39176f3385ef4bd56ebe78e4e60fee11a [weak] - MD5Sum:e3c5c5b8bc863ab11413cc4d22d697bf [weak] Release file created at: Sat, 16 Jul 2022 00:56:46 +0000 Get:10 http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu focal/main amd64 Packages [698 kB] Get:11 http://packages.ros.org/ros2/ubuntu focal InRelease [4679 B] Get:12 http://192.168.111.241:8081/IXCab54c6e78e30452664e287da766c009c_218.197.192.224/ros2/ubuntu focal/main amd64 Packages [1093 kB] Err:12 http://192.168.111.241:8081/IXCab54c6e78e30452664e287da766c009c_218.197.192.224/ros2/ubuntu focal/main amd64 Packages File has unexpected size (1042131 != 1092936). Mirror sync in progress? [IP: 192.168.111.241 8081] Hashes of expected file: - Filesize:1092936 [weak] - SHA256:7f861c69c71d187c7f62875b2823fc3088d4404386bd369accb39e64d3b1f648 - SHA1:0944df3f929630d6ba741d5763b52087b39f8df8 [weak] - MD5Sum:e3d9c7646c74f262afc286fcc4556bb0 [weak] Release file created at: Mon, 18 Jul 2022 22:09:28 +0000 Fetched 704 kB in 3s (202 kB/s) Reading package lists... Done E: Failed to fetch http://192.168.111.241:8081/IXC6ce55d137e7d52efd957279f09784e94_218.197.192.224/ros2/ubuntu/dists/focal/main/binary-amd64/Packages.gz File has unexpected size (1079790 != 1092928). Mirror sync in progress? [IP: 192.168.111.241 8081] Hashes of expected file: - Filesize:1092928 [weak] - SHA256:399489b1137d48ad19917f0f55c395a01cf8b2a9653c573ada099bccaffcdf2e - SHA1:e4c6e9e39176f3385ef4bd56ebe78e4e60fee11a [weak] - MD5Sum:e3c5c5b8bc863ab11413cc4d22d697bf [weak] Release file created at: Sat, 16 Jul 2022 00:56:46 +0000 E: Failed to fetch http://192.168.111.241:8081/IXCab54c6e78e30452664e287da766c009c_218.197.192.224/ros2/ubuntu/dists/focal/main/binary-amd64/Packages.gz File has unexpected size (1042131 != 1092936). Mirror sync in progress? [IP: 192.168.111.241 8081] Hashes of expected file: - Filesize:1092936 [weak] - SHA256:7f861c69c71d187c7f62875b2823fc3088d4404386bd369accb39e64d3b1f648 - SHA1:0944df3f929630d6ba741d5763b52087b39f8df8 [weak] - MD5Sum:e3d9c7646c74f262afc286fcc4556bb0 [weak] Release file created at: Mon, 18 Jul 2022 22:09:28 +0000 E: Some index files failed to download. They have been ignored, or old ones used instead.
-
@Speike 你可以继续install,应该没影响,不放心可以运行一下一键安装的一键换源。
-
-
@小鱼 借个帖子,一键安装后,进到docker里边运行
ros2 run turtlesim turtlesim_node
错误打印:
qt.qpa.xcb: could not connect to display
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.
-
@卜上人间 在主机端运行
xhost +
应该就可以了