edff57a2ad
fix: 解决Apply按钮后机械臂摇头问题
...
- 在IK计算前保存机械臂状态,计算后立即恢复
- 移除Apply配置中的状态恢复逻辑避免冲突
- 删除未使用的inverse_kinematics_static方法
- 保持Apply按钮和路径执行功能的兼容性
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-14 13:35:24 +08:00
5efcfb0a9e
feat: 添加仿真录制回放功能
...
- 新增 SimulationRecorder 类用于录制仿真数据
- 新增 SimulationPlayer 类用于回放录制数据
- GUI集成录制/回放控制按钮
- 支持JSON格式保存和加载
- 支持播放/暂停/速度控制功能
- 集成到三阶段路径执行中的自动录制
- 更新CLAUDE.md文档说明新功能使用方法
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-14 13:06:49 +08:00
a90f750d9a
fix: 修复任务标记和运输物体碰撞导致的21.1cm路径执行误差
...
问题根源:
- 任务标记(A、B点)的碰撞体干扰了机械臂控制
- 运输物体的物理属性影响了路径执行精度
解决方案:
- 任务标记改为纯视觉(移除碰撞体)
- 运输物体改为视觉标记(无碰撞、无质量)
- 实现物体吸附机制,在机械臂到达时跟随末端执行器
效果:
- 路径执行误差从21.1cm降至0.1-0.3cm
- 保留了完整的视觉效果
- 消除了碰撞体对控制的干扰
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-14 12:16:20 +08:00
f1efc666aa
完善路径执行精度控制和误差显示
...
主要改进:
- 使用常量定义所有路径执行参数,避免硬编码
- 增加仿真步数从20到30,提高控制精度
- 减小position_tolerance从0.05到0.02(2cm),要求更高精度
- 关键点停留时间设为1秒(使用KEYPOINT_PAUSE_TIME常量)
- GUI日志显示详细执行结果(目标位置、实际位置、误差)
- 添加误差超限警告提示
优化效果:
- 执行误差控制在2-3cm以内
- 路径规划终点验证为精确目标点
- 执行误差主要来自控制器收敛精度
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-14 10:21:16 +08:00
d50a493acf
优化路径执行:简化为单次规划和执行
...
主要改进:
- 将三阶段独立执行改为单次完整路径执行
- 分段规划后合并路径,避免误差累积
- 在关键点(物体、A点)自动停留0.5秒
- 调整路径颜色为暗绿色,更柔和
- 降低移动速度3倍,动作更平滑
- 修复硬编码问题,使用常量定义
修复问题:
- Stage 2执行失败(6.2cm误差)
- 多次规划导致的误差累积
- 理论位置与实际位置不一致
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-14 09:54:11 +08:00
a2afc6944e
refactor: 完全移除KDL依赖,统一使用PyBullet架构
...
主要重构内容:
1. 移除所有KDL相关的关节顺序转换
- 删除 _build_joint_mappings、_to_pb_order、_to_kdl_order 方法
- collision_checker.py 中移除转换调用
2. 使用PyBullet实现所有运动学功能
- forward_kinematics:使用 getLinkState
- validate_joint_configuration:使用 getJointInfo
- compute_jacobian:使用 calculateJacobian
- check_joint_limits:使用 PyBullet 关节信息
3. 优化代码结构
- 清理重复导入,所有 import 移至文件顶部
- 提高 IK 精度:residualThreshold 0.001→0.0001
- 调整容差:position_tolerance 0.02→0.05
4. 更新项目文档
- 更新 CLAUDE.md 反映架构变更
- 记录当前待解决的精度问题
效果:
- 消除了关节顺序混乱问题
- 统一了系统架构
- 代码更加简洁清晰
待解决:
- 第二阶段执行精度问题(误差6.2cm)
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-14 09:33:49 +08:00
21bf2bb4df
feat: 实施PyBullet IK方案替代KDL,解决32.8cm定位偏差问题
...
主要修改:
1. arm_controller.py: 使用PyBullet的calculateInverseKinematics替代KDL IK
- 精度从32.8cm误差降至0.566cm
- 确保IK求解与仿真环境的一致性
2. main_window.py: 优化路径可视化,避免机械臂重复执行
- 修复早期返回bug,确保三阶段任务完整执行
- 改进可视化方法,减少对机械臂状态的影响
- 使用保存-计算-恢复策略最小化视觉干扰
效果:
- 大幅提升系统精度
- 消除重复执行问题
- 保持KDL代码供对比研究
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-14 09:12:09 +08:00
4e1b612ac9
feat: 添加KDL与PyBullet坐标系统一致性调试功能
...
- 在debug_execution.py中增加KDL和PyBullet末端坐标对比
- 在main_window.py中添加_print_debug_coordinates方法
- 实时显示两种计算方式的末端位置误差
- 用于验证运动学计算的准确性
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-14 06:49:04 +08:00
c6a637d9b3
fix: 修复路径执行精度问题
...
- 修改可视化方法显示真实的插值轨迹
- 修复RRT*算法路径终点精度,确保以精确目标结束
- 删除路径执行器的垃圾提前返回逻辑
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-13 17:24:13 +08:00
8fcd1c1d8c
feat: 扩展可达性测试,增加物体位置检查
...
- 修改 test_reachability 方法,增加transport_object初始位置的获取
- 更新 _check_reachability 方法支持三个关键位置测试:物体位置、A点、B点
- 优化状态显示,明确区分三个位置的可达性结果
- 确保完整任务流程的可达性验证(取物→A点→B点)
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-13 16:55:39 +08:00
ed6593a4f3
fix: 修复execute_path方法使用已规划路径而非重新规划
...
- 修改execute_path()方法使其直接使用self.planned_path中的已优化路径
- 通过self.object_index和self.point_a_index正确分段执行三个阶段
- 消除重复规划导致的性能浪费和逻辑不一致问题
- 确保执行的路径与用户看到的可视化路径完全一致
- 保留原有的夹爪控制和碰撞检测逻辑
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-13 16:49:30 +08:00
bf8882bfd9
clean: 移除调试输出,保持代码整洁
...
移除临时调试信息:
- main_window.py: 移除第一阶段坐标对比调试输出
- path_executor.py: 移除waypoint执行过程调试信息
保留核心功能修复:
- RRT*精度改进 (GOAL_TOLERANCE)
- 路径执行仿真步进优化 (10x simulation steps)
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-13 15:59:23 +08:00
63b7cfaca9
fix: 实现三阶段独立路径执行,修复关键技术问题
...
- 修改execute_path()为三次完全独立的规划和执行
- Stage 1: 当前位置→物体位置(独立规划+执行)
- Stage 2: 物体位置→A点(独立规划+执行)
- Stage 3: A点→B点(独立规划+执行)
- 添加IK解算精度验证(1cm容差)
- 修复path_executor.py中注释掉的final_config获取
- 修复path_optimizer.py密集化碰撞处理,改为跳过碰撞点
- 每个阶段完全独立,无任何依赖关系
按照要求:用第一套准确路径规划,删除第二套有误差的,三次毫无关联的独立执行
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-13 12:06:54 +08:00
32bbd5c44c
fix: 修复配置更新后路径规划组件未重新初始化的问题
...
问题描述:
- 修改配置文件后运行路径规划报错"Joint index out-of-range"
- CollisionChecker持有无效的robot_id引用
解决方案:
- 在on_config_applied方法中重新初始化路径规划组件
- 确保路径规划组件使用新的arm_controller实例
影响文件:
- src/gui/main_window.py: 添加_initialize_planning_components()调用
- CLAUDE.md: 更新已知问题文档
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-13 08:22:40 +08:00
a9db87d81d
refactor: 重构配置管理,遵循单一职责原则
...
将单文件使用的配置改为文件内常量定义:
- kinematics.py: 运动学求解参数改为常量
- ai_rrt_star.py: RRT*算法参数改为常量
- path_optimizer.py: 路径优化参数改为常量
- main_window.py: GUI界面参数改为常量
- hole_crossing.py: 洞口穿越参数改为常量
保留跨文件共享的配置在config.json:
- robot, wall, hole, task_points等多模块使用的配置
- path_planning的collision和execution参数
更新CLAUDE.md文档说明新的配置管理原则。
遵循"配置文件用于多文件共享,单文件使用参数定义为文件内常量"原则。
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-12 22:40:11 +08:00
2ad7049386
feat: 实现完整的三段路径规划和可视化
...
主要改进:
- 添加初始位置→物体→A点→B点的完整路径规划
- 实现分段路径可视化(紫色/绿色/蓝色区分不同段)
- 统一使用单一CollisionChecker实例,支持忽略运输物体
- 修复路径优化器类型错误和移除回退方案
- 调整配置参数(物体高度0.7m,安全边界0.01m)
技术细节:
- AIRRTStarPlanner接受外部collision_checker参数
- 路径执行器分段处理,正确控制夹爪动作
- 添加物体、A点、B点的3D标记和文字标签
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-12 17:40:28 +08:00
e617a7c28e
修复:固定底座、无副作用碰撞检测、通用避障与执行收敛等待
2025-09-12 15:21:36 +08:00
caad67a2bb
feat: 添加A/B任务点可视化标记
...
- 在Environment类添加task_marker_ids属性管理标记ID
- 实现create_task_markers()方法创建A点(绿色)和B点(红色)球体标记
- 实现_clear_task_markers()方法清理旧标记
- 在setup_environment()中自动创建标记
- 在cleanup()中清理标记避免重复创建问题
- 标记使用极小碰撞体积(0.005)避免干扰仿真
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-11 19:58:51 +08:00
70cb0019d8
Implement AI-Enhanced RRT* path planning system
...
Complete implementation of path planning modules:
- AI RRT* algorithm with intelligent sampling strategies
- Collision detection wrapper for PyBullet
- Hole crossing strategy with dynamic approach calculation
- Path optimization with simplification
- Path executor for trajectory execution
- GUI integration with planning and execution buttons
System is now feature-complete and ready for testing phase.
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-11 17:53:38 +08:00
0119d9365f
集成KDL运动学引擎到主系统
...
功能更新:
- 实现KDL自动链检测,无需手动配置链接名称
- 创建ArmController统一控制接口,集成KDL与PyBullet
- 更新MainWindow使用ArmController替换独立的RobotLoader
- 修复KDL固定关节类型语法错误
已知问题:
- KDL逆运动学在Windows上崩溃,需要进一步调试
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-11 09:04:42 +08:00
3b5306611a
Implement KDL kinematics engine and complete core framework
...
Major Features Added:
- KDL-based kinematics engine with world/local coordinate transformation
- Complete GUI system with configuration management
- Robot loader with URDF parsing and joint control
- Enhanced environment system with transport object management
- Main application entry point with dependency validation
Technical Improvements:
- World coordinate to robot base coordinate transformation in KDL
- Real-time configuration updates through GUI
- Comprehensive error handling and validation
- Configuration-driven design throughout
- Robot model scaling adjusted to 0.2x for proper visualization
Files Added:
- src/robot/kinematics.py: KDL forward/inverse kinematics with coordinate transforms
- src/gui/: Complete GUI framework with main window and config management
- main.py: Application entry point with environment validation
- models/*.stl: Robot link mesh files for URDF visualization
- tests/: Unit test framework for core components
This commit establishes the complete foundation for robotic arm path planning
and task execution development.
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-10 14:37:27 +08:00