diff --git a/docker/Dockerfile b/docker/Dockerfile index 1c0d73b..3a81bd0 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -55,7 +55,7 @@ RUN git clone --recursive --depth 1 https://github.com/107-systems/robotem_rovne WORKDIR /opt/colcon_ws -COPY fastrtps-whitelist-wlan.xml /opt/colcon_ws +COPY fastrtps-whitelist-wlan.sh /opt/colcon_ws ENV FASTRTPS_DEFAULT_PROFILES_FILE=/opt/colcon_ws/fastrtps-whitelist-wlan.xml ENV RMW_IMPLEMENTATION=rmw_fastrtps_cpp diff --git a/docker/fastrtps-whitelist-wlan.sh b/docker/fastrtps-whitelist-wlan.sh new file mode 100755 index 0000000..0d9c1b3 --- /dev/null +++ b/docker/fastrtps-whitelist-wlan.sh @@ -0,0 +1,47 @@ +#!/bin/bash +set -euo pipefail +IFS=$'\n\t' + +# Fast-DDS https://fast-dds.docs.eprosima.com/en/latest/fastdds/transport/whitelist.html +# needs actual ip for this interface +interface=wlan0 +ipinet="$(ip a s $interface | egrep -o 'inet [0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}')" +echo " + + + + CustomUDPTransport + UDPv4 + +
${ipinet##inet }
+
+
+ + + CustomTcpTransport + TCPv4 + +
${ipinet##inet }
+
+
+ +
+ + + + + CustomUDPTransport + + false + + + + + + + CustomTcpTransport + + false + + +
" > fastrtps-whitelist-wlan.xml diff --git a/docker/fastrtps-whitelist-wlan.xml b/docker/fastrtps-whitelist-wlan.xml deleted file mode 100644 index 7f37b05..0000000 --- a/docker/fastrtps-whitelist-wlan.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - CustomUDPTransport - UDPv4 - - - - - - - - - CustomTcpTransport - TCPv4 - - - - - - - - - - - - false - - CustomUDPTransport - - - - - - - false - - CustomTcpTransport - - - -