目标是创建一个或多个指定运行一个或多个ROS节点的docker容器。分布式ROS网络预计将在docker容器以及主机上的运行节点上运行。每个Docker容器都需要一个单独的IP地址。无法将节点从容器roslaunch到主机操作系统。
我的问题的重点是网络,目标是ROS并不重要。
可疑问题可能在于docker限制访问容器的安全性/ NAT规则。
注意:不提供敏感信息。
containeruser@ea0df2d4e654:~/catkin_ws$ roslaunch basic_class_design file1.launch
... logging to /home/containeruser/.ros/log/fcc9757a-b39b-11e9-beb7-02420a00be04/roslaunch-ea0df2d4e654-2582.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://10.0.190.4:35539/
remote[10.0.190.0-0] starting roslaunch
remote[10.0.190.0-0]: creating ssh connection to 10.0.190.0:22, user[hostuser]
/usr/lib/python2.7/dist-packages/Crypto/Cipher/blockalgo.py:141: FutureWarning: CTR mode needs counter parameter, not IV
self._cipher = factory.new(key, *args, **kwargs)
launching remote roslaunch child with command: [env ROS_MASTER_URI=http://10.0.190.4:11311 /opt/ros/kinetic/env.sh roslaunch -c 10.0.190.0-0 -u http://10.0.190.4:35539/ --run_id fcc9757a-b39b-11e9-beb7-02420a00be04]
remote[10.0.190.0-0]: ssh connection created
SUMMARY
========
PARAMETERS
* /rosdistro: kinetic
* /rosversion: 1.12.14
MACHINES
* hostcomputer
NODES
/
rviz_ea0df2d4e654_2582_1858054397354533661 (rviz/rviz)
auto-starting new master
process[master]: started with pid [2595]
ROS_MASTER_URI=http://10.0.190.4:11311
setting /run_id to fcc9757a-b39b-11e9-beb7-02420a00be04
process[rosout-1]: started with pid [2608]
started core service [/rosout]
[10.0.190.0-0]: launching nodes...
[10.0.190.0-0]: ROS_MASTER_URI=http://10.0.190.4:11311
[10.0.190.0-0]: process[rviz_ea0df2d4e654_2582_1858054397354533661-1]: started with pid [21035]
[10.0.190.0-0]: ... done launching nodes
[10.0.190.0-0]: [rviz_ea0df2d4e654_2582_1858054397354533661-1] process has died [pid 21035, exit code -6, cmd /opt/ros/kinetic/lib/rviz/rviz __name:=rviz_ea0df2d4e654_2582_1858054397354533661 __log:=/home/hostuser/.ros/log/fcc9757a-b39b-11e9-beb7-02420a00be04/rviz_ea0df2d4e654_2582_1858054397354533661-1.log].
log file: /home/hostuser/.ros/log/fcc9757a-b39b-11e9-beb7-02420a00be04/rviz_ea0df2d4e654_2582_1858054397354533661-1*.log
[10.0.190.0-0]: all processes on machine have died, roslaunch will exit
remote[10.0.190.0-0]: [rviz_ea0df2d4e654_2582_1858054397354533661-1] process has died [pid 21035, exit code -6, cmd /opt/ros/kinetic/lib/rviz/rviz __name:=rviz_ea0df2d4e654_2582_1858054397354533661 __log:=/home/hostuser/.ros/log/fcc9757a-b39b-11e9-beb7-02420a00be04/rviz_ea0df2d4e654_2582_1858054397354533661-1.log].
log file: /home/hostuser/.ros/log/fcc9757a-b39b-11e9-beb7-02420a00be04/rviz_ea0df2d4e654_2582_1858054397354533661-1*.log
[10.0.190.0-0] process has died
remote[10.0.190.0-0]: unable to contact [10.0.190.0] to shutdown cleanly. The remote roslaunch may have exited already.
^C[rosout-1] killing on exit
[master] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done
tcpdump: listening on br0, link-type EN10MB (Ethernet), capture size 262144 bytes
2019-07-31 10:11:12.236156 IP (tos 0x0, ttl 64, id 15524, offset 0, flags [DF], proto TCP (6), length 60)
10.0.190.0.56818 > 10.0.190.4.1234: Flags [S], cksum 0x9033 (incorrect -> 0xc062), seq 1635619556, win 29200, options [mss 1460,sackOK,TS val 2207296 ecr 0,nop,wscale 7], length 0
2019-07-31 10:11:12.236192 IP (tos 0x0, ttl 64, id 33639, offset 0, flags [DF], proto TCP (6), length 40)
10.0.190.4.1234 > 10.0.190.0.56818: Flags [R.], cksum 0x48a4 (correct), seq 0, ack 1635619557, win 0, length 0
2019-07-31 10:11:17.241132 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 10.0.190.4 tell 10.0.190.0, length 28
2019-07-31 10:11:17.241153 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 10.0.190.0 tell 10.0.190.4, length 28
2019-07-31 10:11:17.241155 ARP, Ethernet (len 6), IPv4 (len 4), Reply 10.0.190.0 is-at 86:86:c3:9e:6a:93, length 28
2019-07-31 10:11:17.241157 ARP, Ethernet (len 6), IPv4 (len 4), Reply 10.0.190.4 is-at 02:42:0a:00:be:04, length 28