ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Raspberry PI and PC - Communication error

asked 2020-02-05 05:57:41 -0500

mysqo gravatar image

I have tried setup my RPi4 running ROS Kinetic with my PC also running ROS Kinetic. However, it seems to be a problem for the RPi4 to communicate with the PC, as the RPI cant see the master running on the PC.

When I instead let the RPi4 run the ROS master, I was able to run the talker/listener tutorial by having the PC run the listener and the RPi4 talker. However, if I switched to instead let the RPi4 run the listener and the PC run the talker, it didn't work.

I've followed the troubleshooting guide and this is a summary of the config and the result:

On PC:

/etc/hosts
192.168.1.146   raspberrypi

enxe4b97ac7de5d Link encap:Ethernet  HWaddr e4:b9:7a:c7:de:5d  
      inet addr:192.168.1.111  Bcast:192.168.1.255  Mask:255.255.255.0
      inet6 addr: fe80::5e9:331f:9aed:3532/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:18435 errors:0 dropped:0 overruns:0 frame:0
      TX packets:32562 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000 
      RX bytes:2003025 (2.0 MB)  TX bytes:2556751 (2.5 MB)

~/.zshrc
# --------------------------------------------------------------------------#
export ROS_IP=192.168.1.111
export ROS_HOSTNAME=”robin-XPS-13-9370”
export ROS_MASTER_URI=”http://192.168.1.111:11311/”
# --------------------------------------------------------------------------#

PING 192.168.1.146 (192.168.1.146) 56(84) bytes of data.
64 bytes from 192.168.1.146: icmp_seq=1 ttl=64 time=0.348 ms

On RPI:

/etc/hosts
192.168.1.111   robin-XPS-13-9370

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
    inet 192.168.1.146  netmask 255.255.255.0  broadcast 192.168.1.255
    inet6 fe80::524:5a0:e1dc:d8ef  prefixlen 64  scopeid 0x20<link>
    ether dc:a6:32:2c:b6:b0  txqueuelen 1000  (Ethernet)
    RX packets 12360  bytes 977843 (954.9 KiB)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 7868  bytes 1045499 (1020.9 KiB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

~/.bashrc

# --------------------------------------------------------------------------#
export ROS_IP=192.168.1.146
export ROS_HOSTNAME="raspberrypi"
export ROS_MASTER_URI="http://192.168.1.111:11311"
# --------------------------------------------------------------------------#


PING 192.168.1.111 (192.168.1.111) 56(84) bytes of data.
64 bytes from 192.168.1.111: icmp_seq=1 ttl=64 time=0.488 ms

As you can see Im able to ping PC from RPi4 and vice versa. And If I instead let the RPi4 act as the master, I can send data from RPi4 to PC, but I can't send data from PC to RPi4.

It seems that RPi4 isn't dosen't accept incoming traffic on ethernet, but only outgoing?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2020-02-05 08:53:51 -0500

jschleicher@Pilz gravatar image

All communication is done by resolving the host names. Please try to export ROS_MASTER_URI=http://robin-XPS-13-9370:11311 etc.

edit flag offensive delete link more

Comments

This didn't work :(

mysqo gravatar image mysqo  ( 2020-02-17 05:51:11 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2020-02-05 05:57:41 -0500

Seen: 347 times

Last updated: Feb 05 '20