Skip to content

Commit

Permalink
Fix missing timestamping configuration (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
JEnoch committed Jan 22, 2024
1 parent c9f2e3b commit 6608401
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion zenoh-bridge-ros2dds/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use bridge_args::BridgeArgs;
use clap::Parser;
use ros_args::RosArgs;
use std::time::{Duration, SystemTime};
use zenoh::config::Config;
use zenoh::config::{Config, ModeDependentValue};

mod bridge_args;
mod ros_args;
Expand Down Expand Up @@ -49,6 +49,12 @@ fn parse_args() -> (Option<f32>, Config) {
let ros_args = RosArgs::parse_from(ros_args);
ros_args.update_config(&mut config);

// Always add timestamps to publications (required for PublicationCache used in case of TRANSIENT_LOCAL topics)
config
.timestamping
.set_enabled(Some(ModeDependentValue::Unique(true)))
.unwrap();

(watchdog_opt, config)
}

Expand Down

0 comments on commit 6608401

Please sign in to comment.