Ubuntu与ROS的Docker桌面系统与ROS在线练习课程(在线Linux虚拟机)

转载自:https://blog.csdn.net/ZhangRelay/article/details/73522385

UbuntuROSDocker桌面系统与ROS在线练习课程(在线Linux虚拟机)

zhangrelay 2017-06-20 23:46:06 6393 收藏 7

分类专栏: Ubuntu软件 ROS机器人程序设计(第2版)补充 文章标签: ubuntu ROS Docker

版权

ROS在线练习课程正在逐步完善中,目前以ROS官网中文资料制作,可参考:

https://www.shiyanlou.com/courses/854  邀请码 U23ERF8H

安装Ubuntu+ROS对于零Linux基础的小伙伴有些困难,最近发现了一个学习Linux非常好的网站实验楼,链接如下:

****https://www.shiyanlou.com/****

非常好奇如何实现了,于是查阅了一些资料,觉得最好的如下:

1    实验楼这个网站是怎样实现的在线linux虚拟机?

2    基于 VNCServer + noVNC 构建 Docker 桌面系统

3    Docker一些资料汇总

4    https://hub.docker.com

4.1 https://hub.docker.com/r/dorowu/ubuntu-desktop-lxde-vnc/

4.2 https://hub.docker.com/r/kaixhin/vnc-ros/

4.3 https://hub.docker.com/_/ros/

----~~~~----

ubuntu-desktop-lxde-vnc

 

 
  1. relaybot@relaybot-desktop:~$ docker search dorowu

  2. NAME DESCRIPTION STARS OFFICIAL AUTOMATED

  3. dorowu/ubuntu-desktop-lxde-vnc Ubuntu with openssh-server and NoVNC 114 [OK]

  4. dorowu/ubuntu-ssh-ttyjs Ubuntu with openssh server and tty.js enab... 8 [OK]

  5. dorowu/apt-repo-server apt-repo-server is a debian repository ser... 6 [OK]

  6. dorowu/ubuntu-lxqt-vnc 5 [OK]

  7. dorowu/qemu-iso Boot VM by QEMU/KVM with ISO and access it... 4 [OK]

  8. dorowu/lightop-ubuntu-trusty-ttyjs 2 [OK]

  9. dorowu/ntopng 1 [OK]

  10. hardock14/dorowu-docker-ubuntu-vnc-desktop dorowus images with additional software 1 [OK]

  11. dorowu/online-document.amd64 0

  12. dorowu/lightop-ubuntu-trusty-lxde 0 [OK]

  13. dorowu/qdk2 Create Docker App on QNAP NAS in QPKG format 0 [OK]

  14. dorowu/glusterfs-keepalived 0 [OK]

  15. dorowu/lightop 0 [OK]

  16. dorowu/pekaboo2qnap 0

  17. dorowu/ubuntu_amd64 0

  18. dorowu/nodejs_amd64 0

  19. dorowu/ruby_amd64 0

  20. dorowu/ubuntu_armhf 0

  21. dorowu/qiot-mongodb_amd64 0

  22. dorowu/qdk2-build 0

  23. dorowu/qiot-mongodb_armhf 0

  24. dorowu/dashing 0

  25. dorowu/supershell 0

  26. dorowu/mattermostdocker_db 0

  27. dorowu/qiot-mongo-express_amd64 0

  28. relaybot@relaybot-desktop:~$ docker pull dorowu/ubuntu-desktop-lxde-vnc

  29. Using default tag: latest

  30. latest: Pulling from dorowu/ubuntu-desktop-lxde-vnc

  31. aafe6b5e13de: Pull complete

  32. 0a2b43a72660: Pull complete

  33. 18bdd1e546d2: Pull complete

  34. 8198342c3e05: Pull complete

  35. f56970a44fd4: Pull complete

  36. da6ac41ac9c8: Pull complete

  37. 6f3a5e5efdea: Downloading [============> ] 111.4MB/441.9MB

  38. d9dd7dde4295: Download complete

  39. ab365adf65d2: Download complete

  40. 06b2cd083c64: Download complete

  41. c524c4444fb2: Download complete


