Hi guys, I am trying to connect my autopilot with my companion computer using the ethernet cable.
Details of the hardware:
Autopilot: Pixhawk 6x with firmware version 1.15.1
Companion computer: Raspberry Pi 4B running Ubuntu 24.04
Connected using an Ethernet cable
I have followed the steps from https://docs.px4.io/main/en/advanced_config/ethernet_setup.html#ros-2-setup-example and https://px4.io/get-the-pixhawk-raspberry-pi-cm4-baseboard-by-holybro-talking-with-px4/.
However, XRCE-Agent is unable to communicate with the client.
uavpi2@raspberrypi:~$ MicroXRCEAgent udp4 -p 8888
[1727457933.486357] info | UDPv4AgentLinux.cpp | init | running... | port: 8888
[1727457933.487239] info | Root.cpp | set_verbose_level | logger setup | verbose_level: 4
On the client side, I get:
uxrce_dds_client status
INFO [uxrce_dds_client] Running, disconnected
INFO [uxrce_dds_client] Using transport: udp
INFO [uxrce_dds_client] Agent IP: 10.41.10.1
INFO [uxrce_dds_client] Agent port: 8888
INFO [uxrce_dds_client] Custom participant: no
INFO [uxrce_dds_client] Localhost only: no
INFO [uxrce_dds_client] timesync converged: false
uxrce_dds_client: cycle: 0 events, 0us elapsed, 0.00us avg, min 0us max 0us 0.000us rms
uxrce_dds_client: cycle interval: 0 events, 0.00us avg, min 0us max 0us 0.000us rms
Also, I am able to ping from both the devices.
nsh> ping 10.41.10.1
PING 10.41.10.1 56 bytes of data
56 bytes from 10.41.10.1: icmp_seq=0 time=0.0 ms
56 bytes from 10.41.10.1: icmp_seq=1 time=0.0 ms
56 bytes from 10.41.10.1: icmp_seq=2 time=0.0 ms
56 bytes from 10.41.10.1: icmp_seq=3 time=0.0 ms
56 bytes from 10.41.10.1: icmp_seq=4 time=1.0 ms
56 bytes from 10.41.10.1: icmp_seq=5 time=1.0 ms
56 bytes from 10.41.10.1: icmp_seq=6 time=0.0 ms
56 bytes from 10.41.10.1: icmp_seq=7 time=0.0 ms
56 bytes from 10.41.10.1: icmp_seq=8 time=0.0 ms
56 bytes from 10.41.10.1: icmp_seq=9 time=0.0 ms
10 packets transmitted, 10 received, 0% packet loss, time 10010 ms
rtt min/avg/max/mdev = 0.000/0.200/1.000/0.400 ms
uavpi2@raspberrypi:~$ ping 10.41.10.2
PING 10.41.10.2 (10.41.10.2) 56(84) bytes of data.
64 bytes from 10.41.10.2: icmp_seq=1 ttl=64 time=0.577 ms
64 bytes from 10.41.10.2: icmp_seq=2 ttl=64 time=0.157 ms
64 bytes from 10.41.10.2: icmp_seq=3 ttl=64 time=1.34 ms
^C
--- 10.41.10.2 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2083ms
rtt min/avg/max/mdev = 0.157/0.692/1.344/0.491 ms
My IP settings on the client (autopilot)
nsh> netman show
DEVICE=eth0
BOOTPROTO=fallback
NETMASK=255.255.255.0
IPADDR=10.41.10.2
ROUTER=10.41.10.254
DNS=10.41.10.254
My IP settings on the agent (companion computer)
uavpi2@raspberrypi:~$ ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.41.10.1 netmask 255.255.255.0 broadcast 10.41.10.255
inet6 fe80::a263:3d00:389b:3425 prefixlen 64 scopeid 0x20<link>
ether e4:5f:01:ca:97:5c txqueuelen 1000 (Ethernet)
RX packets 5043 bytes 332097 (332.0 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 301 bytes 17282 (17.2 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Also my MAV2 settings are
Can someone please help me establish the XRCE communication?