RoboticArmTest/config.json
sladro 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

110 lines
1.6 KiB
JSON

{
"robot": {
"model_path": "models/manual_robot.urdf",
"base_position": [
0.0,
1.6,
0.0
],
"base_orientation": [
0.0,
0.0,
1.5
]
},
"wall": {
"position": [
0.0,
0.0,
0.0
],
"dimensions": {
"width": 3.0,
"height": 2.5,
"thickness": 0.2
},
"material": {
"color": [
0.8,
0.8,
0.8,
1.0
],
"type": "concrete"
}
},
"hole": {
"position_relative_to_wall": [
0.0,
0.0,
0.0
],
"dimensions": {
"width": 2.0,
"height": 2.0
},
"shape": "rectangle"
},
"task_points": {
"point_A": {
"position": [
0.5,
0.5,
0.8
],
"description": "取物点,与机械臂同侧"
},
"point_B": {
"position": [
0.5,
-0.3,
0.8
],
"description": "目标点,墙体另一侧"
}
},
"transport_object": {
"initial_position": [
1.0,
0.5,
0.7
],
"dimensions": {
"width": 0.1,
"height": 0.1,
"depth": 0.1
},
"mass": 0.5,
"shape": "cube",
"material": {
"color": [
1.0,
0.0,
0.0,
1.0
],
"friction": 0.7
}
},
"simulation": {
"timestep": 0.01,
"gravity": [
0.0,
0.0,
0.0
],
"real_time": false
},
"path_planning": {
"collision": {
"check_resolution": 0.05,
"safety_margin": 0.01
},
"execution": {
"velocity_scaling": 1.0,
"position_tolerance": 0.01,
"motor_max_force": 150.0
}
}
}