225 Commits

Author SHA1 Message Date
952524dc63 refactor(task_3): remove unnecessary code and update functionality
- Remove redundant LCM initialization and file writing in main.py
- Update file paths in task_3.py to use relative paths
- Replace ctrl.Send_msg() with ctrl.Send_cmd(msg) for consistency
- Add import lcm in task_3.py
- Update main.py to focus on user gait list processing
2025-05-25 18:31:29 +00:00
0558ded36d 调整文件权限,将相关文件的模式从644更改为755,以确保可执行权限。 2025-05-26 02:19:59 +08:00
2734580d10 fix file 2025-05-26 02:08:12 +08:00
938b0f8a86 更新任务3实现:引入机器人命令字典,优化步态文件加载与发送逻辑,支持用户自定义步态切换。增加异常处理以应对中断情况。 2025-05-26 02:06:04 +08:00
5ab480d507 重构(main.py): 移除任务4并引入任务3
- 注释掉MarkerRunner相关代码
- 替换任务4为任务3的调用
- 在place_marker函数中添加返回None以避免错误
2025-05-26 01:52:30 +08:00
3de4bb8485 refactor(base_move): improve left side track following algorithm
- Update function signature: replace target_distance with min_distance and max_distance
- Remove unused error_threshold variable
- Adjust logging messages for better readability
- Modify success condition to check within range of min_distance and max_distance
- Update task_left_line.py to turn 90 degrees before following left side track
2025-05-25 17:38:07 +00:00
76c00337ed 优化follow_left_side_track函数,调整最大时间参数至30秒,增强轨迹跟随的稳定性和响应速度;改进检测逻辑,确保在未检测到轨迹线时能够继续使用上一次控制命令;更新速度计算方式,确保更平滑的调整和停止过程。 2025-05-26 01:16:20 +08:00
612256c525 refactor(base_move): adjust parameters and fix issues in left side track following
- Reduce max_time parameter from 30 to 3 in follow_left_side_track function
- Fix side velocity sign in follow_left_side_track function
- Uncomment and update run_task_test in main.py
- Update initial heading in task_left_line.py
2025-05-25 16:51:07 +00:00
0a031c4142 Merge branch 'main' of ssh://120.27.199.238:222/Havoc420mac/mi-task into main 2025-05-25 16:45:16 +00:00
e869b4d891 fix(base_move): correct side velocity direction in follow_left_side_track
- Reverse the sign of side_velocity to move in the correct direction
- Uncomment run_task_1 and comment out run_task_test in main.py
- Update task_left_line.py to turn 90 degrees before following the left side track
2025-05-25 16:45:15 +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
cb002c5b9f test(left_line): update image saving path and remove unused tasks
- Update image saving path in ImageSubscriber class
- Remove unused imports and code related to task_4 and arrow detection
- Add import for run_task_test
- Comment out run_task_4 and uncomment run_task_test in main function
2025-05-25 11:37:24 +00:00
30c63ce2e5 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
2025-05-25 08:53:13 +00:00
ea2e5d132a refactor(main): update task execution order and remove unused imports
- Remove imports for task_5 and task_test
- Add import for task_4
- Comment out task_2_5 execution
- Uncomment and execute task_4
2025-05-25 08:45:49 +00: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
13f7e30e69 move test files 2025-05-22 05:32:16 +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
2793daf8fe 优化 go_straight 函数中的方向计算逻辑,使用 IMU 数据来确定角度偏差,提升了机器人在前进和后退时的运动精度。 2025-05-20 10:04:14 +08: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
c3fe5e69d1 back turn degree 2025-05-19 15:32:24 +08:00
1146bdc4ef 在 move_base_hori_line.py 中添加了对横向线校准的改进,增加了对小幅度摇头的 TODO 注释。同时在 turn_degree.py 中重构了旋转逻辑,优化了旋转速度和方向的计算,增强了旋转过程的稳定性和精确度,确保机器人在执行旋转时能够更好地适应不同的情况。 2025-05-19 15:16:03 +08: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
405fb116ec nothing 2025-05-19 06:26:45 +00:00
6b15e9be90 在 move_base_hori_line.py 中优化了 align_to_horizontal_line 函数,简化了代码逻辑,调整了旋转角度的计算和限制,增强了校准过程的稳定性。同时,改进了日志记录信息,提升了调试的可读性和准确性。 2025-05-19 14:26:24 +08: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
f77b7edb13 在 move_base_hori_line.py 中优化了 align_to_horizontal_line 函数,添加了累积角度跟踪和动态补偿机制,增强了校准过程的稳定性和准确性。同时在 turn_degree.py 中引入了精确模式,改进了旋转控制逻辑,提升了旋转的精度和稳定性,确保机器人在执行旋转时能够更好地适应不同的情况。 2025-05-18 23:44:09 +08:00
aac055c1e0 test line 2025-05-18 15:32:54 +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
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
f4eab6b296 Merge branch 'fix-arc' into main 2025-05-18 07:58:30 +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
9e0692dca4 在多个函数中添加了 save_log 参数以增强日志记录功能,确保在检测横向和双轨道线时保存相关图像和日志信息。更新了 detect_horizontal_track_edge 和 detect_dual_track_lines 函数,提升了调试信息的可追踪性和可读性。同时,删除了旧的日志文件,优化了代码结构。 2025-05-18 15:53:07 +08: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