82 Commits

Author SHA1 Message Date
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
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
e28a93954a Merge branch 'main' of ssh://120.27.199.238:222/Havoc420mac/mi-task into main 2025-05-15 12:44:49 +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
296a228c3b 优化 arc_turn_around_hori_line 函数,调整旋转速度和减速逻辑
- 增加基础角速度至 0.8,提高旋转精度
- 应用时间补偿系数,减少实际运动时间至 92%
- 调整减速阈值至目标角度的 80%
- 修改速度系数下限至 0.2,允许更慢的减速
- 增加微调角度的补偿系数,确保最终角度更准确
2025-05-15 20:44:24 +08:00
24f98da1a3 优化 arc_turn_around_hori_line 函数,改进旋转过程中的减速控制逻辑
- 增加旋转精度监控,达到目标角度的85%时开始减速
- 直接发送停止命令,替代平滑停止方法
- 添加观察输出信息,便于调试和分析旋转过程中的状态
- 处理旋转完成后的角度微调,确保最终角度准确
2025-05-15 20:32:51 +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
6429e3cd5e $ 5 2025-05-15 12:08:49 +00:00
cb84ca79ac 优化移动控制逻辑,改进平滑停止方法
- 修改 move_to_hori_line 和 arc_turn_around_hori_line 函数,使用平滑停止代替强制停止
- 调整超时时间和移动监控逻辑,确保机器人在接近目标时平稳减速
- 在 BaseMsg 类中新增 stop_smooth 方法,实现逐步减小速度的功能
2025-05-15 20:08:16 +08:00
116fd15b56 fix(base_move): 修正 arc_turn_around_hori_line 函数中的航向角获取方式
- 将航向角的获取方式从 ctrl.odo_msg.yaw 修改为 ctrl.odo_msg.rpy[2]
- 增加航向角的归一化处理逻辑,确保角度在 -π 到 π 之间
2025-05-15 16:51:50 +08:00
6779c93888 task-1 #5 2025-05-15 16:43: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
ffc5d45fb0 Merge branch 'main' of ssh://120.27.199.238:222/Havoc420mac/mi-task into main 2025-05-15 08:21:00 +00:00
dfb651478c task-1 #4 2025-05-15 08:20:57 +00:00
afdeeec21f 增加圆弧转向功能
- 新增 arc_turn_around_hori_line 函数,实现机器人对准横线后进行圆弧转向
- 支持90度和180度的左转或右转,增加调试信息输出
- 优化运动参数计算和指令发送逻辑,确保运动过程的准确性和稳定性
- 在主程序中添加示例调用,展示新功能的使用方法
2025-05-15 16:17:24 +08:00
4135f8c31a refactor(base_move): 优化移动控制逻辑和校准流程
- 修改 move_to_hori_line 函数中的超时设置和停止命令发送方式
- 在主程序中初始化和销毁 ROS 2 上下文
- 增加校准相关变量和逻辑,提高定位精度
- 优化 ImageProcessor 和 MarkerRunner 类的实现
2025-05-15 08:09:59 +00:00
f77cada464 增加 MarkerRunner 支持,优化标记放置功能
- 在 Robot_Ctrl 类中初始化 MarkerRunner,并在运行时调用其方法
- 在移动到横向线的函数中添加标记放置功能,分别在起点和终点放置绿色和红色标记
- 增强错误处理,确保 MarkerRunner 正确销毁
2025-05-15 11:19:24 +08:00
6996a3459f task-1 #3 2025-05-14 14:50:50 +00:00
adaaa0174d 优化计算到横向线的距离函数,增加相机倾斜角度参数,添加观察模式以打印中间计算值,改进代码结构和注释,更新图像读取方式。 2025-05-14 22:33:13 +08:00
c0de61e1a9 task-1 #2 2025-05-14 12:12:57 +00:00
4cf9f143dd 优化横向线对齐和移动函数,移除不必要的图像参数,更新相机高度,调整移动速度,简化代码结构。 2025-05-14 20:06:09 +08:00
6be89617e7 重构主程序,移除图像处理器实例化,简化任务1函数参数,删除无用的测试文件,优化代码结构。 2025-05-14 19:35:29 +08:00
aa4621ed55 task-1 #1 2025-05-14 11:25:44 +00:00
df7c98f09a 更新横向赛道边缘检测函数,调整斜率判断阈值为0.05,移除可视化功能的相关代码,优化代码结构。 2025-05-14 16:18:36 +08:00
88df535378 🎏 add readme 2025-05-13 22:32:03 +08:00
765be6d547 修改turn_degree函数的参数名称,从relative改为absolute,并调整逻辑以支持绝对角度旋转。此更改提高了函数的灵活性和可读性。 2025-05-13 18:34:53 +08:00
9ec783b8b1 更新主程序以启用任务5的执行,并修改turn_degree函数以支持相对角度旋转。 2025-05-13 18:27:47 +08:00
9492912c8f turn-degress test 2025-05-13 18:19:18 +08: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
db35c7a282 🎉 2025-05-11 15:44:54 +00:00