Skip to content

Commit a346629

Browse files
authored
Add roudi config and update example (#522)
1 parent 03075f4 commit a346629

File tree

4 files changed

+29
-4
lines changed

4 files changed

+29
-4
lines changed

examples/zero_copy/BUILD.bazel

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,10 @@ py_library(
9090

9191
ros2_launch(
9292
name = "zero_copy",
93-
data = ["cyclonedds.xml"],
93+
data = [
94+
"cyclonedds.xml",
95+
"roudi.toml",
96+
],
9497
launch_file = "zero_copy.py",
9598
nodes = [
9699
":listener",

examples/zero_copy/Chatter.msg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
uint64 timestamp
22
uint64 count
33
# Shared memory backend can only deal with fixed size messages.
4-
# 3145728 = 3*1024*1024 = 3MiB
5-
char[3145728] data
4+
# For reference, FHD image: 3 * 1080 * 1920 = 6220800 bytes.
5+
char[6220800] data
66
uint64 data_length

examples/zero_copy/roudi.toml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[general]
2+
version = 1
3+
4+
[[segment]]
5+
6+
[[segment.mempool]]
7+
size = 32
8+
count = 16
9+
10+
[[segment.mempool]]
11+
# 8 MiB
12+
size = 8388608
13+
count = 16
14+
15+
[[segment.mempool]]
16+
# 32 MiB
17+
size = 33554432
18+
count = 16

examples/zero_copy/zero_copy.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,11 @@ def generate_launch_description():
7272
# roudi is a shared memory manager that also has to be started.
7373
launch.actions.ExecuteProcess(
7474
name='iceoryx_roudi',
75-
cmd=[zero_copy.roudi.ROUDI_PATH],
75+
cmd=[
76+
zero_copy.roudi.ROUDI_PATH,
77+
'-c',
78+
'zero_copy/roudi.toml',
79+
],
7680
),
7781
launch.actions.SetEnvironmentVariable(name='CYCLONEDDS_URI',
7882
value='zero_copy/cyclonedds.xml'),

0 commit comments

Comments
 (0)