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 authored Jan 17, 2024
1 parent 0600020 commit 6e5d5ae
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 6e5d5ae

Please sign in to comment.