I'm running a DDS Router instance in a Kubernetes cluster. The router configuration is:
version: v4.0
specs:
discovery-trigger: any
participants:
- name: LocalDiscoveryServer
kind: local-discovery-server
discovery-server-guid:
ros-discovery-server: true
id: 0
listening-addresses:
- ip: 0.0.0.0
port: 11811
transport: udp
- name: echo_participant
kind: echo
data: true
verbose: true
discovery: true
with accompanying deployment configuration
kind: Service
apiVersion: v1
metadata:
name: local-ddsrouter
namespace: ros
spec:
ports:
- name: udp3k1
protocol: UDP
port: 11811
targetPort: 11811
selector:
app: ddsrouter
clusterIP: 10.43.2.1
type: ClusterIP
---
kind: Deployment
apiVersion: apps/v1
metadata:
namespace: ros
name: ddsrouter
labels:
app: ddsrouter
spec:
replicas: 1
selector:
matchLabels:
app: ddsrouter
template:
metadata:
labels:
app: ddsrouter
spec:
volumes:
- name: config
configMap:
name: ddsrouter-config
items:
- key: ddsrouter.config.file
path: DDSROUTER_CONFIGURATION.yaml
containers:
- name: ddsrouter
image: ddsrouter
ports:
- containerPort: 11811
protocol: UDP
- containerPort: 30002
protocol: UDP
volumeMounts:
- name: config
mountPath: /ddsrouter/resources
command:
- /bin/bash
- -c
- |
source ./install/setup.bash
ddsrouter --config-path /ddsrouter/resources/DDSROUTER_CONFIGURATION.yaml -d
restartPolicy: Always
I have a couple of ROS2 clients (Humble) running listener/talker, with no associated output from the DDS Router logs. All I get is
2024-03-13 09:05:12.190 [DDSROUTER Info] DEBUG: Creating DDS Router. -> Function DdsRouter
2024-03-13 09:05:12.191 [DDSROUTER Info] Participant created with id: LocalDiscoveryServer and kind discovery_server. -> Function init_participants_
2024-03-13 09:05:12.191 [DDSROUTER Info] Participant created with id: echo_participant and kind echo. -> Function init_participants_
2024-03-13 09:05:12.191 [DDSROUTER Info] DDS Router configured with allowed topics: AllowedTopicList{allowed{}blocked{}} -> Function init_allowed_topics_
2024-03-13 09:05:12.192 [DDSROUTER Info] DEBUG: DDS Router created. -> Function DdsRouter
DDS Router running.
2024-03-13 09:05:12.192 [DDSROUTER Info] Starting DDS Router. -> Function start
Which seems perfectly valid, if vacuous.
I don't think it's the kubernetes configuration. When I run tcpdump -i eth0 udp
I get
09:06:00.643176 IP 10.42.1.69.38984 > ddsrouter-58574ccdf9-hrnvf.11811: UDP, length 68
09:06:00.712290 IP 10.42.0.219.53813 > ddsrouter-58574ccdf9-hrnvf.11811: UDP, length 68
09:06:00.747994 IP 10.42.0.219.53813 > ddsrouter-58574ccdf9-hrnvf.11811: UDP, length 336
09:06:00.861690 IP 10.42.1.69.38984 > ddsrouter-58574ccdf9-hrnvf.11811: UDP, length 336
09:06:00.991129 IP 10.42.1.69.38984 > ddsrouter-58574ccdf9-hrnvf.11811: UDP, length 68
09:06:01.062339 IP 10.42.0.219.53813 > ddsrouter-58574ccdf9-hrnvf.11811: UDP, length 68
09:06:01.198102 IP 10.42.0.219.53813 > ddsrouter-58574ccdf9-hrnvf.11811: UDP, length 336
09:06:01.311779 IP 10.42.1.69.38984 > ddsrouter-58574ccdf9-hrnvf.11811: UDP, length 336
09:06:01.341511 IP 10.42.1.69.38984 > ddsrouter-58574ccdf9-hrnvf.11811: UDP, length 68
09:06:01.412413 IP 10.42.0.219.53813 > ddsrouter-58574ccdf9-hrnvf.11811: UDP, length 68
09:06:01.648172 IP 10.42.0.219.53813 > ddsrouter-58574ccdf9-hrnvf.11811: UDP, length 336
09:06:01.691333 IP 10.42.1.69.38984 > ddsrouter-58574ccdf9-hrnvf.11811: UDP, length 68
09:06:01.761887 IP 10.42.1.69.38984 > ddsrouter-58574ccdf9-hrnvf.11811: UDP, length 336
09:06:01.762497 IP 10.42.0.219.53813 > ddsrouter-58574ccdf9-hrnvf.11811: UDP, length 68
and so on. These IP addresses (10.42.0.219
and 10.42.1.69
) correspond to the talker and listener pods. This suggests that I'm getting RTPS ack traffic in but that the local discovery server isn't responding or acknowledging it.
The endpoint nodes are running stock ros:latest
though I've tried them with ros:humble
and ros:iron
to the same effect. Interestingly, fastdds discovery -i 0 -p 11811 -b
running on the server also doesn't work (and nothing shows up in the backup JSON). fastdds discovery -i 0
running on (ROS2 humble/latest) localhost with ROS_DISCOVERY_SERVER=localhost:11811
works.
What could be doing this? The best reason I can figure out so far is that there's a version mismatch between ROS2 Humble and the built-from-source DDS Router, but there's absolutely no indication that this is happening and there doesn't seem to be an introspection mechanism for me to be able to tell. The packets just seem to be ignored for no apparent reason.