42 Commits

Author SHA1 Message Date
b5df874ad2 更新任务1的移动逻辑,将go_to_xy函数替换为go_straight函数以调整移动距离,提升执行效果。 2025-06-01 07:21:42 +08:00
b392453b62 更新任务函数,统一时间参数为可配置的 time_sleep 变量,以提高代码灵活性和可维护性。调整主程序中的任务调用,确保一致性和可读性。 2025-05-31 22:22:53 +08:00
4200fb8aeb Refactor main execution flow by adding support for task 3 back functionality and adjusting task 1 and task 2 parameters. Update task 2.5 back execution logic and improve movement commands for better control. Set observe flag in track detection functions for consistency. 2025-05-31 13:40:55 +00:00
bffcd973e0 Refactor task 1 and task 2 to incorporate new turn_degree_v2 function
- Updated task_1.py to replace turn_degree_twice calls with turn_degree_v2 for improved rotation accuracy.
- Modified task_2.py to utilize turn_degree_v2 for enhanced turning capabilities and adjusted movement parameters for better path execution.
- Refined go_to_xy parameters in task_2 to optimize navigation and added additional logging for debugging purposes.
2025-05-27 17:53:11 +00:00
7517ce61f0 Merge branch 'main' of ssh://120.27.199.238:222/Havoc420mac/mi-task 2025-05-27 01:03:11 +08:00
47cfa56ff0 新增任务1和任务2.5的返回功能,包含多个移动和旋转步骤以完成任务回程。优化了机器人在任务中的动作流程,确保更流畅的执行。 2025-05-27 01:03:08 +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
924a8e07c6 🎏 task-1 v0.2 2025-05-22 05:27:13 +00: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
28254f23c1 refactor(base_move): improve horizontal line alignment and task 1 execution
- Simplify the horizontal line alignment process in move_base_hori_line.py
- Update task_1.py to use the improved alignment function for better accuracy
2025-05-19 06:30:11 +00: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
aac055c1e0 test line 2025-05-18 15:32:54 +00:00
d40c7d1922 Merge branch 'main' of ssh://120.27.199.238:222/Havoc420mac/mi-task into main 2025-05-18 08:27:41 +00:00
8ee1f5b5d8 优化 arc_turn_around_hori_line 函数,调整参数和逻辑以支持负角度表示右转,增强代码可读性和可维护性。同时更新 task_1.py 中的调用方式,确保一致性和清晰性。 2025-05-18 16:26:20 +08:00
13c5ab360f nothing 2025-05-18 08:25:14 +00:00
7433c83b9b refactor(base_move): improve arc turn control and distance calculation
- Implement time compensation for different turn angles
- Adjust rotation thresholds and speed factors for better control
- Fix distance calculation and variable naming in go_straight function
- Enhance observation and debugging output
2025-05-18 07:57:15 +00:00
0534261b80 refactor(task_1): update observe flag and improve code readability
- Set observe flag to True
- Rename 'success' variable to 'turn_success' for clarity
- Add comments and blank lines for better code structure
- Remove unnecessary return statement
2025-05-18 04:29:05 +00:00
d7675093d1 在 move_base_hori_line.py 中新增 go_straight_by_hori_line 函数,封装了基于横向线的直线移动逻辑。更新 task_1.py 以集成新功能,优化任务执行流程,增强 QR 码扫描的处理和结果返回格式,提升代码可读性和可维护性。 2025-05-17 19:21:32 +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
97dd5a22dc refactor(task): 优化任务执行流程和代码结构
- 在 move_base_hori_line.py 中添加了返回中间状态的逻辑,提高了代码的可扩展性
- 优化了 QR 码扫描的处理流程,增强了代码的鲁棒性
- 在 task_1.py 中调整了任务 1 的执行流程,缩短了模拟装货的等待时间
2025-05-17 03:39:27 +00:00
18248d7ad9 删除当前图像文件,优化 main.py 中的恢复站立逻辑,新增 lie_down 和 stand_up 方法到 BaseMsg 类,更新 task_1.py 以使用新的移动和休息功能。 2025-05-17 11:27:39 +08:00
35e8cc9858 🎏 v0.1 base task-1 2025-05-16 11:35:53 +00:00
91c9896ad0 refactor(base_move): remove QR code scanning in move_base_hori_line
- Remove QR code scanning functionality from arc_turn_around_hori_line function
- Comment out QR code related code in task_1.py
- Adjust base_w value for rotation speed
2025-05-16 07:59:36 +00:00
790fe1fe0f feat(base_move): add pass_align option to arc_turn_around_hori_line function
- Add pass_align parameter to arc_turn_around_hori_line function
- Implement logic to skip alignment step if pass_align is True
- Update task_1.py to use the new pass_align feature
2025-05-15 16:49:27 +00: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
9c251bc471 优化 move_to_hori_line 和 arc_turn_around_hori_line 函数,增强 QR 码扫描功能
- 移除 move_to_hori_line 函数中的 QR 码扫描相关参数,简化函数接口
- 在 arc_turn_around_hori_line 函数中添加 QR 码扫描功能,支持在旋转过程中异步扫描 QR 码
- 更新 task_1.py 中的任务执行逻辑,确保在旋转和移动过程中能够实时获取 QR 码扫描结果
- 增强调试信息输出,便于跟踪任务执行状态
2025-05-15 23:42:09 +08: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
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
f84271c4d1 refactor(base_move): improve stop mechanism and adjust task_1 behavior
- Replace direct stop command with ctrl.base_msg.stop_force() in move_base_hori_line
- Enable observation mode in task_1 by setting observe to True
- Remove unnecessary return statement in task_1
2025-05-15 12:44:48 +00:00
6429e3cd5e $ 5 2025-05-15 12:08:49 +00:00
c6f236ca92 更新 task_1.py 文件,添加移动到横线的功能并调整圆弧转向逻辑。新增参数 distance 以控制移动距离,确保机器人在执行任务时的路径更加准确。 2025-05-15 19:53:36 +08:00
e547885e98 feat(base_move): improve arc_turn_around_hori_line function
- Add target_distance parameter to adjust the radius of the arc
- Modify the function to subtract target_distance from the calculated radius
- Update the velocity calculation to use the absolute value
- Increase the duration by
2025-05-15 08:35:38 +00:00
c0de61e1a9 task-1 #2 2025-05-14 12:12:57 +00:00
6be89617e7 重构主程序,移除图像处理器实例化,简化任务1函数参数,删除无用的测试文件,优化代码结构。 2025-05-14 19:35:29 +08:00
aa4621ed55 task-1 #1 2025-05-14 11:25:44 +00:00
49a6a10f63 feat(task_1): implement new robot movements and behaviors
- Add new functions for turning, going straight, and circling
- Implement standing up and lying down movements
- Update task_1 to use new movement functions
- Decode QR code information from image processor
- Refactor main.py to run task_5 instead of task_1
2025-05-12 08:06:08 +00:00
9f57cfc479 更新 .gitignore 以忽略 Python 缓存文件 2025-05-12 01:03:03 +08:00
c9686a84e1 feat(utils): add QR code decoding functionality
- Integrate QReader for QR code detection and decoding
- Implement decode_qrcode method in ImageProcessor class
- Uncomment run_task_1 function call in main.py
2025-05-11 16:22:21 +00:00
4d924d889a 重构代码,删除不再使用的LCM类型定义文件,更新导入路径,添加图像处理功能到主程序和任务1中,并在适当位置调用图像处理器的销毁方法。 2025-05-12 00:05:54 +08:00
db35c7a282 🎉 2025-05-11 15:44:54 +00:00