3ca49bd852
update README.md
2026-06-20 19:49:23 +08:00
74396f48a0
fix(craic_localization): tune AMCL params and propagate lidar args across launch files
...
- Tune AMCL: widen sigma_hit (0.05→0.2), z_hit (0.5→0.9), z_rand, likelihood_max_dist,
laser_max_range (5.0→8.0) for better convergence on 4x4m field
- Propagate lidar_x/y/z/yaw/intensity/sample_rate/baudrate through bringup,
localization, and mapping launch files so overrides reach the driver
- Fix default lidar_z (0.0→0.02) in lidar.launch.py
- Change rviz Fixed Frame odom→map to stop map jumping on AMCL corrections
- Fix broken teach_points command in docs/localization.md; add troubleshooting
entries for AMCL convergence and rf2o drift
- Add ros2/AGENTS.md with ROS workspace build/style guidelines
2026-06-20 14:13:54 +08:00
13f26e2453
Revert "fix(arm): compensate for reversed J1 motor direction"
...
This reverts commit 6a0ff886f3 .
2026-06-19 10:23:39 +08:00
0475e713f8
Revert "fix(arm): also negate motor direction for reversed J1 motor"
...
This reverts commit 3cafa82e16 .
2026-06-19 10:23:39 +08:00
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
3cafa82e16
fix(arm): also negate motor direction for reversed J1 motor
...
Previous +290 fix handled static position mapping but motion direction was still reversed. Correct formula: motor = -height - 290. This handles both: position endpoints (height -290/-0 maps correctly) AND motion direction (increasing height now moves arm up instead of down).
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai >
2026-06-19 10:20:18 +08:00
6a0ff886f3
fix(arm): compensate for reversed J1 motor direction
...
J1 motor rotation is reversed after replacement: code height=0 now maps to physical bottom (was -290). Fix by adding +290 offset in UDP command (to_udp_message and keyboard_control). User-facing coordinate system (-290=bottom, 0=top) is unchanged; FK/IK/state tracking unaffected.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai >
2026-06-19 10:17:58 +08:00
e3d997dafe
refactor(udp_teleop): derive camera stream URL from unified IP parameter
...
Replace hardcoded stream_url with camera_ip parameter in box_detection_grasp. The launch file passes udp_ip as camera_ip, so all ESP32 addresses (UDP control + camera stream) now come from a single udp_ip launch argument.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai >
2026-06-19 10:07:52 +08:00
4d552eca64
fix(arm_control): change reset height to -285mm
...
Reset Z coordinate changed from -120 to -285 in both YAML config and Python code default.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai >
2026-06-19 10:04:30 +08:00
8f5a051de8
chore: unify all ESP32 UDP IP to 192.168.4.1
...
arm_control.yaml, params.yaml, vision_grasp.launch.py, navigate_to_point.py now all default to the ESP32 AP mode address.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai >
2026-06-19 10:02:13 +08:00
83a6242c32
feat(udp_teleop): add vision grasp bringup launch file
...
Bundles arm_control + vision_grasp + optional box_detection_grasp into single ros2 launch.
Launch arguments: detection (enable YOLO), auto_grasp, udp_ip, show_debug.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai >
2026-06-19 09:58:28 +08:00
7ed065e399
fix(craic_localization): increase grid resolution to 1cm for 4x4m field
...
gmapping delta: 0.02 -> 0.01, 5m x 5m map = 500x500 cells
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai >
2026-06-19 07:51:45 +08:00
752f78f0ad
fix(craic_localization): optimize SLAM and AMCL parameters for 4x4m field
...
gmapping: shrink map bounds from 20x20m to 5x5m (xmin/max: -0.5/4.5), increase grid resolution from 5cm to 2cm (delta: 0.02), more particles (50), tighter update thresholds (linear 0.1, angular 0.2)
amcl: raise motion noise 10x (alpha1-2,5: 0.005->0.05, alpha3-4: 0.1) to stop blindly trusting rf2o, clamp laser range to 5m, tighten likelihood window to 1.5m, reduce update thresholds (d: 0.02, a: 0.03), disable random particle injection (recovery_alpha: 0.0)
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai >
2026-06-19 06:45:40 +08:00
8ecbfd759e
feat(craic_localization): add localization, teach-in, and navigation nodes
...
Four ROS2 nodes:
- chassis_odometry: reads chassis MCU serial (32B packet), publishes /odom + TF odom->base_footprint
- teach_points: records map-frame waypoints from AMCL TF, saves to YAML with interactive CLI
- show_points: publishes visualization_msgs/MarkerArray to /taught_points for RViz display of waypoints with ARROW+TEXT markers
- navigate_to_point: holonomic P-controller that reads YAML waypoints and drives Mecanum chassis via UDP XYW commands, with /goto topic interface
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai >
2026-06-19 06:30:37 +08:00
a546aff1a6
feat(craic_localization): add package foundation, configs, and launch files
...
New ROS2 package for wheel odometry + LiDAR localization. Includes: AMCL config (omni model, likelihood_field), gmapping config (5cm grid, 30 particles), YDLiDAR TminiPro config, launch files for lidar bringup, SLAM mapping, AMCL localization, and sensor calibration, plus RViz config with Map/LaserScan/Odometry displays.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai >
2026-06-19 06:30:30 +08:00
46a18f68bf
feat: add RF2O laser odometry package (ported from lzu_robot)
...
Range Flow-based 2D odometry (ICRA 2016). Provides continuous odom->base_footprint TF from /scan without wheel odometry. Refactored: core algorithm in pure C++ class, ROS coupling only in node wrapper.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai >
2026-06-19 06:30:20 +08:00
c12a35a4a2
feat: add YDLIDAR ROS2 driver package (ported from move_try)
...
TminiPro LiDAR driver with multi-model parameter configs (X4, G1, G2, G6, TminiPro, etc.), ROS2 lifecycle management, and RViz debug config.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai >
2026-06-19 06:30:19 +08:00
da97c1068c
chore: tune keyboard control timing and reduce status output
...
Increase update_rate from 0.05 to 0.03 (faster command cycle), adjust stdin_hold_time from 0.04 to 0.08, and rate-limit console status output to every 5th tick to reduce terminal noise.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai >
2026-06-19 06:30:11 +08:00
b9d61cdd70
chore: add ROS2 build convenience script
...
Single-command colcon build helper for the common robostack configuration.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai >
2026-06-19 06:30:10 +08:00
44cf290a6d
docs: add localization system documentation
...
Comprehensive reference for the LiDAR + AMCL + teach-in localization stack. Covers TF tree, architecture, phased implementation plan, configuration, and teach-in/navigation workflow for the CRAIC desktop competition.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai >
2026-06-19 06:30:09 +08:00
87a0e26079
chore: add .omo/ to .gitignore
...
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai >
2026-06-19 06:30:02 +08:00
cf92d21946
feat(jxbeye):当STA模式连接失败后,自动切换到AP模式
2026-06-19 01:08:56 +08:00
181be30d93
chore(vision_grasp): 调整相机 Z 偏移参数 cam_tz 至 30mm
...
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai >
2026-06-16 22:13:03 +08:00
67cf20b1c4
feat(arm_control): 添加启动自动复位功能并修复 UDP 命令调用
...
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai >
2026-06-16 22:12:55 +08:00
85824e9a93
docs: 添加 CLAUDE.md 项目指南
...
为 Claude Code 提供项目概览和常用命令指南
2026-06-16 21:34:38 +08:00
a832dfaeb1
feat: 添加方框检测与自动抓取节点
...
功能:
- 基于 YOLO 实时检测方框
- 自动模式:启动后自动检测并抓取
- 手动模式:通过服务触发检测
- 检测成功后自动停止并发布抓取目标
- 3D 坐标估计(基于方框尺寸和相机 FOV)
节点:box_detection_grasp
- 话题:/vision_grasp/grasp_target (发布)
- 服务:/box_detection/start (启动检测)
- 服务:/box_detection/stop (停止检测)
配置:
- auto_grasp: 自动/手动模式切换
- box_size_m: 方框尺寸(用于深度估计)
- show_debug_window: 调试窗口
使用:
ros2 run udp_teleop box_detection_grasp \
--ros-args --params-file config/box_detection_grasp.yaml \
-p auto_grasp:=true
详细文档:docs/box_detection_grasp.md
2026-06-16 21:28:09 +08:00
aa1bc2bf75
fix(vision_grasp): 修正 tcp_to_base 旋转矩阵 Y 坐标符号
...
问题:
- 相机坐标 (10, -5, 100) → 基坐标 (299.6, 10, 15)
- 期望:(299.6, -10, 15)
- Y 坐标符号相反
根因:
- 旋转矩阵第二行:TCP X → 基坐标 Y
- 应该是:TCP X → 基坐标 -Y
修复:
- 第二行从 [cos(phi), 0, sin(phi)]
- 改为 [-cos(phi), 0, -sin(phi)]
验证(phi=0):
- TCP (10, -5, 100) + TCP位置(199.6, 0, 10)
- = 基坐标 (299.6, -10, 15) ✓
2026-06-16 20:15:56 +08:00
3f4dfe02a7
chore: 移除调试日志
...
相机旋转问题已修复,移除临时 DEBUG 输出
2026-06-16 20:12:42 +08:00
197de7908a
fix: 修正 UP/DOWN 与 J5 角度的对应关系
...
问题:
- 之前错误地将 J5=81 (张开) 标记为 UP
- 实际上 J5=-100 (闭合) 才是 UP(夹爪朝上)
正确对应关系:
- UP: J5=-100 (闭合), z4=-100, 工作范围 z ∈ [-190, 110]mm
- DOWN: J5=81 (张开), z4=55, 工作范围 z ∈ [-345, -55]mm
修复内容:
- 重命名常量:Z4_OPEN/Z4_CLOSED → Z4_UP/Z4_DOWN
- 更新 resolve_z4_from_j5(): J5 < 0 → UP
- 更新 vision_grasp 相机旋转逻辑:J5 < 0 → 正向
- 更新文档说明
现在 UP/DOWN 语义正确且一致!
2026-06-16 20:01:24 +08:00
aa7cd87151
fix: 修复类型错误并添加 up/down 显式控制
...
问题 1:发布状态失败 - 类型错误
- 修复:在发布 TCP 位姿时显式转换为 float
- 修复:在 GetPose 响应中显式转换类型
问题 2:缺少显式 z4 控制
- 添加 up/down 参数到 MovePose 服务
- up: 强制使用 z4=-100(夹爪朝上)
- down: 强制使用 z4=55(夹爪朝下)
- 默认:根据目标 z 坐标自动选择
控制逻辑:
- z4 选择优先级:up/down > 自动选择
- up/down 与 grip/release 完全独立
- up/down 控制夹爪高度(z4)
- grip/release 控制夹爪开合(J6)
与 udp_control.py 行为完全一致!
2026-06-16 19:44:12 +08:00
33f1a31c59
feat(arm_control): 实现动态 z4 自动适配机制
...
问题根源:
- udp_control.py 使用动态 z4(根据目标 z 自动选择)
- arm_control.py 使用固定 z4=80
- 导致相同目标位姿在两个工具中行为不一致
解决方案:
- 添加 resolve_j5_from_z(): 根据目标 z 自动选择 J5
- 添加 resolve_z4_from_j5(): 根据 J5 确定 z4 值
- 更新正/逆运动学接受动态 z4 参数
- 自动适配规则:
* z > -55mm: J5=-100, z4=-100 (闭合, 工作范围 [-190, 110])
* z ≤ -55mm: J5=81, z4=55 (张开, 工作范围 [-345, -55])
现在 arm_control 与 udp_control.py 行为一致!
2026-06-16 19:37:42 +08:00
df436a9a31
fix(vision_grasp): 根据 J5 状态处理相机旋转 180°
...
问题:
- 相机水平安装,但随 J5 状态旋转 180°
- J5 张开(UP):相机正向,图像正常
- J5 闭合(DOWN):相机旋转 180°,图像上下颠倒
解决方案:
- 从 GetPose 获取 J5 状态
- J5 > 0 (UP): (xc, yc, zc) = (x_img, -y_img, z)
- J5 < 0 (DOWN): (xc, yc, zc) = (-x_img, y_img, z)
- 自动处理相机旋转,无需手动调整
更新文档说明相机旋转机制
2026-06-16 19:25:13 +08:00
308f3938c3
chore: 更新 .gitignore 忽略运行时文件
...
- 忽略状态缓存文件(udp_control_state.json)
- 忽略临时压缩包(dataset.zip, ros2.zip)
- 添加项目特定文件分类
2026-06-16 19:09:00 +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
d716ed5e67
docs: 重写机械臂运动学文档
...
- 清晰的章节结构:几何参数、正运动学、逆运动学
- 完整的数学推导(带 LaTeX 公式)
- Python 代码实现示例
- 工作空间分析和奇异点说明
- 运动插值算法
- 实用示例和测试命令
替换了原有的混乱结构,现在更易理解和参考
2026-06-16 19:05:09 +08:00
f00537ebb9
docs: 整理和精简文档结构
...
- 删除冗余文档(6个重复的说明文档)
- 更新 README.md:简洁清晰的项目总览
- 更新 ros2/README.md:完整的 ROS 2 使用指南
- 保留核心技术文档:docs/arm.md(运动学推导)
文档现在更加简洁,避免重复内容
2026-06-16 19:01:42 +08:00
83b32542ef
feat: 添加机械臂 ROS 2 控制节点和视觉抓取系统
...
- 创建 arm_control_msgs 包:定义机械臂控制的消息和服务接口
- 消息:JointState, TCPPose
- 服务:MoveJoints, MovePose, GetPose, SetGripper
- 实现 arm_control 节点:独立的机械臂控制 ROS 节点
- 完整的逆运动学和正运动学
- 关节空间和笛卡尔空间运动控制
- UDP 通信与 ESP32
- 状态发布(10Hz)
- 实现 vision_grasp 节点:自动化视觉抓取
- 相机坐标系到基坐标系的完整变换
- 自动抓取流程:释放→移动→抓取→回收
- 自动释放流程:移动→释放→回收
- 多线程执行器支持
- 添加完整文档
- ARM_CONTROL_README.md: 机械臂控制节点使用指南
- VISION_GRASP_README.md: 视觉抓取节点使用指南
- QUICKSTART.md: 快速开始指南
- 文档重命名:docs/craic.md → docs/arm.md
2026-06-16 18:45:01 +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
bdec5d4827
docs: add CRAIC competition info to README
2026-05-27 02:31:01 +08:00
6469e77633
docs: add ros2 workspace README with multi-method installation
2026-05-27 02:29:06 +08:00
9532264534
docs: add tools README
2026-05-27 02:20:09 +08:00
7f4189bb7a
docs: add project README
2026-05-27 02:18:53 +08:00
6f6577d983
chore: add ros2 udp_teleop package and tools
2026-05-27 02:17:35 +08:00
13fdba5fff
chore: add root .gitignore
2026-05-27 02:16:54 +08:00
ec41ed8a48
WIP: snapshot before repo migration
2026-05-27 02:15:09 +08:00