10 Commits

Author SHA1 Message Date
2bf960fb77 Revert "fix(tools): apply same J1 motor reversal fix to udp_control.py"
This reverts commit 848b4ed51f.
2026-06-19 10:23:39 +08:00
848b4ed51f fix(tools): apply same J1 motor reversal fix to udp_control.py
tools/udp_control.py had its own to_udp_message() that was missed in previous fixes.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-06-19 10:22:52 +08:00
0db694db85 feat(tools): 添加相机坐标变换工具和完善文档
- 新增 camera_to_base.py: 相机坐标系到基坐标系的完整变换
  - 支持相机到 TCP 的变换(平移+旋转)
  - 支持 TCP 到基坐标系的变换
  - 水平安装相机的特化实现

- 更新 tools/README.md: 完整的工具使用指南
  - 所有工具的详细说明
  - 坐标系定义和图示
  - 完整工作流示例
  - 故障排查指南

- 删除 .udp_control_state.json: 不应提交到版本控制
  (运行时生成的状态缓存文件)

- 更新 udp_control.py: 代码优化和注释改进
2026-06-16 19:08:33 +08:00
7144005be2 feat: 将机械臂坐标系改为 z 轴朝上
主要修改:
- 坐标系统: z=0 为顶部改为底部,z 轴朝上
- 高度范围: d1 ∈ [-290, 0] mm (-290=底部, 0=顶部)
- Z4 偏移: 80.0 (原 -80.0), Z4_OPEN=55, Z4_CLOSED=-100
- 运动学: 更新 tcp_to_joint4_center 和 forward_kinematics 的 z 坐标变换
- 夹爪逻辑: 更新 resolve_gripper_from_z 的高度判断范围
- 插值优化: 先完成末端运动,再处理 grip/release
- 移除所有坐标转换中的负号,统一为正向 z 轴朝上系统
2026-06-16 15:45:53 +08:00
87c8b909e9 Add per-joint limits, joint-space interpolation, grip/release, --up/--down
- Add per-joint angle limits (J2=-110..115, J3=-120..145, J4=-90..130)
  with CLI overrides and validation
- Replace Cartesian interpolation with joint-space interpolation in
  pose mode to guarantee intermediate steps stay within joint limits
- Add --up/--down mutually exclusive groups to both joints and pose
  modes; pose mode auto-detects from z when neither is specified
- Add --grip/--release for J6 control (GRIP/RELEASE_ANGLE placeholders)
- Update cached state to match latest run
2026-06-15 22:18:02 +08:00
9c4f48a225 Auto-select gripper state from z coordinate in pose mode
- Add resolve_gripper_from_z(): z>=55 → down (open), z<55 → up (closed),
  overlap range prefers down
- Remove --up flag from pose subparser (fully auto-detected from --z)
- joints mode retains manual --up flag
- Update cached state to match latest run
2026-06-15 21:51:10 +08:00
7accfc617e Refactor arm UDP controller with user-space height coordinates and gripper toggle
- Switch height to user coordinates (0=top, 290=bottom mm), invert sign
  internally for UDP protocol
- Replace raw --j5 arg with --up flag (gripper up/down toggle)
- Add default geometry constants (L1, L2, X4, Z4) and gripper
  open/closed angles
- Update --show-fk and pose mode to derive Z4 from gripper state
- Add mm unit annotations to all CLI help text and output
- Update cached joint state to match new coordinate convention
- Add camera_capture.py: single-shot JPEG grabber from ESP32 MJPEG stream
- Fix missing newline at EOF in craic.md
2026-06-15 21:33:47 +08:00
f343a01372 Add arm UDP controller with IK and interpolation 2026-06-12 19:01:48 +08:00
9532264534 docs: add tools README 2026-05-27 02:20:09 +08:00
6f6577d983 chore: add ros2 udp_teleop package and tools 2026-05-27 02:17:35 +08:00