69 Commits

Author SHA1 Message Date
d56b922f6a Refactor main.py and task_4.py: Removed deprecated turn_degree_v2 call in main.py and updated task_4.py to utilize center_on_dual_tracks for improved navigation. Deleted test_center_on_tracks.py and test_offline_centering.py files to streamline the codebase. Enhanced dual track detection capabilities by integrating detect_furthest_horizontal_intersection in move_base_hori_line.py, allowing for more accurate alignment to horizontal lines. 2025-05-28 16:17:53 +00:00
c46ddbf7a4 优化双轨迹线检测功能,增强对不同路况的处理能力,改进参数设置和评分机制,提升检测准确性和鲁棒性。同时,更新日志记录格式,确保信息更为清晰。 2025-05-28 22:56:17 +08:00
91a6ef0d36 Enhance main.py and task_4: Added go_to_y_v2 function to main.py for improved navigation. Updated go_straight function in go_straight.py to accept additional parameters for mode, gait_id, and step_height, allowing for more flexible movement control. Integrated follow_dual_tracks function in task_4 to enhance task execution by enabling dual track following capabilities. 2025-05-28 13:18:27 +00:00
5c3e858029 Merge branch 'main' of ssh://120.27.199.238:222/Havoc420mac/mi-task into main 2025-05-28 12:24:04 +00:00
a5d8960a85 Fix detect_track.py: Uncommented observe variable for testing purposes to ensure proper functionality during image processing. 2025-05-28 12:24:01 +00:00
045125d0d1 更新yellow_track_demo.py以使用detect_horizontal_track_edge_v3函数,修改输入路径为新的图像文件。对detect_track.py进行了小幅调整,注释掉了测试代码并优化了日志保存逻辑,提升了代码的可读性和执行效率。 2025-05-28 20:12:51 +08:00
477511f291 Merge branch 'task-3' into main 2025-05-28 07:11:49 +00:00
ca876fd733 Add go_until_yellow_area function to task_3.py for yellow area detection and control. Enhanced robot movement logic to stop upon detecting specified yellow area ratio, including temporary image handling and smooth stopping mechanism. 2025-05-28 07:02:58 +00:00
852a948a6f Refactor task navigation and enhance movement parameters
- Updated task_1.py to improve navigation logic and streamline movement functions.
- Enhanced task_2.py with refined movement parameters for better execution and added logging for debugging.
- Adjusted function calls in main.py to reflect changes in task execution flow.
2025-05-27 18:17:59 +00:00
0af26d8c70 更新日志文件,添加横向边缘检测结果和原始图像保存信息;删除不再使用的步态参数文件 Gait_Params_up_full.toml;修正黄色赛道检测演示程序中的输入路径和函数调用。 2025-05-26 17:40:57 +08:00
e9ff362b01 refactor(main, base_move, task_1): update task execution and enhance track detection
- Uncomment run_task_1 in main.py to enable task execution.
- Comment out run_task_test in main.py to prevent test execution.
- Introduce turn_degree_twice function in turn_degree.py for improved rotation control.
- Update task_1.py to utilize turn_degree_twice and adjust movement parameters for better task execution.
- Modify detect_func_version in task_2_5.py to use the latest detection algorithm.
- Add detect_horizontal_track_edge_v3 function in detect_track.py for enhanced edge detection capabilities.
2025-05-26 09:34:32 +00:00
5fd630c27b 优化follow_left_side_track函数,调整目标距离参数至540像素,增强稳定性和响应速度;更新滤波队列大小至7以提高稳定性;改进速度计算逻辑,确保更平滑的调整和停止过程;更新左侧轨迹线检测演示程序的输入路径。 2025-05-26 00:44:24 +08:00
e77d5655ae 新增go_straight_until_bar函数以控制机器人沿直线行走至检测到栏杆;优化follow_left_side_track函数的PID参数和稳定性要求,增强响应速度和稳定性;调整detect_left_side_track函数的搜索区域和评分逻辑,以提高线段检测的准确性和灵活性。 2025-05-25 19:55:35 +08:00
009b8e616a Merge branch 'main' of ssh://120.27.199.238:222/Havoc420mac/mi-task 2025-05-25 19:43:48 +08:00
250754ea25 优化黄色赛道检测演示程序,更新输入输出路径,替换边缘检测函数以提升准确性,并增强线段选择逻辑。 2025-05-25 19:43:31 +08:00
268d52155d refactor(task_2_5): simplify and restructure task execution
- Remove unused imports and simplify code structure
- Add direction parameter to run_task_2_5 function for flexibility
- Adjust turn_degree parameters for better accuracy
- Comment out unused alternative execution paths
2025-05-25 08:34:13 +00:00
09790e5921 Merge branch 'main' of ssh://120.27.199.238:222/Havoc420mac/mi-task 2025-05-24 22:35:24 +08:00
1c3c07d68a 更新黄色赛道检测演示程序的输入输出路径,替换边缘检测函数为新版本以提高检测准确性,并优化线段合并和选择逻辑,增强了对中上部线段的偏好。 2025-05-24 22:34:27 +08:00
85defc7811 feat(base_move): implement version 2 of horizontal line detection
- Add support for two versions of horizontal line detection functions
- Update move_base_hori_line.py to use the selected detection version
- Modify example_robot_log.py and test/main.py to use the new detection version
- Update image saving path in rgb-camera/img-raw-get.py
- Improve logging and error handling in detect_track.py
2025-05-23 06:56:15 +00:00
924a8e07c6 🎏 task-1 v0.2 2025-05-22 05:27:13 +00:00
c47213e8a3 Merge branch 'main' of ssh://120.27.199.238:222/Havoc420mac/mi-task 2025-05-22 12:35:18 +08:00
968471471f 删除测试图像结果文件,并在黄色赛道检测演示程序中更新输入和输出路径,同时在边缘检测算法中引入新的检测函数以提升检测准确性和稳定性。 2025-05-22 12:35:14 +08:00
1d18ec1e56 test(task_1): adjust go_straight parameters and comment out angle correction
- Comment out angle correction logic in go_straight function
- Adjust go_straight parameters in task_1
- Add success message for horizontal line calibration
- Update main function to include task_test
- Modify marker request response format
2025-05-22 04:27:22 +00:00
1ff2d22d4f Merge branch 'main' of ssh://120.27.199.238:222/Havoc420mac/mi-task into main 2025-05-20 10:31:21 +00:00
a781b77b42 pre merge 2025-05-20 10:31:14 +00:00
4a2ab00f8d 更新日志文件,增加了边缘检测过程中的调试信息和结果记录;修改了黄色赛道检测演示程序的输入路径;在边缘检测算法中引入了线段质量评分机制,优化了线段选择逻辑,提升了检测的准确性和稳定性。 2025-05-20 09:24:54 +08:00
1d0ca47e3b Merge branch 'main' of ssh://120.27.199.238:222/Havoc420mac/mi-task into main 2025-05-19 12:53:18 +00:00
234e11eadc add save ori 2025-05-19 12:53:12 +00:00
e08c8b15a9 更新黄色赛道检测演示程序的输入路径为测试图像,并在边缘检测功能中增加了对上下边缘线的处理逻辑,优化了截断线的修正机制,提升了检测的准确性和稳定性。 2025-05-19 20:52:38 +08:00
5d586c2999 Merge branch 'main' of ssh://120.27.199.238:222/Havoc420mac/mi-task into main 2025-05-19 06:26:54 +00:00
8782fdc092 refactor(main.py): implement pass flag functionality for MarkerRunner
- Add pass_marker variable to main.py
- Update MarkerRunner initialization in Robot_Ctrl class
- Modify MarkerRunner class to accept pass_flag parameter
- Implement pass flag logic in MarkerRunner's send_request method
- Initialize ROS 2 context in main function
2025-05-19 06:08:30 +00:00
26527e7775 在 move_base_hori_line.py 中新增 follow_left_side_track 函数,实现机器狗沿左侧黄色轨迹线移动的控制逻辑。同时在 detect_track.py 中添加 detect_left_side_track 函数,用于检测左侧轨迹线,增强了机器狗的轨迹跟随能力和稳定性。更新了相关参数和日志记录功能,提升了调试信息的可读性。 2025-05-18 16:59:56 +08:00
9e0692dca4 在多个函数中添加了 save_log 参数以增强日志记录功能,确保在检测横向和双轨道线时保存相关图像和日志信息。更新了 detect_horizontal_track_edge 和 detect_dual_track_lines 函数,提升了调试信息的可追踪性和可读性。同时,删除了旧的日志文件,优化了代码结构。 2025-05-18 15:53:07 +08:00
f467122e25 在 move_base_hori_line.py 中新增 follow_dual_tracks 函数,实现机器狗在双轨道中间行走的控制逻辑。更新 detect_track.py,添加 detect_dual_track_lines 函数以支持双轨道线的检测,增强了轨道跟随的稳定性和精度。同时优化了日志记录,提升了调试信息的可读性。 2025-05-17 21:13:50 +08:00
6d41ffa96c 删除 test_track_detection.py 文件,优化 go_straight、move_base_hori_line 和 turn_degree 函数中的日志记录,增强代码可读性和调试信息。更新 task_1 和 task_5 以使用新的日志记录功能,提升任务执行的可追踪性和信息反馈。 2025-05-17 12:34:02 +08:00
18248d7ad9 删除当前图像文件,优化 main.py 中的恢复站立逻辑,新增 lie_down 和 stand_up 方法到 BaseMsg 类,更新 task_1.py 以使用新的移动和休息功能。 2025-05-17 11:27:39 +08:00
214cc13c65 refactor(base_move): adjust moving strategy and update task execution
- Set msg.duration to 0 in move_to_hori_line to wait for next command
- Update task_1 execution flow based on QR code result
- Modify BaseMsg.stop() to use gait_id 27 for stopping
- Comment out smooth stop and use normal stop in move_to_hori_line
2025-05-15 16:41:00 +00:00
b02c2aea88 优化 move_to_hori_line 函数的移动速度控制和停止机制
- 根据目标移动距离动态调整移动速度,提升运动灵活性
- 新增平滑停止方法 stop_smooth,采用逐渐减速的方式实现更柔和的停止过程
- 确保机器人在移动和停止时的控制更加平稳
2025-05-16 00:22:31 +08:00
ef08a40adb # 7 2025-05-15 15:27:06 +00:00
a8574fc1db Merge branch 'main' of ssh://120.27.199.238:222/Havoc420mac/mi-task into main 2025-05-15 15:22:27 +00:00
c493db818a refactor(base_move): improve rotation accuracy and adjust task execution
- Enhance rotation feedback by printing current angle during and after rotation
- Adjust angles and add target distance in task 1 execution
- Modify stop method in BaseMsg class to use milliseconds for duration
2025-05-15 15:22:26 +00:00
dc0a119774 优化 move_to_hori_line 函数,新增 QR 码扫描功能
- 在 move_to_hori_line 函数中添加 scan_qrcode 和 qr_check_interval 参数,支持在移动过程中异步扫描 QR 码
- 实现异步 QR 码扫描机制,确保在移动时能够实时获取扫描结果
- 更新返回值,根据是否启用 QR 码扫描返回不同格式的结果
- 在 task_1.py 中调用 move_to_hori_line 函数时启用 QR 码扫描,并处理扫描结果
- 在 image_raw.py 中实现异步扫描的相关逻辑,确保图像处理器能够支持 QR 码扫描功能
2025-05-15 23:17:29 +08:00
5cfdb94739 优化 arc_turn_around_hori_line 函数,调整参数和逻辑以提高旋转精度
- 修改函数参数顺序,增强可读性
- 根据角度大小调整时间补偿系数和减速阈值,确保不同角度下的运动表现更佳
- 更新停止机制,确保机器人在旋转后平稳停止
- 增加观察输出信息,便于调试和分析旋转过程中的状态
2025-05-15 22:58:18 +08:00
f484dab840 refactor(base_move): simplify arc turn logic and remove precise turn functions
- Simplified arc_turn_around_hori_line function:
  - Removed smooth stop method call
  - Added print statements for debugging
