From 2e13bf214cb83b51057fdbd3a168d14609416341 Mon Sep 17 00:00:00 2001 From: "Kem (TiankuiXian)" <1041084556@qq.com> Date: Fri, 22 Nov 2024 11:15:45 +0900 Subject: [PATCH] fix(perception_reproducer): fix a small bug (#155) * fix bug. Signed-off-by: temkei.kem <1041084556@qq.com> * style(pre-commit): autofix Signed-off-by: temkei.kem <1041084556@qq.com> --------- Signed-off-by: temkei.kem <1041084556@qq.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .../scripts/perception_replayer/perception_reproducer.py | 3 +-- .../planning_debug_tools/scripts/perception_replayer/utils.py | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/planning/planning_debug_tools/scripts/perception_replayer/perception_reproducer.py b/planning/planning_debug_tools/scripts/perception_replayer/perception_reproducer.py index 8b32d0d0..a4202102 100755 --- a/planning/planning_debug_tools/scripts/perception_replayer/perception_reproducer.py +++ b/planning/planning_debug_tools/scripts/perception_replayer/perception_reproducer.py @@ -328,8 +328,7 @@ def add_perception_noise( ) args = parser.parse_args() - if not args.bag: - parser.error("The '--bag' argument is required.") + rclpy.init() if args.pub_route: pub_route(args.bag) diff --git a/planning/planning_debug_tools/scripts/perception_replayer/utils.py b/planning/planning_debug_tools/scripts/perception_replayer/utils.py index f1f628e3..0a1e6f53 100644 --- a/planning/planning_debug_tools/scripts/perception_replayer/utils.py +++ b/planning/planning_debug_tools/scripts/perception_replayer/utils.py @@ -207,8 +207,6 @@ def get_pose_from_bag(input_path: str, interval=(0.1, 10000.0)) -> Tuple[Pose, P def pub_route(input_path: str): - rclpy.init() - try: first_pose, last_pose = get_pose_from_bag(input_path) except Exception as e: