Skip to content

Commit

Permalink
Add the ZENOH_ROUTER_CONFIG_URI envar to the generated bash file, pop…
Browse files Browse the repository at this point in the history
…ulated with either the default path or the user-specified one as needed
  • Loading branch information
civerachb-cpr committed Jan 13, 2025
1 parent 045af58 commit 3d0432b
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,18 @@ def generate_server_start(self) -> None:
middleware_config = self.clearpath_config.system.middleware
if middleware_config.rmw_implementation == RMWImplementation.ZENOH_DDS:

if middleware_config.zenoh_router_config_uri:
# use the user-specified router config file
bash_writer.write(
f'export ZENOH_ROUTER_CONFIG_URI={middleware_config.zenoh_router_config_uri}' # noqa: E501
)
else:
# use the default router config file
bash_writer.write(
'export ZENOH_ROUTER_CONFIG_URI="$(ros2 pkg prefix rmw_zenoh_cpp)/share/rmw_zenoh_cpp/config/DEFAULT_RMW_ZENOH_ROUTER_CONFIG.json5"' # noqa: E501
)
bash_writer.write(
f'ros2 run rmw_zenoh_cpp rmw_zenohd\n'
'ros2 run rmw_zenoh_cpp rmw_zenohd\n'
)
else:
bash_writer.add_echo(
Expand Down

0 comments on commit 3d0432b

Please sign in to comment.