1
0
forked from zbw/yiliao2026

feat: add dedicated Fast DDS 164 profile

This commit is contained in:
2026-07-23 15:52:35 +08:00
parent c70f4921b7
commit edbe450b66
3 changed files with 158 additions and 0 deletions

30
config/dds/use_rdk_dds_164.sh Executable file
View File

@@ -0,0 +1,30 @@
#!/usr/bin/env bash
if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then
echo "ERROR: source this file instead of executing it" >&2
exit 64
fi
_rdk_dds_profile="/home/sunrise/yiliao_ws/config/dds/fastdds_rdk_164.xml"
if ! ip -4 addr show dev wlx200db0c3fca5 2>/dev/null | grep -q 'inet 192\.168\.10\.164/'; then
echo "ERROR: wlx200db0c3fca5 does not own 192.168.10.164" >&2
unset _rdk_dds_profile
return 1
fi
if [[ ! -r "${_rdk_dds_profile}" ]]; then
echo "ERROR: unreadable Fast DDS profile: ${_rdk_dds_profile}" >&2
unset _rdk_dds_profile
return 1
fi
export ROS_DOMAIN_ID=22
export RMW_IMPLEMENTATION=rmw_fastrtps_cpp
export ROS_LOCALHOST_ONLY=0
export FASTRTPS_DEFAULT_PROFILES_FILE="${_rdk_dds_profile}"
export FASTDDS_DEFAULT_PROFILES_FILE="${_rdk_dds_profile}"
printf 'DDS link enabled: domain=%s rmw=%s local=192.168.10.164 profile=%s\n' \
"${ROS_DOMAIN_ID}" "${RMW_IMPLEMENTATION}" "${_rdk_dds_profile}"
unset _rdk_dds_profile