225 Commits

Author SHA1 Message Date
44c83bc1d4 优化 arc_turn_around_hori_line 函数,调整减速和旋转策略
- 将大角度减速阈值从0.7调整为0.8,旋转完成阈值从0.85调整为0.92
- 增加前段旋转时间比例,从0.65提高到0.75,确保更平稳的旋转
- 将减速比例从0.7提高到0.8,增强前进速度与角速度的比例关系
- 调整总旋转时间,从1.15增加到1.25,确保旋转过程的稳定性
- 更新大角度的速度系数,提升控制精度,确保最终角度的准确性
2025-05-18 12:25:19 +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
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
59961b9905 优化 arc_turn_around_hori_line 函数,调整旋转时间和减速策略
- 减少前段旋转时间比例,从0.7降至0.65,降低过度旋转风险
- 调整总旋转时间,从1.2降至1.15,确保旋转过程更平稳
- 更新大角度旋转的减速系数,分别从0.7、0.4、0.2降至0.65、0.35、0.15,增强控制精度
- 修改小角度和大角度的补偿因子,提升校正的保守性
- 精简多阶段校正逻辑,优化大误差情况下的调整策略,确保最终角度的准确性
2025-05-16 16:09:08 +08: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
95b426bf29 优化 arc_turn_around_hori_line 函数,调整大角度旋转的时间补偿和减速策略
- 增加180度旋转的时间补偿系数,确保旋转时间更长
- 调整大角度旋转的基础角速度和减速阈值,提升旋转精度
- 实现多阶段校正逻辑,针对较大误差进行分阶段微调,确保最终角度的准确性
- 更新调试信息,便于实时监控旋转过程中的状态变化
2025-05-16 15:33:30 +08:00
19d583e4d8 优化 arc_turn_around_hori_line 函数,增强圆弧运动的精度和调试信息
- 添加最小半径限制,确保线速度计算的稳定性
- 更新调试信息,显示实际半径与最小半径的使用情况
- 在起点、圆心和目标位置放置标记,便于观察运动轨迹
- 计算实际结束位置与预期目标位置的偏差,输出位置误差信息
2025-05-16 14:32:41 +08:00
ae8de7bd28 优化 move_to_hori_line 和 arc_turn_around_hori_line 函数,提升移动和旋转精度
- 增加移动超时时间,确保在复杂环境下的稳定性
- 放宽移动距离判断标准,提升成功率
- 针对180度旋转简化逻辑,直接使用原始角度,避免过度旋转
- 实现大角度旋转的特殊处理,优化减速策略,确保平稳性
- 增强调试信息输出,便于实时监控旋转和移动状态
2025-05-16 14:25:41 +08:00
9a53927cc5 优化 arc_turn_around_hori_line 函数,调整大角度旋转的补偿和减速逻辑
- 修改大角度旋转时的时间补偿系数,防止过度旋转
- 针对大角度(如180度)调整减速阈值和停止条件,提升旋转精度
- 实现多阶段减速策略,确保在大角度旋转时的平稳性
- 增加微调逻辑,针对大角度误差进行两阶段校正,提升最终角度的准确性
- 更新调试信息输出,便于跟踪旋转过程中的状态变化
2025-05-16 14:09:52 +08: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
b02c2aea88 优化 move_to_hori_line 函数的移动速度控制和停止机制
- 根据目标移动距离动态调整移动速度,提升运动灵活性
- 新增平滑停止方法 stop_smooth,采用逐渐减速的方式实现更柔和的停止过程
- 确保机器人在移动和停止时的控制更加平稳
2025-05-16 00:22:31 +08: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
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
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
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
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
c6f236ca92 更新 task_1.py 文件,添加移动到横线的功能并调整圆弧转向逻辑。新增参数 distance 以控制移动距离,确保机器人在执行任务时的路径更加准确。 2025-05-15 19:53:36 +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
30d02cba9d finish mark;
test(cy-mark): improve marker placement service and update test case

- Update marker_client.py to test with different coordinates and color
- Remove model_marker.sdf file as it's no longer needed
- Enhance marker_service.cpp with better error handling and logging
2025-05-14 17:15:49 +00:00
ac97ca29e7 gazebo mark 2025-05-14 23:13:28 +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