0

我开始使用 ROS2(目前处于 alpha7 状态)。为此,我建立了一个小型网络,其中 Raspberry Pi (Raspbian Jessie) 通过 LAN 连接到路由器,主机 PC (Ubuntu Gnome 16.04) 通过 WLAN 连接到同一路由器。主机内部是一些安装了 Debian Jessie 并通过桥接网络 (wlp4s0) 连接的虚拟机(使用 VirtualBox)。我也可以在我的所有机器(Rasp、Host、VM)之间使用ping,ssh和。scp

我发现 Rasp 没有连接到虚拟机,但虚拟机相互联系。所以我可以在虚拟机之间发送消息。但是 Rasp 和 VM 之间的谈话者 - 听众 - 连接不起作用。

谁能给我一些建议来找出这种行为的原因是什么?


我使用来源(alpha7)中的谈话者和听众进行了一些研究。
:(所有ros用户都在虚拟机上)

树莓派上的谈话者

pi:bin$ export OSPL_URI=file:///usr/etc/opensplice/config/ospl.xml
pi:bin$ ./talker

  > pi@192.168.1.40
  > pi:bin$ export OSPL_URI=file:///usr/etc/opensplice/config/ospl.xml
  > pi:bin$ ./listener                                  > yes
  > pi:bin$ ./listener__rmw_opensplice_cpp              > yes
  > pi:bin$ ./listener__rmw_fastrtps_cpp                > yes after restarting talker
  > pi:bin$ ./listener_best_effort                      > yes
  > pi:bin$ ./listener_best_effort__rmw_opensplice_cpp  > yes
  > pi:bin$ ./listener_best_effort__rmw_fastrtps_cpp    > yes

  > ros@192.168.1.20
  > ros:bin$ export OSPL_URI=file:///usr/etc/opensplice/config/ospl.xml
  > ros:bin$ ./listener                                 > no
  > ros:bin$ ./listener__rmw_opensplice_cpp             > no
  > ros:bin$ ./listener__rmw_fastrtps_cpp               > no
  > ros:bin$ ./listener_best_effort                     > no
  > ros:bin$ ./listener_best_effort__rmw_opensplice_cpp > no
  > ros:bin$ ./listener_best_effort__rmw_fastrtps_cpp   > no

pi:bin$ export OSPL_URI=file:///usr/etc/opensplice/config/ospl.xml
pi:bin$ ./talker__rmw_opensplice_cpp

  > pi@192.168.1.40
  > pi:bin$ export OSPL_URI=file:///usr/etc/opensplice/config/ospl.xml
  > pi:bin$ ./listener                                  > yes after restarting talker
  > pi:bin$ ./listener__rmw_opensplice_cpp              > yes
  > pi:bin$ ./listener__rmw_fastrtps_cpp                > no
  > pi:bin$ ./listener_best_effort                      > yes
  > pi:bin$ ./listener_best_effort__rmw_opensplice_cpp  > yes
  > pi:bin$ ./listener_best_effort__rmw_fastrtps_cpp    > yes

  > ros@192.168.1.20
  > ros:bin$ export OSPL_URI=file:///usr/etc/opensplice/config/ospl.xml
  > ros:bin$ ./listener                                 > no
  > ros:bin$ ./listener__rmw_opensplice_cpp             > no
  > ros:bin$ ./listener__rmw_fastrtps_cpp               > no
  > ros:bin$ ./listener_best_effort                     > no
  > ros:bin$ ./listener_best_effort__rmw_opensplice_cpp > no
  > ros:bin$ ./listener_best_effort__rmw_fastrtps_cpp   > no

pi:bin$ export OSPL_URI=file:///usr/etc/opensplice/config/ospl.xml
pi:bin$ ./talker__rmw_fastrtps_cpp

  > pi@192.168.1.40
  > pi:bin$ export OSPL_URI=file:///usr/etc/opensplice/config/ospl.xml
  > pi:bin$ ./listener                                  > yes
  > pi:bin$ ./listener__rmw_opensplice_cpp              > yes
  > pi:bin$ ./listener__rmw_fastrtps_cpp                > yes after restarting talker
  > pi:bin$ ./listener_best_effort                      > yes
  > pi:bin$ ./listener_best_effort__rmw_opensplice_cpp  > yes
  > pi:bin$ ./listener_best_effort__rmw_fastrtps_cpp    > yes

  > ros@192.168.1.20
  > ros:bin$ export OSPL_URI=file:///usr/etc/opensplice/config/ospl.xml
  > ros:bin$ ./listener                                 > no
  > ros:bin$ ./listener__rmw_opensplice_cpp             > no
  > ros:bin$ ./listener__rmw_fastrtps_cpp               > no
  > ros:bin$ ./listener_best_effort                     > no
  > ros:bin$ ./listener_best_effort__rmw_opensplice_cpp > no
  > ros:bin$ ./listener_best_effort__rmw_fastrtps_cpp   > no

