Skip to content

Commit

Permalink
add ros fastdds
Browse files Browse the repository at this point in the history
  • Loading branch information
liuxingjun authored Nov 14, 2023
1 parent 30a8fbd commit c061278
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions source/_posts/ros2单播组网.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
title: ros2单播组网
date: 2023-11-14 13:39
updated: 2023-11-14 13:39
categories: ros2
---
`/etc/ros/fastdds.xml`文件内增加如下内容
```xml
<?xml version="1.0" encoding="UTF-8"?>
<profiles xmlns="http://www.eprosima.com/XMLSchemas/fastRTPS_Profiles">
<participant profile_name="unicast_connection" is_default_profile="true">
<rtps>
<builtin>
<initialPeersList>
<locator>
<udpv4>
<address>127.0.0.1</address>
</udpv4>
</locator>
<locator>
<udpv4>
<address>172.19.0.2</address>
</udpv4>
</locator>
</initialPeersList>
</builtin>
<userTransports>
<transport_id>lotsOfPeers</transport_id>
</userTransports>
</rtps>
</participant>
</profiles>
```

增加环境变量
```bash
echo 'FASTRTPS_DEFAULT_PROFILES_FILE=/etc/ros/fastdds.xml' > ~/.bashrc
```

0 comments on commit c061278

Please sign in to comment.