kaixhin/vnc-ros

 

 

 
  1. relaybot@relaybot-desktop:~$ docker search ros

  2. NAME DESCRIPTION STARS OFFICIAL AUTOMATED

  3. mono Mono is an open source implementation of M... 233 [OK]

  4. ros The Robot Operating System (ROS) is an ope... 111 [OK]

  5. aerospike Aerospike – the reliable, high performance... 76 [OK]

  6. cirros CirrOS is a Tiny OS that specializes in ru... 38 [OK]

  7. neurodebian NeuroDebian provides neuroscience research... 36 [OK]

  8. osrf/ros The Robot Operating System (ROS) is an ope... 28 [OK]

  9. quantumobject/docker-ros-base ROS-Base container (Robot Operating System) 5 [OK]

  10. px4io/px4-dev-ros Container with PX4 tool chain and SITL sim... 3 [OK]

  11. px4io/px4-ros-full 2 [OK]

  12. virgiletn/docker-ros Set of usefull tools for running ros throu... 1 [OK]

  13. personalrobotics/ros-openrave ROS Indigo Base + Personal Robotics OpenRAVE 1 [OK]

  14. kaixhin/vnc-ros Ubuntu Core 14.04 + LXDE desktop + Firefox... 1 [OK]

  15. shadowrobot/ubuntu-ros-indigo-build-tools DEPRECATED!!! Ubuntu 14.04 ROS Indigo imag... 0 [OK]

  16. autharl/ros ROS images 0 [OK]

  17. timn/fedora-ros Robot Operating System (ROS) on Fedora 0 [OK]

  18. harmish/ros Images of ROS (Robot Operating System) 0 [OK]

  19. jacknlliu/tiago-ros A tiago robot ros development environment. 0 [OK]

  20. kaixhin/ros Ubuntu Core 14.04 + ROS Jade Base. 0 [OK]

  21. pmallozzi/ros Ros 0 [OK]

  22. nhzio/ros-weave rancheros weave + iptables 0 [OK]

  23. ivs0/b-ros Jenkins builder for ROS 0 [OK]

  24. mjenz/ros-datacollection A container based on mjenz/ros-indigo-perc... 0 [OK]

  25. jacknlliu/ros ROS desktop-full docker images with Qt C++... 0 [OK]

  26. sigproc/ros 0 [OK]

  27. diegoferigo/ros Dockerfile for my ROS Kinetic desktop-full... 0 [OK]

  28. relaybot@relaybot-desktop:~$ docker pull ros

  29. Using default tag: latest

  30. latest: Pulling from library/ros

  31. bd97b43c27e3: Waiting

  32. 6960dc1aba18: Waiting

  33. 2b61829b0db5: Waiting

  34. 1f88dc826b14: Waiting

  35. 73b3859b1e43: Waiting

  36. 27d60414a57e: Waiting

  37. d93e52c3383b: Waiting

  38. 357b9c9b1672: Waiting

  39. e7c791091ba5: Waiting

  40. a55e61abbe79: Waiting

  41. 3bdd92756f16: Waiting

  42. a75e7cd84889: Waiting

  43. ^C

  44. relaybot@relaybot-desktop:~$ docker pull kaixhin/vnc-ros

  45. Using default tag: latest

  46. latest: Pulling from kaixhin/vnc-ros

  47. 16da43b30d89: Pull complete

  48. 1840843dafed: Pull complete

  49. 91246eb75b7d: Pull complete

  50. 7faa681b41d7: Pull complete

  51. 97b84c64d426: Pull complete

  52. f6f12794daea: Downloading [==========> ] 44.32MB/204.3MB

  53. e7841d035bd3: Download complete

  54. 440e2abbd651: Download complete

  55. 09e4cb06ebb5: Download complete

  56. 067189fe4086: Download complete

  57. 52c18283b71e: Download complete

  58. 49495db30f44: Download complete

  59. 32e45df178f9: Downloading [=> ] 20.52MB/629.6MB

  60. a138ae9132ab: Waiting

  61. 15247c05ac4a: Waiting

 

----~~~~----

当镜像完全下载后可以进行查看,如下:

 

 
  1. relaybot@relaybot-desktop:~$ docker images -a

  2. REPOSITORY TAG IMAGE ID CREATED SIZE

  3. dorowu/ubuntu-desktop-lxde-vnc latest ec8a8836ea5f 6 weeks ago 1.23GB

  4. kaixhin/vnc-ros latest 0948d9f58857 5 months ago 2.71GB


