From 245038e80e2bf399bc33de962761544789c58ec4 Mon Sep 17 00:00:00 2001 From: Hayato Mizushima Date: Mon, 18 Nov 2024 15:23:56 +0900 Subject: [PATCH] feat: use cmd sleep for delay Signed-off-by: Hayato Mizushima --- .../launch/driving_log_replayer_v2.launch.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/driving_log_replayer_v2/launch/driving_log_replayer_v2.launch.py b/driving_log_replayer_v2/launch/driving_log_replayer_v2.launch.py index 0094a803..8a7ca65c 100644 --- a/driving_log_replayer_v2/launch/driving_log_replayer_v2.launch.py +++ b/driving_log_replayer_v2/launch/driving_log_replayer_v2.launch.py @@ -365,8 +365,6 @@ def launch_bag_player( "bag", "play", conf["input_bag"], - "--delay", - conf["play_delay"], "--rate", conf["play_rate"], "--clock", @@ -428,7 +426,8 @@ def launch_bag_player( if conf["record_only"] == "true" else ExecuteProcess(cmd=play_cmd, output="screen") ) - return [bag_player, LogInfo(msg=f"remap_command is {remap_list}")] + delay_player = ExecuteProcess(cmd=["sleep", conf["play_delay"]], on_exit=[bag_player]) + return [delay_player, LogInfo(msg=f"remap_command is {remap_list}")] def launch_bag_recorder(context: LaunchContext) -> list: