Skip to content

Commit

Permalink
Add the zenoh router to the common nodes if needed
Browse files Browse the repository at this point in the history
  • Loading branch information
civerachb-cpr committed Jan 9, 2025
1 parent 5bf3b63 commit f9a466c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions clearpath_generator_gz/clearpath_generator_gz/launch/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,18 @@ def __init__(self, setup_path: str = '/etc/clearpath/') -> None:
'platform/cmd_vel'
)

# Zenoh Router, only needed if RMW implementation is rmw_zenoh_cpp
print(self.clearpath_config.system.middleware.rmw_implementation)
if self.clearpath_config.system.middleware.rmw_implementation == RMWImplementation.ZENOH_DDS:
self.zenoh_router_node = LaunchFile.Node(
package='rmw_zenoh_cpp',
executable='rmw_zenohd',
name='rmw_zenohd',
namespace=self.namespace,
)
else:
self.zenoh_router_node = None

self.cmd_vel_node = LaunchFile.Node(
package='ros_gz_bridge',
executable='parameter_bridge',
Expand Down Expand Up @@ -154,6 +166,8 @@ def __init__(self, setup_path: str = '/etc/clearpath/') -> None:
self.cmd_vel_node,
self.odom_base_node
]
if self.zenoh_router_node is not None:
self.common_platform_components.append(self.zenoh_router_node)

# Components required for each platform
self.platform_components = {
Expand Down

0 comments on commit f9a466c

Please sign in to comment.