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

View File

@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8" ?>
<profiles xmlns="http://www.eprosima.com/XMLSchemas/fastRTPS_Profiles">
<transport_descriptors>
<transport_descriptor>
<transport_id>rdk_udp_164</transport_id>
<type>UDPv4</type>
<interfaceWhiteList>
<address>192.168.10.164</address>
</interfaceWhiteList>
</transport_descriptor>
<transport_descriptor>
<transport_id>rdk_shm</transport_id>
<type>SHM</type>
</transport_descriptor>
</transport_descriptors>
<participant profile_name="rdk_dds_164" is_default_profile="true">
<rtps>
<builtin>
<initialPeersList>
<locator>
<udpv4>
<address>192.168.10.151</address>
</udpv4>
</locator>
</initialPeersList>
</builtin>
<userTransports>
<transport_id>rdk_udp_164</transport_id>
<transport_id>rdk_shm</transport_id>
</userTransports>
<useBuiltinTransports>false</useBuiltinTransports>
</rtps>
</participant>
</profiles>

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