----ubuntu-desktop-lxde-vnc使用说明----

 

 

 
  1. relaybot@relaybot-desktop:~$ docker run -it --rm -p 6080:80 dorowu/ubuntu-desktop-lxde-vnc

  2. /usr/lib/python2.7/dist-packages/supervisor/options.py:297: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.

  3. 'Supervisord is running as root and it is searching '

  4. 2017-06-20 23:01:40,847 CRIT Supervisor running as root (no user in config file)

  5. 2017-06-20 23:01:40,847 WARN Included extra file "/etc/supervisor/conf.d/supervisord.conf" during parsing

  6. 2017-06-20 23:01:40,869 INFO RPC interface 'supervisor' initialized

  7. 2017-06-20 23:01:40,870 CRIT Server 'unix_http_server' running without any HTTP authentication checking

  8. 2017-06-20 23:01:40,870 INFO supervisord started with pid 19

  9. 2017-06-20 23:01:41,873 INFO spawned: 'xvfb' with pid 26

  10. 2017-06-20 23:01:41,876 INFO spawned: 'pcmanfm' with pid 27

  11. 2017-06-20 23:01:41,879 INFO spawned: 'lxpanel' with pid 28

  12. 2017-06-20 23:01:41,882 INFO spawned: 'lxsession' with pid 29

  13. 2017-06-20 23:01:41,884 INFO spawned: 'x11vnc' with pid 30

  14. 2017-06-20 23:01:41,887 INFO spawned: 'novnc' with pid 31

  15. 2017-06-20 23:01:41,971 INFO exited: lxsession (exit status 1; not expected)

  16. 2017-06-20 23:01:41,994 INFO exited: lxpanel (exit status 1; not expected)

  17. 2017-06-20 23:01:42,951 INFO success: xvfb entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

  18. 2017-06-20 23:01:42,951 INFO success: pcmanfm entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

  19. 2017-06-20 23:01:42,951 INFO success: x11vnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

  20. 2017-06-20 23:01:42,951 INFO success: novnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

  21. 2017-06-20 23:01:42,973 INFO spawned: 'lxsession' with pid 52

  22. 2017-06-20 23:01:43,055 INFO spawned: 'lxpanel' with pid 54

  23. 2017-06-20 23:01:44,106 INFO success: lxpanel entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

  24. 2017-06-20 23:01:44,106 INFO success: lxsession entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

  25. 2017-06-20 23:01:58,177 INFO waiting for novnc, pcmanfm, lxpanel, xvfb, x11vnc, lxsession to die

  26. 2017-06-20 23:01:58,463 INFO stopped: novnc (terminated by SIGQUIT (core dumped))

  27. 2017-06-20 23:01:58,465 INFO stopped: x11vnc (exit status 2)

  28. 2017-06-20 23:01:58,669 INFO stopped: lxsession (terminated by SIGABRT (core dumped))

  29. 2017-06-20 23:01:59,871 INFO stopped: lxpanel (terminated by SIGQUIT (core dumped))

  30. 2017-06-20 23:02:00,056 INFO stopped: pcmanfm (terminated by SIGQUIT (core dumped))

  31. 2017-06-20 23:02:00,060 INFO stopped: xvfb (exit status 1)

  32. 2017-06-20 23:02:00,076 CRIT Supervisor running as root (no user in config file)

  33. 2017-06-20 23:02:00,076 WARN Included extra file "/etc/supervisor/conf.d/supervisord.conf" during parsing

  34. 2017-06-20 23:02:00,077 INFO RPC interface 'supervisor' initialized

  35. 2017-06-20 23:02:00,077 CRIT Server 'unix_http_server' running without any HTTP authentication checking

  36. 2017-06-20 23:02:00,077 INFO supervisord started with pid 19

  37. 2017-06-20 23:02:00,867 INFO spawned: 'xvfb' with pid 75

  38. 2017-06-20 23:02:00,870 INFO spawned: 'pcmanfm' with pid 76

  39. 2017-06-20 23:02:00,873 INFO spawned: 'lxpanel' with pid 77

  40. 2017-06-20 23:02:00,878 INFO spawned: 'lxsession' with pid 78

  41. 2017-06-20 23:02:00,881 INFO spawned: 'x11vnc' with pid 79

  42. 2017-06-20 23:02:00,884 INFO spawned: 'novnc' with pid 80

  43. 2017-06-20 23:02:01,913 INFO success: xvfb entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

  44. 2017-06-20 23:02:01,914 INFO success: pcmanfm entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

  45. 2017-06-20 23:02:01,914 INFO success: lxpanel entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

  46. 2017-06-20 23:02:01,914 INFO success: lxsession entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

  47. 2017-06-20 23:02:01,914 INFO success: x11vnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

  48. 2017-06-20 23:02:01,914 INFO success: novnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

 

 

 

Ubuntu的VNC桌面

 

Docker图像提供HTML5 VNC界面访问Ubuntu 16.04 LXDE桌面环境。

快速开始

运行码头图像并打开端口 6080

docker run -it --rm -p 6080:80 dorowu/ubuntu-desktop-lxde-vnc

浏览http://127.0.0.1:6080/

<img src =“https://raw.github.com/fcwu/docker-ubuntu-vnc-desktop/master/screenshots/lxde.png?v1”width = 700 />

