diff --git a/rosbag2_examples/rosbag2_examples_py/rosbag2_examples_py/simple_bag_player.py b/rosbag2_examples/rosbag2_examples_py/rosbag2_examples_py/simple_bag_player.py index d4bac76bd..09b8146ed 100644 --- a/rosbag2_examples/rosbag2_examples_py/rosbag2_examples_py/simple_bag_player.py +++ b/rosbag2_examples/rosbag2_examples_py/rosbag2_examples_py/simple_bag_player.py @@ -34,7 +34,8 @@ def __init__(self, bag_filename): self.publisher = self.create_publisher(String, 'chatter', 10) # ignore timestamp and publish at a fixed rate (10 Hz). self.timer = self.create_timer(0.1, self.timer_callback) - self.message_needs_to_be_edit_before_send_ = True + self.declare_parameter("edit", False) + self.message_needs_to_be_edit_before_send_ = self.get_parameter("edit").get_parameter_value().bool_value def timer_callback(self): while self.reader.has_next():