Skip to content

Commit

Permalink
Support using zenoh config in zenoh-carla-bridge. (#19)
Browse files Browse the repository at this point in the history
Signed-off-by: ChenYing Kuo <[email protected]>
  • Loading branch information
evshary committed Apr 23, 2024
1 parent c69e769 commit 411ec7a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ struct Opts {
/// Select which kind of bridge you're using: zenoh-bridge-dds or zenoh-bridge-ros2dds.
#[clap(short, long, value_enum)]
mode: Option<Mode>,

/// Zenoh Config
#[clap(long, value_enum)]
zenoh_config: Option<String>,
}

fn main() -> Result<()> {
Expand All @@ -59,6 +63,7 @@ fn main() -> Result<()> {
carla_port,
zenoh_listen,
mode,
zenoh_config,
} = Opts::parse();

let mode = match mode {
Expand All @@ -67,7 +72,10 @@ fn main() -> Result<()> {
};

log::info!("Running Carla Autoware Zenoh bridge...");
let mut config = Config::default();
let mut config = match zenoh_config {
Some(conf_file) => Config::from_file(conf_file).unwrap(),
None => Config::default(),
};
config
.listen
.endpoints
Expand Down

0 comments on commit 411ec7a

Please sign in to comment.