Skip to content

Commit

Permalink
feat: use cmd sleep for delay
Browse files Browse the repository at this point in the history
Signed-off-by: Hayato Mizushima <[email protected]>
  • Loading branch information
hayato-m126 committed Nov 18, 2024
1 parent 05efb9d commit 245038e
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,6 @@ def launch_bag_player(
"bag",
"play",
conf["input_bag"],
"--delay",
conf["play_delay"],
"--rate",
conf["play_rate"],
"--clock",
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 245038e

Please sign in to comment.