From 30c63ce2e560c014297b0676125db036f073d262 Mon Sep 17 00:00:00 2001 From: havoc420ubuntu <2993167370@qq.com> Date: Sun, 25 May 2025 08:53:13 +0000 Subject: [PATCH] refactor(task_4): adjust movement parameters and image save path - Modify go_straight distance from 10 to 6 in task 4 - Update image save path in rgb-camera test --- task_4/task_4.py | 2 +- test/ros2/rgb-camera/img-raw-get.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/task_4/task_4.py b/task_4/task_4.py index c79d362..923f77f 100644 --- a/task_4/task_4.py +++ b/task_4/task_4.py @@ -22,5 +22,5 @@ def run_task_4(ctrl, msg): turn_degree(ctrl, msg, 90, absolute=90) - go_straight(ctrl, msg, distance=10) + go_straight(ctrl, msg, distance=6) diff --git a/test/ros2/rgb-camera/img-raw-get.py b/test/ros2/rgb-camera/img-raw-get.py index ddf8230..5ae85d6 100644 --- a/test/ros2/rgb-camera/img-raw-get.py +++ b/test/ros2/rgb-camera/img-raw-get.py @@ -51,7 +51,7 @@ class ImageSubscriber(Node): if self.cv_image is not None: # Generate a timestamped filename timestamp = datetime.now().strftime("%Y%m%d_%H%M%S") - filename = f"captured_images/path/image_{timestamp}.png" + filename = f"../captured_images/test/image_{timestamp}.png" cv2.imwrite(filename, self.cv_image) self.get_logger().info(f"Saved image as {filename}")