虚拟机上的谈话者

ros@192.168.1.20
ros:bin$ export OSPL_URI=file:///usr/etc/opensplice/config/ospl.xml
ros:bin$ ./talker

  > ros@192.168.1.21
  > ros:bin$ export OSPL_URI=file:///usr/etc/opensplice/config/ospl.xml
  > ros:bin$ ./listener                                 > yes
  > ros:bin$ ./listener__rmw_opensplice_cpp             > yes
  > ros:bin$ ./listener__rmw_fastrtps_cpp               > yes after restarting talker
  > ros:bin$ ./listener_best_effort                     > yes
  > ros:bin$ ./listener_best_effort__rmw_opensplice_cpp > yes
  > ros:bin$ ./listener_best_effort__rmw_fastrtps_cpp   > yes

  > pi@192.168.1.40
  > pi:bin$ export OSPL_URI=file:///usr/etc/opensplice/config/ospl.xml
  > pi:bin$ ./listener                                  > no
  > pi:bin$ ./listener__rmw_opensplice_cpp              > no
  > pi:bin$ ./listener__rmw_fastrtps_cpp                > no
  > pi:bin$ ./listener_best_effort                      > no
  > pi:bin$ ./listener_best_effort__rmw_opensplice_cpp  > no
  > pi:bin$ ./listener_best_effort__rmw_fastrtps_cpp    > no

ros@192.168.1.20
ros:bin$ export OSPL_URI=file:///usr/etc/opensplice/config/ospl.xml
ros:bin$ ./talker__rmw_opensplice_cpp

  > ros@192.168.1.21
  > ros:bin$ export OSPL_URI=file:///usr/etc/opensplice/config/ospl.xml
  > ros:bin$ ./listener                                 > yes
  > ros:bin$ ./listener__rmw_opensplice_cpp             > yes
  > ros:bin$ ./listener__rmw_fastrtps_cpp               > yes
  > ros:bin$ ./listener_best_effort                     > yes
  > ros:bin$ ./listener_best_effort__rmw_opensplice_cpp > yes
  > ros:bin$ ./listener_best_effort__rmw_fastrtps_cpp   > yes

  > pi@192.168.1.40
  > pi:bin$ export OSPL_URI=file:///usr/etc/opensplice/config/ospl.xml
  > pi:bin$ ./listener                                  > no
  > pi:bin$ ./listener__rmw_opensplice_cpp              > no
  > pi:bin$ ./listener__rmw_fastrtps_cpp                > no
  > pi:bin$ ./listener_best_effort                      > no
  > pi:bin$ ./listener_best_effort__rmw_opensplice_cpp  > no
  > pi:bin$ ./listener_best_effort__rmw_fastrtps_cpp    > no

ros@192.168.1.20
ros:bin$ export OSPL_URI=file:///usr/etc/opensplice/config/ospl.xml
ros:bin$ ./talker__rmw_fastrtps_cpp

  > ros@192.168.1.20
  > ros:bin$ export OSPL_URI=file:///usr/etc/opensplice/config/ospl.xml
  > ros:bin$ ./listener                                 > yes after restarting talker
  > ros:bin$ ./listener__rmw_opensplice_cpp             > yes
  > ros:bin$ ./listener__rmw_fastrtps_cpp               > yes after restarting talker
  > ros:bin$ ./listener_best_effort                     > yes
  > ros:bin$ ./listener_best_effort__rmw_opensplice_cpp > yes
  > ros:bin$ ./listener_best_effort__rmw_fastrtps_cpp   > yes

  > ros@192.168.1.21
  > ros:bin$ export OSPL_URI=file:///usr/etc/opensplice/config/ospl.xml
  > ros:bin$ ./listener                                 > yes
  > ros:bin$ ./listener__rmw_opensplice_cpp             > yes
  > ros:bin$ ./listener__rmw_fastrtps_cpp               > yes after restarting talker
  > ros:bin$ ./listener_best_effort                     > yes
  > ros:bin$ ./listener_best_effort__rmw_opensplice_cpp > yes
  > ros:bin$ ./listener_best_effort__rmw_fastrtps_cpp   > yes

  > pi@192.168.1.40
  > pi:bin$ export OSPL_URI=file:///usr/etc/opensplice/config/ospl.xml
  > pi:bin$ ./listener                                  > no
  > pi:bin$ ./listener__rmw_opensplice_cpp              > no
  > pi:bin$ ./listener__rmw_fastrtps_cpp                > no
  > pi:bin$ ./listener_best_effort                      > no
  > pi:bin$ ./listener_best_effort__rmw_opensplice_cpp  > no
  > pi:bin$ ./listener_best_effort__rmw_fastrtps_cpp    > no
4

0 回答 0