连接VNC Viewer并通过VNC密码进行保护

将VNC服务端口5900转发到主机

docker run -it --rm -p 6080:80 -p 5900:5900 dorowu/ubuntu-desktop-lxde-vnc

现在,打开vnc查看器并连接到端口5900.如果要通过密码保护vnc服务,请设置环境变量VNC_PASSWORD,例如

docker run -it --rm -p 6080:80 -p 5900:5900 -e VNC_PASSWORD=mypassword dorowu/ubuntu-desktop-lxde-vnc

提示将在浏览器或vnc查看器中询问密码。

故障排除

  1. boot2docker连接问题,https://github.com/fcwu/docker-ubuntu-vnc-desktop/issues/2


----补充局域网(外网访问)----

获取IP信息:

两种方法:

1 $ docker exec ec8a8836ea5f ifconfig eth0 | grep "inet addr:"

注意,ec8a8836ea5f为ID,依据实际情况进行调整。

 

 
  1. relaybot@relaybot-desktop:~$ docker exec fdfc8eda1 ifconfig eth0 | grep "inet addr:"

  2. inet addr:172.17.0.2 Bcast:0.0.0.0 Mask:255.255.0.0

  3. relaybot@relaybot-desktop:~$ ifconfig -a

  4. docker0 Link encap:Ethernet HWaddr 02:42:16:25:5a:77

  5. inet addr:172.17.0.1 Bcast:0.0.0.0 Mask:255.255.0.0

  6. inet6 addr: fe80::42:16ff:fe25:5a77/64 Scope:Link

  7. UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

  8. RX packets:21801 errors:0 dropped:0 overruns:0 frame:0

  9. TX packets:31279 errors:0 dropped:0 overruns:0 carrier:0

  10. collisions:0 txqueuelen:0

  11. RX bytes:6093261 (6.0 MB) TX bytes:30175014 (30.1 MB)

  12.  
  13. enp3s0 Link encap:Ethernet HWaddr 20:6a:8a:03:40:6b

  14. UP BROADCAST MULTICAST MTU:1500 Metric:1

  15. RX packets:0 errors:0 dropped:0 overruns:0 frame:0

  16. TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

  17. collisions:0 txqueuelen:1000

  18. RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

  19. Interrupt:16

  20.  
  21. lo Link encap:Local Loopback

  22. inet addr:127.0.0.1 Mask:255.0.0.0

  23. inet6 addr: ::1/128 Scope:Host

  24. UP LOOPBACK RUNNING MTU:65536 Metric:1

  25. RX packets:23603 errors:0 dropped:0 overruns:0 frame:0

  26. TX packets:23603 errors:0 dropped:0 overruns:0 carrier:0

  27. collisions:0 txqueuelen:1

  28. RX bytes:6543144 (6.5 MB) TX bytes:6543144 (6.5 MB)

  29.  
  30. vethd735054 Link encap:Ethernet HWaddr f6:0a:d2:7f:58:70

  31. inet6 addr: fe80::f40a:d2ff:fe7f:5870/64 Scope:Link

  32. UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

  33. RX packets:21801 errors:0 dropped:0 overruns:0 frame:0

  34. TX packets:31319 errors:0 dropped:0 overruns:0 carrier:0

  35. collisions:0 txqueuelen:0

  36. RX bytes:6398475 (6.3 MB) TX bytes:30180429 (30.1 MB)

  37.  
  38. wlp5s0 Link encap:Ethernet HWaddr 70:f1:a1:ca:75:52

  39. inet addr:192.168.1.101 Bcast:192.168.1.255 Mask:255.255.255.0

  40. inet6 addr: fe80::3c12:a5b2:8cf9:246/64 Scope:Link

  41. UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

  42. RX packets:1167103 errors:0 dropped:0 overruns:0 frame:0

  43. TX packets:965289 errors:0 dropped:0 overruns:0 carrier:0

  44. collisions:0 txqueuelen:1000

  45. RX bytes:1572330174 (1.5 GB) TX bytes:97246007 (97.2 MB)


----

 

2 在novnc网页中启动命令行ifconfig -a

----vnc-ros----

参考资料:

 

----https://hub.docker.com/r/kaixhin/vnc-ros/----

 

简短的介绍

Ubuntu Core 14.04 + LXDE桌面+ Firefox浏览器+ TightVNC服务器+ ROS Jade Desktop Full。

完整描述


 

VNC-ROS

Ubuntu Core 14.04 + LXDE桌面+ Firefox浏览器+ TightVNC服务器+ ROSJade桌面版。默认使用尾部运行作为守护进程。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值