diff --git a/clearpath_generator_common/clearpath_generator_common/bash/generator.py b/clearpath_generator_common/clearpath_generator_common/bash/generator.py index 2edc5de8..59b2c0a4 100644 --- a/clearpath_generator_common/clearpath_generator_common/bash/generator.py +++ b/clearpath_generator_common/clearpath_generator_common/bash/generator.py @@ -87,4 +87,17 @@ def generate_setup_bash(self) -> None: else: bash_writer.add_unset('ROS_DISCOVERY_SERVER') + # ROS automatic discovery range + bash_writer.add_export( + 'ROS_AUTOMATIC_DISCOVERY_RANGE', + self.clearpath_config.system.middleware.automatic_discovery_range.upper(), + ) + if len(self.clearpath_config.system.middleware.static_peers) > 0: + bash_writer.add_export( + 'ROS_STATIC_PEERS', + f'"{";".join(self.clearpath_config.system.middleware.static_peers)}"', + ) + else: + bash_writer.add_unset('ROS_STATIC_PEERS') + bash_writer.close()