- Removed unused arc_turn_precise and arc_turn_around_hori_line_precise functions
- Updated task_1.py to use simplified arc_turn_around_hori_line
-
2025-05-15 14:37:53 +00:00
aa855b160c Merge branch 'main' of ssh://120.27.199.238:222/Havoc420mac/mi-task into main 2025-05-15 14:26:34 +00:00
4dc515505b # 5 2025-05-15 14:26:27 +00:00
021915633c 优化圆弧转弯控制逻辑,新增平滑停止和精确转弯功能
- 在 move_base_hori_line.py 中,改进了 arc_turn_around_hori_line 函数,使用平滑停止方法替代强制停止,并添加停止过程中的角度监控。
- 新增 arc_turn_precise 函数,实现更精确的圆弧转弯控制,分阶段控制速度,提升转弯精度。
- 新增 arc_turn_around_hori_line_precise 函数,结合横线检测与精确转弯功能,确保机器人在执行任务时的路径更加准确。
- 在 base_msg.py 中,新增 stop_turn_smooth 方法,提供更细致的速度减小策略,确保旋转动作的平稳停止。
2025-05-15 22:24:24 +08:00
8c899fda7d Merge branch 'main' of ssh://120.27.199.238:222/Havoc420mac/mi-task 2025-05-15 20:18:10 +08:00
f5774d97b9 🎨 更新图像处理逻辑,优化边缘检测功能
- 修改 yellow_track_demo.py 中的输入和输出路径,确保使用最新的图像文件
- 在 detect_track.py 中改进掩码处理,添加形态学操作以提升掩码质量
- 优化轮廓检测逻辑,增加边缘检测和直线拟合的步骤,确保检测到的线段更准确
- 更新了相关的观察输出信息,便于调试和分析
2025-05-15 20:16:57 +08:00
d551343838 Merge branch 'main' of ssh://120.27.199.238:222/Havoc420mac/mi-task into main 2025-05-15 12:09:17 +00:00