Skip to content

Commit

Permalink
fix: remap topic to be unique
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 8, 2024
1 parent 61ca6a9 commit 832f725
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -378,8 +378,10 @@ def launch_bag_player(
if conf["remap"] != "":
remap_topics: list[str] = conf["remap"].split(",")
for topic in remap_topics:
if topic.startswith("/") and topic not in remap_list:
remap_list.append(f"{topic}:=/unused{topic}")
if topic.startswith("/"):
remap_str = f"{topic}:=/unused{topic}"
if remap_str not in remap_list:
remap_list.append(remap_str)
if len(remap_list) != 1:
play_cmd.extend(remap_list)
bag_player = (
Expand Down

0 comments on commit 832f725

Please sign in to comment.